html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: linear-gradient(to bottom, #000D10 0%, #00527E 60%);
}

/* Splash: sits behind #ComposeApp (z-index 0 < 1).
   Matches Compose BrandedSplash layout for seamless handoff. */
.rs-splash {
    position: fixed;
    inset: 0;
    z-index: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.rs-splash-logo {
    width: 128px;
    height: 128px;
}

.rs-splash-title {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 28px;
    font-weight: 400;
    color: white;
    letter-spacing: 0.25px;
}

/*
 * Compose viewport: positioned within device safe areas so the canvas never
 * draws behind notches or home indicators. z-index: 1 ensures the canvas
 * (appended by ComposeViewport) paints above the splash once the first
 * Compose frame renders.
 *
 * min-width: 360px is the mobile baseline floor: Compose must never measure
 * at 0-wide (BoxWithConstraints crashes Coil's Pixels precondition). Values
 * below 360px cause a horizontal scroll; Compose still lays out at >= 360px.
 */
#ComposeApp {
    position: fixed;
    top: env(safe-area-inset-top);
    left: env(safe-area-inset-left);
    right: env(safe-area-inset-right);
    bottom: env(safe-area-inset-bottom);
    z-index: 1;
    min-width: 360px;
}

/* ComposeViewport creates a canvas inside #ComposeApp. Block display removes
   inline baseline gap; width/height ensure the canvas layout box tracks
   the viewport so Skiko's ResizeObserver fires on viewport changes. */
canvas {
    display: block;
    width: 100%;
    height: 100%;
}
