/* reversi-flip · fullscreen — paired with fullscreen-fit.js, which sets --fs-side (the board unit's width),
   --fs-rows and toggles .fs-wide. Only applies while the game-shell's Full screen is on
   (html.pip-immersive); normal play is untouched. */
html.pip-immersive .pip-stage .fs-unit { width: var(--fs-side, 100%); max-width: none; margin-left: auto; margin-right: auto; box-sizing: border-box; }
html.pip-immersive .pip-stage.fs-wide {
  display: grid;
  grid-template-columns: var(--fs-side) var(--fs-side-col, 320px);
  grid-template-rows: repeat(var(--fs-rows, 6), auto) 1fr;
  column-gap: 20px;
  justify-content: center;
  align-content: start;
}
html.pip-immersive .pip-stage.fs-wide > * { grid-column: 2; min-width: 0; }
html.pip-immersive .pip-stage.fs-wide > .fs-unit { grid-column: 1; grid-row: 1 / -1; margin: 0; align-self: start; }

/* reversi-flip: levels + score + board first; controls, how-to, depth panels and corner watch below the fold. */
html.pip-immersive .pip-stage .rf-how { display: none; }
html.pip-immersive .pip-stage .rf-stage { margin: 0; }
html.pip-immersive .pip-stage.fs-wide > .rf-stage.fs-unit { position: sticky; top: 0; margin: 0; }
html.pip-immersive .pip-stage:not(.fs-wide) { display: flex; flex-direction: column; }
html.pip-immersive .pip-stage:not(.fs-wide) > .fs-unit { order: 5; flex: none; }
html.pip-immersive .pip-stage:not(.fs-wide) > .rf-controls { order: 6; }
html.pip-immersive .pip-stage:not(.fs-wide) > [id^="rf-depth"] { order: 9; }
html.pip-immersive .pip-stage:not(.fs-wide) > .rf-corner-watch { order: 10; }
html.pip-immersive .pip-stage .fs-unit .rf-cell { min-height: 0; }

/* pass 3: controls stay on screen at 44px; hero chrome and long text hidden; no stage scroll */
html.pip-immersive .pip-stage .game-title,html.pip-immersive .pip-stage .facts,html.pip-immersive .pip-stage .hub-bar,html.pip-immersive .pip-stage .playyard-ad,html.pip-immersive .pip-stage .below-content,html.pip-immersive .pip-stage .rf-corner-watch{display:none}
html.pip-immersive .pip-stage{overflow:hidden;padding-left:max(8px,env(safe-area-inset-left));padding-right:max(8px,env(safe-area-inset-right));padding-bottom:max(6px,env(safe-area-inset-bottom))}
html.pip-immersive .pip-stage .rf-controls{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;margin:6px 0 0}
html.pip-immersive .pip-stage .rf-controls .btn{min-height:44px;min-width:44px;padding:.4rem .8rem}
html.pip-immersive .pip-stage .rf-levels{margin:.2rem auto}
html.pip-immersive .pip-stage .rf-level{min-height:44px}
html.pip-immersive .pip-stage.fs-wide .rf-controls{justify-content:flex-start}

/* qa: depth panels (Bracket Line Lab etc.) are not part of full-screen play */
html.pip-immersive .pip-stage [id^="rf-depth"],html.pip-immersive .pip-stage [id^="rf-depth"] *{display:none !important}
