html {
  font-display: swap;
}

/* ===================== */
/* header, footer 共通  */
/* ===================== */
header, footer {
  background-color: #333;
  color: white;
  text-align: center;
  padding: 15px 10px;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
  font-family: sans-serif;

  /* CLS対策：高さ確保とレイアウト固定 */
  min-height:80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;

  /* 共通ボーダー（footerのみ上線で調整） */
  border-top: 1px solid #444;
}

/* ===================== */
/* body全体とmain        */
/* ===================== */
body {
  margin: 0;
  padding: 0;
  font-family: 'Noto Sans JP', sans-serif;

  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
  line-height: 1.8;
  flex: 1 0 auto;
}

/* ===================== */
/* タイトル              */
/* ===================== */
h1 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

/* ===================== */
/* フッター要素内        */
/* ===================== */

footer .copyright {
  font-size: 0.75em; /* 87.5%のサイズ。小さすぎず上品 */
  color: #666;         /* 薄めのグレーにするとさらに控えめな印象に */
}


footer p {
  margin: 5px 0;
}

footer a {
  color: #90caf9;
  text-decoration: none;
  margin: 0 0.5em;
  font-size: 0.9em;
  display: inline-block;
}

footer a:hover {
  text-decoration: underline;
  color: #ffffff;
}

footer .footer-links {
  display: flex;
  flex-direction: row; /* 横並び */
  justify-content: center;
  gap: 1em;
  min-width: 250px; /* 必要に応じて調整 */
  flex-wrap: wrap;
  align-items: center; /* 高さ揃え */
}

@media (max-width: 600px) {
  footer .footer-links {
    flex-direction: column; /* スマホは縦並び */
    gap: 0.5em;
  }
  footer a {
    margin: 0;
  }
}

/* ===================== */
/* ボタン類              */
/* ===================== */
#loadMoreBtn {
  display: block;
  margin: 1.5em auto;
  padding: 10px 20px;
  background-color: #eeeeee;
  color: #333;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  cursor: pointer;
  width: auto;
  max-width: 90%;
  transition: background-color 0.3s;
  text-align: center;
}

#loadMoreBtn:hover {
  background-color: #ddd;
}

button#backBtn {
  display: block;
  margin: 1.5em auto;
  padding: 12px 24px;
  background-color: #2196f3;
  color: white;
  font-size: 1rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  width: 80%;
  max-width: 300px;
  transition: background-color 0.3s;
  text-align: center;
}

button#backBtn:hover {
  background-color: #1976d2;
}