/* coin-flip · 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);
  display: flex; flex-direction: column; margin: 0;
}
html.pip-immersive #card-grid > .coin-stage { flex: 1 1 auto; min-height: 120px; height: auto; container-type: size; }
html.pip-immersive .cf-coin { --cfs: min(66cqh, 66cqw); width: var(--cfs); height: var(--cfs); }
html.pip-immersive .cf-ring { width: min(82cqh, 82cqw); height: min(82cqh, 82cqw); margin: calc(min(82cqh, 82cqw) / -2) 0 0 calc(min(82cqh, 82cqw) / -2); }
html.pip-immersive .cf-shadow { width: min(60cqh, 64cqw); margin-left: calc(min(60cqh, 64cqw) / -2); bottom: 4%; }
html.pip-immersive #card-grid > :not(.coin-stage) { flex: none; }
html.pip-immersive #card-grid .cf-hist { min-height: 0; margin-top: .3rem; max-height: 52px; overflow: hidden; }
html.pip-immersive .cf-life { margin-top: .2rem; }
html.pip-immersive .cf-bar { margin: .35rem 0 .15rem; }

/* Landscape: coin on the left at full height, modes + controls on the right. */
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 12; 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; }
html.pip-immersive.fs-wide #status { min-height: 2.2em; }
html.pip-immersive.fs-wide #color-btns { margin: .4rem 0; }
html.pip-immersive.fs-wide #color-btns .btn { padding: .6rem 1rem; }
html.pip-immersive .cf-decision { margin-top: .5rem; }

/* Description under the game (normal page only; hidden while the stage is fullscreen). */
.cf-guide { max-width: 560px; margin: 1.5rem auto; padding: 0 1rem; color: #1e293b; line-height: 1.55; font-size: .98rem; }
.cf-guide h2 { font-size: 1.15rem; margin: 1.1rem 0 .4rem; color: #92400e; }
.cf-guide p, .cf-guide ul { margin: 0 0 .7rem; }
.cf-guide ul { padding-left: 1.2rem; }
.cf-guide li { margin-bottom: .45rem; }
