/* 全体レイアウトの修正 */
html, body {
    min-height: 100vh; /* ビューポート全体の高さを確保 */
    margin: 0;
    padding: 0;
    background-color: #f4f2f8;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow-x: hidden; /* 横スクロールを無効にする */
    font-family: 'Playfair Display', serif;
    -ms-overflow-style: none; /* IE, Edge */
    scrollbar-width: none; /* Firefox */
}

header {
    background-color: transparent;
    color: black;
    min-height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: baseline; /* テキストの下端を揃える */
    width:90%;
    margin: 0 auto;
    box-sizing: border-box;
    padding: 120px 80px 20px 80px; 
}

header .logo {
  width: 100%; 
  height: 80%;
  margin-bottom: 20px;   
}

header h1 {
    font-size: 2rem;
    font-weight: 500;
    margin: 0; /* デフォルト余白を消す */
    line-height: 1; /* 余白を詰める */
}

html::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

nav {
    position: relative;  
    top: 20px; 
    display: flex;
    justify-content: flex-end;
    align-items: center;
    z-index: 1000;     /* バナーの下に隠れないように */
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;             /* ボタンとリンクの間隔 */
}

nav ul li {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ボタンとリンクを同じデザインに統一 */
nav ul li a,
nav ul li button {
    color: #444; /* デフォルトの文字色 */
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    padding: 4px 8px;      /* 任意の余白 */
    transition: color 0.3s ease;
    font-family: inherit;
}

/* 下線アニメーション */
nav ul li a::after,
nav ul li button::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 1px;
    background: #7d6bc5; /* 下線の色 */
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

/* ホバー時の色と下線 */
nav ul li a:hover,
nav ul li button:hover {
    color: #7d6bc5;
}

nav ul li a:hover::after,
nav ul li button:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* main */
main {
    flex-grow: 1; /* コンテンツが少なくてもフッターを下に固定 */
    padding: 2rem 5%;
    width: 90%; 
    max-width: 1400px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* リンクのデフォルトスタイルを無効にする */
a {
    color: inherit;  /* 親要素の色を継承 */
    text-decoration: none;  /* 下線を消す */
}

/* フィルター部分 */
#filter-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-right: 20px; /* 右に余白を追加 */
}

.filter label {
    font-weight: bold;
    margin-right: 7px;
}

select {
    padding: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1rem;
    margin-right: 25px; /* 右に余白を追加 */
    width: 100%; /* 横幅を親要素に合わせて100%に設定 */
    max-width: 300px; /* 必要に応じて最大幅を設定 */
    font-family: 'Playfair Display', serif;
}

button {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

button:hover {
    background-color: #45a049;
}

/* リセットボタンのスタイル */
#reset-filters {
    background-color: #4A4A4A;
    color: white;
    font-family: 'Playfair Display', serif;
}

#reset-filters:hover {
    background-color: ##333333;
}

/* インデックス行の設定 */
.index-row {
    display: flex;
    flex-direction: column;
    width: 100%; /* 横幅をページの90%に設定 */
    margin: 0 auto; /* 中央揃えにする */
}

/* インデックスタイトル（行名） */
.index-title {
    font-size: 1.2rem;
    font-weight: bold;
    display: block;
    width: 100%; /* 親要素の幅に合わせる */
    border-bottom: 1.3px solid black; /* 安定した下線 */
    padding-top: 18px; /* 下線と文字を近づける */
    padding-bottom: 2px; /* 下線と文字を近づける */
    margin-bottom: 10px; /* 次の行との間隔を調整 */
}

/* シナリオ行の設定 */
.scenario-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%; /* 横幅をページの90%に設定 */
    margin: 0 auto; /* 中央揃えにする */
}

/* シナリオタイトル */
.scenario {
    background-color: transparent;
    border: none;
    padding: 0.5px;
    box-sizing: border-box;
    cursor: default;
    font-size: 1rem;
    font-weight: normal;
    margin-bottom: 7px;
    
    /* 4列表示を維持 */
    display: inline-block;
    width: calc(25% - 15px); /* 4列 */
    white-space: nowrap; /* 折り返さず1行で表示 */
    overflow: hidden; /* はみ出した部分を隠す */
    text-overflow: ellipsis; /* はみ出した部分を「…」で表示 */
    transition: all 0.3s ease; /* マウスオーバー時のスムーズな遷移 */
}

/* マウスオーバー時にテキストを完全に表示 */
.scenario:hover {
    white-space: normal; /* 折り返し表示 */
    overflow: visible; /* オーバーフロー部分を表示 */
    text-overflow: unset; /* 省略記号を外す */
    background-color: #f0f0f0; /* 背景色の変更（オプション） */
}

footer {
  background: #f9f9f9; 
  color: #444;
  font-size: 0.8rem;
  font-family: 'Noto Serif JP', serif;
  font-weight: 300; 
  height: 5%;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  border-top: none;
  box-shadow: 0 -2px 6px rgba(0,0,0,0.08); /* 影で自然に区切る */
}

footer .footer-inner {
  opacity: 0.8;
}


.site-banner {
  background: linear-gradient(135deg, #dcd6f7, #e7e9f9, #f0f1f6);
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  color: #111; /* 少し落ち着いた文字色 */
  text-align: center;
  font-size: 1rem;
  min-height: 20px; /* バナーの目安 */
  padding: 1rem;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}
@media (max-width: 768px) {

#index {
  width: 100%;
}

.index-row {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0;
}

.index-title {
  font-size: 1.2rem;
  font-weight: 700;
  width: 100%;
  border-bottom: 1.3px solid black;
  padding-top: 18px;
  padding-bottom: 2px;
  margin-bottom: 10px;
  text-align: center;
}
  .member-row {
    flex-direction: column;  /* 縦並びに */
    align-items: center;     /* 子要素を中央寄せ */
    gap: 8px;
  }

  .member {
    margin: 0 auto;         /* 左右の余白を自動に */
    text-align: center;     /* テキストも中央 */
    font-size: 1rem;
    width: fit-content;     /* 必要なら幅を内容に合わせる */
  }
}
