/* Quvilo Path Flow — mobile viewport shell v0.11.1
   Safe to use with Phaser's existing 600 x 800 FIT scaling.
   Fills letterbox space with the game's navy palette; does NOT stretch,
   crop or change the game's pointer/touch coordinates.
*/
:root {
  color-scheme: dark;
  --quvilo-bg: #050b19;
}

html,
body {
  width: 100%;
  min-height: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: var(--quvilo-bg) !important;
  overscroll-behavior: none;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-tap-highlight-color: transparent;
}

/* Cover common Vite/Phaser HTML shells without changing their layout. */
#app,
#root {
  background-color: var(--quvilo-bg) !important;
}

#game-container {
  width: 100%;
  min-height: 100vh;
  height: 100vh; /* fallback */
  min-height: 100dvh;
  height: 100dvh;
  box-sizing: border-box;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  /* Seamlessly color the top/bottom unused phone space. */
  background: linear-gradient(
    180deg,
    #0b1830 0%,
    #050b19 29%,
    #050b19 71%,
    #0b1830 100%
  ) !important;
  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);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

#game-container canvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
  flex: 0 0 auto;
  touch-action: none;
}

/* Mobile landscape has very little height; preserve all game controls. */
@media (orientation: landscape) and (max-height: 500px) {
  #game-container {
    background: var(--quvilo-bg) !important;
  }
}
