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

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

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: 80%;
  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 {
    padding: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1rem;
    margin-right: 25px; /* 右に余白を追加 */
    width: 100%; /* 横幅を親要素に合わせて100%に設定 */
    max-width: 300px; /* 必要に応じて最大幅を設定 */
    font-family: 'Noto Serif JP', serif;
}

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

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

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

.member {
  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;
}

.member: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: 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;     /* 必要なら幅を内容に合わせる */
  }
}
