/* First account-page pass: a larger, airier profile banner. */
#accountView .account-card {
  position: relative;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: auto auto;
  align-content: space-between;
  min-height: 176px !important;
  padding: 22px 18px 18px !important;
  gap: 20px !important;
  border: 1px solid rgba(163, 199, 237, 0.82) !important;
  border-radius: 24px !important;
  background:
    radial-gradient(circle at 91% 4%, rgba(47, 133, 232, 0.26), transparent 36%),
    linear-gradient(145deg, #e7f3ff 0%, #f9fcff 52%, #eef7ff 100%) !important;
  box-shadow: 0 20px 46px rgba(36, 98, 166, 0.16) !important;
  overflow: hidden !important;
}

#accountView .account-card::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -58px;
  width: 146px;
  height: 146px;
  border: 1px solid rgba(96, 165, 250, 0.12);
  border-radius: 999px;
  pointer-events: none;
}

#accountView .account-card-bg {
  opacity: 1 !important;
  background: linear-gradient(115deg, rgba(41, 124, 220, 0.14), transparent 52%) !important;
}

#accountView .account-user {
  position: relative;
  z-index: 1;
  grid-column: 1 !important;
  display: grid !important;
  grid-template-columns: 98px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 15px !important;
  width: 100%;
  padding-right: 44px;
}

#accountView .account-user .avatar,
#accountView .account-user .avatar-upload {
  width: 98px !important;
  height: 98px !important;
  border: 3px solid rgba(255, 255, 255, 0.96) !important;
  border-radius: 31px !important;
  box-shadow: 0 14px 30px rgba(55, 122, 203, 0.20) !important;
}

#accountView .account-user-main {
  min-width: 0;
  overflow: visible !important;
}

#accountView .account-name-row {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
}

#accountView .account-name-row h2 {
  flex: 0 1 auto !important;
  width: auto !important;
  max-width: calc(100% - 50px) !important;
  font-size: 18px !important;
  font-weight: 400 !important;
  letter-spacing: 0;
}

#accountView .account-name-row .profile-edit-button {
  flex: 0 0 auto !important;
  position: static !important;
  justify-self: start !important;
  width: auto !important;
  min-width: 38px !important;
  height: 23px !important;
  min-height: 23px !important;
  margin: 0 !important;
  padding: 0 8px !important;
  border-radius: 999px !important;
  font-size: 10px !important;
  font-weight: 400 !important;
}

#accountView #accountPhone {
  margin-top: 7px !important;
  color: #7b899b;
  font-size: 12px;
}

#accountView .account-level-summary {
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  margin-top: 7px;
}

#accountView .account-level-summary > strong {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, #3d83ca, #6578d9);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .04em;
}

#accountView .account-level-summary > span {
  min-width: 0;
  overflow: hidden;
  color: #6f7e91;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#accountView .account-invite-code {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  min-height: 29px;
  margin-top: 9px;
  padding: 4px 5px 4px 10px;
  border: 1px solid rgba(74, 131, 199, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

#accountView .account-invite-code > span {
  flex: 0 0 auto;
  color: #7b899b;
  font-size: 10px;
}

#accountView .account-invite-code > strong {
  min-width: 0;
  overflow: hidden;
  color: #2f6fad;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#accountView .account-invite-code > button {
  flex: 0 0 auto;
  width: auto;
  min-width: 42px;
  min-height: 21px;
  padding: 0 9px;
  border: 0;
  border-radius: 999px;
  background: #e7f2ff;
  color: #3478bd;
  font-size: 10px;
  font-weight: 400;
}

#accountView .account-invite-code > button:disabled { opacity: 0.48; }

#accountView .account-recharge-zone {
  position: relative;
  z-index: 1;
  grid-column: 1 !important;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  justify-self: stretch !important;
  align-self: end !important;
  width: 100%;
  min-height: 42px;
  padding-top: 14px;
  border-top: 1px solid rgba(132, 166, 207, 0.16);
}

#accountView .account-recharge-zone #balanceLabel.account-top-balance {
  max-width: none !important;
  color: #2f7edb;
  font-size: 15px !important;
  font-weight: 400 !important;
  text-align: left !important;
}

#accountView .recharge-shortcut {
  justify-self: end !important;
  min-width: 78px;
  min-height: 34px !important;
  margin: 0 !important;
  border-radius: 999px !important;
}

#accountView .account-settings-button {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid rgba(80, 137, 205, 0.16);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.84);
  color: #3979bd;
  box-shadow: 0 8px 20px rgba(36, 98, 166, 0.13);
  backdrop-filter: blur(10px);
}

#accountView .account-settings-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#accountView .account-settings-button:active {
  transform: scale(0.94);
}

html.theme-dark #accountView .account-card {
  border-color: rgba(217, 169, 87, 0.22) !important;
  background:
    radial-gradient(circle at 90% 8%, rgba(217, 169, 87, 0.12), transparent 34%),
    linear-gradient(145deg, #171614 0%, #0e0f10 62%, #14120e 100%) !important;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28) !important;
}

html.theme-dark #accountView .account-card-bg {
  background: linear-gradient(115deg, rgba(217, 169, 87, 0.08), transparent 48%) !important;
}

html.theme-dark #accountView .account-recharge-zone {
  border-top-color: rgba(217, 169, 87, 0.14);
}

html.theme-dark #accountView .account-invite-code {
  border-color: rgba(217, 169, 87, 0.18);
  background: rgba(255, 255, 255, 0.045);
  box-shadow: none;
}

html.theme-dark #accountView .account-level-summary > strong { background: linear-gradient(135deg, #85642c, #b08a48); }
html.theme-dark #accountView .account-level-summary > span { color: #a39a8b; }

html.theme-dark #accountView .account-invite-code > span { color: #938d82; }
html.theme-dark #accountView .account-invite-code > strong { color: #e6c47c; }
html.theme-dark #accountView .account-invite-code > button { background: rgba(217, 169, 87, 0.13); color: #e6c47c; }

html.theme-dark #accountView .account-recharge-zone #balanceLabel.account-top-balance {
  color: #e6c47c !important;
}

html.theme-dark #accountView .account-settings-button {
  border-color: rgba(217, 169, 87, 0.24);
  background: rgba(255, 255, 255, 0.04);
  color: #d9bc7c;
  box-shadow: none;
}

@media (max-width: 360px) {
  #accountView .account-card {
    min-height: 168px !important;
    padding: 19px 15px 16px !important;
  }

  #accountView .account-user {
    grid-template-columns: 88px minmax(0, 1fr) !important;
    gap: 12px !important;
  }

  #accountView .account-user .avatar,
  #accountView .account-user .avatar-upload {
    width: 88px !important;
    height: 88px !important;
    border-radius: 28px !important;
  }
}

/* account light premium hierarchy v8 */
#accountView {
  position: relative;
  min-height: calc(100dvh - 132px);
  margin: -12px -14px calc(-108px - env(safe-area-inset-bottom, 0px));
  padding: 18px 14px calc(120px + env(safe-area-inset-bottom, 0px));
  background:
    radial-gradient(circle at 14% -8%, rgba(93, 131, 232, 0.22), transparent 34%),
    radial-gradient(circle at 94% 10%, rgba(62, 158, 224, 0.20), transparent 30%),
    linear-gradient(180deg, #dfeaff 0%, #edf5ff 34%, #f7fbff 78%, #fbfdff 100%);
}

#accountView::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.30) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255,255,255,0.24) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.18;
  mask-image: linear-gradient(180deg, #000, transparent 58%);
}

#accountView > * {
  position: relative;
  z-index: 1;
}

#accountView .account-card {
  min-height: 194px !important;
  padding: 23px 18px 18px !important;
  border: 1px solid rgba(255, 255, 255, 0.78) !important;
  border-radius: 26px !important;
  background:
    radial-gradient(circle at 82% 7%, rgba(118, 168, 255, 0.34), transparent 31%),
    radial-gradient(circle at 4% 100%, rgba(80, 186, 238, 0.16), transparent 36%),
    linear-gradient(145deg, rgba(255,255,255,0.92) 0%, rgba(238,247,255,0.88) 45%, rgba(224,238,255,0.90) 100%) !important;
  box-shadow:
    0 24px 58px rgba(44, 92, 158, 0.20),
    0 8px 18px rgba(86, 137, 202, 0.10),
    inset 0 1px 0 rgba(255,255,255,0.92) !important;
  backdrop-filter: blur(18px);
}

#accountView .account-card::after {
  right: -46px;
  bottom: -70px;
  width: 178px;
  height: 178px;
  border-color: rgba(83, 137, 210, 0.10);
  background: radial-gradient(circle, rgba(255,255,255,0.40), rgba(95, 153, 231, 0.08) 60%, transparent 70%);
}

#accountView .account-card-bg {
  background:
    linear-gradient(118deg, rgba(63, 111, 202, 0.12), transparent 52%),
    linear-gradient(0deg, rgba(255,255,255,0.16), transparent) !important;
}

#accountView .account-user .avatar,
#accountView .account-user .avatar-upload {
  border: 3px solid rgba(255,255,255,0.98) !important;
  box-shadow:
    0 16px 34px rgba(54, 106, 178, 0.22),
    inset 0 1px 0 rgba(255,255,255,0.82) !important;
}

#accountView .account-name-row h2 {
  color: #102846 !important;
  font-size: 21px !important;
  font-weight: 760 !important;
  letter-spacing: -0.02em;
}

#accountView .account-name-row .profile-edit-button {
  border: 1px solid rgba(63, 115, 190, 0.14) !important;
  background: rgba(255,255,255,0.62) !important;
  color: rgba(48, 90, 145, 0.70) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.76);
}

#accountView #accountPhone {
  color: rgba(48, 71, 103, 0.52) !important;
  font-size: 11px !important;
}

#accountView .account-level-summary > strong {
  padding: 4px 9px;
  background: linear-gradient(135deg, #d8a84a, #f2d68a 52%, #b88424) !important;
  color: #fff7df !important;
  box-shadow: 0 7px 14px rgba(168, 114, 32, 0.22), inset 0 1px 0 rgba(255,255,255,0.36);
  text-shadow: 0 1px 1px rgba(96, 61, 12, 0.22);
}

#accountView .account-level-summary > span {
  color: rgba(39, 67, 106, 0.62) !important;
}

#accountView .account-invite-code {
  border-color: rgba(85, 129, 193, 0.13) !important;
  background: rgba(255,255,255,0.60) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.78), 0 8px 18px rgba(60, 110, 170, 0.08) !important;
}

#accountView .account-recharge-zone {
  min-height: 74px;
  padding: 14px 2px 0;
  border-top-color: rgba(90, 132, 190, 0.13) !important;
}

#accountView .account-recharge-zone #balanceLabel.account-top-balance {
  display: grid;
  grid-template-columns: auto auto;
  align-items: end;
  justify-content: start;
  gap: 0 7px;
  color: #0d2142 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em;
  text-shadow: 0 8px 18px rgba(20, 95, 192, 0.16);
}

#accountView .account-recharge-zone #balanceLabel.account-top-balance span {
  grid-column: 1 / -1;
  margin-bottom: 7px;
  color: #6f8096;
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0;
  text-shadow: none;
}

#accountView .account-recharge-zone #balanceLabel.account-top-balance b {
  color: #0d2142;
  font-size: 38px;
  line-height: 0.92;
  font-weight: 900;
  letter-spacing: -0.055em;
}

#accountView .account-recharge-zone #balanceLabel.account-top-balance em {
  padding-bottom: 3px;
  color: #6e7c91;
  font-size: 17px;
  font-style: normal;
  font-weight: 800;
}

#accountView .recharge-shortcut {
  min-width: 100px !important;
  min-height: 48px !important;
  padding: 0 19px !important;
  border: 0 !important;
  font-size: 16px !important;
  font-weight: 850 !important;
  background: linear-gradient(135deg, #2f79ee, #4e6ef0) !important;
  color: #fff !important;
  box-shadow: 0 14px 28px rgba(54, 103, 226, 0.30), inset 0 1px 0 rgba(255,255,255,0.32) !important;
}

#accountView .account-settings-button {
  border-color: rgba(255,255,255,0.68) !important;
  background: rgba(255,255,255,0.54) !important;
  color: #315f9f !important;
  box-shadow: 0 10px 24px rgba(50, 96, 155, 0.13), inset 0 1px 0 rgba(255,255,255,0.82) !important;
}

html.theme-dark #accountView {
  margin: 0;
  padding: 0;
}

/* account compact light layout v10 */
#accountView {
  padding-top: 12px;
}

#accountView .account-card {
  min-height: 164px !important;
  padding: 17px 15px 14px !important;
  border-radius: 24px !important;
}

#accountView .account-user {
  grid-template-columns: 82px minmax(0, 1fr) !important;
  gap: 12px !important;
}

#accountView .account-user .avatar,
#accountView .account-user .avatar-upload {
  width: 82px !important;
  height: 82px !important;
  border-radius: 25px !important;
}

#accountView .account-name-row h2 {
  font-size: 18px !important;
  font-weight: 520 !important;
}

#accountView .account-name-row .profile-edit-button {
  min-width: 34px !important;
  height: 21px !important;
  min-height: 21px !important;
  padding: 0 7px !important;
  font-size: 9px !important;
  font-weight: 400 !important;
}

#accountView #accountPhone {
  margin-top: 5px !important;
  font-size: 10px !important;
}

#accountView .account-level-summary {
  margin-top: 5px;
}

#accountView .account-level-summary > strong {
  padding: 3px 7px;
  font-size: 9px;
  font-weight: 520;
}

#accountView .account-level-summary > span {
  font-size: 9px;
}

#accountView .account-invite-code {
  min-height: 25px;
  margin-top: 7px;
  padding: 3px 5px 3px 8px;
}

#accountView .account-invite-code > span,
#accountView .account-invite-code > button {
  font-size: 9px;
  font-weight: 400;
}

#accountView .account-invite-code > strong {
  font-size: 10px;
  font-weight: 420;
}

#accountView .account-recharge-zone {
  min-height: 58px;
  padding-top: 10px;
}

#accountView .account-recharge-zone #balanceLabel.account-top-balance span {
  margin-bottom: 4px;
  font-size: 10px;
  font-weight: 520;
}

#accountView .account-recharge-zone #balanceLabel.account-top-balance b {
  font-size: 21px;
  font-weight: 520;
  letter-spacing: -0.025em;
}

#accountView .account-recharge-zone #balanceLabel.account-top-balance em {
  padding-bottom: 1px;
  font-size: 11px;
  font-weight: 440;
}

#accountView .recharge-shortcut {
  min-width: 82px !important;
  min-height: 38px !important;
  padding: 0 14px !important;
  font-size: 13px !important;
  font-weight: 520 !important;
}

#accountView .account-settings-button {
  top: 13px;
  right: 13px;
  width: 31px;
  height: 31px;
  min-width: 31px;
  min-height: 31px;
}

/* account regular typography v13 */
#accountView .account-card :is(h2, strong, b, em, button, span) {
  font-weight: 400 !important;
}

#accountView .account-name-row h2,
#accountView .account-recharge-zone #balanceLabel.account-top-balance b {
  color: #243a57 !important;
  font-weight: 430 !important;
}

#accountView .account-recharge-zone #balanceLabel.account-top-balance span,
#accountView .account-recharge-zone #balanceLabel.account-top-balance em,
#accountView #accountPhone,
#accountView .account-level-summary > span {
  color: #6d7d91 !important;
  font-weight: 400 !important;
}
