/* Local pixel font for DOM form elements — kept local so LAN / Tailscale
   play works offline. Press Start 2P is the closest free match to the
   charmap-cellphone bitmap font used by Phaser BitmapText elsewhere in
   the UI. Not a 1:1 match but visually consistent as a pixel font. */
@font-face {
    font-family: 'PixelUI';
    src: url('/assets/fonts/PressStart2P.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: block;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;  /* no pull-to-refresh / bounce */
}

body {
    background: #000;
    font-family: 'Courier New', monospace;
    /* Fixes iOS Safari's viewport quirk where scrolling resizes the
       viewport after the game has already laid out. */
    position: fixed;
    inset: 0;
    /* Disable text selection and long-press callouts on mobile so
       touching the HIT/FLIP buttons doesn't trigger a copy menu. */
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

#game-container canvas {
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    /* Prevents the browser from intercepting touches as scroll/zoom
       gestures and keeps the game in full control of input. */
    touch-action: none;
}

#app {
    width: 100vw;
    /* 100vh on mobile Safari includes space behind the dynamic browser
       toolbar, so the bottom of the canvas ends up hidden under it.
       100dvh (dynamic viewport height) tracks the actual visible area
       as the toolbar shows/hides, so the controls row always fits. */
    height: 100vh;       /* fallback for older browsers */
    height: 100dvh;      /* iOS 15.4+, Chrome 108+, Firefox 101+ */
    display: flex;
    justify-content: center;
    align-items: center;
}
