/* RG Personal Profile v2 admin preview; no changes to native UsersWP outside preview. */
body.rg-personal-profile-v2-preview .rgp2-preview{width:100%;max-width:100%;font:inherit;color:#302338}
body.rg-personal-profile-v2-preview .rgp2-preview-note{display:flex;align-items:center;flex-wrap:wrap;gap:8px 18px;padding:12px 18px;margin:0 0 18px;border:1px dashed #be8dd0;border-radius:12px;background:#fbf5fd;font-size:13px;line-height:1.5}
body.rg-personal-profile-v2-preview .rgp2-preview-note strong{color:#7a388d}
body.rg-personal-profile-v2-preview .rgp2-preview-note span{color:#76617e}
body.rg-personal-profile-v2-preview .rgp2-preview-note a{margin-left:auto;color:#803e98;text-decoration:underline;text-underline-offset:2px}
body.rg-personal-profile-v2-preview .rgp2-hero{border:1px solid #ecdeed;border-radius:22px;overflow:visible;background:linear-gradient(120deg,#fff,#fdf9fd 65%,#faf1fb);box-shadow:0 9px 28px rgba(53,26,74,.055);margin-bottom:18px}
body.rg-personal-profile-v2-preview .rgp2-hero__cover{position:relative;height:clamp(125px,17vw,200px);border-radius:21px 21px 0 0;overflow:hidden;background:linear-gradient(125deg,#755088,#ad80b6 60%,#e7bfe9)}
body.rg-personal-profile-v2-preview .rgp2-hero__cover-image{display:block;width:100%;height:100%;object-fit:cover;object-position:center}
body.rg-personal-profile-v2-preview .rgp2-hero__info{display:flex;gap:24px;align-items:center;min-height:120px;padding:0 clamp(20px,3vw,32px) 24px}
body.rg-personal-profile-v2-preview .rgp2-avatar-stack{position:relative;display:block;width:clamp(94px,10vw,116px);height:clamp(94px,10vw,116px);flex:0 0 auto;margin-top:-38px;isolation:isolate}
body.rg-personal-profile-v2-preview .rgp2-avatar-stack__base,
body.rg-personal-profile-v2-preview .rgp2-avatar-stack__letter{position:relative;z-index:1;display:grid;place-items:center;box-sizing:border-box;width:100%;height:100%;border-radius:50%;border:4px solid white;box-shadow:0 5px 14px rgba(50,23,62,.17);background:#eee3f2;object-fit:cover}
body.rg-personal-profile-v2-preview .rgp2-avatar-stack__letter{font-weight:800;font-size:clamp(38px,4.7vw,55px);color:#843c95;background:linear-gradient(145deg,#f9e8ff,#dfc4f1)}
body.rg-personal-profile-v2-preview .rgp2-avatar-stack__frame{position:absolute;z-index:2;pointer-events:none;width:148%;height:148%;max-width:none;left:50%;top:50%;transform:translate(-50%,-50%);object-fit:contain}
body.rg-personal-profile-v2-preview .rgp2-avatar-stack__css-frame{position:absolute;z-index:2;pointer-events:none;inset:-5px;border:4px solid #cd93e2;border-radius:50%;box-shadow:0 0 12px rgba(150,76,187,.4);outline:2px solid #fff7ff}
body.rg-personal-profile-v2-preview .rgp2-hero__identity{min-width:0;flex:1;padding-top:12px}
body.rg-personal-profile-v2-preview .rgp2-hero__heading{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
body.rg-personal-profile-v2-preview .rgp2-hero__name{font-size:clamp(24px,2.9vw,32px);font-weight:800;line-height:1.2;color:#291f31;overflow-wrap:anywhere;margin:0}
body.rg-personal-profile-v2-preview .rgp2-hero__edit{display:inline-flex;align-items:center;min-height:32px;padding:5px 10px;border:1px solid #e8d1f0;border-radius:30px;background:#f7ebfa;color:#9140a3;font-size:12px;font-weight:700;text-decoration:none}
body.rg-personal-profile-v2-preview .rgp2-hero__metadata{display:flex;flex-wrap:wrap;align-items:center;gap:9px;margin-top:12px;color:#866c8d;font-size:13px;line-height:1.4}
body.rg-personal-profile-v2-preview .rgp2-hero__alias,
body.rg-personal-profile-v2-preview .rgp2-hero__points{border-radius:20px;background:#f6ebfa;padding:5px 11px;color:#8c3fa4;border:1px solid #ead5f1}
body.rg-personal-profile-v2-preview .rgp2-hero__joined{padding:5px 0}
body.rg-personal-profile-v2-preview .rgp2-preview__native-tabs{width:100%}
@media(max-width:767px){
  body.rg-personal-profile-v2-preview .rgp2-preview-note{align-items:flex-start;flex-direction:column}
  body.rg-personal-profile-v2-preview .rgp2-preview-note a{margin-left:0}
  body.rg-personal-profile-v2-preview .rgp2-hero{border-radius:18px}
  body.rg-personal-profile-v2-preview .rgp2-hero__cover{height:128px;border-radius:17px 17px 0 0}
  body.rg-personal-profile-v2-preview .rgp2-hero__info{flex-direction:column;align-items:center;text-align:center;gap:8px;padding:0 16px 24px}
  body.rg-personal-profile-v2-preview .rgp2-avatar-stack{margin-top:-39px}
  body.rg-personal-profile-v2-preview .rgp2-hero__identity{padding-top:0}
  body.rg-personal-profile-v2-preview .rgp2-hero__heading,
  body.rg-personal-profile-v2-preview .rgp2-hero__metadata{justify-content:center}
  body.rg-personal-profile-v2-preview .rgp2-hero__name{font-size:25px}
}
@media(prefers-reduced-motion:reduce){
  body.rg-personal-profile-v2-preview .rgp2-preview *{transition:none!important;animation:none!important}
}

/* Profile v2.1 preview: branded cover instead of UsersWP uploaded banner.
   It is a shared CSS default, not a per-user Economy entitlement. */
body.rg-personal-profile-v2-preview .rgp2-hero__cover--default{
  isolation:isolate;
  background:linear-gradient(107deg,#73508a 0%,#a778b6 46%,#d7a9d9 80%,#f0cfe9 100%)
}
body.rg-personal-profile-v2-preview .rgp2-hero__cover--default::before{
  content:"";position:absolute;inset:0;
  background:linear-gradient(135deg,rgba(255,255,255,.05),rgba(99,44,134,.13));
  clip-path:polygon(0 100%,23% 100%,36% 57%,42% 86%,55% 17%,74% 100%,100% 100%);
  opacity:.76;
}
body.rg-personal-profile-v2-preview .rgp2-hero__cover--default::after{
  content:"";position:absolute;width:70px;height:70px;border-radius:50%;
  top:-25px;left:35%;background:rgba(96,45,121,.15);
  box-shadow:330px 90px 0 40px rgba(145,79,161,.055);
}
/* Native UsersWP continues to enforce visibility and build tab content.
   Only the nav presentation is owned by RG Personal in preview. */
body.rg-personal-profile-v2-preview .rgp2-tabs{min-width:0}
body.rg-personal-profile-v2-preview .rgp2-tabs__nav{
  display:flex;align-items:center;gap:7px;min-width:0;overflow-x:auto;
  overflow-y:hidden;scrollbar-width:thin;overscroll-behavior-x:contain;
  -webkit-overflow-scrolling:touch;padding:8px;
  background:#fff;border:1px solid #edddef;border-radius:17px;
  box-shadow:0 6px 18px rgba(55,28,74,.045);margin:0 0 17px
}
body.rg-personal-profile-v2-preview .rgp2-tabs__link{
  box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;
  flex:0 0 auto;white-space:nowrap;min-height:42px;
  padding:9px 14px;border-radius:10px;border:1px solid transparent;
  font-size:14px;font-weight:700;line-height:1.3;text-decoration:none;
  color:#765778;background:transparent;
}
body.rg-personal-profile-v2-preview .rgp2-tabs__link:hover{
  text-decoration:none;background:#fbf3fd;color:#8c3fa4
}
body.rg-personal-profile-v2-preview .rgp2-tabs__link.is-active,
body.rg-personal-profile-v2-preview .rgp2-tabs__link[aria-current=page]{
  background:#f7ebfb;border-color:#e9d2ed;color:#9342a5
}
body.rg-personal-profile-v2-preview .rgp2-tabs__link:focus-visible{
  outline:2px solid #9342a5;outline-offset:2px
}
body.rg-personal-profile-v2-preview .rgp2-tabs__content{
  padding:clamp(16px,2vw,26px);background:linear-gradient(130deg,#fff,#fdf9fd);
  border:1px solid #eddfed;border-radius:20px;min-height:80px;
  overflow-wrap:anywhere;font-size:14px;line-height:1.6;
}
body.rg-personal-profile-v2-preview .rgp2-tabs__content :is(p,li){font-size:14px;line-height:1.6}
body.rg-personal-profile-v2-preview .rgp2-tabs__content .rg-personal-inventory h2{
  font-size:21px;margin:0 0 14px;
}
@media(max-width:767px){
 body.rg-personal-profile-v2-preview .rgp2-tabs__nav{padding:6px;gap:3px;border-radius:14px}
 body.rg-personal-profile-v2-preview .rgp2-tabs__link{font-size:13px;min-height:42px;padding:9px 11px}
 body.rg-personal-profile-v2-preview .rgp2-tabs__content{padding:16px;border-radius:16px}
 body.rg-personal-profile-v2-preview .rgp2-hero__cover--default::after{left:26%}
}

/* RG Personal 0.9.25: GamiPress points thumbnail. */
body.rg-personal-profile-v2-preview .rgp2-hero__points{display:inline-flex;align-items:center;gap:5px}
body.rg-personal-profile-v2-preview .rgp2-points-icon{display:inline-flex;align-items:center;justify-content:center;flex:none;width:16px;height:16px;line-height:1}
body.rg-personal-profile-v2-preview .rgp2-points-icon img{display:block;width:16px!important;height:16px!important;max-width:16px;max-height:16px;object-fit:contain}
body.rg-personal-profile-v2-preview .rgp2-points-icon__fallback{font-size:15px;color:#a452bc}

/* 0.9.28 — avatar/frame alignment: stable centred ring, tunable without touching item data. */
body.rg-personal-profile-v2-preview .rgp2-avatar-stack {--rgp2-frame-scale:1.44}
body.rg-personal-profile-v2-preview .rgp2-avatar-stack__frame {
  width:calc(100% * var(--rgp2-frame-scale));
  height:calc(100% * var(--rgp2-frame-scale));
  aspect-ratio:1;object-position:center;display:block;
}

/* 0.9.29–0.9.30 — universal ring fit, no ACF per-frame offsets.
   A white border is useful by itself, but creates a second circle under a frame.
   :has() updates instantly when owner-state swaps the dynamic overlay. */
body.rg-personal-profile-v2-preview .rgp2-avatar-stack {
  --rgp2-frame-scale:1.30;
}
body.rg-personal-profile-v2-preview .rgp2-avatar-stack:has(> :is(.rgp2-avatar-stack__frame,.rgp2-avatar-stack__css-frame))
:is(.rgp2-avatar-stack__base,.rgp2-avatar-stack__letter) {
  border-width:0;
}
/* Without an equipped frame retain the original 4px white edge from base styles. */

/* RG Personal 0.10.6: public rank next to the UsersWP display name. */
body.rg-personal-profile-v2-preview .rgp-public-rank{
  display:inline-flex;align-items:center;gap:6px;max-width:100%;box-sizing:border-box;
  padding:6px 11px;border:1px solid #e6ccef;border-radius:999px;
  background:#f8effa;color:#8c489c;font-size:12px;font-weight:700;
  line-height:1.25;white-space:normal;overflow-wrap:anywhere;
}
body.rg-personal-profile-v2-preview .rgp-public-rank__symbol{
  display:inline-block;flex:0 0 auto;line-height:1;color:#ad78c5;font-size:17px;
}
body.rg-personal-profile-v2-preview .rgp-public-rank__name{min-width:0}
@media(max-width:767px){
  body.rg-personal-profile-v2-preview .rgp-public-rank{font-size:12px;padding:5px 10px}
}
