html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;                 /* the page never scrolls */
    overscroll-behavior: none;        /* no pull-to-refresh or rubber-banding */
    background: #0B2540;
    color: #F4F7F5;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    -webkit-text-size-adjust: 100%;
}

body {
    position: fixed;                  /* stops iOS Safari from scrolling the page under a drag */
    inset: 0;
}

#app, .game {
    position: fixed;
    inset: 0;
}

.game, .game canvas {
    touch-action: none;               /* drags go to the game, not to scrolling or zooming */
    user-select: none;
    -webkit-user-select: none;        /* no text selection */
    -webkit-touch-callout: none;      /* no long-press menu */
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.game canvas {
    display: block;
    width: 100%;
    height: 100%;
}

#safe-area-probe {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    visibility: hidden;
    pointer-events: none;
    padding-top: env(safe-area-inset-top, 0px);
    padding-right: env(safe-area-inset-right, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    padding-left: env(safe-area-inset-left, 0px);
}

.loading {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    background: linear-gradient(#0B2540, #15607A);
}

.loading-title {
    font-size: 34px;
    font-weight: 600;
}

.loading-bar {
    width: 200px;
    height: 8px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.loading-bar-fill {
    height: 100%;
    width: var(--blazor-load-percentage, 0%);
    background: #F2D0A4;
    border-radius: 4px;
}

#blazor-error-ui {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    background: #F2D0A4;
    color: #0B2540;
    z-index: 10;
}

#blazor-error-ui a {
    color: #0B2540;
    margin-left: 8px;
}
