/* 庄家牌型徽章按牌区绝对定位，稳定覆盖牌面底部三分之一 v400 */
#room.hundred-niu-mode .hn-banker {
  position: relative;
}

#room.hundred-niu-mode .hn-banker > strong {
  position: absolute;
  left: 50%;
  right: auto;
  top: calc(50% + 1px);
  bottom: auto;
  grid-column: auto;
  grid-row: auto;
  margin: 0;
  outline: 0;
  box-shadow: none;
  transform: translateX(-50%);
}

/* 顶排下注框的上边线会横穿庄家区域，隐藏后避免形成错误定位线。 */
#room.hundred-niu-mode .hn-zone:nth-child(-n + 2) {
  border-top-color: transparent;
  box-shadow:
    inset 2px 0 0 rgba(0, 43, 28, .64),
    inset -2px 0 0 rgba(0, 43, 28, .64),
    inset 0 -2px 0 rgba(0, 43, 28, .64),
    0 7px 15px rgba(0, 21, 13, .27);
}

#room.hundred-niu-mode .hn-zone:nth-child(-n + 2).is-selected {
  box-shadow:
    inset 2px 0 0 rgba(255, 218, 104, .19),
    inset -2px 0 0 rgba(255, 218, 104, .19),
    inset 0 -2px 0 rgba(255, 218, 104, .19),
    0 7px 18px rgba(0, 21, 13, .34);
}

/* 闲家牌组上移半张牌，使结果徽章只覆盖牌面底部约三分之一。 */
#room.hundred-niu-mode .hn-zone .hn-hand {
  transform: translateY(-52%);
}

/* 下注阶段不提前显示牌；发牌后由脚本显示前四张，第五张依次翻开。 */
#room.hundred-niu-mode .hn-hand.is-not-dealt {
  visibility: hidden;
}

#room.hundred-niu-mode .hn-hand .hn-deal-empty {
  visibility: hidden;
  border-color: transparent !important;
}

#room.hundred-niu-mode .hn-hand .card.hn-dealt-now {
  animation: hn-card-deal-in .2s ease-out both;
}

@keyframes hn-card-deal-in {
  0% {
    opacity: 0;
    filter: brightness(1.8) blur(2px);
  }
  55% {
    opacity: 1;
    filter: brightness(1.25) blur(0);
  }
  100% {
    opacity: 1;
    filter: brightness(1);
  }
}

@media (max-width: 560px) {
  #room.hundred-niu-mode .hn-banker > strong {
    top: 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  #room.hundred-niu-mode .hn-hand .card.hn-dealt-now {
    animation: none;
  }
}
