html,
body {
  margin: 0px;
  overflow: hidden;
  height: 100%;
  font-family: Miso;
  user-select: none;
  -moz-user-select: none;
  -webkit-user-select: none;
  overflow: hidden;
}

#keypad {
  text-align: center;
  display: none;
  font-size: 0;
}

#keypad.column,
#keypad.column2,
#keypad.row,
#keypad.row-reverse,
#keypad.joypad,
#keypad.numpad,
#keypad.numpad2 {
  display: flex;
  flex-direction: column;
}

#keypad.row>div,
#keypad.row-reverse>div {
  flex: 1;
}

#keypad.row {
  flex-direction: row;
}

#keypad.row-reverse {
  flex-direction: row-reverse;
}

#keypad.joypad>#numpad {
  display: none;
}

#keypad.numpad>#joypad,
#keypad.numpad2>#joypad {
  display: none;
}

.key {
  font-size: 20px;
  cursor: pointer;
  margin: 1px 1px;
  height: 38px;
  line-height: 38px;
  width: 33%;
  width: calc(33.33% - 2px);
  border: 1px solid #000;
  background-color: rgb(239, 239, 239);
  text-align: center;
  border-radius: 3px;
}

#keypad.column2>#numpad>.key,
#keypad.numpad2>#numpad>.key {
  width: 24%;
  width: calc(25% - 3px);
}

.key.numpad2 {
  display: none;
}

#keypad.column2>#numpad>.key.numpad,
#keypad.numpad2>#numpad>.key.numpad {
  display: none;
}

#keypad.column2>#numpad>.key.numpad2,
#keypad.numpad2>#numpad>.key.numpad2 {
  display: inline-block;
}

#frame {
  display: flex;
  overflow: hidden;
  width: 100%;
  height: 100%;
  flex-direction: column;
}

#screen {
  display: block;
  background-color: #fff;
  font-size: 16px;
  width: 100%;
  flex: 1;
  min-height: 0px;
}

#screen>canvas {
  height: 100%;
  width: 100%;
  margin: auto;
  display: block;
  image-rendering: pixelated;
}

#alert {
  position: absolute;
  top: 0px;
  left: 0px;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

#alert .message {
  width: 50%;
  background: #fffdf9;
  padding: 10mm;
  font-size: 1em;
  text-align: center;
  word-wrap: break-word;
  margin: 100px auto;
}

.dialog {
  background: #fffdf9;
  width: calc(90% - 20mm);
  height: calc(100% - 40mm);
  padding: 10mm;
  font-size: 6mm;
  word-wrap: break-word;
  margin: 10mm auto;
  border: 0.1rem solid #a6a6a6;
  border-radius: 0.2rem;
}

.TextEditor {
  position: absolute;
  display: none;
  border: none;
}