/* Preserve the existing theme; keep controls usable on narrow screens. */
img { max-width: 100%; height: auto; }
.game-container, .game-main, .game-section { min-width: 0; }
#gameFrame { width: 100%; border: 0; }
#gameFrame:fullscreen { width: 100vw; height: 100vh; background: #000; }
#gameFrame:-webkit-full-screen { width: 100vw; height: 100vh; background: #000; }
#gameWrapper { overflow: hidden; }
#gameFrame[data-native-width] { top: 0; left: 0; margin: 0; }
#gameWrapper:fullscreen { width: 100vw !important; height: 100vh !important; background: #000; }
.game-expanded-active { overflow: hidden; }
.game-container.game-expanded {
    position: fixed !important; inset: 0 !important; z-index: 10000 !important;
    width: 100vw !important; height: 100dvh !important; max-width: none !important;
    margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important;
    background: #000;
}
.game-expanded #gameWrapper, .game-expanded #gameFrame { width: 100%; height: 100%; }
.game-expanded #gameWrapper { height: 100% !important; }
.game-exit-expanded { position: absolute; top: 8px; right: 8px; z-index: 10001; padding: 10px 14px; background: #222; color: #fff; border: 1px solid #fff; border-radius: 5px; cursor: pointer; }
.game-exit-expanded[hidden] { display: none; }
:focus-visible { outline: 2px solid #ffd700; outline-offset: 4px; }
@media (max-width: 600px) {
    .header-content { flex-wrap: wrap; justify-content: center; gap: 12px; }
    nav ul { flex-wrap: wrap; justify-content: center; gap: 12px; }
    .game-controls { flex-wrap: wrap; gap: 10px; }
    .page-title, .game-title { overflow-wrap: anywhere; }
    .content-section { overflow-wrap: break-word; }
    .contact-email { overflow-wrap: anywhere; font-size: 1.2rem; }
    .control-desc, .game-info { min-width: 0; overflow-wrap: anywhere; }
    .game-header, .game-title-bar { flex-wrap: wrap; gap: 10px; }
    .game-placeholder-img { max-width: calc(100% - 32px); height: auto; }
    .image-row, .screenshot-grid, .animatronic-info { grid-template-columns: minmax(0, 1fr); }
    .article-content, .article-container { overflow-wrap: anywhere; }
    .article-content table, .article-container table { display: block; max-width: 100%; overflow-x: auto; }
}
