/* dice-roller · 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: var(--fs-hero-w, 55%) minmax(260px, 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; }
html.pip-immersive .game-wrap.pip-stage > #card-grid { display: flex; }
html.pip-immersive #dice-area { flex: 1 1 auto; min-height: 0; align-content: center; gap: clamp(.6rem, 3cqw, 1.6rem); padding: .5rem; overflow: visible; }
html.pip-immersive #dice-area .die { width: clamp(64px, min(24cqw, 30cqh), 150px); height: clamp(64px, min(24cqw, 30cqh), 150px); font-size: clamp(1.6rem, 9cqh, 3.4rem); }
html.pip-immersive #dice-area .pips { width: 70%; height: 70%; gap: 3%; }
html.pip-immersive .game-wrap.pip-stage > #dr-layer { position: absolute; left: 0; top: 0; width: 0; height: 0; grid-column: 1; grid-row: 1; }
html.pip-immersive #color-btns { margin: .4rem 0; }
html.pip-immersive .history, html.pip-immersive .stats { min-height: 0; }
html.pip-immersive .how { font-size: .78rem; }

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