* { margin:0; padding:0; box-sizing:border-box; }
html, body {
  width:100%; height:100%;
  background:#000;
  overflow:hidden;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  -webkit-user-select:none; user-select:none;
  touch-action:none;
  /* the blue flash a phone paints over anything it thinks you tapped. On a
   * game that is one dark canvas it lands as a full-screen strobe. */
  -webkit-tap-highlight-color: transparent;
  /* iOS answers a long press with a copy/share sheet over the game. The pulse
   * IS a long press, so on Safari every deliberate sonar shot raised it. */
  -webkit-touch-callout: none;
}
body { display:flex; align-items:center; justify-content:center; }
/*
 * The stage fills whatever it is given.
 *
 * It used to be pinned to 16/9, which letterboxed a phone held upright down to
 * a 375x211 strip - the game in a quarter of the screen with black above and
 * below it. The camera now holds a constant visible AREA rather than a
 * constant width, so any shape of viewport gets a sensible amount of world and
 * the stage can simply take the room it has.
 */
#stage {
  position:relative;
  width:100%;
  height:100%;
}
/*
 * NEVER MORE THAN TWICE AS LONG AS IT IS SHORT - ON ONE PORTAL ONLY.
 *
 * Yandex 1-6-2-2 says the long side of the active area may not exceed the
 * short side by more than 2x on desktop, and a stage that fills the window
 * breaks that on an ultrawide: 21:9 is 2.39.
 *
 * It is deliberately NOT the default. Nobody else asks for it, and on a wide
 * monitor it costs the player picture - the game stops filling the screen and
 * gets page background either side. Paying that everywhere to satisfy one
 * portal's rule is the wrong trade, so tools/build.js puts this class on the
 * body of the Yandex build and of no other.
 *
 * On an ordinary screen it is not binding anyway: 16:9 is 1.78, and 200vh is
 * wider than the window.
 */
body.aspect-capped #stage {
  max-width:200vh;
  max-height:200vw;
}
#screen { display:block; width:100%; height:100%; background:#04060a; }
/*
 * THE POINTER GETS OUT OF THE WAY.
 *
 * This is a keyboard game once a level starts - the mouse does nothing in
 * there - so an arrow parked over the rover is a permanent piece of another
 * program sitting in the middle of the picture. It also ends up in any
 * recording made of the game, and a visible mouse cursor is on the list of
 * things CrazyGames reject a preview video for.
 *
 * Set only while a level is being played AND the mouse has been still for a
 * moment; the smallest movement brings it back, so the MENU button and the
 * two icons are never unreachable.
 */
body.hide-cursor, body.hide-cursor #screen { cursor: none; }
