body{
  width: 100%;
  height: 100%;
  margin: 0;
  max-width: 2500px;
  background-color: bisque;
  font-size: 16px;
  overflow-x: hidden;
  overflow-y: auto;
  font-family: "Noto Sans JP", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
}

/* ヘッダー（変更なし） */
header{
  z-index: 10;
  position: absolute;
  width: 100%;

  .menubutton{
    display: none;
  }

  .menuul{
      margin: 2em 20%;
      padding-right: 10px;
  height: 5vh;
  z-index: 10;
 display: flex;
 justify-content: space-between;

 a{
  text-decoration: none;
}
}

.menuli{
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  color: white;
  padding: 0.5em 1em;
  border-radius: 8px;
}

.menubutton img{
  position: absolute;
  width: 50px;
  margin: 2em;
  }

  .menuli li{
  font-size: 2em;
  padding: 2em;
  list-style: none;
}
@media (width<640px) {
 .menuul{display: none;}
 .menubutton{display: block;}
}
}

/* ボタン（変更なし） */
.menubutton{
  background:none;
  border:none;
  padding:0;
  cursor:pointer;
  position:fixed;
  top:20px;
  left:20px;
  z-index:100;
}

.menubutton img{
  width:50px;
  display:block;
}

/* メニュー（変更なし） */
.menunakami{
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: black;

  transform: translateX(-100%);
  transition: transform 0.3s;
}

.menunakami.open{
  transform: translateX(0);
}

.menunakami ul{
  list-style:none;
  padding:80px 20px;
}

.menunakami li{
  margin:20px 0;
}

.menunakami a{
  color:white;
  text-decoration:none;
  font-size:20px;
}


/* ==================================================
   ここから下：キャラクターギャラリー表示（見やすさ改善）
   ・全員を一度に見渡せるグリッドレイアウトに変更
   ・画面外へ高速で飛んでいく演出をやめ、ふわっと現れる
     控えめなフェードイン＋ホバーで浮き上がる演出に変更
   ・写真／文章／メニューの内容は一切変更なし
   ================================================== */

.allslide{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2.5em;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  box-sizing: border-box;
  padding: 190px 6% 5em;
}

.slide{
  position: relative;
  width: 100%;
  rotate: 0deg;
  display: flex;
  flex-direction: column;
  animation: fadeInUp 0.6s ease both;

  picture{
    display: block;
  }

  img{
    display: block;
    width: 100%;
    height: 320px;
    object-fit: cover;
    object-position: top center;
    background-color: rgb(255, 255, 255);
    padding: 1.2em;
    box-sizing: border-box;
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.18);
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
  }

  &:hover img{
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 28px rgba(0,0,0,0.28);
  }

h3{
  position: static;
  width: fit-content;
  max-width: 100%;
  margin: 0.6em 0 0;
  font-size: 1.15em;
  padding: 0.3em 0.8em;
  letter-spacing: 0.08em;
  border-radius: 6px;
  background-color: rgb(255,255,255);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  box-sizing: border-box;
}
}

/* 表示順を逆にする（HTMLは変更せず order で見た目だけ反転） */
.slide:nth-child(1){ order: 10; }
.slide:nth-child(2){ order: 9; }
.slide:nth-child(3){ order: 8; }
.slide:nth-child(4){ order: 7; }
.slide:nth-child(5){ order: 6; }
.slide:nth-child(6){ order: 5; }
.slide:nth-child(7){ order: 4; }
.slide:nth-child(8){ order: 3; }
.slide:nth-child(9){ order: 2; }
.slide:nth-child(10){ order: 1; }

@keyframes fadeInUp {
  0%{
    transform: translateY(24px);
    opacity: 0;
  }
  100%{
    transform: translateY(0);
    opacity: 1;
  }
}

/* モーダル */
.photo-modal{
  border-radius: 20px;
  padding: 1.5em 2em;
  width: calc(100% - 40%);
  max-width: 900px;
  max-height: 85vh;
  margin: auto;
  font-size: 1rem;
  background-color: #1a1a1a;
  color: #f0f0f0;
  box-shadow: 0 8px 40px rgba(0,0,0,0.7);
  overflow-y: auto;

  p{
    position: relative;
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    line-height: 1.9em;
    color: #111111;
    margin: 0.8em 0;
  }
}

.photo-modal[open]{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1em;
}

.close-btn{
  align-self: center;
  margin-top: 1.2em;
  position: relative;
  background-color: transparent;
  font-size: 0.95rem;
  color: #f0f0f0;
  border-radius: 8px;
  border: 1.5px solid rgba(255,255,255,0.4);
  padding: 8px 28px;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: background-color 0.2s, border-color 0.2s;
}

.modalgif{
  position: relative;
  width: min(280px, 60vw);
  display: block;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.photo-modal::backdrop{
  background-color: rgb(0,0,0,0.5);
  backdrop-filter: blur(30px);
}

/* smartphoneever */
@media (width<=640px) {

.allslide{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1em;
  padding: 110px 4% 3em;

  img{
    height: 200px;
    padding: 0.6em;
    cursor: pointer;
  }
}

.slide{
h3{
  font-size: 14px;
  padding: 6px 10px;
  border-radius: 4px;
}
}

.photo-modal{
  width: 90%;
  padding: 1.2em 1.4em;

  p{
    font-size: 0.95rem;
    line-height: 1.7em;
  }
}

.modalgif{
  width: min(220px, 70vw);
}
}

/* かなり狭い画面では1列に */
@media (width<=380px) {
.allslide{
  grid-template-columns: repeat(1, 1fr);
}
.allslide img{
  height: 260px;
}
}

.ted{
  color: rgb(137, 89, 35);
  background-color: rgb(229, 208, 175);

  .close-btn{
    background-color: rgb(137, 89, 35);
    border-color: rgba(255,255,255,0.8);
  }
}

.dolores{
   color: rgb(227, 61, 36);
   background-color: rgb(238, 228, 212);

   .close-btn{
    background-color: rgb(137, 89, 35);
    border-color: rgba(255,255,255,0.8);
  }
}

.maryjane{
   color: rgb(174, 93, 217);
   background-color: rgb(217, 207, 237);

   .close-btn{
    background-color: rgb(174, 93, 217);
    border-color: rgba(255,255,255,0.8);
  }
}

.timmy{
    color: rgb(20, 117, 173);
    background-color: rgb(244, 217, 68);

    .close-btn{
      background-color: rgb(20, 117, 173);
      border-color: rgba(255,255,255,0.8);
    }
}

.emmet{
  color:rgb(36, 68, 9);
  background-color:  rgb(218, 88, 28);

  .close-btn{
    background-color:rgb(36, 68, 9);
    border-color: rgba(255,255,255,0.8);
  }
}

.deedee{
  color: rgb(184, 10, 10);
  background-color: rgb(27, 173, 199);

  .close-btn{
    background-color: rgb(184, 10, 10);
    border-color: rgba(255,255,255,0.8);
  }
}

.baby{
  background-color: rgb(26, 158, 81);
  color: rgb(9, 91, 91);

  .close-btn{
    background-color:rgb(9, 91, 91);
    border-color: rgba(255,255,255,0.8);
  }
}

.maegan{
  color: rgb(154, 27, 61);
  background-color: rgb(248, 216, 230);

  .close-btn{
    background-color: rgb(154, 27, 61);
    border-color: rgba(255,255,255,0.8);
  }
}

.tom{
  background-color: rgb(231, 208, 35);
  color: #0963b2;

  .close-btn{
    background-color: #0963b2;
    border-color: rgba(255,255,255,0.8);
  }
}

.april{
  color: rgb(52, 118, 168);
  background-color: rgb(243, 239, 220);

  .close-btn{
    background-color: rgb(137, 89, 35);
    border-color: rgba(255,255,255,0.8);
  }
}

footer{
  position: relative;
  background-color: purple;
  padding: 3em 20%;

  p{
    overflow-wrap: break-word;
    color: white;
    margin: 0;
  }
}