* {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  font-size: 18px;
}
body {
  margin: 0 auto;
  padding: 0.4em 2em;
  width: auto;
  min-width: 300px;
  max-width: 800px;
}
h1 {
  font-size: 2rem;
}

/* form */
form {
  margin: 3em auto;
  min-width: 300px;
  width: auto;
  max-width: 500px;
  text-align: center;
}
fieldset {
  border: 2px solid #ccc;
  border-radius: 0.2em;
  margin: 1em 0;
}

legend {
  font-weight: bold;
}

label {
  margin-right: 0.6em;
}

input {
  margin: 0.6em 0;
}

input[type='number'],
input[type='time'] {
  margin-right: 1em;
}

input[type='submit'] {
  width: 100px;
  height: 3em;
  margin: 1em auto;
  display: block;
  background-color: royalblue;
  border: none;
  padding: 0.4em;
  border-radius: 0.2em;
  color: whitesmoke;
  font-weight: bold;
}
input[type='submit']:hover {
  cursor: pointer;
  background-color: cornflowerblue;
}

.total-time {
  font-weight: bold;
}
.total-time > span {
  color: royalblue;
}

/* result */
#result {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2em;
  min-width: 300px;
  width: auto;
  max-width: 500px;
  border: 2px solid #ccc;
  border-radius: 0.2em;
}

#result h1 {
  border-bottom: 3px solid royalblue;
  font-size: 1.6rem;
  margin: 1em 0 0;
}

#result p {
  text-align: center;
  color: red;
  font-weight: bold;
  font-size: 1.4rem;
}

/* table */
table {
  margin: 0 auto 3em;
  border: 2px solid #ddd;
  border-radius: 0.4em;
  min-width: 300px;
  width: auto;
  max-width: 500px;
}

thead {
  background-color: #ddd;
}
td,
th {
  border-right: 1px solid #ddd;
}
td:last-child {
  border: none;
}
tr:nth-child(even) {
  background-color: #eee;
}

tfoot {
  background-color: #ddd;
}
