* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; }
body { height: 100vh; height: 100dvh; background: #000; font: 500 16px Arial, sans-serif; }
.game-frame { position: fixed; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #000; }
.game-navigation { position: fixed; z-index: 2147483646; top: 0; left: 0; width: 100%; display: flex; align-items: flex-start; justify-content: space-between; padding: max(12px, env(safe-area-inset-top)) calc(max(12px, env(safe-area-inset-right)) + 10px) 0 calc(max(12px, env(safe-area-inset-left)) + 10px); pointer-events: none; }
.game-back, .game-fullscreen { pointer-events: auto; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; background: #2B2478; color: #fff; cursor: pointer; box-shadow: 0 2px 10px #0005; touch-action: manipulation; }
.game-back img { width: 100%; height: 100%; display: block; }
.game-fullscreen { border: 2px solid #fff; }
.game-fullscreen svg { width: 26px; height: 26px; }
.game-back:hover, .game-fullscreen:hover { filter: brightness(1.15); }
.game-fullscreen:focus { outline: none; }
.game-fullscreen:focus-visible { background-color: #5549ad; }
.game-back:focus-visible { outline: 3px solid #FFD000; outline-offset: 3px; }
.game-fullscreen[hidden], .fullscreen-status[hidden] { display: none; }
.fullscreen-status { position: fixed; z-index: 11; bottom: max(16px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); max-width: 90%; padding: 10px 16px; border-radius: 12px; background: #2B2478; color: #fff; text-align: center; }
@media (max-height: 450px) { .game-navigation { padding-top: max(8px, env(safe-area-inset-top)); } .game-back, .game-fullscreen { width: 40px; height: 40px; } }

/* Bouton Back agrandi ×2, indépendant du bouton plein écran. */
.game-back { width: 96px; height: 96px; }
@media (max-height: 450px) { .game-back { width: 80px; height: 80px; } }

.game-back, .game-fullscreen { flex-shrink: 0; }
