.nkg-game-lock { overflow: hidden; }
.nkg-game-surface, .nkg-game-pad { overscroll-behavior: contain; }
.nkg-game-pad { display: none; }
.nkg-game-exit-hint { display: none; }
@media (hover: hover) and (pointer: fine) {
    .nkg-game-full .nkg-game-exit-hint {
        display: block;
        position: absolute;
        z-index: 4;
        pointer-events: none;
        inset: max(.45rem, env(safe-area-inset-top)) .7rem auto auto;
        padding: .32em .55em;
        border: 1px solid #7776a3;
        border-radius: 4px;
        background: #171729;
        color: #e1dcf9;
        font: 600 .72rem/1.3 ui-monospace, monospace;
    }
    .nkg-game-full.nkg-input-running,
    .nkg-game-full.nkg-input-running :is(canvas, .nkg-playfield, .nkg-courier-stage) {
        cursor: none !important;
    }
    .nkg-game-full.nkg-input-running button { cursor: pointer; }
}
@media (pointer: coarse), (max-width: 600px) {
    .nkg-game-pad {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1.3rem;
        width: min(100%, 26rem);
        margin-inline: auto;
        padding: .1rem clamp(.4rem, 3vw, 1rem);
        touch-action: none;
        user-select: none;
        -webkit-user-select: none;
    }
    .nkg-game-surface :is(.nkg-playfield, .nkg-courier-stage, canvas),
    .nkg-game-pad > * { touch-action: none; }
    .nkg-game-pad .nkg-joystick {
        display: grid;
        place-items: center;
        position: relative;
        width: clamp(64px, 13vw, 76px);
        aspect-ratio: 1;
        flex: none;
        border: 1px solid #766bad;
        border-radius: 50%;
        background: radial-gradient(circle, #30375c 0 34%, #232641 35% 62%, #191d34 63%);
        box-shadow: inset 0 0 0 3px #68589548;
        touch-action: none;
    }
    .nkg-joystick::before {
        content: "";
        position: absolute;
        inset: 13%;
        border: 1px dashed #9b90ce;
        border-radius: inherit;
    }
    .nkg-joystick > span {
        pointer-events: none;
        width: 43%;
        aspect-ratio: 1;
        border: 1px solid #e1cbff;
        border-radius: inherit;
        background: #b0a0f5;
        box-shadow: 0 3px 0 #5b4b9a;
        transform: translate(var(--stick-x, 0px), var(--stick-y, 0px));
    }
    .nkg-game-pad .nkg-game-action {
        min-height: clamp(54px, 13vw, 70px);
        min-width: clamp(72px, 17vw, 94px);
        padding: .35em .65em;
        border: 1px solid #e1ffad;
        border-radius: 999px;
        background: #b4ff42;
        box-shadow: 0 3px 0 #75a82c, inset 0 0 0 3px #7db62d33;
        color: #1a2411;
        font-size: .8rem;
        font-weight: 800;
        touch-action: none;
    }
    .nkg-game-pad .nkg-game-action:active { filter: brightness(.8); }
}
