/* The sheet a game is played in (sheet.js): a paper card in the middle, or on a phone a sheet slid up from the bottom.
   Each game styles what goes inside it (battle.css, pong.css). */
.game-tag { position: absolute; right: 0; top: 0; z-index: 4; border: 0; padding: 8px 13px; min-height: 44px; background: #efd276; color: #1f2a44; font: 18px 'Permanent Marker', cursive; rotate: -7deg; box-shadow: 1px 2px 0 #1f2a4425; cursor: pointer; }
.game-tag:focus-visible { outline: 3px solid #1f2a44; outline-offset: 4px; }
body.game-open #fx { z-index: 45; }
body.game-open .gremlin { z-index: 43; pointer-events: none; width: 58px; height: 64px; }
.game { --ink: #1f2a44; position: fixed; z-index: 40; width: min(540px, calc(100vw - 32px)); left: 50vw; top: calc(50dvh + 22px); transform: translate(-50%, -50%); padding: 12px; max-height: calc(100dvh - 90px); overflow-y: auto; overscroll-behavior: contain; color: var(--ink); background: #e7dac1 var(--grain); border: 2px solid var(--ink); border-radius: 7px 5px 10px 6px; box-shadow: 4px 5px 0 #1f2a44; font: 700 15px/1.3 Nunito, system-ui, sans-serif; }
.game:focus { outline: none; }
.game button { font-family: inherit; color: inherit; cursor: pointer; }
.game button:focus-visible { outline: 3px solid #8672b8; outline-offset: -3px; }
.game #mute { position: static; flex: none; width: 44px; height: 44px; margin-left: auto; padding: 11px; opacity: .75; }
.game-grab { display: none; width: 32px; height: 4px; border-radius: 8px; background: #988e7c; margin: -3px auto 3px; }
.game-head { display: flex; align-items: center; min-height: 44px; touch-action: none; }
.game-head h2 { margin: 0 0 0 7px; padding: 3px 9px; background: #f8edce; box-shadow: 1px 2px 0 #1f2a4425; rotate: -2deg; font: 20px 'Permanent Marker', cursive; }
.game-close { flex: none; display: grid; place-items: center; width: 44px; height: 44px; font-size: 27px; padding: 0; border: 0; background: none; }
.game-close:hover { background: #d6c6aa; }
@keyframes game-sheet-in { from { translate: 0 100%; } }
@media (max-width: 700px) {
  .game { left: 0; top: 100dvh; bottom: auto; transform: translateY(-100%); width: 100vw; max-height: calc(100dvh - 72px); padding: 9px 10px max(15px, env(safe-area-inset-bottom)); border-bottom: 0; border-radius: 12px 10px 0 0; box-shadow: 0 -3px 0 #1f2a4425; animation: game-sheet-in 240ms ease-out; }
  .game-grab { display: block; }
  .game-head h2 { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .game, body.game-open .gremlin, body.game-open .gremlin svg { animation: none !important; transition: none !important; }
}
