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

body {
  display: flex;
  align-items: center;
  justify-content: center;
  /* A game, not a page: no pinch zoom, text selection or long-press menus on phones. */
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

/* Phones held upright: the 4:3 screen would be tiny, so ask for landscape instead. */
#rotate {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 3;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #000;
  color: #f3f300;
  font: 18px/1.3 ui-monospace, Menlo, monospace;
  text-align: center;
  padding: 24px;
}

body.portrait-phone #rotate {
  display: flex;
}

body.portrait-phone #screen,
body.portrait-phone .overlay {
  visibility: hidden;
}

#screen {
  display: block;
  cursor: none;
  touch-action: none;
}

#loading {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f3f300;
  font: 16px/1 ui-monospace, Menlo, monospace;
  pointer-events: none;
}

/* HTML pieces over the canvas (overlay.js): text boxes and the Google sign-in button. */
.overlay {
  position: fixed;
  box-sizing: border-box;
  z-index: 2;
}

.tim-text {
  -webkit-user-select: text;
  user-select: text;
  touch-action: auto;
  margin: 0;
  padding: 2px 6px;
  border: 2px solid #c8901a;
  border-radius: 3px;
  background: #fffbd0;
  color: #000;
  font-family: ui-monospace, Menlo, monospace;
  resize: none;
  outline: none;
}

.tim-text:focus {
  border-color: #f3c800;
  box-shadow: 0 0 0 1px #6b3f1c;
}

.google-slot {
  display: flex;
  align-items: center;
  justify-content: center;
}
