nav{
  display: flex; 
  flex-direction: column; /* 子要素を縦に並べる */
  justify-content: baseline; 
  align-items: center; 
  position: fixed;
  top: 50%; 
  left: 50%; 
  padding-left: 0px;
  transform: translate(-50%, -50%); 
  background-color: white;
  width: 60%;
  height: auto;
  transition: all 0.5s;
  z-index: 3;
  opacity: 0;
  visibility: hidden; /* メニュー非表示時は要素を完全に隠す */
  background-color: rgba(255, 255, 255); 
  box-shadow: 10px 10px 0px 0px #fac7c1; 
}

.open nav{
  opacity: 1;
  visibility: visible;
}

nav .inner ul{
  list-style-type: none;
  width: 100%; 
}

nav .inner ul li {
  text-align: center; 
}

nav .inner ul li a{
  padding: 10px 0; 
  color: black;
  text-decoration: none;
}

nav .inner ul li a:hover{
  background-color: #e4e4e4;
}

.toggle-btn {
  display: block;
  position: fixed;
  top: 13px;
  right: 20px;
  width: 50px;
  height: 30px;
  z-index: 3;
  cursor: pointer;
}

.toggle-btn span{
  position: absolute;
  display: block;
  left: 0;
  width: 45px;
  height: 3px;
  background-color: #333;
  transition: all 0.5s;
  border-radius: 4px;
}

.toggle-btn span:nth-child(1){
  top: 1px;
}

.toggle-btn span:nth-child(2){
  top: 14px;
}

.toggle-btn span:nth-child(3){
  bottom: 0px;
}

.open .toggle-btn span{
  background-color: black;
}

.open .toggle-btn span:nth-child(1) {
  transform: translateY(10px) rotate(-315deg);
}

.open .toggle-btn span:nth-child(2) {
  opacity: 0;
}

.open .toggle-btn span:nth-child(3) {
  transform: translateY(-10px) rotate(315deg);
}

#mask {
  display: none;
  transition: all 0.5s;
}

.open #mask{
  display: block;
  background-color: white;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  position: fixed;
  z-index : 2;
  opacity: 0.8;
  cursor: pointer;
}

@media(max-width: 425px){
  nav{
    width: 85%;
  }
}