body {
  font-family: sans-serif;
  padding: 20px;
}

main {
  display: grid;
  gap: 40px;
}

header {
  text-align: center;
  padding: 40px;
  background: #eee; /* replace later with bookshelf image */
}

table {
  width: 100%;
  margin: 20px 0;
}

th, td {
  border: 1px solid black;
  padding: 8px;
}

#reviewsContainer {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.author {
  font-weight: normal;
  font-size: 0.9em;
  color: #555;
}

.review-card p {
  font-style: italic;
}

#bookForm { /* outer container */
  max-width: 600px;
}

#bookForm label {
  font-weight: bold;
  margin-top: 10px;
  align-self: center;
}

#bookForm input,
#bookForm textarea {
  width: 100%;
  box-sizing: border-box;
}

#review {
  grid-column: 1 / -1;
  min-height: 120px;
}

label[for="review"] { /* targets review label */
  grid-column: 1 / -1; /* stretches element from first to last column*/
}

#bookForm button {
  grid-column: 1 / -1;
  margin-top: 10px;
  width: 100%;
  max-width: 600px;
}

fieldset { /* inner container */
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 12px;

  border: 1px solid #ccc;
  padding: 20px;
  border-radius: 8px;
}

legend {
  padding: 0 10px;
  font-weight: bold;
}