/* Bowling (/bowling): only what is the game's own - the two canvases with the alley, the lane and the HUD, and the
   online panel. Buttons, fields and the accent come from the app kit (css/app-kit, docs/app-kit.md), the button row from
   css/app-kit/games.css (every game). Loaded only on this page (StylePaths). The lane, the pins and the balls keep their
   own colours in every look (filter-engines/bowling.js).

   Like Air Hockey, the canvases fill the whole stage: the WebGL scene below and the HUD above it, which takes the mouse,
   the keys and the touches. The game lays out its view for any shape. */

.filter-landing-stage.bowling-stage {
    position: relative;
    display: block;
    width: 100%;
    min-height: 280px;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    padding: 0;
    box-shadow: none;
    background: #0b0d14;
    background-image: none;
    touch-action: none;
}

/* Absolutely placed so the canvases' own pixel size never stretches the stage. */
.bowling-scene,
.bowling-hud {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.bowling-scene {
    background: #0b0d14;
    pointer-events: none;
}

.bowling-hud {
    background: transparent;
    cursor: crosshair;
}

.bowling-landing-app:not([data-bz-phase="running"]) .bowling-hud {
    cursor: pointer;
}

.bowling-hud:focus-visible {
    box-shadow: inset 0 0 0 3px var(--ak-accent);
}

/* The online panel: the room code in capitals, the status under the buttons. */
.bowling-online {
    display: grid;
    gap: 0.6rem;
}

.bowling-online[hidden] {
    display: none;
}

.bowling-code {
    text-transform: uppercase;
    letter-spacing: 0.25em;
}

.bowling-status:empty {
    display: none;
}

/* Phones: a taller view down the lane. */
@media (max-width: 640px) {
    .filter-landing-stage.bowling-stage {
        aspect-ratio: 3 / 4.4;
        max-height: max(100vw, calc(100svh - 4rem));
    }
}
