@font-face {
  font-family: 'xkcd';
  src: url('../assets/xkcd-script.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: block;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  color: #000;
  overflow: hidden;
  position: fixed;
  inset: 0;
  overscroll-behavior: none;
  overscroll-behavior-y: none;
  touch-action: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  font-family: 'xkcd', 'Comic Sans MS', system-ui, sans-serif;
}

#stage {
  position: fixed;
  inset: 0;
  touch-action: none;
}

canvas#game {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

/* ---- controls hint overlay ---- */

/* Occupies the band between the top of the page and the tops of the figures'
   heads — the bottom edge is set from the canvas layout in resize(). The keys
   centre in that band, so they never sit over the cast. */
.hint {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: opacity 420ms ease;
  opacity: 1;
}

.hint.gone { opacity: 0; }

/* Two separate chips, well apart, rather than one panel holding both. */
.hint-keys {
  display: flex;
  gap: 100px;
  align-items: center;
}

.key {
  width: clamp(46px, 11vw, 58px);
  height: clamp(46px, 11vw, 58px);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: clamp(22px, 5.4vw, 29px);
  line-height: 1;
  font-family: system-ui, sans-serif;
}
