:root {
    --safe-area-top: env(safe-area-inset-top, 0px);
    --safe-area-right: env(safe-area-inset-right, 0px);
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
    --safe-area-left: env(safe-area-inset-left, 0px);
}

html,
body {
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    overscroll-behavior: none;
    background-color: #000;
}

body {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    -webkit-text-size-adjust: 100%;
    touch-action: none;
}

*,
*:before,
*:after {
    box-sizing: border-box;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

input,
input:before,
input:after {
    -webkit-user-select: initial;
    -khtml-user-select: initial;
    -moz-user-select: initial;
    -ms-user-select: initial;
    user-select: initial;
}

::selection {
    color: inherit;
    background: transparent;
}

::-moz-selection {
    color: inherit;
    background: transparent;
}

#canvas {
    position: fixed;
    margin: 0;
    padding: 0;
    touch-action: none;
}

canvas {
    image-rendering: optimizeSpeed;
    image-rendering: -o-crisp-edges;
    image-rendering: -webkit-optimize-contrast;
    -ms-interpolation-mode: nearest-neighbor;
    -ms-touch-action: none;
    touch-action: none;
}

.ani_hack {
    -webkit-perspective: 1000;
    -webkit-backface-visibility: hidden;
    -webkit-touch-callout: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

#block_game {
    touch-action: none;
}

body .orientation-msg-container {
    inset: 0;
    padding:
        var(--safe-area-top)
        var(--safe-area-right)
        var(--safe-area-bottom)
        var(--safe-area-left);
    overflow: hidden;
    touch-action: none;
}

body .orientation-msg-text {
    right: calc(10% + var(--safe-area-right));
    left: calc(10% + var(--safe-area-left));
    width: auto;
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
}
