/* R8.2: canvas fullscreen real, sem zoom ou recorte por object-fit. */
html, body {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
  background: #050b18 !important;
  overscroll-behavior: none;
}

#unity-container,
#unity-container.unity-mobile,
#unity-container.unity-desktop {
  position: fixed !important;
  inset: 0 !important;
  box-sizing: border-box !important;
  width: 100% !important;
  height: 100% !important;
  height: 100dvh !important;
  transform: none !important;
  max-width: none !important;
  max-height: none !important;
  overflow: hidden !important;
}

#unity-canvas {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  touch-action: none !important;
  outline: 0;
}

body:fullscreen #unity-container,
html:fullscreen #unity-container {
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
}

#sgs-r82-fullscreen {
  position: fixed;
  z-index: 100000;
  top: max(12px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  box-sizing: border-box;
  border: 1px solid #56eff5;
  border-radius: 14px;
  padding: 12px 20px;
  background: rgba(5, 17, 34, .95);
  color: #e2ffff;
  box-shadow: 0 2px 16px rgba(23, 197, 233, .32);
  font: 700 16px/1.2 system-ui, sans-serif;
  letter-spacing: .02em;
  white-space: nowrap;
  touch-action: manipulation;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

#sgs-r82-fullscreen[hidden] { display: none !important; }

/* O aviso anterior de orientação continua útil, mas não deve obstruir o botão. */
#sgs-r8-rotate { z-index: 99998 !important; }

@media (max-height: 380px) and (orientation: landscape) {
  #sgs-r82-fullscreen { top: 6px; padding: 9px 16px; font-size: 14px; }
}
