/* 全站固定个人浮卡：空闲为右下角胶囊，悬停展开为圆角信息卡。 */
/* 手机端把聊天球并入个人悬浮球，这两个角标默认只在手机媒体查询内显示。 */
html body[data-app-view] #account-profile-shortcut,
html body[data-app-view] #account-chat-badge { display: none; }

html body[data-app-view] #account-home-button {
  position: fixed;
  z-index: 90;
  top: auto;
  right: 24px;
  bottom: 22px;
  left: auto;
  display: grid;
  width: 500px;
  max-width: calc(100vw - 32px);
  min-width: 0;
  height: 76px;
  min-height: 0;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  border: 1px solid rgba(103, 255, 155, 0.34);
  border-radius: 999px;
  padding: 8px 16px 8px 8px;
  background: linear-gradient(135deg, rgba(10, 18, 25, 0.96), rgba(5, 10, 17, 0.98));
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5), 0 0 22px rgba(103, 255, 155, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  color: #fff;
  text-align: left;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: width 0.22s ease, height 0.22s ease, border-radius 0.22s ease, padding 0.22s ease, box-shadow 0.22s ease;
}

html body[data-app-view="square"] #account-home-button { display: grid !important; }

html body[data-app-view] #account-home-button:hover,
html body[data-app-view] #account-home-button:focus-visible,
html body[data-app-view] #account-home-button.is-active {
  width: 566px;
  height: 184px;
  min-height: 0;
  border-radius: 26px;
  padding: 14px 16px 14px 12px;
  border-color: rgba(103, 255, 155, 0.58);
  background: linear-gradient(135deg, rgba(14, 26, 32, 0.98), rgba(5, 10, 17, 0.99));
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.58), 0 0 30px rgba(103, 255, 155, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

html body[data-app-view] #account-home-button .profile-trigger-visual { display: contents; }

html body[data-app-view] #account-home-button #account-avatar {
  position: relative;
  order: 1;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  overflow: hidden;
  border: 2px solid rgba(137, 255, 175, 0.62);
  border-radius: 16px;
  background: #0b1711 url("/lobby-cat-avatar.svg") center / cover no-repeat;
  box-shadow: 0 0 16px rgba(103, 255, 155, 0.16);
  color: transparent;
  font-size: 0;
  cursor: pointer;
  transition: width 0.22s ease, height 0.22s ease, border-radius 0.22s ease;
}

html body[data-app-view] #account-home-button #account-avatar::after {
  position: absolute;
  right: 2px;
  bottom: 2px;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 2px solid #06110b;
  border-radius: 50%;
  background: linear-gradient(145deg, #9dffbc, #56e987);
  box-shadow: 0 3px 10px rgba(0, 0, 0, .42), 0 0 12px rgba(103, 255, 155, .34);
  color: #04130a;
  content: "聊";
  font-size: 12.5px;
  font-weight: 1000;
  line-height: 1;
  transition: transform .18s ease;
}

html body[data-app-view] #account-home-button #account-avatar:hover::after,
html body[data-app-view] #account-home-button:focus-visible #account-avatar::after { transform: scale(1.12); }

html body[data-app-view] #account-home-button #account-avatar img { width: 100%; height: 100%; object-fit: cover; }

html body[data-app-view] #account-home-button .account-level-ring {
  display: none;
  position: relative;
  order: 3;
  width: 58px;
  height: 58px;
  place-content: center;
  justify-items: center;
  border-radius: 50%;
  background-color: #08120f;
  background-image: conic-gradient(#6bff9e var(--level-progress, 20%), rgba(255, 255, 255, 0.12) 0);
  box-shadow: 0 0 18px rgba(103, 255, 155, 0.14);
}

html body[data-app-view] #account-home-button .account-level-ring::before {
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: #08120f;
  content: "";
}

html body[data-app-view] #account-home-button .account-level-ring b,
html body[data-app-view] #account-home-button .account-level-ring small {
  position: relative;
  z-index: 1;
  display: block;
  line-height: 1;
}

html body[data-app-view] #account-home-button .account-level-ring b {
  color: #f7fff9;
  font-size: 15px;
  font-weight: 900;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

html body[data-app-view] #account-home-button .account-level-ring small {
  margin-top: 2px;
  color: rgba(234, 255, 242, 0.8);
  font-size: 12.5px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.72);
}

html body[data-app-view] #account-home-button .profile-trigger-copy {
  order: 2;
  align-self: center;
  gap: 2px;
  min-width: 0;
}

html body[data-app-view] #account-home-button .profile-trigger-kicker,
html body[data-app-view] #account-home-button .profile-trigger-id,
html body[data-app-view] #account-home-button .profile-trigger-meta,
html body[data-app-view] #account-home-button .profile-card-shortcuts,
html body[data-app-view] #account-home-button .profile-trigger-arrow { display: none; }

html body[data-app-view] #account-home-button #account-name {
  max-width: none;
  overflow: hidden;
  color: #f9fcff;
  font-size: 18.5px;
  font-weight: 900;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: font-size 0.22s ease;
}

html body[data-app-view] #account-home-button .profile-trigger-balance-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

html body[data-app-view] #account-home-button .profile-trigger-balance {
  overflow: hidden;
  color: #8dffb1;
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html body[data-app-view] #account-home-button .profile-trigger-recharge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 3px 12px;
  border: 1px solid rgba(103, 255, 155, 0.5);
  border-radius: 999px;
  background: rgba(103, 255, 155, 0.1);
  color: #baffcf;
  font-size: 12.5px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

html body[data-app-view] #account-home-button .profile-trigger-recharge:hover {
  background: rgba(103, 255, 155, 0.2);
  color: #fff;
}

html body[data-app-view] #account-home-button:hover .profile-trigger-kicker,
html body[data-app-view] #account-home-button:focus-visible .profile-trigger-kicker,
html body[data-app-view] #account-home-button.is-active .profile-trigger-kicker {
  display: block;
  color: #70ffa3;
  font-size: 12.5px;
  letter-spacing: 0.18em;
}

html body[data-app-view] #account-home-button:hover .profile-trigger-id,
html body[data-app-view] #account-home-button:focus-visible .profile-trigger-id,
html body[data-app-view] #account-home-button.is-active .profile-trigger-id {
  display: block;
  overflow: hidden;
  color: rgba(226, 236, 248, 0.55);
  font-size: 12.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html body[data-app-view] #account-home-button:hover .profile-trigger-meta,
html body[data-app-view] #account-home-button:focus-visible .profile-trigger-meta,
html body[data-app-view] #account-home-button.is-active .profile-trigger-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  color: rgba(226, 236, 248, 0.48);
  font-size: 12.5px;
}

html body[data-app-view] #account-home-button:hover .profile-trigger-meta #account-role,
html body[data-app-view] #account-home-button:focus-visible .profile-trigger-meta #account-role,
html body[data-app-view] #account-home-button.is-active .profile-trigger-meta #account-role {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html body[data-app-view] #account-home-button:hover .profile-trigger-meta .account-credit,
html body[data-app-view] #account-home-button:focus-visible .profile-trigger-meta .account-credit,
html body[data-app-view] #account-home-button.is-active .profile-trigger-meta .account-credit {
  border: 1px solid rgba(103, 255, 155, 0.16);
  padding: 2px 5px;
  background: rgba(103, 255, 155, 0.08);
  color: rgba(202, 255, 218, 0.72);
  font-size: 12.5px;
}

html body[data-app-view] #account-home-button:hover .profile-card-shortcuts,
html body[data-app-view] #account-home-button:focus-visible .profile-card-shortcuts,
html body[data-app-view] #account-home-button.is-active .profile-card-shortcuts {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

html body[data-app-view] #account-home-button .profile-card-shortcuts i {
  display: inline-flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 32px;
  padding: 6px 14px;
  border: 1px solid rgba(118, 204, 255, 0.38);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(36, 74, 133, 0.55), rgba(17, 39, 79, 0.7));
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
  color: #bfe8ff;
  font-size: 14px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

html body[data-app-view] #account-home-button:hover .account-level-ring,
html body[data-app-view] #account-home-button:focus-visible .account-level-ring,
html body[data-app-view] #account-home-button.is-active .account-level-ring { display: grid; }

html body[data-app-view] #account-home-button:hover #account-avatar,
html body[data-app-view] #account-home-button:focus-visible #account-avatar,
html body[data-app-view] #account-home-button.is-active #account-avatar {
  width: 68px;
  height: 68px;
  border-radius: 20px;
}

html body[data-app-view] #account-home-button:hover #account-name,
html body[data-app-view] #account-home-button:focus-visible #account-name,
html body[data-app-view] #account-home-button.is-active #account-name {
  font-size: 24px;
  line-height: 1.15;
}

html body[data-app-view] #account-home-button:hover .profile-trigger-balance,
html body[data-app-view] #account-home-button:focus-visible .profile-trigger-balance,
html body[data-app-view] #account-home-button.is-active .profile-trigger-balance { font-size: 15px; }

@media (max-width: 520px) {
  html body[data-app-view] #account-home-button {
    right: 12px;
    bottom: 12px;
    width: 260px;
    height: 68px;
    gap: 8px;
    padding: 6px 13px 6px 6px;
  }
  html body[data-app-view] #account-home-button #account-avatar {
    width: 54px;
    height: 54px;
    border-radius: 15px;
  }
  html body[data-app-view] #account-home-button #account-name { font-size: 17.5px; }
  html body[data-app-view] #account-home-button .profile-trigger-balance { font-size: 12.5px; }
  html body[data-app-view] #account-home-button .profile-trigger-recharge {
    min-height: 24px;
    padding: 2px 10px;
    font-size: 12.5px;
  }
  html body[data-app-view] #account-home-button:hover,
  html body[data-app-view] #account-home-button:focus-visible,
  html body[data-app-view] #account-home-button.is-active {
    width: min(340px, calc(100vw - 24px));
    height: 176px;
    border-radius: 22px;
    padding: 12px;
  }
  html body[data-app-view] #account-home-button:hover #account-avatar,
  html body[data-app-view] #account-home-button:focus-visible #account-avatar,
  html body[data-app-view] #account-home-button.is-active #account-avatar {
    width: 58px;
    height: 58px;
    border-radius: 17px;
  }
  html body[data-app-view] #account-home-button:hover #account-name,
  html body[data-app-view] #account-home-button:focus-visible #account-name,
  html body[data-app-view] #account-home-button.is-active #account-name { font-size: 21.5px; }
  html body[data-app-view] #account-home-button .profile-card-shortcuts i {
    min-height: 30px;
    padding: 5px 9px;
    font-size: 12.5px;
  }
}

/* 桌面端只保留右下角个人胶囊，聊天从头像进入，计时器自动吸附在胶囊上方。 */
@media (min-width: 761px) {
  html body[data-app-view] #global-chat-root .gchat-ball { display: none !important; }
}

/* 充值余额、陪玩收入与抽成收入分栏，避免收入混入可点单余额。 */
html body[data-app-view] #account-home-button .profile-trigger-balance-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr) 1px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
}
html body[data-app-view] #account-home-button .profile-trigger-wallet-cell {
  display: grid;
  min-width: 0;
  gap: 1px;
  line-height: 1.1;
}
html body[data-app-view] #account-home-button .profile-trigger-wallet-cell small {
  overflow: hidden;
  color: rgba(200, 220, 240, 0.72);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html body[data-app-view] #account-home-button .profile-trigger-wallet-cell b {
  overflow: hidden;
  color: #8dffb1;
  font-size: 18.5px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html body[data-app-view] #account-home-button .profile-trigger-wallet-cell.is-income b {
  color: #ffd479;
}
html body[data-app-view] #account-home-button .profile-trigger-wallet-cell.is-commission b {
  color: #7dd3fc;
}
html body[data-app-view] #account-home-button .profile-trigger-wallet-divider {
  width: 1px;
  height: 22px;
  background: linear-gradient(180deg, transparent, rgba(146, 184, 224, 0.22), transparent);
}
html body[data-app-view] #account-home-button:hover .profile-trigger-wallet-cell small,
html body[data-app-view] #account-home-button:focus-visible .profile-trigger-wallet-cell small,
html body[data-app-view] #account-home-button.is-active .profile-trigger-wallet-cell small {
  font-size: 12.5px;
}
html body[data-app-view] #account-home-button:hover .profile-trigger-wallet-cell b,
html body[data-app-view] #account-home-button:focus-visible .profile-trigger-wallet-cell b,
html body[data-app-view] #account-home-button.is-active .profile-trigger-wallet-cell b {
  font-size: 19.5px;
}
@media (max-width: 520px) {
  html body[data-app-view] #account-home-button .profile-trigger-balance-row { gap: 3px; }
  html body[data-app-view] #account-home-button .profile-trigger-wallet-cell small { font-size: 12.5px; }
  html body[data-app-view] #account-home-button .profile-trigger-wallet-cell b { font-size: 14px; }
  html body[data-app-view] #account-home-button .profile-trigger-wallet-divider { height: 19px; }
  html body[data-app-view] #account-home-button .profile-trigger-recharge {
    padding-right: 7px;
    padding-left: 7px;
  }
}

