@charset "UTF-8";

* {
  margin: 0;
  padding: 0;
  list-style-type: none;
  text-decoration: none;
  box-sizing: border-box;
}

body {
  font-family: "Zen Maru Gothic", sans-serif;
  background-color: #f9f3eb;
  color: #3d2d18;
  line-height: 2.0;
}

a{
  color: #3d2d18;
}

#wrap{
  overflow: hidden;
}

header {
  position: relative;
  padding: 20px;
  color: #3d2d18;
  background-color: #f9f3eb;
}

header img {
width: 60%;
}

header h1 {
  margin-right: auto;
  margin-bottom: 0;
  font-family: "Zen Maru Gothic", sans-serif;
  font-size: 20px;
}

header ul {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  font-family: "Zen Maru Gothic", sans-serif;
  font-size: 15px;
  color: #3d2d18;
}

header li {
  width: auto;
  margin-right: 20px;
  color: #3d2d18;
}

.site-header{
  background-color: #f9f3eb;
  color: #3d2d18;
  padding: 30px;
}
.site-footer{
  background-color: #f9f3eb;
  color: #3d2d18;
  padding: 30px;
  opacity: 0.5;
}

nav {
  /* display: none; */
  height: 100vh;
  width: 300px;
  position: absolute;
  top: 0;
  right: -300px;
  z-index: 50;
  background-color: rgba(0, 0, 0, .5);
  transition: transform .5s;
  color: #3d2d18;
}

#navBtn {
  display: none;
}

#navBtn:checked ~ nav {
  display: block;
  transform: translateX(-300px);
}

.open {
  cursor: pointer;
  position: absolute;
  top: 10px;
  right: 10px;
  display: block;
  z-index: 100;
  width: 40px;
  height: 40px;
  border: 1px solid #3d2d18;;
  border-radius: 2px;
}

/*humburger button*/

.open::before,
.open::after {
  content: "";
}

.open span,
.open::before,
.open::after {
  content: "";
  position: absolute;
  top: 18px;
  left: 30%;
  width: 40%;
  border-bottom: 2px solid #3d2d18;;
  transition: transform .5s;
}

.open::before {
  transform: translateY(-8px);
}

.open::after {
  transform: translateY(8px);
}

/*close button*/
#navBtn:checked + .open span {
  transform: scaleX(0);
}

#navBtn:checked + .open::before {
  transform: rotate(45deg);
}

#navBtn:checked + .open::after {
  transform: rotate(-45deg);
}

#navBtn:checked + .open span,
#navBtn:checked + .open::before,
#navBtn:checked + .open::after {
  border-bottom-color: #EEE;
}

nav ul {
  list-style: none;
  padding-bottom: 1rem;
  text-align: center;
  
}

nav ul li {
  /* display: inline-block; */
  margin: 0 10px;
  padding: 10px 0;
}

nav ul li a {
  text-decoration: none;
  font-weight: bold;
  color: #EEE;
}


section {
  max-width: 1200px;
  padding: 20px;
  margin-top: 40px;
  /* text-align: center; */
  background-color: #f9f3eb;
  margin-right: auto;
  margin-left: auto;
}

section h1 {
  margin-bottom: 10px;
  font-family: "Zen Maru Gothic", sans-serif;
  font-size: 24px;
  color: #3d2d18;
}

.character-card {
    display: block; /* モバイルでは縦積みにする */
    padding: 2rem 2rem;
    margin: 2rem 1rem;
    border-radius: 12px;
    background-color: #ffffff;
  }

.character-image {
    text-align: center; /* この要素内のインライン要素（画像）を中央に配置 */
  }

  .character-image img {
    width: 50%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
    margin-bottom: 1rem; /* モバイルでの画像下の余白 */
  }

  /* キャラクター名とローマ字表記のスタイル */
  .character-name {
    font-size: 2rem;
    font-weight: bold;
    color: #3d2d18;
  }

  .roman-name {
    font-size: 0.9rem;
    color: #3b773b;
    display: block;
    margin-bottom: 1rem;
  }

  .introduction {
    line-height: 1.8;
    color: #3d2d18;
    text-align: justify;
  }

  .sub-character-grid {
    display: grid;
    /* モバイル: 1列 (縦並び) */
    grid-template-columns: 1fr; 
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
  }

  .sub-character-item {
    display: flex; /* 画像とテキストを横並びにする */
    align-items: center;
    gap: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
    background-color: #ffffff;
  }

  .sub-character-item img {
    /* 丸い画像にする設定 */
    width: 80px;
    height: 80px;
    border-radius: 50%; 
    object-fit: cover;
    flex-shrink: 0; /* 縮小させない */
  }

  .sub-character-details h3 {
    font-size: 1.25rem;
    font-weight: bold;
    color: #3b773b;
    margin: 0;
  }

  .sub-character-details p {
    font-size: 0.9rem;
    color: #3d2d18;
    margin-top: 0.25rem;
  }

  .step-card-grid {
    display: grid;
    /* スマホ・PC共通で1列 (縦並び) に設定 */
    grid-template-columns: 1fr; 
    gap: 2rem;
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
  }
  
  .step-card {
    background-color: #ffffff;
    border-radius: 10px;
    padding: 1.5rem;
  }
  
  /* STEPカード内の画像スタイル (既存) */
  .step-card-image {
    text-align: center;
    margin-bottom: 1rem;
  }

  .step-card-image img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%; /* 丸くする */
    border: 3px solid #3b773b;
    padding: 3px;
    background-color: #fff;
  }
  
  .step-card h3 {
    font-size: 1.4rem;
    font-weight: bold;
    color: #3b773b;
    margin-top: 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9f2e9;
    margin-bottom: 1rem;
    text-align: center; /* カード内の小見出しも中央寄せ */
  }
  
  .step-card ul {
    list-style: none; /* リストマーカーを削除 */
    padding-left: 0;
    margin-bottom: 0;
  }
  
  .step-card ul li {
    font-size: 1rem;
    color: #3d2d18;
    margin-bottom: 0.7rem;
    position: relative;
    padding-left: 1.5rem;
  }

  .step-card ul li::before {
    content: '▶'; /* オリジナルのマーカーを三角に変更 */
    color: #3b773b;
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 0;
  }


.about {
  /* text-align: center; */
  padding: 3rem 1rem;
}

/* スマホで縦並び */
.data {
  flex-direction: column;
}

.data{
  display: flex;
}

figure {
  padding: 15px;
  width: 300px;
  margin: 0 auto;
}

.greenbox {
  align-items: center;
  gap: 2rem;
  background-color: #f9f3eb;
  color: #3d2d18;;
  padding: 0rem 2rem;
  border-radius: 12px;
  margin: 0rem auto;
  text-align: left;
}

.greenbox a,
.greenbox p {
  color: #3d2d18;
  padding: 0.5rem 0.5rem;
  margin: 1rem auto;
}

.btn {
  background-color: #3b773b;;
  color: #f9f3eb;
  border: none;
  padding: 1rem 2rem;
  border-radius: 5px;
  cursor: pointer;
  font-family: "Zen Maru Gothic", sans-serif;
  font-size: 15px;
  font-weight: 450;
}

.btn:hover {
  opacity: 0.9;
  background-color: #a71919;;
  color: #f9f3eb;
}

.image-item img {
  width: 100%;
  height: auto;
}

.img-item img {
  width: 100%;
  height: auto;
  border-radius: 5px;
  vertical-align: bottom;
}

.img2-item img {
  width: 150px;
  height: auto;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.gallery-item {
    text-align: center;
  }
  
.gallery-item img {
    width: 100%;
    height: auto; /* 画像の高さを固定 */
    object-fit: cover; /* 画像がコンテナを埋めるように調整 */
  }

.gallery-caption {
    /* キャプションのスタイル */
    padding: 0.75rem;
    font-size: 0.9rem;
    color: #3d2d18;;
  }

.download-btn {
  display: inline-block;
  padding: 20px;
  border-radius: 4px;
  border: none; 
  text-align: center;
  background: #3d2d18;
  color: #fff;
  cursor: pointer;
  transition: background 0.3s ease;
  text-decoration: none;
  font-family: "Zen Maru Gothic", sans-serif;
  font-size: 1rem;
  margin: 1rem;
}

.download-btn:hover, .download-btn:focus {
  background: #a71919;
}

.back-btn-container{
  text-align: right;
}

.back-btn {
  display: inline-block;
  background: #3b773b;
  color: #f9f3eb;
  padding: 0.5em 1.2em;
  border-radius: 4px;
  text-decoration: none;
  font-family: "Zen Maru Gothic", sans-serif;
  font-size: 1rem;
  transition: background 0.3s ease;
  margin: 3rem 3rem;
}

.back-btn:hover {
  background: #a71919;
}

.next-btn {
  display: flex; 
  justify-content: space-between;
  }

.pagetop img{
  width: 120px;
  height: auto;
  filter: drop-shadow(5px 5px 5px #787878);
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 10; /*ナビゲーションより下*/
}

@media screen and (min-width:768px) {
  /*　画面サイズが768px以上の場合読み込む　*/
  #about {
    text-align: center;
  }

  .character-card {
      display: flex; /* Flexboxを適用して横並びにする */
      gap: 3rem; /* 画像とテキストの間隔 */
      padding: 3rem;
    }

  .character-image {
    flex: 1;
    min-width: 0;
  }

   .character-image img {
    width: 50%;
    height: auto;
    margin-left: 2rem;
  } 

  .character-details {
    flex: 2;
    min-width: 0;
  }

  .sub-character-grid {
      /* PC: 2列にする */
      grid-template-columns: 1fr 1fr; 
    }
    
    .sub-character-item {
      /* PC版ではグリッドの各セル内でテキストを縦積みに戻す (見た目の調整) */
      display: block; 
      text-align: center;
    }
    
    .sub-character-item img {
      margin: 0 auto 0.75rem auto; /* 中央寄せと下の余白 */
    }
    
    .sub-character-details {
      text-align: center;
    }

  h1 {
    font-size: 20pt;
  }

  header img {
    width: 40%;
    }

  header ul {
    margin-top: 0;
    display: flex;
    flex-direction: row;
    font-size: 18px;
    color: #3d2d18;;
  }
  
  nav {
    display: flex;
    height: auto;
    width: 100%;
    position: static;
    background-color: transparent;
  }
  
  nav ul li {
    display: flex;
  }

  nav ul li a {
    color: #3d2d18;
  }

  #navBtn,
  .open {
    display: none;
  }

  .greenbox {
  display: flex;
  }

  .greenbox-item {
    flex: 2;
  }

  .greenbox figure {
    flex: 1;
  }
  
  section h1 {
    font-size: 32px;
  }
  
  .author {
    padding: 2rem;
    text-align: center;
    margin: 3rem auto;
    width: 100%;
  }

	.data {
    flex-direction: row-reverse;
    flex-wrap: wrap;
  }

  .data figure{
    width: 30%;
    flex-direction: row;
    flex-wrap: wrap;
    margin-top: -100px;
  }
  
  .data-text {
    width: 70%;
    padding: 1rem 0;
  }

  .grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
  }
}


@media screen and (min-width:868px) {
   .character-card {
    text-align: center;
    margin: 2rem auto;
    width: 868px;

  }
    } 


@media screen and (min-width:1200px) {
 header img {
    width: 30%;
    }

  .greenbox {
    width: 1000px;
  }

  .pagetop img{
    width: 180px;
  } 
}

@media screen and (min-width:1201px) {
  header img {
     width: 460px;
     }
 
 }

@keyframes marquee-right {
	from {
		transform: translateX(0%);
	}
	to {
		transform: translateX(-50%);
	}
}

html {
  scroll-behavior: smooth;
}