/* 百人牛牛顶部操作顺序：退出 → 申请拼庄 → 庄家头像 v397 */
#room.hundred-niu-mode .hn-topbar {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "banker"
    "trend";
}

#room.hundred-niu-mode .hn-top-banker {
  justify-self: start;
  margin-left: 60px;
}

#room.hundred-niu-mode .hn-top-banker .hn-apply-banker {
  order: 1;
}

#room.hundred-niu-mode .hn-top-banker-pool {
  order: 2;
  display: flex;
  align-items: center;
  gap: 6px;
}

#room.hundred-niu-mode .hn-top-banker-pool .hn-top-banker-profile {
  order: initial;
}

#room.hundred-niu-mode .hn-top-banker-profile > b {
  position: absolute;
  left: 50%;
  bottom: -5px;
  z-index: 3;
  min-width: 31px;
  padding: 1px 3px;
  border: 1px solid rgba(255, 218, 108, .72);
  border-radius: 7px;
  color: #ffe36e;
  font-size: 8px;
  font-weight: 950;
  line-height: 1.05;
  text-align: center;
  white-space: nowrap;
  background: rgba(0, 48, 31, .96);
  box-shadow: 0 2px 4px rgba(0, 15, 9, .52);
  transform: translateX(-50%);
}

#room.hundred-niu-mode .exit-confirm-modal {
  position: fixed;
  z-index: 10040 !important;
}

/* 百人牛牛在线人数：与奔驰宝马一致的双头像胶囊样式 */
#room.hundred-niu-mode .hn-online {
  appearance: none;
  box-sizing: border-box;
  width: 56px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 1px;
  padding: 0;
  border: 0;
  color: #fff4c4;
  cursor: pointer;
  background: transparent;
  -webkit-tap-highlight-color: transparent;
}

#room.hundred-niu-mode .hn-online-avatars {
  width: 46px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 3px 5px rgba(0, 18, 10, .42));
}

#room.hundred-niu-mode .hn-online-face {
  box-sizing: border-box;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  display: grid;
  place-items: center;
  overflow: hidden;
  margin: 0;
  border: 2px solid rgba(255, 223, 117, .98);
  border-radius: 50%;
  background: #0a6b49;
  color: #fff2bd;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  box-shadow:
    0 0 0 1px rgba(76, 37, 2, .68),
    inset 0 1px rgba(255, 255, 255, .48);
}

#room.hundred-niu-mode .hn-online-face + .hn-online-face {
  margin-left: -8px;
}

#room.hundred-niu-mode .hn-online-face img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 50%;
}

#room.hundred-niu-mode .hn-online-label {
  box-sizing: border-box;
  min-width: 48px;
  height: 14px;
  padding: 1px 6px 0;
  display: block;
  border: 1px solid rgba(255, 211, 90, .58);
  border-radius: 999px;
  color: #fff4b0;
  font-size: 7px;
  font-weight: 950;
  line-height: 11px;
  text-align: center;
  white-space: nowrap;
  background: rgba(0, 78, 49, .9);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, .14),
    0 2px 5px rgba(0, 17, 10, .32);
}

#room.hundred-niu-mode .hn-online-panel {
  position: fixed;
  inset: 0;
  z-index: 10060;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 10px;
}

#room.hundred-niu-mode .hn-online-panel.hidden {
  display: none;
}

#room.hundred-niu-mode .hn-online-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 27, 18, .58);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

#room.hundred-niu-mode .hn-online-drawer {
  position: relative;
  z-index: 2;
  width: min(340px, calc(100vw - 20px));
  max-height: min(620px, calc(100dvh - 24px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 220, 104, .82);
  border-radius: 20px;
  color: #fff5cf;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 221, 104, .12), transparent 35%),
    linear-gradient(155deg, #07543a, #003f2b 58%, #002d20);
  box-shadow: 0 18px 45px rgba(0, 15, 9, .62), inset 0 1px rgba(255, 255, 255, .13);
  animation: hn-online-drawer-in .32s ease-out both;
}

#room.hundred-niu-mode .hn-online-drawer > header {
  min-height: 58px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px 8px 15px;
  border-bottom: 1px solid rgba(255, 220, 104, .2);
  background: rgba(0, 32, 21, .26);
}

#room.hundred-niu-mode .hn-online-drawer > header > span {
  min-width: 0;
  margin-right: auto;
  display: flex;
  flex-direction: column;
}

#room.hundred-niu-mode .hn-online-drawer > header strong {
  color: #fff1ae;
  font-size: 16px;
  line-height: 20px;
}

#room.hundred-niu-mode .hn-online-drawer > header small {
  color: rgba(221, 245, 230, .68);
  font-size: 9px;
}

#room.hundred-niu-mode .hn-online-drawer > header > b {
  padding: 4px 9px;
  border: 1px solid rgba(255, 219, 101, .28);
  border-radius: 999px;
  color: #ffe270;
  font-size: 10px;
  white-space: nowrap;
  background: rgba(255, 211, 77, .09);
}

#room.hundred-niu-mode .hn-online-drawer > header > button {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  padding: 0 0 2px;
  border: 1px solid rgba(255, 230, 146, .24);
  border-radius: 50%;
  color: #fff1b6;
  font-size: 22px;
  background: rgba(255, 255, 255, .08);
}

#room.hundred-niu-mode .hn-online-list {
  min-height: 0;
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 5px 10px 12px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

#room.hundred-niu-mode .hn-online-user {
  min-height: 51px;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 6px 5px;
  border-bottom: 1px solid rgba(255, 224, 122, .1);
}

#room.hundred-niu-mode .hn-online-user.is-me {
  margin: 2px 0;
  padding: 6px 8px;
  border: 1px solid rgba(255, 220, 104, .25);
  border-radius: 12px;
  background: rgba(255, 216, 89, .09);
}

#room.hundred-niu-mode .hn-online-user-avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid rgba(255, 225, 125, .9);
  border-radius: 50%;
  background: #0b6b4b;
}

#room.hundred-niu-mode .hn-online-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#room.hundred-niu-mode .hn-online-user-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

#room.hundred-niu-mode .hn-online-user-info strong {
  overflow: hidden;
  color: #fff5d0;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#room.hundred-niu-mode .hn-online-user-info em {
  color: rgba(212, 241, 223, .66);
  font-size: 9px;
  font-style: normal;
}

#room.hundred-niu-mode .hn-online-user > b {
  min-width: 56px;
  color: #ffe052;
  font-size: 12px;
  text-align: right;
  white-space: nowrap;
}

@keyframes hn-online-drawer-in {
  from {
    opacity: 0;
    transform: translateY(24px) scale(.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 430px) {
  #room.hundred-niu-mode .hn-top-banker {
    margin-left: 55px;
  }

  #room.hundred-niu-mode .hn-top-banker-pool {
    gap: 5px;
  }

  #room.hundred-niu-mode .hn-online-panel {
    padding: 7px;
  }

  #room.hundred-niu-mode .hn-online-drawer {
    width: calc(100vw - 14px);
    max-height: calc(100dvh - 14px);
  }
}

@media (prefers-reduced-motion: reduce) {
  #room.hundred-niu-mode .hn-online-drawer {
    animation: none;
  }
}
