root {
  display: block;
}

body {
  background-color: black;
  background-repeat: repeat-x;
  background-position: top;
}

/* Game-active: lock body when canvas is fullscreen */
body.game-active {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: -webkit-fill-available;
}

body.game-active *,
body.game-active *:before,
body.game-active *:after {
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

input,
input:before,
input:after {
  -webkit-user-select: initial;
  -khtml-user-select: initial;
  -moz-user-select: initial;
  -ms-user-select: initial;
  user-select: initial;
}

body.game-active ::selection {
  background: transparent;
  color: inherit;
}
body.game-active ::-moz-selection {
  background: transparent;
  color: inherit;
}

#canvas_game,
#canvas_3d,
#canvas_upper_3d {
  position: fixed;
  box-shadow: 0 0 5vmin 1vmin black;
  /* Crisp scaling on high-DPI mobile screens */
  image-rendering: auto;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

#canvas_3d,
#canvas_upper_3d {
  pointer-events: none;
}

canvas {
  -ms-touch-action: none;
}

.ani_hack {
  -webkit-perspective: 1000;
  -webkit-backface-visibility: hidden;

  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  outline: none;
  -webkit-tap-highlight-color: transparent; /* mobile webkit */
}

.upper_3d {
  z-index: 2;
}

/***************FONTS*******************/
.check-fonts {
  position: fixed;
  opacity: 0;
}

.check-font-1 {
  font-family: 'FRAHV';
}
}

/* Floating fullscreen button — always visible on mobile */
#btn-fullscreen-mobile {
  display: none;
  position: fixed;
  bottom: 12px;
  right: 12px;
  z-index: 9999;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
  padding: 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
#btn-fullscreen-mobile svg {
  width: 22px;
  height: 22px;
  fill: #fff;
  pointer-events: none;
}
