html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overscroll-behavior: none;
}

h1:focus {
    outline: none;
}

/* Bottom nav (mobile only). MudBlazor d-md-none hides it on >=md. */
.cs-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1100;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    background: var(--mud-palette-surface);
}

.cs-bottom-nav-item {
    flex: 1;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 68px;
    padding: 8px 4px 10px 4px;
    border-radius: 0;
    line-height: 1;
    color: var(--mud-palette-text-secondary);
    text-transform: none;
    letter-spacing: 0;
}

.cs-bottom-nav-item .mud-button-label {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.cs-bottom-nav-item .mud-icon-root {
    font-size: 1.6rem;
}

.cs-bottom-nav-item.active {
    color: var(--mud-palette-primary);
    background: var(--mud-palette-action-default-hover);
}

/* Push main content above the bottom nav on phones so nothing is hidden. */
@media (max-width: 959.98px) {
    .cs-main {
        padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    }
}

/* FAB position — bottom-right, lifted on mobile so it clears the bottom nav. */
.cs-fab {
    position: fixed;
    right: 24px;
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    z-index: 1200;
}

@media (max-width: 959.98px) {
    .cs-fab {
        bottom: calc(96px + env(safe-area-inset-bottom, 0px));
    }
}

.blazor-error-boundary {
    background: #b32121;
    color: white;
    padding: 1rem;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}
