*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #1d2b53;
}

body {
  overscroll-behavior: none;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Sized and positioned from JS so it follows the visual viewport (mobile keyboard). */
#stage {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.frame {
  position: relative;
  flex: none;
}

.layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Low-res background canvas, upscaled with hard pixel edges. */
.layer-bg {
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}

/* Hidden text field: focusable (so mobile shows a keyboard) but invisible.
   16px font stops iOS from zooming in on focus. */
.kb-proxy {
  position: fixed;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  opacity: 0;
  font-size: 16px;
  pointer-events: none;
  caret-color: transparent;
}
