/* Bundled fonts (SIL OFL): Alegreya (display serif, variable 500-700)
   and Alegreya Sans (UI). Relative URLs only - Playables requirement. */
@font-face {
    font-family: 'Alegreya';
    font-style: normal;
    font-weight: 500 700;
    font-display: swap;
    src: url('fonts/alegreya-var.woff2') format('woff2');
}
@font-face {
    font-family: 'Alegreya Sans';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/alegreya-sans-400.woff2') format('woff2');
}
@font-face {
    font-family: 'Alegreya Sans';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/alegreya-sans-700.woff2') format('woff2');
}

/* The OS safe-area insets, republished as custom properties.
   env() cannot be read from JavaScript, but a custom property whose value
   IS an env() can — getComputedStyle resolves it to a px length. This is
   the only bridge from the notch/gesture-bar geometry into the game; see
   src/game/ui/safearea.ts. Zero everywhere the device has no insets to
   report (an ordinary browser tab included), which makes the whole safe
   frame a no-op there by construction. */
:root {
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
}

/* The page background matches the tone the backdrop's vignette reaches at
   the screen edge (#141d0e), so if any sliver of page ever shows (gesture
   bar, curved glass, URL-bar animation) the gradient reads continuous
   instead of resetting to a flat mismatched green. */
html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: #141d0e;
    overscroll-behavior: none;
}

/* Fixed inset-0 tracks the browser's dynamic viewport (100vh does not on
   phones: the gesture-bar strip at the curved bottom was left unpainted
   by the canvas and showed the old flat body color). */
#gameParent {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* #guide {
    position: absolute;
    max-width: 100%;
    max-height: 100%;
    object-fit: scale-down;
    pointer-events: none;
} */

/* canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
} */

/* #gameParent canvas {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
} */
