html, body {
    height: 100%;
    margin: 0;
    overflow: hidden;
    background: #1E5E3A;
}

/* Read by screen readers, not shown (main.js writes into it). */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

#out {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Shown while the app downloads; uses system fonts because the app's own font is not loaded yet. */
.avalonia-splash {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    background: #1E5E3A;
    color: #FFFFFF;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    text-align: center;
    pointer-events: none;
}

.splash-title {
    margin: 0;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
}

.splash-text {
    margin: 0;
    font-size: clamp(1.25rem, 3vw, 2rem);
}

/* How much of the game has downloaded (main.js fills it in). */
.splash-progress {
    width: min(20rem, 70vw);
    height: 0.75rem;
    margin-top: 1rem;
    border-radius: 0.375rem;
    background: rgba(255, 255, 255, 0.25);
    overflow: hidden;
}

.splash-progress[hidden] {
    display: none;
}

.splash-bar {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: #FFFFFF;
    transition: width 250ms linear;
}

.avalonia-splash.splash-close {
    transition: opacity 200ms, display 200ms;
    display: none;
    opacity: 0;
}

@media (prefers-contrast: more) {
    html, body, .avalonia-splash {
        background: #000000;
    }
}
