/* RESET: https://www.joshwcomeau.com/css/custom-css-reset/ */

*, *::before, *::after {
    box-sizing: border-box;
}

* {
    margin: 0;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        interpolate-size: allow-keywords;
    }
}

body {
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}

input, button, textarea, select {
    font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
}

p {
    text-wrap: pretty;
}
h1, h2, h3, h4, h5, h6 {
    text-wrap: balance;
}

/* CUSTOM */
body, html { min-height: 100%; }
body {
    font-family: monospace;
    text-align: center;

    padding: 10px;

    display: flex;
    flex-flow: row nowrap;
    justify-content: center;
    align-items: stretch;

    & > .main-area {
        width: 25rem;
        max-width: 100%;

        display: flex;
        flex-flow: column nowrap;
        justify-content: flex-start;
        align-items: stretch;

        gap: 10px;
    }

    & > .loading-screen {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;

        display: flex;
        flex-flow: row nowrap;
        justify-content: center;
        align-items: center;
        
        backdrop-filter: blur(5px);
        
        &:not(.active) {
            display: none;
        }
    }

    &:has(.loading-screen.active) {
        max-height: 100%;
        overflow: hidden;
    }
}
