.inline-game-panel {
    grid-column: 1 / -1;
    min-width: 0;
    margin: 4px 0 14px;
    padding: 20px;
    border: 1px solid var(--premium-line, var(--palette-focus-dark, #ffce29));
    border-radius: 16px;
    background: var(--premium-surface, var(--palette-surface-dark, #17264d));
    color: var(--premium-text, var(--palette-text-dark, #f3f7ff));
}
.inline-game-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.inline-game-header h3 { margin: 0; color: inherit; font-size: 20px; }
.inline-game-close, .inline-game-retry { border: 1px solid currentColor; border-radius: 8px; padding: 8px 16px; background: transparent; color: inherit; cursor: pointer; }
.inline-game-close { font-size: 26px; line-height: 1; padding: 4px 10px; }
.inline-game-status { margin: 12px 0; color: inherit; }
.inline-game-error .inline-game-status { border-left: 3px solid #ef746f; padding: 12px; }
.inline-game-frame { display: block; width: 100%; height: 300px; border: 0; background: transparent; }
.inline-game-panel [hidden] { display: none !important; }
.inline-game-selected { outline: 3px solid var(--palette-focus-dark, #ffce29); outline-offset: 2px; }
/* Provider pages retain their scripts and API path, with only their catalog visible. */
html.inline-game-document, html.inline-game-document body { min-height: 0 !important; height: auto !important; overflow: hidden !important; background: transparent !important; }
html.inline-game-document body { margin: 0 !important; padding: 0 !important; }
html.inline-game-document body:not(.inline-game-path) { visibility: hidden; }
.inline-game-path > :not(.inline-game-path):not(.inline-game-content):not(script):not(style):not(link) { display: none !important; }
html.inline-game-document .inline-game-path { margin: 0 !important; padding: 0 !important; width: 100% !important; max-width: none !important; min-height: 0 !important; }
html.inline-game-document body .inline-game-content { box-sizing: border-box; margin: 0 !important; padding: 8px !important; width: 100% !important; max-width: none !important; }
html.inline-game-document:root body.game-catalog-page .game-catalog-hero {
    display: flex !important;
    align-items: stretch;
    margin: 0 0 18px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none !important;
}
html.inline-game-document:root body.game-catalog-page .game-catalog-hero > :not(.game-catalog-search-wrap) { display: none !important; }
html.inline-game-document:root body.game-catalog-page .game-catalog-search-wrap { box-sizing: border-box; flex: 1 1 100%; width: 100%; min-width: 0; }
html.inline-game-document:root body.game-catalog-page .game-catalog-search { box-sizing: border-box; background: var(--catalog-input) !important; color: var(--catalog-text) !important; }
html.inline-game-document:root body.game-catalog-page .game-catalog-container .game-item,
html.inline-game-document:root body.game-catalog-page .game-item .game-title { background: var(--catalog-card) !important; color: var(--catalog-text) !important; }
@media (max-width: 600px) { .inline-game-panel { padding: 12px 8px; border-radius: 12px; } .inline-game-header { padding: 0 4px; } }

/* Embedded mobile catalogs show three games without changing the lobby grid. */
@media (max-width: 767px) {
    html.inline-game-document body.game-catalog-page .game-catalog-container .row:has(> .game-item) { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
    html.inline-game-document body.game-catalog-page .game-item .game-title { min-height: 44px; padding: 6px 3px; font-size: 11px; }
}

/* Follow the host desktop layout even when the embedded frame is narrower. */
html.inline-game-document.inline-game-desktop body.game-catalog-page .game-catalog-container .row:has(> .game-item) { grid-template-columns: repeat(7, minmax(0, 1fr)); }
