html {
  color-scheme: dark;
  background: #000;
}

html,
body {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #000;
  touch-action: none;
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

#frame {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#screen {
  display: block;
  background: #000;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  touch-action: none;
}

.pad {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

body.show-pad .pad {
  display: block;
}

.pad-btn {
  pointer-events: auto;
  position: absolute;
  bottom: calc(var(--pad-bottom, 16px) + env(safe-area-inset-bottom, 0px));
  width: var(--pad-size, 76px);
  height: var(--pad-size, 76px);
  min-width: 64px;
  min-height: 64px;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border-radius: 0;
  border: 4px solid #fff;
  background: #000;
  color: #fff;
  appearance: none;
  -webkit-appearance: none;
  touch-action: none;
  outline: none;
}

#btn-left {
  left: var(--pad-side, 18px);
}

#btn-right {
  left: calc(var(--pad-side, 18px) + var(--pad-size, 76px) + var(--pad-gap, 20px));
}

#btn-jump {
  right: var(--pad-side, 18px);
  border-color: #ff2a2a;
  color: #ff2a2a;
}

.pad-btn svg {
  width: 46%;
  height: 46%;
  display: block;
  shape-rendering: crispEdges;
}

.pad-btn.is-down {
  background: #fff;
  color: #000;
  border-color: #6b6b6b;
}

.pad-jump.is-down {
  background: #ff2a2a;
  color: #000;
  border-color: #fff;
}

.pad.is-overlay .pad-btn {
  opacity: 0.78;
}

.pad.is-overlay .pad-btn.is-down {
  opacity: 0.94;
}

noscript p {
  color: #fff;
  font-family: sans-serif;
  text-align: center;
  margin-top: 2rem;
}
