@charset "utf-8";


/* ===== リセット ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.gallery-page {
  background-color: #fff;
  color: #222;
  line-height: 1.6;
}

/* ===== ヘッダー余白なし ===== */
.gallery-page header {
  height: auto;
  background: none;
  margin: 0;
  padding: 0;
}

/* ===== ナビバー（base.css と同じデザインを流用） ===== */
.gallery-page .global-nav {
  width: 90%;             /* main と同じ幅 */
  max-width: 900px;
  margin: 2rem auto;      /* 上下余白 + 中央寄せ */
  padding: 0;
  position: relative;
  background: rgba(255,255,255,0.92);
  border-bottom: 1px solid #eee;
  z-index: 2;
}

.gallery-page .nav-list {
  display: flex;
  justify-content: center; /* 中央揃え */
  gap: 40px;
  list-style: none;
  padding: 16px 0;
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
}

.gallery-page .nav-list a {
  text-decoration: none;
  color: #333;
  font-weight: normal;
  position: relative;
}

.gallery-page .nav-list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1px;
  background-color: #222;
  transition: width 0.2s ease;
}

.gallery-page .nav-list a:hover::after {
  width: 100%;
}

/* ===== main中央寄せ ===== */
main {
  max-width: 900px;
  width: 90%;
  margin: 0 auto;
  padding: 2rem 1rem;
}


/* ===== h1タイトル ===== */
h1 {
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-size: 2rem;           /* 標準デスクトップサイズ */
  font-weight: 600;           /* 少し太めで存在感 */
  color: #333;                /* 本文より濃い色で目立たせる */
  text-align: left;           /* 左揃えで統一感 */
  margin: 2rem 0 1rem 0;      /* 上下の余白でタイトルをゆとりある配置 */
  position: relative;         /* 下線装飾用 */
}

/* ===== 下線装飾 ===== */
h1::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;               /* タイトルの下に少し余白を置く */
  width: 50px;                /* 下線の長さ */
  height: 2px;                /* 線の太さ */
  background-color: #3f5c6d;  /* サイト全体のアクセントカラー */
}

/* ===== ページごとに微調整可能 ===== */
body.gallery-page h1 {
  font-size: 2.2rem;          /* ギャラリーではやや大きめ */
}

body.novel-page h1 {
  font-size: 2rem;            /* 小説ページでは標準サイズ */
}

body.info-page h1 {
  font-size: 1.8rem;          /* infoページでは少し小さめ */
}



/* ===== h2タイトル ===== */
main h2 {
  text-align: left;        /* タイトルは左揃え */
  margin: 0 0 1.5rem 0;    /* 上下マージンのみ */
  font-size: 1.2rem;
  font-weight: normal;
  line-height: 1.6;
  width: 100%;
  box-sizing: border-box;
}

/* ===== ギャラリーグリッド ===== */
.gallery-grid {
  display: grid;
  gap: 0.8rem;                 /* 画像間の余白 */
  justify-content: start;      /* ギャラリー全体中央 */
  grid-template-columns: repeat(auto-fit, 150px); /* 列幅固定 */
}

.gallery-grid img {
  width: 150px;      /* 固定サイズに合わせる */
  height: auto;
  display: block;
  border: 2px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.gallery-grid img:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 10px rgba(220,220,220,0.2);
  border-color: #999;
}

.gallery-grid a {
  display: block;
}



/* ギャラリーのジャンル区切り */
.gallery-section + .gallery-section {
  border-top: 1px solid #ddd; /* 薄い線で区切る */
  padding-top: 3rem;          /* 上に余白も少し追加 */
  margin-top: 3rem;           /* 上下に余白を空ける */
}

.gallery-section {
  max-width: 900px;  /* ページ幅を制限 */
  margin: 0 auto;    /* 中央寄せ */
  padding: 2rem 1rem;
}





/* ===== Homeボタン中央寄せ ===== */
.back-home {
  text-align: center;
  margin: 3rem 0 2rem;
}

.back-home a {
  display: inline-block;
  padding: 0.6em 1.2em;
  background-color: #eee;
  color: #333;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background-color 0.3s;
}

.back-home a:hover {
  background-color: #ddd;
}

/* ===== Homeボタン中央寄せ ===== */
.back-home {
  text-align: center;
  margin: 3rem 0;
}

.back-home a {
  display: inline-block;
  padding: 0.6em 1.2em;
  background-color: #eee;
  color: #333;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background-color 0.3s;
}

.back-home a:hover {
  background-color: #ddd;
}




/* ===== レスポンシブ ===== */
@media (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fit, 120px); /* タブレット用 */
  }
  .gallery-grid img {
    width: 120px;
  }
}

/* タブレット */
@media (min-width: 600px) and (max-width: 1023px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }
}

/* スマホ（～599px） */
@media (max-width: 599px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fit, 80px); /* スマホ用 */
  }
  .gallery-grid img {
    width: 100%;
  }
}



