.game-menu-modal-root {
    position: fixed;
    inset: 0;
    z-index: 1000;
    pointer-events: none;
}

.game-menu-modal-root > * {
    pointer-events: auto;
}

.game-menu {
    position: fixed;
    display: flex;
    flex-direction: column;
    gap: 0.75vmin;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 1vmin;
    width: min(26rem, 88vw);
    box-sizing: border-box;
    z-index: 1001;
}

.game-menu-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1000;
}

.game-menu-header,
.game-menu-actions {
    background: var(--beige-bg);
    border: 1px solid rgba(0, 0, 0, 0.18);
    box-shadow: var(--inset-shadow);
    border-radius: 0.5vmin;
}

.game-menu-header {
    text-align: center;
}

.game-menu-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6vmin;
    padding: 1vmin;
    align-items: stretch;
    box-sizing: border-box;
}

.game-menu-leave-button,
.game-menu-close-button {
    display: flex;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    justify-content: center;
    width: 100%;
}

.app-shell-mobile .game-menu {
    width: calc(100vw - 1.5rem);
    max-height: calc(100vh - 1.5rem);
    padding: 0.7rem;
    gap: 0.7rem;
}

.app-shell-mobile .game-menu-header,
.app-shell-mobile .game-menu-actions {
    padding: 0.75rem;
    border-radius: 0.9rem;
}

.app-shell-mobile .game-menu-actions {
    gap: 0.45rem;
    padding: 0.75rem;
}

.app-shell-mobile .game-menu-mobile-shell {
    height: 100%;
}

.app-shell-mobile .game-menu-mobile-actions {
    min-height: 0;
    justify-content: center;
}

.app-shell-mobile .game-menu {
    width: calc(100vw - 0.7rem);
    max-height: calc(100vh - 0.7rem);
    height: calc(100vh - 0.7rem);
    padding: 0;
    gap: 0;
}

.app-shell-mobile .game-menu-mobile-card {
    min-height: calc(100vh - 0.7rem);
    border-radius: 1rem;
    padding: max(0.75rem, env(safe-area-inset-top)) 0.75rem max(0.75rem, env(safe-area-inset-bottom));
}

.app-shell-mobile .game-menu-mobile-actions .game-menu-leave-button {
    width: 100%;
}
