/* jetpack-climb · fullscreen fit — everything is scoped under html.pip-immersive, so the normal page is
   untouched. Sizes come from js/fullscreen-fit.js (--fs-w / --fs-h / --fs-side on the stage). */
html:is(.pip-immersive,.pip-native) .game-wrap.fs-fit { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 6px; overflow-x: hidden; overflow-y: auto; }
html:is(.pip-immersive,.pip-native) .game-wrap.fs-fit > * { flex-shrink: 0; }
html:is(.pip-immersive,.pip-native) .game-wrap.fs-fit > * { max-width: 100%; }
html:is(.pip-immersive,.pip-native) .game-wrap.fs-fit #jc-stage { width: var(--fs-w) !important; height: var(--fs-h) !important; max-width: none !important; max-height: none !important; margin: 0 !important; flex: none; }
html:is(.pip-immersive,.pip-native) .game-wrap.fs-fit #jc-stage canvas { width: 100% !important; height: 100% !important; max-width: none !important; }
html:is(.pip-immersive,.pip-native) .game-wrap.fs-fit > .hud { width: var(--fs-w); max-width: 100%; margin: 0; padding-top: 4px; padding-bottom: 4px; }
html:is(.pip-immersive,.pip-native) .game-wrap.fs-fit > [role="status"]:empty, html:is(.pip-immersive,.pip-native) .game-wrap.fs-fit > #status:empty { display: none; }
html:is(.pip-immersive,.pip-native) .game-wrap.fs-fit > [role="status"], html:is(.pip-immersive,.pip-native) .game-wrap.fs-fit > #status { margin: 0; min-height: 0; padding: 2px 8px; width: var(--fs-w); text-align: center; font-size: .85rem; }

/* wide: board left, HUD/controls right */
html:is(.pip-immersive,.pip-native) .game-wrap.fs-wide { display: grid; grid-template-columns: var(--fs-w) var(--fs-side); justify-content: center; align-content: center; column-gap: 16px; row-gap: 8px; grid-auto-rows: min-content; }
html:is(.pip-immersive,.pip-native) .game-wrap.fs-wide #jc-stage { grid-column: 1; grid-row: 1 / span 12; align-self: center; }
html:is(.pip-immersive,.pip-native) .game-wrap.fs-wide > :not(#jc-stage) { grid-column: 2; width: auto; margin: 0; }
html:is(.pip-immersive,.pip-native) .game-wrap.fs-wide > .hud { width: auto; }


/* full screen: keep clear of the notch and home bar, hide chrome that is not the game */
html:is(.pip-immersive,.pip-native) .game-wrap.fs-fit { 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)); touch-action: none; overscroll-behavior: none; }
html:is(.pip-immersive,.pip-native) .game-wrap .pip-actions, html:is(.pip-immersive,.pip-native) .hd-guide, html:is(.pip-immersive,.pip-native) .ad-well { display: none !important; }
html:is(.pip-immersive,.pip-native) .game-wrap .btn { min-height: 44px; }

/* full screen, second pass: the board gets the room. Title, facts and the arcade link are hidden (display only);
   the score row and New Game stay. Portrait uses the full width, landscape the full height. */
html:is(.pip-immersive,.pip-native) .game-wrap.fs-fit .game-title,
html:is(.pip-immersive,.pip-native) .game-wrap.fs-fit .facts { display: none !important; }
html:is(.pip-immersive,.pip-native) .game-wrap.fs-fit { overflow: hidden; padding-top: 0; gap: 4px; }
@media (orientation: portrait) {
  html:is(.pip-immersive,.pip-native) .game-wrap.fs-fit { padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
}
@media (orientation: landscape) {
  html:is(.pip-immersive,.pip-native) .game-wrap.fs-fit { padding-bottom: max(2px, env(safe-area-inset-bottom)); }
  html:is(.pip-immersive,.pip-native) .game-wrap.fs-wide { align-content: center; }
}
