/* tower-of-hanoi · fullscreen. Paired with fullscreen-fit.js (sets --fs-side on <html>, toggles .fs-wide on
   the stage). Only inside the game-shell Full screen (html.pip-immersive). The pegs grow with the board. */
html.pip-immersive .game-wrap.pip-stage #card-grid { width: var(--fs-side, min(92vw, 56vh)); margin: 6px auto; --toh-peg-h: max(150px, calc(var(--fs-side, 340px) * .62)); }
html.pip-immersive .game-wrap.pip-stage .toh-peg { height: var(--toh-peg-h); }
html.pip-immersive .game-wrap.pip-stage .toh-peg::before { height: calc(var(--toh-peg-h) - 40px); }
html.pip-immersive .game-wrap.pip-stage .toh-disc { height: max(18px, calc(var(--toh-peg-h) * .078)) !important; }
html.pip-immersive .game-wrap.pip-stage .toh-howto { font-size: .76rem; margin: 2px 0; }
html.pip-immersive .game-wrap.pip-stage .toh-chips { margin: 2px 0; }
html.pip-immersive .game-wrap.pip-stage .btn-row { margin: 4px 0; }
html.pip-immersive .game-wrap.pip-stage.fs-wide {
  display: grid;
  grid-template-columns: var(--fs-side) minmax(0, 260px);
  grid-template-rows: repeat(12, auto) 1fr;
  column-gap: 20px;
  justify-content: center;
  align-content: center;
}
html.pip-immersive .game-wrap.pip-stage.fs-wide > * { grid-column: 2; min-width: 0; }
html.pip-immersive .game-wrap.pip-stage.fs-wide > #card-grid { grid-column: 1; grid-row: 1 / -1; align-self: center; margin: 0; }
@media (max-height: 460px) {
  html.pip-immersive .game-wrap.pip-stage .toh-howto, html.pip-immersive .game-wrap.pip-stage .facts { display: none; }
}
/* the shell hides .btn-row in fullscreen; Undo and Hint are real controls here, so keep them */
html.pip-immersive .game-wrap.pip-stage > .btn-row { display: flex; }
html.pip-immersive .game-wrap.pip-stage .toh-howto { display: none; }
/* short landscape: drop the secondary rows (chips, rehearsal panel) so the play column fits */
@media (max-height: 460px) {
  html.pip-immersive .game-wrap.pip-stage .toh-chips, html.pip-immersive .game-wrap.pip-stage .toh-rehearsal { display: none; }
}
