/* The page is chrome around the game: no scrollbars, and the loader borrows the client's
   own palette (internal/art Palette) and its first frame. */
html, body {
    margin: 0;
    padding: 0;
    background-color: #000;
    overflow: hidden;
    overscroll-behavior: none;
    height: 100vh;
    width: 100vw;
}

canvas {
    width: 100% !important;
    height: 100% !important;
    /* The canvas owns every gesture on it: without this the browser claims the pan and
       double-tap zooms on repeated taps. */
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
    outline: none;
}

/* Over the canvas, letterboxed at 16:9 the way the game is, so the swap does not move. */
#loader {
    position: fixed;
    inset: 0;
    z-index: 10;
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.4s ease-out;
}

#loader.done {
    opacity: 0;
    pointer-events: none;
}

#frame {
    position: relative;
    width: min(100vw, calc(100vh * 16 / 9));
    aspect-ratio: 16 / 9;
}

#picture {
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
}

/* Where the game prints its prompt: under the ground line, which sits at 130 of 180. */
#progress, #error {
    position: absolute;
    left: 0;
    right: 0;
    top: 80%;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: 'Courier New', Courier, monospace;
    font-size: max(12px, 2.2vmin);
    color: #e8e4d8; /* Palette.Paper */
}

#progress-bar-container {
    width: 40%;
    height: max(3px, 0.6vmin);
    background-color: rgba(27, 31, 42, 0.5); /* Palette.Ink */
    margin-bottom: 0.8em;
}

#progress-bar {
    width: 0%;
    height: 100%;
    background-color: #d97b3f; /* Palette.Accent */
    transition: width 0.1s ease-out;
}

#error {
    display: none;
    padding: 0 10%;
    text-align: center;
    top: 74%;
}

#error a {
    color: #d97b3f;
}
