* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
    touch-action: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

#game {
    display: block;
    /* Preserve 16:9 so the internal 1280x720 grid maps 1:1 to screen pixels (scaled) */
    aspect-ratio: 1280 / 720;
    max-width: 100vw;
    max-height: 100vh;
    width: auto;
    height: auto;
    image-rendering: auto;
}

#loading {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 20px;
    z-index: 10;
    background: #000;
}
