* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; background: #101522; font-family: Arial, sans-serif; }
body { color: #eef2f7; }
.page-shell { min-height: 100vh; display: grid; place-items: center; padding: 14px; }
.game-frame { width: min(100%, 980px); background: #171f31; border: 1px solid #39445b; border-radius: 18px; padding: 10px; box-shadow: 0 20px 60px #0008; touch-action: none; }
.game-frame, .game-frame *, #game-container, #game-container canvas, .mobile-controls, .mobile-controls button {
  -webkit-user-select: none !important; user-select: none !important; -webkit-touch-callout: none !important;
}
.top-actions { display: flex; justify-content: flex-end; padding: 2px 2px 8px; }
.top-actions button { border: 0; border-radius: 9px; padding: 8px 12px; background: #313d56; color: white; font-weight: 700; cursor: pointer; }
#game-container { width: 100%; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 12px; background: #182033; }
#game-container canvas { width: 100% !important; height: 100% !important; display: block; }
#loadingMessage { display: grid; place-items: center; height: 100%; min-height: 300px; color: #dce3ee; font-weight: 700; }
.mobile-controls { display: flex; justify-content: center; align-items: center; gap: 14px; padding: 12px 0 4px; }
.mobile-controls button { min-width: 82px; height: 66px; border: 1px solid #56647e; border-radius: 16px; background: #28344c; color: #fff; font-size: 28px; font-weight: 800; touch-action: none; cursor: pointer; }
.mobile-controls .zap { min-width: 150px; background: #7b5a20; border-color: #c69b42; font-size: 22px; }
.mobile-controls button:active { transform: translateY(2px); }
.help { margin: 6px 8px 4px; text-align: center; color: #aeb9ca; font-size: 14px; }
@media (min-width: 900px) { .mobile-controls { opacity: .9; } }
@media (max-width: 600px) {
  .page-shell { padding: 0; display: block; }
  .game-frame { border-radius: 0; border-left: 0; border-right: 0; padding: 6px; min-height: 100vh; }
  .top-actions { padding-top: max(2px, env(safe-area-inset-top)); }
  .mobile-controls { gap: 8px; }
  .mobile-controls button { min-width: 76px; height: 64px; }
  .mobile-controls .zap { min-width: 128px; }
  .help { font-size: 12px; }
}
