/* 洗家村 · UI 修正（横屏/竖屏通用）
   1) 弹窗内容区必须能被压缩并可滚动，否则内容会把底部按钮顶出屏幕，
      既看不见也点不到（设置里的「保存名字」「绑个账号」、排行榜、图鉴都中招）。
   2) 聊天坞只是底部一条，别让它的透明区域挡住右下技能键。 */

.modal,
.modal-wide,
.modal-chat {
  max-height: calc(var(--app-h, 100vh) - 16px) !important;
  max-width: calc(var(--app-w, 100vw) - 16px) !important;
  overflow: hidden !important;
}
.modal-mask {
  overflow: hidden !important;
  padding: 8px !important;
}
.modal-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}
/* 列表撑不住的时候也要能滚 */
.rank-list,
.track-list,
.bag-main,
.armor-group {
  min-height: 0;
}
/* 聊天坞：缩到不碰右下技能区，并且只在自己身上吃点击 */
.chat-dock {
  z-index: 4 !important;
}

/* 竖屏（物理竖着）时聊天坞会压在右下「拳」键上，导致点了没反应：靠左让开 */
@media (orientation: portrait) {
  .chat-dock {
    left: 10px !important;
    right: auto !important;
    transform: none !important;
    max-width: 46% !important;
  }
  .chat-dock:active {
    transform: scale(.97) !important;
  }
}
