html {
    margin: 0;
    height: 100%;
    overflow: hidden;
    background-color: black;

    touch-action: none;

    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

canvas, img {
    touch-action: none;
    pointer-events: none;

    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

a {
    position: absolute;
    padding: 0.8rem;
    color: white;
}

h1 {
    color: white;
    text-align: center;
    width: fit-content;
    height: 1em;
}

h1, canvas {
    padding: 0;
    margin: auto;
    display: block;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
}

#touchcontrols img {
    padding: 0;
    margin: auto;
    display: block;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
}

#touchcontrols img#dpad {
    width: 10em;
    height: auto;
    margin-left: 1rem;
    margin-bottom: 1rem;
}

#touchcontrols img.touch-button {
    width: 5rem;
    height: auto;
}

#touchcontrols img.touch-button#jumpbutton {
    margin-right: 5rem;
    margin-bottom: 1rem;
}

#touchcontrols img.touch-button#punchbutton {
    margin-right: 1rem;
    margin-bottom: 5rem;
}

canvas {
    max-width: 768px;
    max-height: 672px;
    min-width: none;
    min-height: none;

    width: min(100dvw, 800dvh / 7);
    height: min(100dvh, 87.5dvw);
    image-rendering: pixelated;
}