/* PONDUCK — page shell.
 *
 * The canvas is the page. Everything here exists to stop the browser from
 * decorating it: no scroll, no margin, no overscroll rubber-band, no tap
 * highlight, and a background that already matches the render so there is no
 * white flash before the first frame. */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: #1d3210;   /* the backdrop green, darkened — see renderer clear */
  color: #f4f1e6;
  font-family: ui-monospace, "SF Mono", "DejaVu Sans Mono", Menlo, Consolas, monospace;
  /* Without this a swipe on the canvas pulls the whole page down on iOS and the
     camera drag fights the browser for the gesture. */
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

#stage {
  display: block;
  width: 100vw;
  height: 100vh;
  height: 100dvh;   /* dvh so the toolbar sliding away does not letterbox it */
  /* The canvas owns every gesture it gets. `touch-action: none` is what makes
     pointermove usable for a camera drag on a phone at all. */
  touch-action: none;
  outline: none;
}

.noscript {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Someone who has asked the OS for less motion still needs the game, but not
   the flashes: the tick-flash and the quack pop are decoration and nothing
   depends on seeing them. */
@media (prefers-reduced-motion: reduce) {
  #todo li.just, #quack.is-quacking { animation: none !important; }
}
