html {
  scroll-behavior: smooth;
}
.table-of-contents {
  background-color: #f9f9f9; /* 薄いピンク */
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  width: 80%;
  margin: 20px auto;
}

.table-of-contents h2 {
  font-size: 2em;
  color: black;
  text-align: center;
  font-family: 'Noto Sans JP', sans-serif;
  margin-bottom: 20px;
  font-weight: 700;
  text-shadow: 1px 1px 2px #aaa;
}

.table-of-contents ul {
  list-style: none;
  padding-left: 0;
  margin-top: 0;
  display: flex; /* 横並びにするため */
  justify-content: center;
  gap: 20px; /* 各リンク間に余白を作る */
}

.table-of-contents li {
  margin: 15px 0;
  font-size: 1.5em;
  text-align: center;
}

.table-of-contents li a {
  text-decoration: none;
  color: #4b7a41; /* 濃い緑 */
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-block;
  padding: 10px 20px;
  border-radius: 25px;
  background-color: #f1f1f1; /* 背景色 */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.table-of-contents li a:hover {
  color: #fff;
  background-color: #a1c349; /* 明るい草色 */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.table-of-contents li a:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(161, 196, 73, 0.5);
}

.table-of-contents li a:active {
  transform: translateY(1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}


/* パソコン版: 横並び（デフォルト設定） */
@media (min-width: 769px) {
  .table-of-contents ul {
    flex-direction: row; /* 横並び */
    justify-content: center;
  }
}
/* 世界観タブ */
.worldview {
  position: relative;
  width: 100%;
  height: 400px; /* 高さを調整 */
  background-image: url('images/world1.jpg'); /* 背景画像 */
  background-size: cover;
  background-position: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
/* 世界観タブ */
.worldview2{
  margin-top: 50px;
  position: relative;
  width: 100%;
  height: 400px; /* 高さを調整 */
  background-image: url('images/world2.jpg'); /* 背景画像 */
  background-size: cover;
  background-position: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.worldview-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  text-align: center;
  font-family: 'Noto Sans JP', sans-serif;
}

.worldview h3 {
  font-size: 3em;
  color: black;
  font-weight: 700;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.6);
}

.worldview p {
  font-size: 1.5em;
  color: black;
  margin-top: 10px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
}
.worldview2 h3 {
  font-size: 3em;
  color: white;
  font-weight: 700;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.6);
}

.worldview2 p {
  font-size: 1.5em;
  color: white;
  margin-top: 10px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
}
/* 画像ギャラリー */
.image-gallery {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin: 40px 0;
}

/* 左側の画像 */
.left-image {
  flex: 1;
  max-width: 40%; /* 1枚画像が広すぎないように調整 */
}

.left-image img {
  width: 100%;
  height: auto; /* 高さを自動調整 */
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 右側の画像 (2列×2行のレイアウト) */
.right-images {
  flex: 2;
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2列 */
  grid-template-rows: repeat(2, 1fr); /* 2行 */
  gap: 20px;
  height: 100%; /* 右側の画像全体の高さを100%に設定 */
}

.right-images img {
  width: 100%;
  height: 100%; /* 各画像が高さ100%で均等に分けられる */
  object-fit: cover; /* 画像の縦横比を保ちながら要素内に収める */
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
/* 画像拡大効果の無効化 */
.right-images img,
.left-image img {
  transition: none; /* ホバー時のトランジション効果を無効にする */
  transform: none !important; /* 変形（拡大や回転）を無効にする */
  pointer-events: none; /* 画像クリックを無効にする（拡大などの反応を完全に防ぐ） */
}

/* ホバー時に拡大しないように */
.right-images img:hover,
.left-image img:hover {
  transform: none !important;
  transition: none !important;
}
/* セクションのデザイン */
.section {
  padding: 40px;
  margin-bottom: 30px;
  border-radius: 10px;
}

.section h2 {
  font-size: 2em;
  color: #4b7a41;
}

/* 丸みを帯びた細長い画像仕切り */
.image-divider {
  overflow: hidden; /* 画像がボックスからはみ出さないようにする */
  width: 100%;
}

.image-divider img {
  width: 100%;
  height: 100%;
}
/* セクションのデザイン */
.section {
  padding: 40px;
  background-color: #f8f8f8;
  margin-bottom: 30px;
  border-radius: 10px;
}

.section h2 {
  font-size: 2em;
  color: #4b7a41;
}

/* 画像とテキストを並べるセクション */
.image-text-section {
  display: flex;
  justify-content: space-between; /* 左右にスペースを空ける */
  align-items: center;
  margin: 30px 0; /* 上下に余白 */
  padding: 15px; /* 内側の余白を少なく */
  background-color: #f1f8f3; /* 背景色 */
  border-radius: 15px; /* 丸みを帯びた角 */
  height: auto; /* 高さは自動調整 */
}

/* 画像のスタイル */
.image-container2 {
  flex: 1; /* 画像のスペース */
  max-width: 35%; /* 画像の幅を少し小さくする */
  height: auto; /* 高さを自動調整 */
}

.image-container2 img {
  width: 100%; /* 画像の幅を親の幅に合わせる */
  height: auto; /* 画像の高さを自動調整 */
  border-radius: 10px; /* 画像の角を丸くする */
}

/* テキストのスタイル */
.text-container {
  flex: 1; /* テキストのスペース */
  max-width: 60%; /* テキストの幅を調整 */
  padding-left: 20px; /* 画像とテキストの間にスペースを空ける */
  text-align: left; /* 左揃え */
}

.text-container h3 {
  font-size: 1.8em; /* 見出しのサイズを調整 */
  color: #4b7a41; /* 見出しの色 */
  margin-bottom: 10px; /* 見出しの下に余白 */
}

.text-container p {
  font-size: 1em; /* 本文のフォントサイズを調整 */
  color: #333; /* 本文の色 */
  line-height: 1.6; /* 行間を広げて読みやすく */
  margin-top: 10px; /* 上部に余白 */
}
.centered-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 60px 20px;
  background-color: #4c5c44; /* 深い緑色 */
  border-radius: 20px; /* 丸みを帯びた角 */
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); /* 優しい影 */
  text-align: center;
  max-width: 800px;
  margin: 50px auto; /* セクションを中央に配置 */
}

.section-title {
  font-size: 2.5rem;
  color: #a1c349; /* 明るい草色 */
  font-weight: bold;
  margin-bottom: 20px;
  font-family: 'Noto Sans JP', sans-serif;
  text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.3); /* 文字に影 */
}

.section-content {
  font-size: 1.2rem;
  color: #f1f1f1; /* 明るい文字色 */
  line-height: 1.8;
  max-width: 700px;
  margin: 0 auto;
  font-family: 'Noto Sans JP', sans-serif;
}
/* =========================
   スマホ対応（768px以下）
   ========================= */
@media (max-width: 768px){

  /* 目次も縦 */
  .table-of-contents ul{
    flex-direction: column;
    gap: 10px;
  }

  /* ギャラリー全部縦 */
  .image-gallery{
    flex-direction: column;
    gap: 20px;
    padding: 0 15px;
  }

  .left-image,
  .right-images{
    max-width: 100%;
    width: 100%;
  }

  /* 右側の4枚 → 1列 */
  .right-images{
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .right-images img{
    height: auto;
  }

  /* 画像＋テキスト → 縦 */
  .image-text-section{
    flex-direction: column;
    padding: 15px;
    gap: 15px;
  }

  .image-container2{
    max-width: 100%;
  }

  .text-container{
    max-width: 100%;
    padding-left: 0;
  }

  /* 世界観セクション高さ少し縮める（任意） */
  .worldview,
  .worldview2{
    height: 250px;
  }

  .worldview h3,
  .worldview2 h3{
    font-size: 2em;
  }

  /* 裏設定の余白調整 */
  .centered-section{
    margin: 30px 15px;
    padding: 40px 15px;
  }

  .section-title{
    font-size: 2rem;
  }

  .section-content{
    font-size: 1rem;
  }
}











/* =========================
   inline wiki section
   ========================= */
.story-wiki{
  width:min(980px, calc(100% - 40px));
  margin:70px auto 100px;
  color:#f1f1f1;
}

.story-wiki-intro{
  margin:0 0 22px;
  padding:0 2px;
}

.story-wiki-intro p{
  margin:0;
  color:#cfd8cb;
  font-size:.95rem;
}

.story-wiki-block{
  margin:0 0 22px;
  padding:24px 24px 20px;
  background:rgba(255,255,255,.035);
  border:1px solid rgba(255,255,255,.08);
  border-radius:16px;
  box-shadow:0 6px 18px rgba(0,0,0,.14);
}

.story-wiki-block > h2,
.story-wiki-block > h3{
  margin-bottom:14px;
}

.story-wiki-block > h2{
  font-size:1.5rem;
  color:#a1c349;
}

.story-wiki-block > h3{
  font-size:1.15rem;
  color:#dfead1;
}

.story-wiki-block p:last-child,
.story-wiki-block ul:last-child,
.story-wiki-block ol:last-child{
  margin-bottom:0;
}

.story-wiki-note{
  margin:14px 0 0;
  padding:14px 16px;
  background:rgba(161,195,73,.08);
  border:1px solid rgba(161,195,73,.18);
  border-radius:12px;
}

.story-wiki-note p{
  margin:0;
  color:#e5eddc;
}

.story-wiki-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}

.story-wiki-card{
  padding:18px;
  background:rgba(0,0,0,.16);
  border:1px solid rgba(255,255,255,.07);
  border-radius:14px;
}

.story-wiki-card h3,
.story-wiki-card h4{
  margin-bottom:10px;
  color:#fff;
}

.story-wiki-card p:last-child,
.story-wiki-card ul:last-child{
  margin-bottom:0;
}

.story-wiki-defs{
  margin:0;
}

.story-wiki-def{
  display:grid;
  grid-template-columns:180px minmax(0,1fr);
  gap:18px;
  padding:14px 0;
  border-top:1px solid rgba(255,255,255,.08);
}

.story-wiki-def:first-child{
  border-top:none;
  padding-top:0;
}

.story-wiki-def dt{
  margin:0;
  font-weight:700;
  color:#d6dfcf;
}

.story-wiki-def dd{
  margin:0;
  color:#f1f1f1;
}

.story-wiki-table{
  overflow:hidden;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.08);
  margin-top:16px;
}

.story-wiki-table table{
  margin:0;
  background:transparent;
  color:#f1f1f1;
}

.story-wiki-table th{
  background:rgba(161,195,73,.12);
  color:#fff;
  border-bottom:1px solid rgba(255,255,255,.08);
}

.story-wiki-table td{
  background:rgba(255,255,255,.02);
  color:#f1f1f1;
  border-top:1px solid rgba(255,255,255,.08);
}

.story-wiki-tags{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:12px;
}

.story-wiki-tag{
  display:inline-block;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.08);
  color:#dfead1;
  font-size:.88rem;
}

.story-wiki-subtle{
  color:#cbd3c8;
  font-size:.92rem;
}

.story-wiki-quote{
  margin:16px 0 0;
  padding:16px 18px;
  background:rgba(255,255,255,.03);
  border-left:4px solid #a1c349;
  border-radius:12px;
}

.story-wiki-divider{
  width:100%;
  height:1px;
  margin:30px 0;
  background:rgba(255,255,255,.10);
}

.story-wiki-spoiler{
  color:#ffe7a0;
}

@media (max-width:768px){
  .story-wiki{
    width:calc(100% - 24px);
    margin:50px auto 70px;
  }

  .story-wiki-block{
    padding:18px 16px 16px;
    border-radius:14px;
  }

  .story-wiki-grid{
    grid-template-columns:1fr;
    gap:12px;
  }

  .story-wiki-def{
    grid-template-columns:1fr;
    gap:6px;
  }

  .story-wiki-block > h2{
    font-size:1.3rem;
  }
}
@media (max-width:768px){
  html,body{
    width:100%;
    max-width:100%;
    overflow-x:hidden;
  }

  .story-wiki,
  .wiki-page,
  .headerzone,
  main,
  section,
  article,
  div{
    max-width:100%;
  }

  .story-wiki,
  .wiki-page{
    width:calc(100% - 24px);
    margin:50px auto 70px;
    padding-left:0;
    padding-right:0;
  }
}
.character-list{
  display:grid;
  gap:18px;
}

.character-card{
  display:grid;
  grid-template-columns:160px minmax(0,1fr);
  gap:18px;
  align-items:start;
  padding:18px;
  background:rgba(0,0,0,.16);
  border:1px solid rgba(255,255,255,.07);
  border-radius:14px;
}

.character-stand{
  width:100%;
}

.character-stand img{
  width:100%;
  height:auto;
  display:block;
  border-radius:12px;
  object-fit:cover;
  background:rgba(255,255,255,.03);
}

.character-body h3{
  margin-bottom:10px;
  color:#fff;
}

.character-body p:last-child{
  margin-bottom:0;
}

.character-meta{
  margin-top:12px;
  display:grid;
  gap:8px;
}

.character-meta-row{
  display:grid;
  grid-template-columns:90px minmax(0,1fr);
  gap:12px;
  padding-top:8px;
  border-top:1px solid rgba(255,255,255,.08);
}

.character-meta-row dt{
  margin:0;
  color:#d6dfcf;
  font-weight:700;
}

.character-meta-row dd{
  margin:0;
  color:#f1f1f1;
}

@media (max-width:768px){
  .character-card{
    grid-template-columns:1fr;
    gap:14px;
    padding:16px;
  }

  .character-stand{
    max-width:220px;
    margin:0 auto;
  }

  .character-body{
    text-align:left;
  }

  .character-meta-row{
    grid-template-columns:1fr;
    gap:4px;
  }
}
