/* page.css -- the page a built game runs on (harness/make_playable.mjs writes it next to the game as style.css):
 * a black window the game fills, with no text selection, callouts or tap highlight on it. */

html,
body {
    position: absolute;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: black;
    color: #fff;
    font-family: "Arial", sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    font-optical-sizing: auto;
    font-variation-settings: "wdth" 100;
}

div { box-sizing: border-box; }

/* a long press is not a selection or a context callout: the game is played, not read */
body,
canvas {
    outline: 0;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}
canvas { -webkit-tap-highlight-color: rgba(255, 255, 255, 0); }

/* every layer fills the window; pixel art stays pixels when scaled (a layer with smoothing on -- the default --
 * sets image-rendering: auto on itself, renderer/webGL2D.js and canvas.js) */
canvas {
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

/* the layers' box: the engine puts one canvas per layer in it, stacked by their z-index */
#layers {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* a finger on the game is input, not a scroll or a zoom of the page: otherwise the browser takes the touch
   (pointercancel) and the on-screen joystick breaks off at the first move */
#layers canvas {
    position: absolute;
    top: 0;
    left: 0;
    background: transparent;
    touch-action: none;
}
