/* The Cocos subframe follows the available viewport, not a fixed desktop size.
   SHOW_ALL in FirstPlayable preserves the full 1280x720 HUD and touch coordinates. */
html, body {
  width: 100%; height: 100%; margin: 0; overflow: hidden;
  background: #243e4f;
  overscroll-behavior: none;
  touch-action: none;
}
body {
  display: flex; flex-direction: column;
  box-sizing: border-box;
  height: 100dvh;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px)
           env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
}
#GameDiv { width: 100% !important; height: auto !important; flex: 1 1 0; min-height: 0; position: relative; }
#Cocos3dGameContainer, #GameCanvas { width: 100%; height: 100%; }
canvas { display: block; outline: none; }
body, canvas, div { user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }

#web-toolbar {
  flex: 0 0 38px; display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 0 10px; color: #f8f2de; font: 12px system-ui, sans-serif;
}
#fullscreen-button {
  min-height: 32px; padding: 5px 14px; border: 1px solid #f4cf77; border-radius: 7px;
  background: #243e4f; color: #f4cf77; font: bold 12px system-ui, sans-serif;
  cursor: pointer; touch-action: manipulation;
}
html:fullscreen #web-toolbar { display: none; }
