.layout form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 1em auto;
  margin-bottom: 1em;
  padding: 1em;
  background: #f5f5f5;
  border: 1px solid #eee;
}

.layout form > label + label,
.layout form > input[type="submit"] {
  margin-top: 1em;
}

.layout label {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-weight: bold;
  width: 100%;
}

.layout input[type="text"],
.layout input[type="email"] {
  width: 100%;
  text-align: center;
  margin-top: 0.25em;
}

@media screen and (min-width: 600px) {
  .layout form {
    flex-direction: row;
  }

  .layout form > label + label,
  .layout form > input[type="submit"] {
    margin-top: 0;
    margin-left: 1em;
  }

  .layout label {
    flex-direction: row;
    width: auto;
  }

  .layout input[type="text"],
  .layout input[type="email"] {
    width: auto;
    text-align: left;
    margin-top: 0;
    margin-left: 0.25em;
  }
}