/* game-table.css — 局内(对局中)排版, 学习 https://game.hullqin.cn/ 的桌面桌游界面
   仅作用于 body.hq-table (由 game-table.js 注入), 不影响未接入页面 */
body.hq-table{
  min-height:100dvh;display:flex;flex-direction:column;align-items:stretch;
  padding:0;overflow-x:hidden;
}
body.hq-table #app{
  width:100%;max-width:1024px;margin:0 auto;padding:6px 16px 0;
  display:flex;flex-direction:column;flex:1 1 auto;min-height:0;
}
/* 局内隐藏大幅标题, 改用顶部 40px 标题条 */
body.hq-playing #app>header{display:none}
/* 大厅居中 */
body.hq-table #lobby{flex:1 1 auto;display:flex;flex-direction:column;justify-content:center;align-items:center}
body.hq-table #lobby>*:not([class*="modal"]){width:100%;max-width:560px;margin-inline:auto}
/* 局内: 各游戏用 inline style 把 #game 设为 display:block / none, 可见时强制 flex 列 */
body.hq-table #game{flex:1 1 auto;min-height:0;gap:10px;padding-bottom:4px}
body.hq-playing #game{display:flex !important;flex-direction:column;min-height:0}
body.hq-table #game,body.hq-table #game *{-webkit-user-select:none;user-select:none}
/* 顶部标题条 (40px) + 房间号行 */
.hq-head{flex:0 0 auto;display:flex;flex-direction:column;align-items:center;gap:2px;padding-top:4px}
.hq-head .hq-title{font-size:20px;font-weight:700;line-height:28px;letter-spacing:.5px}
.hq-head .hq-room{font-size:13px;opacity:.7}
.hq-head .hq-room b{font-weight:600;letter-spacing:1px;opacity:1}
/* 玩家条 */
body.hq-table .statusbar{display:flex;align-items:center;justify-content:center;gap:14px;flex-wrap:wrap;margin:0;padding:0}
body.hq-table .ply{min-width:0;padding:6px 12px;border-radius:12px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.12)}
body.hq-table .ply.turn,body.hq-table .ply.active{border-color:#fbbf24;box-shadow:0 0 0 1px rgba(251,191,36,.75)}
body.hq-table .turnind{font-size:14px;text-align:center;color:#cbd5e1}
body.hq-table #playersStrip{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap;margin:0}
body.hq-table .info{font-size:14px;text-align:center}
/* 棋盘类: 视口内自适应, 不滚动 */
body.hq-table #board{margin:0 auto;width:min(100%,64dvh);max-width:min(100%,64dvh);max-height:64dvh;height:auto;aspect-ratio:1}
body.hq-table #boardWrap{display:flex;justify-content:center;margin:0 auto;width:min(100%,64dvh);max-height:70dvh}
body.hq-table #boardWrap>#board{width:100%;height:auto;max-height:none}
/* 卡牌类舞台 */
body.hq-table #table,body.hq-table #centerPiles,body.hq-table #myHand,body.hq-table #hand,
body.hq-table #opponents,body.hq-table #playersArea,body.hq-table #countsBar,
body.hq-table #myArea,body.hq-table #pots,body.hq-table #pendingActions{width:100%;margin-inline:auto}
body.hq-table #centerPiles,body.hq-table #pots{display:flex;justify-content:center;gap:10px;flex-wrap:wrap}
body.hq-table .section-title,body.hq-table h3{text-align:center;font-size:13px;opacity:.8;margin:2px 0}
/* 舞台元素: 不被压缩, 竖直方向自适应分布 */
body.hq-playing #board,
body.hq-playing #boardWrap,
body.hq-playing #table,
body.hq-playing #centerPiles,
body.hq-playing #opponents,
body.hq-playing #myHand,
body.hq-playing #hand,
body.hq-playing #myArea,
body.hq-playing #playersArea,
body.hq-playing #countsBar,
body.hq-playing #pots{margin-block:auto;flex:0 0 auto}
body.hq-playing #playersStrip,body.hq-playing .statusbar,body.hq-playing .info,body.hq-playing .turnind{flex:0 0 auto}
/* 底部操作条: 贴底 + rounded-full 40px 按钮 */
body.hq-table #game>.actions{
  margin-top:auto;flex:0 0 auto;display:flex;justify-content:center;align-items:center;
  gap:12px;flex-wrap:wrap;padding:10px 0 max(14px,env(safe-area-inset-bottom));
}
body.hq-table #game>.actions button{
  height:40px;min-width:104px;border-radius:9999px;padding:0 18px;font-size:15px;line-height:1;
}
@media (max-width:640px){
  body.hq-table #app{padding:4px 10px 0}
  .hq-head .hq-title{font-size:17px;line-height:24px}
  body.hq-table #board,body.hq-table #boardWrap{width:min(100%,58dvh)}
  body.hq-table #game>.actions button{min-width:88px;padding:0 14px}
}