.menu-trigger {
  cursor: pointer;
  display: block;
  position: fixed;
  top: 30px;
  right: calc((100vw - min(90vw, 1400px)) / 2);
  z-index: 5000;
  width: 60px;
}

.menu-trigger span {
  background-color: #404040;
  display: block;
  margin-bottom: 10px;
  height: 2px;
  width: 100%;
  transition: transform 0.3s ease-in-out;
}

.menu-trigger span:nth-child(2) {
  width: 30px;
  height: 2px;
  margin-left: auto;
}

/* active */
.menu-trigger.active {
  width: 40px;
  top: 32px;
  right: calc((100vw - min(90vw, 1400px)) / 2);
}

  .menu-trigger.active span:nth-child(1) {
  transform: translateY(0px) rotate(30deg);
  width: 60px;
  }

  .menu-trigger.active span:nth-child(2) {
  transform: translateY(-12px) rotate(-30deg);
  width: 60px;
  }
  
  .menu-trigger.active span { 
    background-color: #fff;
    margin-top: 5px;
  }

  #spnav {
    background-color: rgba(0,0,0,0.9);
    display: block;
    overflow: auto;
    height: 100%;
    padding-top: 50px;
    padding-bottom: 50px;
    position: fixed;
    right: -360px;
    top: 0;
    transition: right 0.3s ease-in-out;
    width: 360px;
    z-index: 1200;
  }

  #spnav.open { right: 0; }
  #spnav ul.menu {
    list-style-type: none;
    padding: 0 30px 30px 0;
    width: 90%;
    margin: 0 auto;
  }

  #spnav .menu li a {
    color: #ffffff;
    display: block;
    padding: 10px 30px;
    position: relative;
    text-decoration: none;
    font-size: 16px;
    letter-spacing: 1px;
    font-family: "Montserrat", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
  }

  #spnav .menu li.link a {
    background: url(images/i_link_w.png) no-repeat right center;
    background-size: 12px;
  }

  #spnav .sub-menu {
    display: none;
  }
  #spnav .menu-item-has-children {
    position: relative;
  }
  #spnav .menu-item-has-children a {
    position: relative;
    z-index: 1;
  }

#spnav .menu-item-has-children .toggle-icon {
  position: absolute;
  right: 0;
  top: 15px;
  width: 20px;
  height: 20px;
  background: url(images/i_ar2_w.png) no-repeat center center;
  background-size: 10px;
  z-index: 2;
  cursor: pointer;

  transition: transform 0.3s ease;
  transform: translateX(0) rotate(0deg);
  will-change: transform; /* さらに滑らか */
}

#spnav .menu-item-has-children.open .toggle-icon {
  transform: translateX(10px) rotate(180deg);
}

  #spnav .sub-menu li a {
    margin-left: 30px;
    padding: 5px 20px;
    box-sizing: border-box;
    /*font-size: 15px;*/
    white-space: nowrap;
  }

#spnav .sub-menu li a span {
    font-size: 13px;
    white-space: nowrap;
  }
  #spnav .sub-menu li:last-child a {
    
  }
  .overlay {
    background-color: rgba(0, 0, 0, .2);
    display: none;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 998;
  }
  .overlay.open { display: block; }

@media screen and (max-width: 1500px) {
.menu-trigger {
  right: 3%;
  }

.menu-trigger.active {
  right: 4%;
  }
}

@media screen and (max-width: 1000px) {
.menu-trigger {
  right: 3%;
  }

.menu-trigger.active {
  right: 6%;
  }
}

@media screen and (max-width: 700px) {
  
.menu-trigger span {
  height: 2px;
}
.menu-trigger span:nth-child(2) {
  height: 2px;
}
  
.menu-trigger {
  right: 4%;
  top: 25px;
  width: 54px;
  }
  
.menu-trigger.active {
  width: 30px;
  right: 7%;
  top: 24px;
  }
  
.menu-trigger.active span:nth-child(1) {
  transform: translateY(0px) rotate(30deg);
  width: 50px;
  }

  .menu-trigger.active span:nth-child(2) {
  transform: translateY(-12px) rotate(-30deg);
  width: 50px;
  }
    
#spnav {
  padding-top: 80px;
    right: -90%;
    width: 90%;
  }
}

@media screen and (max-width: 480px) {
.menu-trigger span {
  height: 1px;
}
.menu-trigger span:nth-child(2) {
  height: 1px;
}
.menu-trigger {
  right: 4%;
  top: 25px;
  width: 54px;
  }
  
.menu-trigger.active {
  width: 30px;
  right: 6%;
  top: 24px;
  }
  
}