*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    min-height: 100%;
    overflow: hidden;
    background-color: #000;
}

#loading {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #111;
    color: #fff;
    font-family: Arial, sans-serif;
    font-size: 18px;
    z-index: 9999;
}

#loading.is-hidden {
    display: none;
}

#content-frame {
    display: block;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: 100vw;
    max-height: 100vh;
    max-height: 100dvh;
    margin: 0;
    padding: 0;
    border: none;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.35) transparent;
}

#content-frame::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

#content-frame::-webkit-scrollbar-track {
    background: transparent;
}

#content-frame::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.35);
    border-radius: 999px;
}

#content-frame::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.55);
}

@media (max-width: 768px) {
    html,
    body {
        width: 100%;
        height: 100%;
        height: 100dvh;
    }

    #content-frame {
        width: 100vw;
        height: 100vh;
        height: 100dvh;
    }
}

@media (prefers-reduced-motion: reduce) {
    #content-frame {
        scroll-behavior: auto;
    }
}

@supports (padding: env(safe-area-inset-top)) {
    #content-frame {
        padding-top: env(safe-area-inset-top);
        padding-right: env(safe-area-inset-right);
        padding-bottom: env(safe-area-inset-bottom);
        padding-left: env(safe-area-inset-left);
    }
}
