/* magic-8ball · fullscreen — paired with fullscreen-fit.js (--fs-hero-h / --fs-hero-w, html.fs-wide).
   Everything is scoped under html.pip-immersive: normal play is untouched. */
html.pip-immersive .game-wrap.pip-stage {
  display: flex; flex-direction: column; align-items: center;
  padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right));
  padding-bottom: max(10px, env(safe-area-inset-bottom));
}
html.pip-immersive .game-wrap.pip-stage > * { width: min(100%, 560px); flex: none; }
html.pip-immersive .game-wrap.pip-stage > #card-grid {
  width: 100%; max-width: 760px; height: var(--fs-hero-h, 320px); margin: 0; container-type: size; box-sizing: border-box;
}
/* Landscape: hero on the left at full height, the rest in a right-hand column. */
html.pip-immersive.fs-wide .game-wrap.pip-stage {
  display: grid; grid-template-columns: minmax(0, var(--fs-hero-w, 55%)) minmax(0, 440px); column-gap: 24px;
  grid-auto-rows: min-content; align-content: start; justify-content: center; align-items: start; overflow-y: auto;
}
html.pip-immersive.fs-wide .game-wrap.pip-stage > * { width: auto; grid-column: 2; min-width: 0; }
html.pip-immersive.fs-wide .game-wrap.pip-stage > #card-grid { grid-column: 1; grid-row: 1 / span 14; max-width: none; height: var(--fs-hero-h, 320px); position: sticky; top: 0; }
html.pip-immersive.fs-wide .game-wrap.pip-stage > .pip-dock { grid-column: 1 / -1; }
/* the ball: the card-grid is the hero; the stage takes whatever is left under the tabs/question and sizes the ball */
html.pip-immersive #card-grid { display: flex; flex-direction: column; align-items: stretch; overflow: hidden; }
html.pip-immersive #card-grid > * { flex: none; }
html.pip-immersive #card-grid > #m8-stage { flex: 1 1 0; min-height: 0; padding: 0; align-items: center; container-type: size; }
html.pip-immersive .eight-ball { width: min(210px, 92cqw, 96cqh); height: min(210px, 92cqw, 96cqh); }
html.pip-immersive.m8-hd .eight-ball { width: calc(210px * var(--m8-k, 1)); height: calc(210px * var(--m8-k, 1)); }
html.pip-immersive #answer-line { margin: .2rem 0; }
html.pip-immersive .howto, html.pip-immersive .facts { display: none; }
/* fs-fix: history, codex, pattern panel and their tools are not shown in fullscreen */
html.pip-immersive .pip-stage .m8-card, html.pip-immersive .pip-stage .m8-patterns, html.pip-immersive .pip-stage .m8-tools { display: none !important; }
