/* v0.9.6 · Fullscreen World Viewport
   The world/canvas owns the entire playable browser viewport. HUD and farm
   controls remain overlays; no layout band is reserved below the map. */

:root{
  --tcq-app-height:100vh;
  --tcq-app-width:100vw;
}
@supports(height:100lvh){:root{--tcq-app-height:100lvh}}

html,body{
  width:100%!important;
  height:100%!important;
  min-height:100%!important;
  margin:0!important;
  padding:0!important;
  overflow:hidden!important;
  background:#79cfe7!important;
}
body>main,
main,
.layout,
.gamecol{
  position:relative!important;
  width:100%!important;
  height:var(--tcq-app-height)!important;
  min-height:var(--tcq-app-height)!important;
  max-height:var(--tcq-app-height)!important;
  margin:0!important;
  padding:0!important;
  overflow:hidden!important;
}

.canvas-wrap{
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  min-width:0!important;
  min-height:0!important;
  max-width:none!important;
  max-height:none!important;
  margin:0!important;
  padding:0!important;
  aspect-ratio:auto!important;
  overflow:hidden!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  background:#79cfe7!important;
}

#game{
  position:absolute!important;
  inset:0!important;
  display:block!important;
  width:100%!important;
  height:100%!important;
  min-width:100%!important;
  min-height:100%!important;
  margin:0!important;
  border:0!important;
  border-radius:0!important;
  object-fit:fill!important;
  image-rendering:pixelated!important;
  background:#79cfe7!important;
}

/* Every gameplay layer sits on top of the full-world canvas. */
.game-hud,.mobile-controls,.dialog,.shop-modal,.tcq-sheet,#playerSpeechBubble,#worldPrompt,.toast{
  position:absolute;
}
.game-hud,.mobile-controls{inset:0!important}

/* The farm controls float above the map rather than consuming document height. */
.farm-command-deck{
  position:absolute!important;
  bottom:max(5px,env(safe-area-inset-bottom,0px))!important;
}

/* On phones prefer the large viewport unit so Safari does not leave the
   short dynamic-viewport band seen in older builds. */
@media(max-width:760px){
  html,body,body>main,main,.layout,.gamecol{
    height:var(--tcq-app-height)!important;
    min-height:var(--tcq-app-height)!important;
    max-height:var(--tcq-app-height)!important;
  }
  .canvas-wrap{height:var(--tcq-app-height)!important}
  #game{height:100%!important}

  /* Keep edge controls inside the actual visible viewport. */
  .hud-edge-rail{max-height:64%!important}
  .hud-chat-edge{z-index:10!important}
  .farm-command-deck{z-index:9!important}
}

/* Landscape is also edge-to-edge; no chat/footer spacer may reappear. */
@media(max-width:760px) and (orientation:landscape){
  html,body,body>main,main,.layout,.gamecol,.canvas-wrap{
    height:var(--tcq-app-height)!important;
    min-height:var(--tcq-app-height)!important;
    max-height:var(--tcq-app-height)!important;
  }
}
