/* war-cards · full screen fit (shell adds html.pip-immersive in both native and immersive modes). Layout only. */
html.pip-immersive .game-wrap.pip-stage{display:flex!important;flex-direction:column;gap:6px;max-width:none!important;width:auto;padding-left:max(12px,env(safe-area-inset-left,0px))!important;padding-right:max(12px,env(safe-area-inset-right,0px))!important;padding-bottom:max(8px,env(safe-area-inset-bottom,0px))!important;overflow:hidden!important;background:var(--war-art-page,#14110f)}
html.pip-immersive .pip-stage>:is(.wc-how,.wc-review,#war-depth-gameplay,#war-depth-replay,.pip-actions,.game-title,.facts){display:none!important}
html.pip-immersive .pip-stage>.hud{padding:0;margin:0;flex:none}
html.pip-immersive .pip-stage .hud .btn{min-height:44px;min-width:44px}
html.pip-immersive .pip-stage .wc-modes{margin:0;flex:none}
html.pip-immersive .pip-stage .wc-mode{min-height:44px}
html.pip-immersive .pip-stage .wc-daily{min-height:44px;margin:0;flex:none}
html.pip-immersive .pip-stage #status{flex:none;min-height:0;margin:0;font-size:.85rem;line-height:1.25;text-align:center;overflow:hidden;max-height:2.6em}
html.pip-immersive .pip-stage #card-grid{flex:1 1 0;min-height:0!important;display:flex!important;flex-direction:column;container-type:size;overflow:hidden}
html.pip-immersive .pip-stage .wc-meter{flex:none;margin:0 0 6px}
html.pip-immersive .pip-stage .wc-table{flex:1 1 0;min-height:0;align-content:center;padding:0 10px}
html.pip-immersive .pip-stage .wc-hand{flex:none;min-height:0;margin:8px 0 4px;padding:0 0 10px}
html.pip-immersive .pip-stage #color-btns{flex:none;margin:0}
html.pip-immersive .pip-stage #color-btns .btn{min-height:48px}
/* card size follows the board: width from the board width and height, text scales with the card */
html.pip-immersive .pip-stage #card-grid{--fw:max(56px,min(30cqw,calc((100cqh - 96px)/1.55)))}
html.pip-immersive .pip-stage #card-grid:has(#wc-hand:not([hidden])){--fw:max(48px,min(28cqw,calc((100cqh - 150px)/2.6)))}
html.pip-immersive body .wc-slot{width:var(--fw);margin-top:14px;container-type:inline-size}
html.pip-immersive body .wc-hand button{flex:0 0 calc(var(--fw)*.82);width:calc(var(--fw)*.82);min-width:44px;container-type:inline-size}
html.pip-immersive body .wc-slot .wc-card .pip{font-size:38cqw}
html.pip-immersive body .wc-slot .wc-card.face .rank{font-size:40cqw}
html.pip-immersive body .wc-slot .wc-card .i{font-size:18cqw}
html.pip-immersive body .wc-hand button .wc-card .pip{font-size:36cqw}
html.pip-immersive body .wc-hand button .wc-card.face .rank{font-size:38cqw}
html.pip-immersive body .wc-hand button .wc-card .i{font-size:18cqw}
html.pip-immersive .pip-stage .wc-over{position:absolute;inset:0;overflow:auto}
@media (orientation:landscape) and (max-height:520px){
  html.pip-immersive .game-wrap.pip-stage{display:grid!important;grid-template-columns:minmax(150px,.7fr) minmax(0,1.6fr) minmax(130px,.6fr);grid-template-rows:auto auto auto 1fr;column-gap:12px;row-gap:6px;align-content:stretch}
  html.pip-immersive .pip-stage>.hud,html.pip-immersive .pip-stage>.wc-modes,html.pip-immersive .pip-stage>.wc-daily,html.pip-immersive .pip-stage>#status{grid-column:1}
  html.pip-immersive .pip-stage>.wc-modes{grid-template-columns:1fr}
  html.pip-immersive .pip-stage>.wc-modes .wc-mode small{display:none}
  html.pip-immersive .pip-stage>.wc-modes .wc-mode{min-height:44px}
  html.pip-immersive .pip-stage>#card-grid{grid-column:2;grid-row:1/5}
  html.pip-immersive .pip-stage>#color-btns{grid-column:3;grid-row:1/5;flex-direction:column;justify-content:center;align-self:stretch}
  html.pip-immersive .pip-stage>#color-btns .btn{flex:0 0 auto;max-width:none;min-height:56px}
  html.pip-immersive .pip-stage #card-grid{--fw:max(44px,min(24cqw,calc((100cqh - 60px)/1.5)))}
  html.pip-immersive .pip-stage #card-grid:has(#wc-hand:not([hidden])){--fw:max(40px,min(20cqw,calc((100cqh - 90px)/2.6)))}
}
