html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background: #0d1b2a;
    overflow: hidden;
    /* Touch-first tablet target: stop pull-to-refresh, double-tap zoom, and
       text-selection callouts from eating the taps/drags Phaser is listening for. */
    overscroll-behavior: none;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

#game-container {
    /* Stays the full viewport size so it's the correct centering context —
       capping THIS box (as an earlier version of this rule did) shrinks the
       container itself down to the cap size, which then sits undocked at
       one edge of the real (bigger) viewport instead of being centered in
       it. The cap belongs on the canvas below, not here. */
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#game-container canvas {
    touch-action: none;
    /* Scale.FIT sizes the canvas off the container's box. The game's fixed
       900x700 drawing buffer stays crisp up to about 1.2x scale-up; beyond
       that the CSS stretch needed to fill a large screen starts visibly
       softening text and images (portraits worst). max-width/height caps the
       rendered size — and, unlike a competing `width`, is guaranteed by the
       CSS spec to override Phaser's inline style regardless of source. */
    max-width: 1080px;
    max-height: 840px;
}
