body {
  background-color: #fdcf8e;
}

.menu-wrapper {
  max-width: 960px;
  margin: 10% auto 0;
  padding: 0 4%;
}

.menu-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.open-menu {
  position: fixed;
  top:10px;
  right:50%;
  transform:translateX(50%);
  display:flex;
  gap:8px;
  font-family:sans-serif;
}

.open_item {
  padding:8px 16px;
  background:#FFDAB9;
  color:#333;
  border-radius:4px;
  cursor:pointer;
  text-align:center;
  transition:.2s;
}

.open_item:hover {
  opacity:.9;
  transform:translateY(-2px);
}


.chapter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 100px;
  text-align: center;
  font-weight: bold;
  font-size: 1.2rem;
  color: white;
  background-color: orange;
  border-radius: 12px;
  text-decoration: none;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: background-color 0.2s, transform 0.2s;
}

.chapter:hover {
  background: #f8a733;
  translate: 0 -3px;
}


@media screen and (min-width: 480px) {
  .chapter {
    width: 160px;
    height: 110px;
    font-size: 1.3rem;
  }
}

@media screen and (min-width: 968px) {
  .chapter {
    width: 180px;
    height: 120px;
    font-size: 1.4rem;
  }
}

/* 折り返した行だけ左寄せにする */
.menu-list > .chapter:nth-child(n+5) {
  margin-left: 0;
}

/* footer中央寄せ */
footer {
  text-align: center;
  padding: 50px 0;
  font-size: 1rem;
}

@media screen and (min-width: 48em){
  footer {
    font-size: 1.5rem;
  }
}
