@media screen {

    html, body {
        min-height: 100%;
    }

    body {
        margin: 0;
        font-size: 18px;
        font-family: 'PT Sans', Verdana, sans-serif;
        background: #ffffff;
        line-height: 1.4;

        overflow: hidden;
    }

    /*** layout ***/

    .flex-wrapper {
        display: -webkit-box;
        display: -moz-box;
        display: -ms-flexbox;
        display: flexbox;
        display: -moz-flex;
        display: -o-flex;
        display: -webkit-flex;
        display: -ms-flex;
        display: flex;
        -moz-flex-wrap: wrap;
        -ms-flex-wrap: wrap;
        -o-flex-wrap: wrap;
        -webkit-flex-wrap: wrap;
        flex-wrap: wrap;
    }

    #page-wrap {
        width: 100%;
        height: 100vh;

        overflow: hidden;
        background: black;
    }

    #content {
        opacity: 0;
        pointer-events: none;
    }

    #page-wrap.load-images #content {
        opacity: 1;
        pointer-events: auto;
    }

    #load-images-wrapper {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;

        z-index: 30;

        justify-content: center;
        align-items: center;
        align-content: center;
    }

    #page-wrap.load-images #load-images-wrapper {
        display: none;
    }

    #load-images {
        cursor: pointer;
        display: inline-block;
        padding: 0.25em 0.5em;
        margin: 0 20px;
        background: black;
        color: white;
    }

    /*** canvas ***/

    #canvas {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;

        z-index: 10;
    }

    #back-to-lib-link {
        display: inline-block;
        position: fixed;
        top: 0;
        right: 0;
        padding: 0.25em 0.5em;
        background: #ee6557;
        color: white;
        text-decoration: none;
        z-index: 50;
        font-size: 0.85em;
    }

    #back-to-lib-link:hover {
        background: black;
    }

    #source-code-link {
        display: inline-block;
        position: fixed;
        bottom: 1em;
        right: 1em;
        padding: 0.25em 0.5em;
        background: #ee6557;
        color: white;
        text-decoration: none;
        z-index: 50;
    }

    #source-code-link:hover {
        background: black;
    }

    .async-textures {
        position: absolute;
        top: 15%;
        right: 15%;
        bottom: 15%;
        left: 15%;
        z-index: 15;

        cursor: pointer;
        font-size: 3em;
        color: white;

        justify-content: center;
        align-items: center;
        align-content: center;

    }

    .async-textures img {
        display: none;
    }


    #async-textures-wrapper {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;

        z-index: 5;
    }

    .image-wrapper {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        display: flex;
    }

    #async-textures-wrapper img {
        display: block;
        min-width: 100%;
        min-height: 100%;
        width: auto;
        height: auto;

        object-fit: cover;

        transition: opacity 1s ease-in;
    }

    #async-textures-wrapper .image-wrapper:last-child img {
        opacity: 0;
    }

    #async-textures-wrapper.second-image-shown .image-wrapper:first-child img {
        opacity: 0;
    }

    #async-textures-wrapper.second-image-shown .image-wrapper:last-child img {
        opacity: 1;
    }

    /*** handling error ***/

    .no-curtains #load-images {
        background: #333;
        pointer-events: none
    }

}

@media screen and (max-width: 720px) {

    .async-textures {
        font-size: 2em
    }

}