/* BG-PROFILE-R1.13: high-contrast account type badge; white page canvas retained. */
.profile-page{background:#fff}
.profile-avatar{
  width:3.375rem;
  height:3.375rem;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg,#dceaff,#edf4ff);
  color:#6497e6;
}
.profile-user-copy{min-width:0}
.profile-user-name{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
}
.profile-user-name strong{
  font-weight:500;
}
.profile-user-name span{
  height:1.25rem;
  padding:0 0.4375rem;
  border-radius:62.4375rem;
  display:inline-flex;
  align-items:center;
  background:#eef5ff;
  color:#4c86df;
  font-size:0.5625rem;
  font-weight:800;
}
.profile-user-copy p{
  margin:0.3125rem 0 0;
}
.profile-user-arrow{
  border:0;
  background:transparent;
  padding:0;
}

.profile-wallet-head{
  position:relative;
  z-index:1;
  display:flex;
  align-items:center;
}
.profile-wallet-actions{
  position:relative;
  z-index:1;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:0.5625rem;
  margin-top:1rem;
}
.profile-wallet-actions button{
  height:3rem;
  border:0;
  border-radius:0.8125rem;
  background:rgba(255,255,255,.14);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:0.4375rem;
  font-size:0.75rem;
}
.profile-action-icon{
  width:1.6875rem;
  height:1.6875rem;
  border-radius:0.5625rem;
  display:grid;
  place-items:center;
  background:rgba(255,255,255,.13);
}
.profile-action-icon svg{
  fill:none;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}


/* V1.06.01: unified profile overview card */
.profile-overview{
  position:relative;
  overflow:hidden;
  color:#fff;
  font-weight:500;
}
.profile-overview-user{
  z-index:1;
}
.profile-overview .profile-avatar{
  border-radius:50%;
  display:grid;
  place-items:center;
  color:#fff;
}
.profile-overview .profile-user-name strong{color:#fff}
.profile-overview .profile-user-name span{
  background:rgba(255,255,255,.15);
  color:#fff;
}
.profile-overview .profile-user-copy p{color:rgba(255,255,255,.72)}
.profile-overview .profile-user-arrow{color:rgba(255,255,255,.78)}

.profile-overview-divider{
  position:relative;
  z-index:1;
  height:1px;
  margin:0 0.875rem;
}

.profile-overview-wallet{
  position:relative;
  z-index:1;
  grid-template-columns:minmax(0,1fr) minmax(10.625rem,.95fr);
  align-items:end;
  gap:0.875rem;
}
.profile-wallet-main{min-width:0}
.profile-overview .profile-wallet-head{
  display:flex;
  align-items:center;
  gap:0.4375rem;
  color:rgba(255,255,255,.82);
}
.profile-overview .profile-wallet-actions button{
  border:0;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.07);
}
.profile-overview .profile-action-icon svg{
  width:1rem;
  height:1rem;
}

@media(max-width:520px){
  .profile-overview-wallet{
    grid-template-columns:1fr;
    align-items:stretch;
    gap:0.75rem;
  }
}

.profile-grid{
  background:#fff;
}
.profile-grid button,
.profile-grid a{
  min-width:0;
  border:0;
  background:transparent;
  color:#6f85a5;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-decoration:none;
}
.profile-grid-icon{
  display:grid;
  place-items:center;
}
.profile-grid b{
  font-size:0.8125rem;
  font-weight:500;
}

.profile-menu{
  background:#fff;
  overflow:hidden;
}
.profile-menu>button{
  width:100%;
  border:0;
  border-bottom:1px solid #edf1f6;
  display:grid;
  align-items:center;
  text-align:left;
}
.profile-menu>button:last-child{border-bottom:0}
.profile-menu-icon{
  display:grid;
  place-items:center;
}
.profile-menu-icon svg{
  width:1.25rem;
  height:1.25rem;
  fill:none;
  stroke:currentColor;
  stroke-width:1.65;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.profile-menu-copy b{
  display:block;
  font-weight:600;
}
.profile-menu i{
  color:#a8b6c8;
  font-style:normal;
}


@media(min-width:768px){
  .profile-content{
    grid-template-columns:1fr 1fr;
  }
  .profile-overview{grid-column:1/-1}
  .profile-grid{grid-column:1/-1}
  .profile-menu{grid-column:1}
}


/* BG-PROFILE-R1.03 — user-approved visual. Only .profile-page; games unaffected. */
.profile-page .profile-content{display:flex;flex-direction:column;gap:0;padding:0.4375rem clamp(0.5rem,2.6vw,1.5rem) 1.375rem}
.profile-page .profile-overview{
  border:0;border-radius:1.1875rem;
  background:linear-gradient(127deg,#2c91fa 0%,#367ffc 48%,#626df6 76%,#8651f8 100%);
  box-shadow:0 0.5rem 1.4375rem rgba(47,111,196,.12);isolation:isolate;
}
.profile-page .profile-overview::before{
  content:"";position:absolute;inset:0;width:auto;height:auto;right:0;top:0;border-radius:0;
  background:linear-gradient(132deg,transparent 0 43%,rgba(255,255,255,.08) 43.2% 43.6%,transparent 43.8% 100%),
             linear-gradient(318deg,rgba(62,49,235,.13) 0 30%,transparent 30.1% 100%);
  pointer-events:none;
}
.profile-page .profile-overview::after{
  content:"";position:absolute;inset:0;width:auto;height:auto;right:0;bottom:0;border-radius:0;
  background:repeating-linear-gradient(0deg,transparent 0 0.5rem,rgba(255,255,255,.035) 0.5625rem),linear-gradient(150deg,transparent 0 59%,rgba(25,175,249,.06) 59% 76%,transparent 76%);
  clip-path:polygon(58% 0,100% 0,100% 63%,72% 63%,58% 34%);pointer-events:none;
}
.profile-page .profile-overview-user{min-height:6.25rem;padding:0.875rem 1rem 0.4375rem;display:grid;grid-template-columns:3.75rem minmax(0,1fr) 1.5rem;gap:0.75rem;align-items:center;position:relative}
.profile-page .profile-avatar-group{width:3.75rem;height:4.875rem;position:relative;align-self:start;z-index:2}
.profile-page .profile-overview .profile-avatar{width:3.75rem;height:3.75rem;overflow:hidden;background:#bad8fc;border:0.125rem solid rgba(255,255,255,.62);box-shadow:0 0 0 1px rgba(255,255,255,.16)}
.profile-page .profile-avatar img{display:block;width:100%;height:100%;object-fit:cover}
.profile-page .profile-vip-badge{height:1.1875rem;width:3.76875rem;min-width:0;max-width:none;box-sizing:border-box;position:absolute;bottom:0.5625rem;left:0;z-index:3;transform:scale(.9);transform-origin:left bottom;display:flex;align-items:center;justify-content:flex-end;border:1px solid #c4d7e9;border-radius:0.3125rem;background:linear-gradient(180deg,#e2effa,#9eb9d3);color:#405a78;font-size:0.625rem;letter-spacing:.15px;font-weight:850;white-space:nowrap;padding:0 0.375rem 0 1.4375rem;box-shadow:0 0.125rem 0.1875rem rgba(29,64,99,.23)}
.profile-page .profile-vip-gem{position:absolute;width:1.8125rem;height:1.8125rem;left:-0.3125rem;top:-0.4375rem;overflow:visible}
.profile-page .profile-user-copy{padding-bottom:0}
.profile-page .profile-user-name{gap:0.3125rem}
.profile-page .profile-user-name strong{color:#fff;font-size:1.0625rem;white-space:nowrap}
.profile-page .profile-guest-mark{display:block;flex:none;width:1.6875rem;height:1.4375rem}
.profile-page .profile-user-name #profileAccountType{font-size:0.625rem;font-weight:650;color:#fff;background:#173b73;background-image:linear-gradient(135deg,#173b73,#24569b);height:1.4375rem;padding:0 0.6875rem;box-shadow:inset 0 0 0 1px rgba(255,255,255,.2),0 0.125rem 0.375rem rgba(14,46,108,.16)}
.profile-page .profile-user-copy p{color:rgba(255,255,255,.88);font-size:0.75rem;margin-top:0.5rem}
.profile-page .profile-user-copy p:empty{display:none}
.profile-page .profile-upper-actions{position:absolute;top:0.75rem;inset-inline-end:0.875rem;display:flex;gap:0.5625rem;align-items:center;justify-content:flex-end;z-index:3}
.profile-page .profile-upper-actions button{width:1.8125rem;height:1.8125rem;border:0;padding:0.25rem;background:transparent;color:#fff;display:grid;place-items:center}
.profile-page .profile-upper-actions button[data-profile-action="messages"]{position:relative;overflow:visible}.profile-message-count{position:absolute;top:-0.25rem;right:-0.42rem;z-index:1;min-width:1rem;height:1rem;padding:0 0.22rem;border:1.5px solid rgba(255,255,255,.9);border-radius:999px;background:#ff4058;color:#fff;display:grid;place-items:center;box-sizing:border-box;font-size:0.5625rem;font-weight:600;line-height:1;font-variant-numeric:tabular-nums;pointer-events:none}
.profile-page .profile-upper-actions svg{width:1.1875rem;height:1.1875rem;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.profile-page .profile-user-arrow{position:absolute;top:3.1875rem;inset-inline-end:0.9375rem;width:1.375rem;height:1.625rem;color:#fff;font-size:1.5rem}
.profile-page .profile-overview-divider{background:rgba(255,255,255,.15);margin-inline:1rem}
.profile-page .profile-overview-wallet{display:block;padding:0.625rem 1rem 0.75rem}
.profile-page .profile-wallet-head{font-size:0.8125rem;color:#fff}
.profile-page .profile-overview .profile-wallet-head{font-size:0.8125rem}
/* BG-PROFILE-R1.05: one balance element for member amounts and guest masking. */
.profile-page .profile-wallet-head{min-height:1.6875rem;gap:0.75rem}
.profile-page .profile-wallet-head>span:first-child{flex:none}
.profile-page .profile-wallet-value{font-size:0.9375rem;font-weight:750;letter-spacing:normal;line-height:1;white-space:nowrap;color:#fff;min-width:0;overflow:hidden;text-overflow:ellipsis}
.profile-page .profile-wallet-value.is-masked{letter-spacing:0.15625rem}
.profile-page .profile-vip-progress{display:flex;align-items:center;gap:0.75rem;min-height:1.5625rem;margin-top:0.5rem;position:relative;z-index:1;min-width:0}
.profile-page .profile-vip-progress-level,.profile-page .profile-vip-progress-next{flex:0 0 auto;color:#ffd23d;font-size:1.4375rem;font-weight:850;font-style:italic;line-height:1;text-shadow:0 1px 0.125rem rgba(26,55,159,.13);white-space:nowrap}
.profile-page .profile-vip-progress-track{height:0.375rem;flex:1 1 auto;min-width:0.75rem;border-radius:62.4375rem;background:rgba(228,236,255,.36);box-shadow:inset 0 1px 0.125rem rgba(18,54,174,.12)}
.profile-page .profile-vip-progress-next{font-size:1.3125rem}
.profile-page .profile-overview .profile-wallet-actions{display:grid;grid-template-columns:1fr 1fr;gap:0.625rem;margin-top:0.75rem}
.profile-page .profile-overview .profile-wallet-actions button{height:2.9375rem;border-radius:0.8125rem;background:rgba(255,255,255,.17);font-size:0.8125rem;gap:0.6875rem}
.profile-page .profile-overview .profile-action-icon{width:1.875rem;height:1.875rem;display:grid;place-items:center;border-radius:0;background:transparent}
.profile-page .profile-action-icon svg{display:block;width:1.875rem;height:1.875rem;stroke:none}
.profile-page .profile-wallet-actions b{border-inline-start:1px solid rgba(255,255,255,.65);padding-inline-start:0.6875rem;font-weight:500}
.profile-page .profile-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0.375rem;margin-top:0.75rem;margin-bottom:0.125rem;padding:0.5625rem 0.4375rem 0.625rem;border:0;border-radius:1rem;box-shadow:0 0.3125rem 1rem rgba(46,76,120,.05)}
.profile-page .profile-grid button,.profile-page .profile-grid a{min-height:4.6875rem;gap:0.375rem;padding:0.1875rem 1px}
.profile-page .profile-grid-icon{width:2.375rem;height:2.375rem;border-radius:0.75rem;background:#f0f5ff;color:#1684ff}
.profile-page .profile-grid b{color:#000000}
.profile-page .profile-menu{border:0;border-radius:1.0625rem;box-shadow:0 0.375rem 1.125rem rgba(46,76,120,.05);margin-top:0}
.profile-page .profile-menu>button{min-height:3.625rem;grid-template-columns:2.375rem minmax(0,1fr) 1.25rem;gap:0.6875rem;padding:0.5625rem 0.75rem;background:#fff}
.profile-page .profile-menu-icon{width:2.25rem;height:2.25rem;border-radius:0.6875rem;background:#f0f5ff;color:#1684ff}
.profile-page .profile-menu-copy b{font-size:0.875rem;color:#273d5c}
.profile-page .profile-menu i{font-size:1.3125rem}
.profile-page .profile-signin{display:block;margin:1rem 0.125rem 0;width:calc(100% - 0.25rem);height:2.625rem;border:0;border-radius:1.75rem;background:linear-gradient(100deg,#267df4,#398cfb);color:#fff;font-weight:700;font-size:0.875rem}
.profile-page .profile-session-status{display:block;margin:1rem 0.125rem 0;width:calc(100% - 0.25rem);height:2.625rem;border:1px solid #dae4f2;border-radius:1.75rem;background:#fff;color:#8391a8;font-size:0.8125rem}
.profile-page .profile-user-name strong{min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis}
@media(max-width:359px){
  .profile-page .profile-overview-user{grid-template-columns:3.375rem minmax(0,1fr) 1.375rem;gap:0.5625rem;padding:0.875rem 0.75rem 0.5rem}
  .profile-page .profile-avatar-group{width:3.375rem;height:4.625rem}
  .profile-page .profile-overview .profile-avatar{width:3.375rem;height:3.375rem}
  .profile-page .profile-user-name strong{font-size:0.9375rem}
  .profile-page .profile-upper-actions{right:0.625rem;gap:0.375rem}
  .profile-page .profile-wallet-actions button{gap:0.3125rem}
}
@media(min-width:768px){
  .profile-page .profile-content{padding-inline:1.375rem;display:flex;flex-direction:column;gap:0;align-items:stretch}
  .profile-page .profile-overview-wallet{display:block}
  .profile-page .profile-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}

@media (min-width:1200px){.profile-page .profile-content{padding-inline:1.75rem}}
@media screen and (min-width:768px) and (hover:hover) and (pointer:fine){.profile-page .profile-content{padding-inline:0.875rem}}

/* R1.29.7: same centered 1.5s guest notice as Greedy; inserted only on click, then removed. */
.profile-page .profile-login-notice{
  position:fixed;
  z-index:1000;
  left:50%;
  top:50%;
  transform:translate(-50%,calc(-50% + 0.625rem));
  border-radius:1.875rem;
  padding:0.625rem 1rem;
  max-width:85vw;
  background:#243342e9;
  color:#fff;
  font-size:0.875rem;
  line-height:1.3;
  text-align:center;
  white-space:nowrap;
  opacity:0;
  pointer-events:none;
  transition:opacity .2s,transform .2s;
}
.profile-page .profile-login-notice.show{
  opacity:1;
  transform:translate(-50%,-50%);
}

/* R1.334: approved profile icon artwork; each cell is one fifth by one half of the atlas. */
.profile-page .profile-grid-icon.profile-color-icon,
.profile-page .profile-menu-icon.profile-color-icon{
  background-color:transparent;
  background-image:url("assets/profile-color-icons-r1334.png");
  background-repeat:no-repeat;
  background-size:500% 200%;
  background-position:var(--profile-icon-x) var(--profile-icon-y);
}
.profile-color-bets{--profile-icon-x:0%;--profile-icon-y:0%}
.profile-color-deposit-records{--profile-icon-x:25%;--profile-icon-y:0%}
.profile-color-withdraw-records{--profile-icon-x:50%;--profile-icon-y:0%}
.profile-color-invite{--profile-icon-x:75%;--profile-icon-y:0%}
.profile-color-withdraw-settings{--profile-icon-x:100%;--profile-icon-y:0%}
.profile-color-service{--profile-icon-x:25%;--profile-icon-y:100%}
.profile-color-help{--profile-icon-x:50%;--profile-icon-y:100%}
.profile-color-download{--profile-icon-x:75%;--profile-icon-y:100%}
.profile-color-about{--profile-icon-x:100%;--profile-icon-y:100%}
/* R1.336: distinguish account security from the teal deposit card. */
.profile-page .profile-grid-icon.profile-color-icon.profile-color-account-security{
  background-image:url("assets/profile-account-security-r1336.png");
  background-size:115% 115%;
  background-position:center;
}

html[dir="rtl"] .profile-user-arrow,html[dir="rtl"] .profile-menu > button > i{transform:scaleX(-1)}

html[dir="rtl"] #profileMemberId{direction:ltr;text-align:right}
