[x-cloak].pwa-offline-screen {
    display: none !important;
}

.pwa-offline-screen {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    display: grid;
    place-items: center;
    overflow-y: auto;
    padding: max(1.5rem, env(safe-area-inset-top)) max(1.5rem, env(safe-area-inset-right))
        max(1.5rem, env(safe-area-inset-bottom)) max(1.5rem, env(safe-area-inset-left));
    background: radial-gradient(circle at top, rgba(255, 255, 255, 0.95), transparent 38rem), #f5f5f5;
    color: #171717;
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        'Segoe UI',
        sans-serif;
}

.pwa-offline-screen__card {
    width: min(100%, 30rem);
    padding: clamp(2rem, 8vw, 3.5rem);
    text-align: center;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 1.5rem;
    box-shadow: 0 1.5rem 4rem rgba(23, 23, 23, 0.08);
}

.pwa-offline-screen__logo {
    width: min(10rem, 55%);
    height: auto;
    margin: 0 auto 1.75rem;
}

.pwa-offline-screen__mascot {
    width: 7rem;
    height: auto;
    aspect-ratio: 420 / 520;
    margin: 0 auto 1rem;
}

.pwa-offline-screen h1 {
    margin: 0;
    font-size: clamp(1.5rem, 5vw, 2rem);
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.pwa-offline-screen p {
    margin: 0.75rem auto 0;
    color: #737373;
    font-size: 1rem;
    line-height: 1.6;
}

.pwa-offline-screen button {
    min-height: 2.75rem;
    margin-top: 1.75rem;
    padding: 0.65rem 1.15rem;
    appearance: none;
    border: 0;
    border-radius: 0.75rem;
    background: #171717;
    color: #ffffff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.pwa-offline-screen button:hover {
    background: #404040;
}

.pwa-offline-screen button:focus-visible {
    outline: 3px solid #a3a3a3;
    outline-offset: 3px;
}

/*
    The installed app feels like an app rather than a page in a browser: no rubber-band scrolling, no trackpad swipe
    through the history (the window has its own back and forward), and no grey flash where a tap lands.
*/
@media (display-mode: standalone), (display-mode: window-controls-overlay), (display-mode: fullscreen) {
    html,
    body {
        overscroll-behavior: none;
        -webkit-tap-highlight-color: transparent;
    }
}

/*
    The installed app draws its own title bar on the desktop (the manifest's window-controls-overlay): the panel's
    topbar takes that role, dragging the window and keeping its contents clear of the window controls. The Inertia app
    has its own title bar (resources/js/components/shell/TitleBar.svelte).
*/
@media (display-mode: window-controls-overlay) {
    .fi-topbar {
        padding-inline-start: calc(env(titlebar-area-x, 0px) + 1rem);
        padding-inline-end: calc(100vw - env(titlebar-area-x, 0px) - env(titlebar-area-width, 100vw) + 1rem);
        -webkit-app-region: drag;
        app-region: drag;
    }

    .fi-topbar a,
    .fi-topbar button,
    .fi-topbar input,
    .fi-topbar [role='button'],
    .fi-topbar .fi-dropdown-panel {
        -webkit-app-region: no-drag;
        app-region: no-drag;
    }
}
