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

html {
  scroll-snap-type: y mandatory;
}

body {
  font-family: sans-serif;
  font-size: 0.8rem;
  user-select: none;
}

p {
  width: 25rem;
  max-width: 100%;
  line-height: 1.4;
}

.credit-line {
  color: rgb(140, 175, 187);
  position: absolute;
  top: calc(0.5rem + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  text-align: center;
}

h2,
h3,
a {
  text-decoration: none;
  color: black;
  font-size: 1rem;
  font-weight: 600;
}

h2 {
  margin-bottom: 2rem;
}

body > h3 {
  position: fixed;
  bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  padding: 0.2rem 0.6rem;
  white-space: nowrap;
}

#total-output {
  background-color: lightblue;
}

textarea {
  font-family: sans-serif;
  border-radius: 0;
  padding: 0.3rem 0.5rem;
}

fieldset {
  border: none;
}

form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  padding: 0.5rem 1rem;
  scroll-snap-align: start;
}

legend {
  margin-bottom: 0.3rem;
}

fieldset {
  display: flex;
  flex-direction: column;
}

ul {
  order: 1;
  margin-top: 0.3rem;
  padding-left: 1.1rem;
  font-size: 0.7rem;
  line-height: 1.5;
  color: #232323;
}

select,
a {
  text-decoration: none;
  border: 1px solid black;
  padding: 0.3rem 0.5rem;
  cursor: pointer;
}

a:hover {
  background-color: rgb(169, 203, 214);
}

@media (max-width: 600px) {
  form {
    width: 100%;
  }

  fieldset {
    width: 100%;
  }

  select {
    width: 100%;
  }

  body > h3 {
    bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
  }

  section {
    justify-content: flex-start;
    padding-top: 20vh;
  }

  section:nth-of-type(3) {
    justify-content: center;
    padding-top: 0;
  }
}
