html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #07040f;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
#game {
  position: fixed;
  inset: 0;
}
#screen {
  position: absolute;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  background: #000;
  outline: none;
}
#scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: none;
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0) calc(var(--px, 3px) * 0.55), rgba(0, 0, 0, 0.16) calc(var(--px, 3px) * 0.55), rgba(0, 0, 0, 0.16) var(--px, 3px));
}
body.scan #scan {
  display: block;
}
#touch {
  position: absolute;
  inset: 0;
  touch-action: none;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-weight: 900;
}
#touch[hidden] {
  display: none;
}
.tz {
  position: absolute;
  bottom: calc(env(safe-area-inset-bottom) + 3vmin);
  display: flex;
  gap: 3vmin;
  align-items: flex-end;
}
.tz.left {
  left: calc(env(safe-area-inset-left) + 3vmin);
}
.tz.right {
  right: calc(env(safe-area-inset-right) + 3vmin);
}
.tb {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(20, 10, 50, 0.32);
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-radius: 18%;
  font-size: 3.2vmin;
  letter-spacing: 0.05em;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.6);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.25);
  pointer-events: none;
}
.tb svg {
  width: 55%;
  height: 55%;
  fill: rgba(255, 255, 255, 0.9);
}
.tb.steer {
  width: 19vmin;
  height: 19vmin;
}
.tb.gas {
  width: 21vmin;
  height: 26vmin;
  background: rgba(40, 160, 90, 0.35);
  border-color: rgba(150, 255, 190, 0.6);
}
.tb.brake {
  width: 17vmin;
  height: 17vmin;
  background: rgba(200, 40, 60, 0.35);
  border-color: rgba(255, 150, 160, 0.6);
}
.tb.gear {
  width: 13vmin;
  height: 11vmin;
  font-size: 2.4vmin;
  display: none;
}
.tb.on {
  transform: scale(0.94);
  background: rgba(255, 255, 255, 0.35);
  border-color: #fff;
}
#touch.manual .tb.gear {
  display: flex;
}
#touch.autogas .tb.gas {
  opacity: 0.4;
}
.tb.pause {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 2vmin);
  right: calc(env(safe-area-inset-right) + 40vmin);
  width: 10vmin;
  height: 9vmin;
  font-size: 3.4vmin;
}
.wheelhint, .tilthint {
  display: none;
  position: absolute;
  left: 0;
  bottom: 0;
  width: 42vmin;
  height: 22vmin;
  border: 2px dashed rgba(255, 255, 255, 0.35);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 2.4vmin;
  align-items: center;
  justify-content: center;
  text-align: center;
}
#touch.wheel .tb.steer, #touch.tilt .tb.steer {
  visibility: hidden;
}
#touch.wheel .wheelhint {
  display: flex;
}
#touch.tilt .tilthint {
  display: flex;
}
#safe {
  position: fixed;
  top: 0;
  left: 0;
  width: 1px;
  height: env(safe-area-inset-top);
  visibility: hidden;
  pointer-events: none;
}
body.portrait .tz {
  bottom: calc(env(safe-area-inset-bottom) + 5vmin);
}
body.portrait .tb.pause {
  top: calc(var(--viewb, 50vh) + 3vmin);
  right: calc(env(safe-area-inset-right) + 4vmin);
}
