/* Keep a seated game and every action inside the available browser height. */
.terminal-fit-viewport { display: contents; }
body.terminal-in-game { height: 100vh; height: 100dvh; overflow: hidden; display: flex; flex-direction: column; }
body.terminal-in-game .ck-game-stage > header { flex: 0 0 auto; height: auto; min-height: 64px; padding: 8px 3%; gap: 12px; }
body.terminal-in-game .brand { font-size: 18px; }
body.terminal-in-game .brand small { display: none; }
body.terminal-in-game .brand-icon { height: 34px; width: 34px; font-size: 25px; }
body.terminal-in-game .header-right { gap: 10px; }
body.terminal-in-game .header-right .live { display: none; }
body.terminal-in-game .music-controls small { display: none; }
body.terminal-in-game .ck-game-stage > .terminal-fit-viewport { display: block; flex: 1 1 0; min-height: 0; width: 100%; position: relative; overflow: hidden; }
body.terminal-in-game #app { position: absolute; top: 0; left: 50%; max-width: none; margin: 0; padding: 8px 14px 12px; transform-origin: top left; }
body.terminal-in-game .back { margin-bottom: 6px; padding: 6px 10px; }
body.terminal-in-game .table-heading { margin-bottom: 8px; }
body.terminal-in-game .table-heading h1 { font-size: 32px; }
body.terminal-in-game .table-heading p { margin: 3px 0; font-size: 10px; }
body.terminal-in-game .table-heading .eyebrow { font-size: 8px; }
body.terminal-in-game .controls { padding: 10px; gap: 8px; }
body.terminal-in-game .hint { margin: 7px auto; font-size: 9px; }
body.terminal-in-game .ledger { padding-top: 6px; margin-top: 7px; font-size: 8px; }
body.terminal-in-game .ck-game-stage > footer { flex: 0 0 auto; padding: 5px 3%; gap: 8px; }
body.terminal-in-game .ck-game-stage > footer button { padding: 6px 10px; }
body.terminal-in-game .ck-game-stage > .empty-stash:not([hidden]) { flex: 0 0 auto; padding: 6px 3%; margin: 0; }
@media (max-width: 650px) {
  body.terminal-in-game .ck-game-stage > header { min-height: 52px; padding: 5px 10px; gap: 6px; }
  body.terminal-in-game .header-right { gap: 5px; }
  body.terminal-in-game .header-right button { font-size: 8px; padding: 6px; }
  body.terminal-in-game .brand { font-size: 13px; letter-spacing: 1px; gap: 5px; }
  body.terminal-in-game .brand-icon { width: 25px; height: 25px; font-size: 18px; }
  body.terminal-in-game .wallet { padding: 4px 7px; }
  body.terminal-in-game .wallet small, body.terminal-in-game .wallet > span { display: none; }
  body.terminal-in-game .music-controls { gap: 4px; }
  body.terminal-in-game .music-controls label { width: 65px; }
  body.terminal-in-game .ck-game-stage > footer > span { display: none; }
  body.terminal-in-game .ck-game-stage > footer { justify-content: flex-end; }
}

/* The CkGamez toolbar and quick chat sit outside the game stage. */
body.terminal-in-game .ck-game-stage{display:flex;flex-direction:column;min-height:0;height:100%;overflow:hidden}
body:not(.terminal-in-game) .ck-game-stage{overflow-y:auto}
