@charset "utf-8";

:root {
  --theme-color: #219ebc;
}

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

body {
  font-family: 'MS Pゴシック', sans-serif;
  height: 100%;
}

button {
  cursor: pointer;
}

main {
  width: 80%;
  margin: 0 auto;
  padding: 2rem 0;
}

header,
footer {
  width: 100%;
  height: 100px;
  background-color: var(--theme-color);
}

h1 {
  text-align: center;
  color: var(--theme-color);
  padding-bottom: 1rem;
}

form {
  max-width: 600px;
  margin: 0 auto;
}

span {
  vertical-align: baseline;
  color: var(--theme-color);
  font-size: 0.8rem;
  margin-left: 0.5rem;
}

form div {
  width: 100%;
  display: flex;
  margin: 1rem;
  flex-wrap: wrap;
}

form label {
  width: 180px;
  margin-bottom: 0.5em;
}

select {
  background-color: white;
  border: 1px solid #000;
  padding: 0.2rem;
}

form input[type='text'],
form input[type='email'] {
  width: 50%;
  padding: 0.2rem;
}

form input[type='text']:focus,
form input[type='email']:focus,
textarea:focus {
  outline: none;
}

#agree {
  display: block;
  width: 300px;
  margin: 2rem auto 0;
}

form textarea {
  width: 60%;
  padding: 0.2rem;
}

button {
  display: block;
  background-color: var(--theme-color);
  border: none;
  padding: 1rem;
  color: #fff;
  width: 200px;
  border-radius: 25px;
  margin: 0 auto;
  margin-top: 1rem;
}

@media screen and (max-width: 600px) {
  main {
    width: 100%;
  }

  form {
    padding-left: 2rem;
  }

  form p {
    flex-direction: column;
  }

  form input[type='text'],
  form input[type='email'] {
    width: 60%;
  }

  form textarea {
    width: 80%;
  }

  select {
    width: 60%;
  }

  #agree {
    display: block;
  }
}
