.noble-merge-game {
    width: min(960px, calc(100% - 2rem));
    height: min(820px, calc(100% - 2rem));
    max-width: none;
    max-height: none;
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: #151515;
    color: #fff;
    overflow: hidden;
}

.noble-merge-game[open] {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
}

.noble-merge-game::backdrop {
    background: rgb(0 0 0 / 78%);
}

body:has(.noble-merge-game[open]) {
    overflow: hidden;
}

.noble-merge-game-controls {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: max(6px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) 6px 8px;
}

.noble-merge-game-controls button {
    min-height: 44px;
    padding: 4px 12px;
    border: 1px solid #aaa;
    border-radius: 6px;
    background: #242424;
    color: inherit;
    cursor: pointer;
    font: inherit;
}

.noble-merge-game-controls button:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.noble-merge-game iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.noble-merge-game.is-expanded,
.noble-merge-game:fullscreen {
    width: 100%;
    height: 100%;
    border-radius: 0;
}

@media (max-width: 600px) {
    .noble-merge-game {
        width: calc(100% - 12px);
        height: calc(100% - 12px);
    }
}
