/* fullscreen: fills the stage below the dock. The game sizes its own canvas to #stage
   (index.html sizeCanvas) and redraws on PIPShell.onResize. Everything waits on
   html.pip-immersive (set for native and iPhone modes), so normal play is untouched. */
html.pip-immersive .pip-stage{display:flex;flex-direction:column;gap:8px;overflow:hidden!important;padding-left:10px!important;padding-right:10px!important;padding-bottom:10px!important}
html.pip-immersive .pip-stage>*{flex:none;min-width:0}
html.pip-immersive .pip-stage>.hud{margin:0}
html.pip-immersive .pip-stage>#status:empty{display:none}
html.pip-immersive .pip-stage>#stage{flex:1 1 0;min-height:0;width:100%;max-width:none;margin:0;overflow:hidden;border-radius:14px}
html.pip-immersive #stage>#game-canvas{position:absolute;left:0;top:0;display:block}
html.pip-immersive #color-btns{display:flex;justify-content:center;gap:8px}
html.pip-immersive #color-btns button{flex:1 1 0;max-width:96px;min-width:44px;height:52px}
html.pip-immersive [data-pip-upgrade="color-rain"]{margin:0;padding:0 .6rem;border-radius:10px}
html.pip-immersive [data-pip-upgrade="color-rain"] p{display:none}
html.pip-immersive #over-overlay{overflow:auto;padding:.75rem}
@media (orientation:landscape) and (max-height:520px){
  html.pip-immersive .pip-stage{display:grid;grid-template-columns:minmax(0,1fr) 168px;grid-template-rows:auto auto 1fr auto;grid-template-areas:"stage hud" "stage st" "stage btns" "stage opt";column-gap:10px;row-gap:6px;padding-top:calc(var(--pip-dock-h,0px) + 6px + env(safe-area-inset-top,0px))!important}
  html.pip-immersive .pip-stage>#stage{grid-area:stage;height:100%}
  html.pip-immersive .pip-stage>.hud{grid-area:hud;flex-direction:column;align-items:stretch;gap:6px}
  html.pip-immersive .pip-stage>#status{grid-area:st}
  html.pip-immersive .pip-stage>#color-btns{grid-area:btns;display:grid;grid-template-columns:1fr 1fr;align-content:start;gap:8px}
  html.pip-immersive #color-btns button{max-width:none;width:100%;height:52px}
  html.pip-immersive .pip-stage>[data-pip-upgrade]{grid-area:opt}
  html.pip-immersive #over-overlay .legend,html.pip-immersive #over-overlay .howto{display:none}
}
