body {
  background: #000;
  color: #fff;
  font-family: monospace;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  padding: 16px;
}

#game {
  position: relative;
  width: min(90vw, 300px);
  aspect-ratio: 1 / 1;
  border: 4px solid #555;
  overflow: hidden;
  outline: none;
}

#game::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("./images/nu_map.png") center / cover no-repeat;
  z-index: 1;
  pointer-events: none;
}

.path {
  position: absolute;
  background: #333;
  z-index: 2;
}

#path-vertical {
  left: 50%;
  top: 0;
  width: 6%;
  height: 100%;
  transform: translateX(-50%);
}

#path-horizontal {
  left: 0;
  top: 50%;
  width: 100%;
  height: 6%;
  transform: translateY(-50%);
}

#player {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6%;
  height: 6%;
  transform: translate(-50%, -50%);
  background: url("images/sprite_right_1.png") center / contain no-repeat;
  z-index: 3;
}

.label {
  position: absolute;
  font-size: clamp(10px, 2.5vw, 12px);
  color: #ccc;
  white-space: nowrap;
  z-index: 2;
}

.label.up    { top: 4px; left: 50%; transform: translateX(-50%); }
.label.down  { bottom: 4px; left: 50%; transform: translateX(-50%); }
.label.left  { left: 4px; top: 50%; transform: translateY(-50%); }
.label.right { right: 4px; top: 50%; transform: translateY(-50%); }

#controls {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.controls-middle {
  display: flex;
  justify-content: center;
}

#controls button {
  font-size: 24px;
  margin: 6px;
  width: 64px;
  height: 64px;
  touch-action: manipulation;
}