/* 参考传统牌桌：对手牌背沿桌边摆放，头像信息独立成小卡 */
/* 中间牌河区域收紧，给桌面留出更多空间 */
.game-screen .center-board {
  width: min(52%, 600px);
  height: min(48%, 380px);
  top: 43%;
  z-index: 16;
}

@media (max-width: 820px) {
  .game-screen .center-board {
    width: 68%;
    height: 40%;
    top: 43%;
  }
}

@media (max-width: 520px) {
  .game-screen .center-board {
    width: 74%;
    height: 38%;
    top: 43%;
  }
}

@media (orientation: landscape) and (max-height: 560px) {
  .game-screen .center-board {
    width: 50%;
    height: 50%;
    top: 43%;
  }
}

#app.force-landscape .center-board {
  width: 50%;
  height: 50%;
  top: 43%;
}

.edge-hands {
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
}

.edge-hand {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
}

.edge-hand .tile {
  width: 17px;
  flex: 0 0 auto;
  border-radius: 2px;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.32));
}

.edge-top {
  top: 6px;
  left: 136px;
  right: 6px;
  gap: 0;
  flex-direction: row;
}

.edge-left {
  left: 5px;
  top: 50%;
  transform: translateY(-50%);
  flex-direction: column;
}

.edge-right {
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  flex-direction: column;
}

.edge-left .tile,
.edge-right .tile {
  margin-top: -12px;
}

.edge-left .tile:first-child,
.edge-right .tile:first-child {
  margin-top: 0;
}

.game-screen .seat {
  min-width: 0;
  max-width: 122px;
  padding: 4px 6px;
  gap: 5px;
  align-items: flex-start;
}

.game-screen .seat .avatar {
  width: 30px;
  height: 30px;
  font-size: 13px;
}

.game-screen .seat-name {
  font-size: 9px;
  gap: 3px;
}

.game-screen .seat-name .name-text {
  max-width: 70px;
}

.game-screen .seat-meta {
  gap: 3px;
  margin-top: 2px;
  font-size: 7px;
}

.game-screen .seat-meta .coin {
  font-size: 7px;
}

.game-screen .seat-meta .coin-mark {
  width: 10px;
  height: 10px;
  font-size: 6px;
}

.game-screen .seat-melds {
  max-width: 108px;
  margin-top: 3px;
  gap: 1px;
}

.game-screen .seat-melds .tile {
  width: 14px;
}

.game-screen .seat-hand-count {
  min-width: 20px;
  height: 14px;
  font-size: 7px;
  right: -3px;
  bottom: -5px;
}

.game-screen .seat-top {
  top: 6px;
  left: 8px;
  transform: none;
}

.game-screen .seat-left {
  left: 28px;
  top: 42%;
  transform: translateY(-50%);
}

.game-screen .seat-right {
  right: 28px;
  top: 42%;
  transform: translateY(-50%);
}

@media (min-width: 900px) {
  .edge-top {
    left: 158px;
  }

  .edge-top .tile {
    width: 24px;
  }

  .edge-left .tile,
  .edge-right .tile {
    width: 22px;
    margin-top: -15px;
  }

  .game-screen .seat {
    max-width: 142px;
  }

  .game-screen .seat .avatar {
    width: 34px;
    height: 34px;
    font-size: 15px;
  }

  .game-screen .seat-name {
    font-size: 10px;
  }

  .game-screen .seat-melds {
    max-width: 128px;
  }
}

/* 页面横屏的逻辑宽度很大，但物理媒体查询仍是竖屏，需要单独覆盖 */
#app.force-landscape .seat {
  min-width: 0;
  max-width: 122px;
  padding: 4px 6px;
  gap: 5px;
}

#app.force-landscape .seat .avatar {
  width: 30px;
  height: 30px;
  font-size: 13px;
}

#app.force-landscape .seat-top {
  top: 5px;
  left: 8px;
  transform: none;
}

#app.force-landscape .seat-left {
  left: 28px;
  top: 42%;
  transform: translateY(-50%);
}

#app.force-landscape .seat-right {
  right: 28px;
  top: 42%;
  transform: translateY(-50%);
}

#app.force-landscape .seat-melds {
  max-width: 108px;
}

#app.force-landscape .seat-melds .tile {
  width: 14px;
}

#app.force-landscape .seat-hand-count {
  min-width: 20px;
  height: 14px;
  font-size: 7px;
}

#app.force-landscape .edge-top {
  top: 5px;
  left: 136px;
  right: 6px;
}

#app.force-landscape .edge-top .tile {
  width: 17px;
}

#app.force-landscape .edge-left .tile,
#app.force-landscape .edge-right .tile {
  width: 17px;
  margin-top: -12px;
}

@media (max-width: 360px) {
  .edge-top {
    left: 118px;
  }

  .edge-hand .tile {
    width: 13px;
  }

  .edge-left .tile,
  .edge-right .tile {
    margin-top: -10px;
  }

  .game-screen .seat {
    max-width: 108px;
  }

  #app.force-landscape .seat {
    max-width: 108px;
  }

  #app.force-landscape .edge-top {
    left: 118px;
  }

  #app.force-landscape .edge-top .tile,
  #app.force-landscape .edge-left .tile,
  #app.force-landscape .edge-right .tile {
    width: 13px;
  }
}
