html, body {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
}

body {
    font-family: 'Noto Serif JP', serif;
    margin: 0;
    padding: 0;
    background-color: #f4f2f8;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow-x: hidden;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
}

body::-webkit-scrollbar, html::-webkit-scrollbar {
    display: none;
}

.site-banner {
  background: linear-gradient(135deg, #dcd6f7, #e7e9f9, #f0f1f6);
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  color: #111;
  font-size: 1rem;
  height: 6%;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;      
  justify-content: center; 
  align-items: center;
  text-align: center; 
}

.info-banner {
  position: sticky;
  top: 0;
  z-index: 999;
  background: #f4f2f8;
  padding: 0.5em 1em;
  text-align: center;
  font-size: 0.95rem;
  width: 50%;
  margin: 0 auto; 
  text-align: center;
}

header {
    background-color: transparent;
    color: black;
    height: 23%;
    display: flex;
    flex-direction: column;  
    justify-content: center;
    align-items: center;   
    width:90%;
    margin: 0 auto;
    box-sizing: border-box;
    margin-top: 6%; 
}

.paw-nav {
    position: fixed;
    right: 60px; 
    bottom: 60px;  
    z-index: 1000;
    list-style: none; 
    margin: 0;
    padding: 0;
}

.paw-nav li {
    display: inline-block;
}

.paw-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #444;
    text-decoration: none;
    transition: transform 0.25s ease, color 0.25s ease;
}

.paw-nav a:hover {
    transform: scale(1.3) rotate(-10deg);
    color: #7d6bc5;
}


h1 {
  width: 100%;              
  text-align: center;     
  font-size: 2.0rem;
  font-weight: 600;      
  margin: 0 0 10px 0;     
  box-sizing: border-box;
}

h4 {
  width: 100%;              
  text-align: right;     
  font-size: 0.8rem;
  font-weight: 400;      
  margin: 0 0 10px 0;     
  box-sizing: border-box;
}

main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 70%;
  max-width: none;
  margin: 0 auto;
  box-sizing: border-box;
}

#filter-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-top: 40px;
}

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

/* select 共通スタイル */
select {
    padding: 0.5rem;
    font-size: 1rem;
    font-family: 'Noto Serif JP', serif;
    box-sizing: border-box;
    margin-right: 1rem; /* Resetボタンとの間隔 */
}

/* 個別幅設定 */
#system-filter {
    width: 250px;      /* 狭め */
}

#players-filter {
    width: 120px;      /* 少し広め */
}

#sort-method {
    width: 120px;      /* 適度な幅 */
}

button {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  background-color: #ffffff;      /* 白で軽やかに */
  color: #666666;                 /* ダークグレーで控えめ */
  border: 1.5px solid #cccccc;    /* 薄いグレーのボーダー */
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.3s ease, color 0.3s ease, background-color 0.3s ease;
}

button:hover {
  border-color: #999999;          /* ちょっと濃いグレー */
  color: #333333;                 /* 文字も濃く */
  background-color: #e9e8f0;      /* ほんのり紫がかった薄いグレー */
}


#reset-filters {
    background-color: #4A4A4A;
    color: white;
    font-family: 'Noto Serif JP', serif;
}

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

.container {
  width: 100%;  
}

#scenarios-list-container {
  width: 100%;      
  margin: 20px auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 0px 20px 40px;
  box-sizing: border-box;
  align-items: center;
  padding-bottom: 20px;
}

#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: left;
}

.scenario-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
  justify-content: flex-start;
}

.scenario {
  flex: 0 0 calc((100% - 4 * 10px) / 5);
  box-sizing: border-box;
  padding: 0.5px;
  cursor: default;
  font-size: 1rem;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  transition: all 0.3s ease;
}

.scenario:hover {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  background-color: #f4f2f8;
}

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;
}

a {
    color: inherit;  /* 親要素の色を継承 */
    text-decoration: none;  /* 下線を消す */
}

@media (max-width: 1024px) {
  .site-banner {
    position: fixed;    
    top: 0;
    left: 0;
    right: 0;
    height: auto;  
    white-space: normal;   
    padding: 0.8rem 1rem;  
    font-size: 0.8rem;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 1000;
    flex-wrap: wrap;    
  }

  header {
    flex-direction: column;
    align-items: center;
    margin-top: 60px;
  }

  .filter label {
    font-weight: 700;
    margin-bottom: 8px;
    display: inline-block;
  }

  .filter-container {
    flex-direction: row;       /* 横並び維持 */
    flex-wrap: wrap;           /* 幅が足りないときは折り返し */
    justify-content: center;   /* 中央揃え */
    gap: 1rem;
    padding-top: 15px;
  }

  #filter-container .filter {
    display: flex;
    flex-direction: column; /* ラベルとセレクトを縦並び */
    gap: 0.4rem;
  }

  #system-filter,
  #players-filter,
  #sort-method {
    width: auto;
    min-width: 200px;
    margin-right: 0;
  }

  #reset-filters {
    margin-top: 0.8rem;
  }

  #index {
    width: 100%;
  }

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

  .index-title {
    font-size: 1.6rem;
    font-weight: 700;
    width: 100%;
    border-bottom: 1.5px solid black;
    padding-top: 20px;
    padding-bottom: 4px;
    margin-bottom: 12px;
    text-align: center;
    cursor: pointer;
  }

  .scenario-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .scenario-row.open {
    max-height: 2500px;
  }

  .scenario {
    text-align: center;
    font-size: 1.05rem;
    width: 100%;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  }

  .scenario a {
    display: block;
    width: 100%;
    line-height: 1.8;
  }

  .paw-nav {
    right: 25px;
    bottom: 35px;
  }

  .paw-nav a {
    font-size: 2rem;
  }
}


@media (max-width: 768px) {
.site-banner {
  font-size: 0.6rem;
  padding: 0.1rem 0.5rem;
  height: 50px;
  box-sizing: border-box; 
}

header {
  flex-direction: column;
  align-items: center;
  margin-top: 70px; 
}

.filter label {
    font-weight: 700;
    margin-bottom: 10px;
    display: inline-block; 
}
  .filter-container {
    flex-direction: column;   /* 横並び → 縦並び */
    align-items: center;      /* 中央揃え */
    gap: 0.5rem;              /* セクション間の間隔 */
    padding-top: 20px;
  }

#filter-container .filter {
    display: flex;
    flex-direction: column; /* 縦並び */
    gap: 0.5rem; /* 各ラベル＋セレクトセットの間隔 */
}

  /* select は幅を調整して中央揃え */
#system-filter,
#players-filter,
#sort-method {
    width: auto;      /* 自動幅でボタンサイズに合わせる */
    min-width: 250px; /* 必要に応じて最小幅を指定 */
    margin-right: 0; 
  }

    #reset-filters {
        margin-top: 1rem;            /* select と Reset の距離を広げる */
    }

  #index {
    width: 100%;
  }

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

  .index-title {
    font-size: 1.4rem;
    font-weight: 700;
    width: 100%;
    border-bottom: 1.3px solid black;
    padding-top: 18px;
    padding-bottom: 2px;
    margin-bottom: 10px;
    text-align: center;
    cursor: pointer;
  }

  .scenario-row {
    display: flex;           
    flex-direction: column;  
    gap: 8px;                 
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .scenario-row.open {
    max-height: 2000px;
  }

.scenario {
  text-align: center;
  font-size: 1rem;
  width: 100%; 
  white-space: normal;  
  overflow: visible;  
  text-overflow: clip;   
  padding: 8px;
  border-bottom: 1px solid rgba(0,0,0,0.1); /* 薄い仕切り線 */
  padding: 6px 0;
}

.scenario a {
  display: block;   
  width: 100%;
  line-height: 1.6; 
}


    .paw-nav {
        right: 20px; 
        bottom: 30px;
    }

    .paw-nav a {
        font-size: 1.8rem; 
    }
}