@charset "utf-8";
/* CSS Document */

.menu-wrapper {
  position: relative;
	z-index: 6;
}

.menu-icon {
  width: 40px;
  height: 30px;
  position: fixed; /* ← fixedにして常に左上固定 */
  top: 3%;
  right: 6%;
  cursor: pointer;
  z-index: 3;
  display: inline-block;
}

@media(min-width: 768px){
.menu-icon{
top: 6%;
right: 3%;
}
}

.menu-icon span {
  display: block;
  height: 4px;
  margin: 6px 0;
  background: #333;
  border-radius: 2px;
  transition: 0.4s;
}

@media(min-width: 768px){
.menu-icon span{
background: #fff;
}
}

/* ハンバーガーがXに変形 */
#menu-toggle:checked + .menu-icon span:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}
#menu-toggle:checked + .menu-icon span:nth-child(2) {
  opacity: 0;
}
#menu-toggle:checked + .menu-icon span:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

/* オーバーレイ背景 */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  pointer-events: none;
  transition: 0.4s;
  z-index: 1;
}

#menu-toggle:checked ~ .overlay {
  opacity: 1;
  pointer-events: auto;
}

/* メニュー本体（左から出す） */
.menu {
  position: fixed;
  top: 0;
  right: -300px; /* ← 初期位置を右へ */
  width: 300px;
  height: 100%;
  background: #e63248;
  box-shadow: 2px 0 8px rgba(0,0,0,0.2);
  transition: right 0.4s ease;
  z-index: 2;
}

#menu-toggle:checked ~ .menu {
  right: 0; /* ← 開いたときは左0へ */
}

.menu ul{
  list-style: none;
  padding: 60px 20%;
  line-height: 3em;
}

.menu li {
  margin: 10px 0;
}

.menu ul img{
width: 1.5em;
vertical-align: baseline;
padding-right: 0.2em ;
}

header ul span{
display: inline-block;
padding-top: 1.5em;
}

.menu a {
  text-decoration: none;
  color: #fff;
  font-size: 1.3rem;
  transition: color 0.3s;
}

.menu a:hover {
  color: #333;
}