html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  /* A phone's browser draws its toolbars over the layout viewport, so `100%` of
     it puts the footer behind them. `dvh` is the viewport as it actually
     stands; the line above stays for anything that has never heard of it, which
     is every browser without such toolbars. */
  height: 100dvh;
  overflow: hidden;
  /* Nothing here scrolls the page — the app scrolls what it draws — so a drag
     that runs past the end of something is a drag with nowhere to go, rather
     than a pull-to-refresh or a bounce. */
  overscroll-behavior: none;
  /* The light panel fill the app paints, so the moment before the wasm loads
     looks like the moment after rather than a flash of white. */
  background: #f2ece2;
}
@media (prefers-color-scheme: dark) {
  html,
  body {
    /* egui's dark panel fill. */
    background: #1b1b1b;
  }
}
canvas {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
  /* Every touch belongs to the app. Left to itself the browser holds a tap back
     to see whether a second one follows and means zoom, takes a drag as a pan
     of a page that does not scroll, and answers a press held down — which is
     how a puzzle goes back a step — with a menu offering to save the canvas as
     an image. */
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}
/* eframe keeps a hidden input beside the canvas to catch IME and mobile
   keyboard input, and moves it over the caret whenever a text field is focused
   — which is to say, under the pointer that just put the caret there. The
   canvas has then been left, as far as the browser is concerned, and the
   `mouseleave` that follows reaches egui as the pointer having gone: a drag to
   select text is dropped at its first step, and nothing is ever selected to
   copy. Taking the input out of hit-testing costs nothing, since it is only
   ever focused from code. */
#app ~ input {
  pointer-events: none;
}
