/* checkers-board · 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; }

/* checkers-board: board + HUD first; the how-to line and the explorer sit out of the way. */
html.pip-immersive .pip-stage .ck-how { display: none; }
html.pip-immersive .pip-stage #card-grid { margin: 0; margin-left: 0; margin-right: 0; }
html.pip-immersive .pip-stage.fs-wide > #board-wrap.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) > .ck-record { order: 6; }
html.pip-immersive .pip-stage:not(.fs-wide) > .ck-explorer { order: 7; }
html.pip-immersive .pip-stage:not(.fs-wide) > [id^="ck-depth"] { order: 9; }
html.pip-immersive .pip-stage .fs-unit .sq { min-height: 0; }
html.pip-immersive .pip-stage > .ck-explorer, html.pip-immersive .pip-stage > [id^="ck-depth"] { display: none; }

/* wave 3: touch targets, safe areas, a calmer stage backdrop in full screen. */
html.pip-immersive .pip-stage { 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)); background: radial-gradient(120% 80% at 50% 30%, #fef3c7 0%, #f5d9a0 70%, #e7c07a 100%); }
html.pip-immersive .pip-stage .ck-diff button, html.pip-immersive .pip-stage .ck-tools .btn, html.pip-immersive .pip-stage .ck-bar .btn { min-height: 44px; }
html.pip-immersive .pip-stage .ck-coach { margin: .1rem 0; padding: .3rem .5rem; font-size: .8rem; }
html.pip-immersive .pip-stage .pip-actions, html.pip-immersive .pip-stage .ck-tray { display: none; }
html.pip-immersive .pip-stage #card-grid { box-shadow: 0 18px 34px -14px rgb(40 18 6 / .65), 0 2px 0 rgb(255 255 255 / .35) inset; }
@media (orientation: landscape) and (max-height: 500px) { html.pip-immersive .pip-stage .ck-bar { gap: .3rem; } }
