html, body {
  margin: 0; padding: 0; height: 100%;
  background: #0a0a0c;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
#frame {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: env(safe-area-inset-top) env(safe-area-inset-right)
           env(safe-area-inset-bottom) env(safe-area-inset-left);
}
#game {
  background: #000;
  touch-action: none;
  /* scaled by main.js to fit the window, aspect preserved */
}
/* gtm19: THE SHARE CARD's fallback — the card as a real <img> over the canvas (a long-press
   saves it everywhere, in-app browsers included); outside the canvas's pointer handlers */
#shareOverlay {
  position: fixed; inset: 0; z-index: 10;
  background: rgba(8, 8, 12, 0.96);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 12px; box-sizing: border-box;
  font-family: Consolas, monospace; color: #e8e8ee; text-align: center;
  touch-action: auto; -webkit-user-select: auto; user-select: auto;
}
#shareOverlay[hidden] { display: none; }
/* gtm23: the real share button over the canvas chip — transparent, the canvas draws the look */
#shareBtn { position: fixed; z-index: 9; background: transparent; border: 0; padding: 0; margin: 0; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
#shareBtn[hidden] { display: none; }
#shareOverlay .so-title { color: #e8c15a; font-weight: bold; font-size: 20px; letter-spacing: 1px; }
#shareOverlay .so-sub { color: #b8b8c2; font-size: 13px; }
#shareOverlay img {
  max-width: min(78vh, 92vw); max-height: 78vh; width: auto; height: auto;
  border: 2px solid #3a3a44; border-radius: 6px;
  -webkit-touch-callout: default; -webkit-user-select: auto; user-select: auto;
}
#shareOverlay .so-btn {
  font: bold 14px Consolas, monospace; color: #e8e8ee; background: #2a2a34; border: 0;
  border-radius: 18px; padding: 9px 22px; cursor: pointer;
}
