/* 20260914 引擎游戏全屏自适应收口（第二批·先转盘样板）
   背景：67/68 引擎根层本就 position:absolute;inset:0 铺满 #gameCanvas（flex:1，已扣顶部HUD与底部7件套），
   相对的就是"扣完面板的可用高"，并非按视口布局；仅个别引擎主体用视口单位(vw/vh)定尺寸，
   矮屏纵向排不下时自带词卡/内容顶入底部面板区被遮挡（iPhone SE 375x667 转盘词卡实测被压35px）。
   作用域铁律：每条选择器以 body.in-game #gamePlay .game-canvas.theme-{引擎} 开头，
   经典5(pirate/balloon/whack/fish/star)零命中；只收尺寸/显隐，不改配色/背景/圆角/阴影；全部 !important。
   --gh/--gw：由 page_game.js 的 _ldSyncCanvasVars 在进局与 resize/orientation 时写入 #gameCanvas，
   取值=画布 clientWidth/clientHeight（非视口）。JS未就绪时退回与引擎原值一致的 vh 兜底。 */

/* ---- 幸运转盘 wheel：转盘主体由"按视口78vh"改为"按画布可用高 --gh"收口 ---- */
body.in-game #gamePlay .game-canvas.theme-wheel .wheel-stage {
  /* 兜底：与引擎原值一致，自定义属性不可用时行为不变 */
  width: min(78vw, 78vh, 340px) !important;
  /* 收口：矮屏按可用高的0.5收缩；高屏(画布高约592)算得约296，与原304几乎无感 */
  width: min(78vw, calc(var(--gh, 78vh) * 0.5), 340px) !important;
}
/* 引擎内自带的"先听发音"提示与返回钮，与全局面板 mic-hint、panelbar 返回完全重复，
   引擎玩法统一只用全局面板，隐藏以腾出矮屏纵向空间（全局面板7件套不受影响）。 */
body.in-game #gamePlay .game-canvas.theme-wheel .wheel-hint,
body.in-game #gamePlay .game-canvas.theme-wheel .wheel-actions {
  display: none !important;
}

/* ===== 冒险闯关横屏精修(2026-10-11)：解body 520px沉浸帽让整页拉满；HUD锁定顶栏44px，下方左游戏70%/右功能30%竖排；矮横屏<=340px再收紧 ===== */
@media (orientation:landscape){
 /* 解掉竖屏沉浸帽：body被style.css锁520px靠左，导致横屏整页只占左窄栏、右侧大片空白 */
 html body.page-game.in-game{max-width:none!important;width:100%!important;margin:0!important;padding:0!important;height:100vh!important;height:100dvh!important;}
 /* HUD绝对定位锁顶44px；下面flex左右分栏，顶部留44px */
 body.page-game.in-game #gamePlay{
   display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;
   width:100%!important;max-width:none!important;height:100vh!important;height:100dvh!important;
   margin:0!important;padding:44px 0 0!important;box-sizing:border-box!important;overflow:hidden!important;
 }
 body.page-game.in-game #gamePlay .game-hud{
   position:absolute!important;top:0!important;left:0!important;right:0!important;
   height:44px!important;flex:none!important;width:auto!important;
   margin:0!important;padding:0 14px!important;box-sizing:border-box!important;
   border-radius:0!important;font-size:13px!important;white-space:nowrap!important;overflow:hidden!important;
   display:flex!important;flex-direction:row!important;align-items:center!important;
 }
 body.page-game.in-game #gamePlay .game-canvas{
   position:relative!important;flex:0 0 70%!important;width:70%!important;height:100%!important;
   min-height:0!important;min-width:0!important;margin:0!important;border-radius:0!important;overflow:hidden!important;
 }
 body.page-game.in-game #gamePlay #gamePanel.game-panel{
   position:relative!important;flex:0 0 30%!important;width:30%!important;height:100%!important;
   min-height:0!important;min-width:0!important;margin:0!important;padding:6px 8px!important;border-radius:0!important;
   box-sizing:border-box!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch;
   display:flex!important;flex-direction:column!important;align-items:center!important;
 }
 body.page-game.in-game #gamePlay #gamePanel .game-question{flex:0 0 auto!important;width:100%!important;margin:0!important;}
 body.page-game.in-game #gamePlay #gamePanel .game-ctrl{
   flex:1 1 auto!important;display:flex!important;flex-direction:column!important;flex-wrap:nowrap!important;
   align-items:center!important;justify-content:center!important;gap:10px!important;margin:2px 0!important;padding:0!important;
 }
 body.page-game.in-game #gamePlay #gamePanel .ctrl-left,
 body.page-game.in-game #gamePlay #gamePanel .ctrl-right{display:flex!important;flex-direction:column!important;align-items:center!important;gap:8px!important;}
 /* 横屏窄栏隐藏"播放/慢放/回放"文字标注，只留图标，避免拥挤重叠 */
 body.page-game.in-game #gamePlay #gamePanel .ctl-row .lbl,
 body.page-game.in-game #gamePlay #gamePanel .ctrl-lbl{display:none!important;}
 body.page-game.in-game #gamePlay #gamePanel #gMicBtn.mic-btn{width:72px!important;height:72px!important;font-size:32px!important;}
 body.page-game.in-game #gamePlay #gamePanel #gPlayBtn.play-btn,
 body.page-game.in-game #gamePlay #gamePanel #gReplayBtn.replay-btn{width:44px!important;height:44px!important;font-size:18px!important;}
 body.page-game.in-game #gamePlay #gamePanel #gPlaySlowBtn.slow-btn{width:40px!important;height:40px!important;font-size:17px!important;}
 body.page-game.in-game #gamePlay #gamePanel #gMicHint.mic-hint{flex:0 0 auto!important;font-size:10px!important;line-height:1.3!important;text-align:center!important;margin-top:4px!important;}
 body.page-game.in-game #gamePlay .actions{display:none!important;}
}
@media (orientation:landscape) and (max-height:340px){
 body.page-game.in-game #gamePlay{padding-top:38px!important;}
 body.page-game.in-game #gamePlay .game-hud{height:38px!important;}
 body.page-game.in-game #gamePlay #gamePanel.game-panel{padding:4px 6px!important;}
 body.page-game.in-game #gamePlay #gamePanel .game-ctrl{gap:6px!important;}
 body.page-game.in-game #gamePlay #gamePanel .ctrl-left,
 body.page-game.in-game #gamePlay #gamePanel .ctrl-right{gap:5px!important;}
 body.page-game.in-game #gamePlay #gamePanel #gMicBtn.mic-btn{width:60px!important;height:60px!important;font-size:26px!important;}
 body.page-game.in-game #gamePlay #gamePanel #gPlayBtn.play-btn,
 body.page-game.in-game #gamePlay #gamePanel #gReplayBtn.replay-btn{width:38px!important;height:38px!important;font-size:16px!important;}
 body.page-game.in-game #gamePlay #gamePanel #gPlaySlowBtn.slow-btn{width:34px!important;height:34px!important;font-size:15px!important;}
 body.page-game.in-game #gamePlay #gamePanel #gMicHint.mic-hint{font-size:9px!important;white-space:nowrap!important;}
}
