* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: #151817;
  background:
    linear-gradient(
      180deg,
      #f8faf9 0,
      #f8faf9 250px,
      #edf5f2 520px,
      #f1f3f5 900px,
      #f6f3ef 1300px
    );
  font-family: Arial, "Meiryo", "Yu Gothic", sans-serif;
  font-size: 15px;
  line-height: 1.65;
}

.footer-links {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
}


.page {
  width: calc(100% - 110px);
  max-width: 1420px;
  margin: 0 auto;
  padding: 50px 0 80px;
}

.header-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 20px;
}

.visit-counter {
  font-size: 13px;
  font-weight: bold;
  color: #000;
  white-space: nowrap;
  margin: 0;
  text-align: right;
}


/* 上部
-------------------------------- */

.intro {
  padding-bottom: 30px;
  border-bottom: 1px solid #c8cecc;
}

.intro h1,
.archive-section h2 {
  position: relative;
  margin: 0 0 28px;
  padding-left: 17px;
  font-size: 27px;
  line-height: 1.3;
}

.intro h1::before,
.archive-section h2::before {
  content: "";
  position: absolute;
  top: 1px;
  bottom: 1px;
  left: 0;
  width: 4px;
  background: linear-gradient(
    to bottom,
    #2f8f83,
    #315b7d,
    #c87545
  );
}

.intro-title {
  margin: 0 0 24px;
  font-weight: bold;
}

.intro p {
  max-width: 1350px;
}


/* 各項目
-------------------------------- */

.archive-section {
  margin-top: 36px;
}

.archive-section h2 {
  margin-bottom: 24px;
  font-size: 22px;
}


/* 写真
-------------------------------- */

.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px 16px;
}

.photo-card {
  overflow: hidden;
  background: #fafafa;
  border: 1px solid #d5d9d7;
  box-shadow: 1px 2px 3px rgba(0, 0, 0, 0.08);
}

.image-box {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 230px;
  overflow: hidden;
  background: #eeeeec;
  border-bottom: 1px solid #ddddda;
}

.image-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.card-text {
  min-height: 80px;
  padding: 12px 15px;
}

.card-text h3 {
  margin: 0 0 4px;
  color: #161918;
  font-size: 16px;
  line-height: 1.45;
}

.card-text p {
  margin: 0;
  color: #626866;
  font-size: 14px;
}


/* 画面幅対応
-------------------------------- */

@media (max-width: 1000px) {
  .photo-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 760px) {
  .page {
    width: calc(100% - 30px);
    padding-top: 28px;
  }

  .intro h1 {
    font-size: 23px;
  }

  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .image-box {
    height: 190px;
  }
}

@media (max-width: 480px) {
  .photo-grid {
    grid-template-columns: 1fr;
  }

  .image-box {
    height: auto;
  }

  .image-box img {
    height: auto;
  }
}

/* ページング */
.pagination {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 55px;
  padding-top: 22px;
  border-top: 1px solid #c8cecc;
}
.pagination a, .pagination .current {
  min-width: 38px;
  padding: 7px 10px;
  border: 1px solid #bfc7c4;
  background: #fff;
  color: #315b7d;
  text-align: center;
  text-decoration: none;
}
.pagination .current {
  border-color: #315b7d;
  background: #315b7d;
  color: #fff;
}
.pagination a:hover { background: #edf3f1; }

/* 第7版：説明文・関連リンク */
.card-text { min-height: 112px; }
.card-text h3 { font-size: 15px; }
.card-text p { margin: 0 0 10px; }
.no-caption { color: #999; }
.card-links { margin-top: 8px; padding-top: 8px; border-top: 1px solid #e1e4e2; }
.card-links a { display: block; width: fit-content; margin: 3px 0; color: #315b7d; font-size: 13px; word-break: break-all; }
.card-links a:hover { text-decoration: none; }
.image-box.multi-image { height: 230px; display: grid; grid-template-columns: repeat(2,1fr); }
.image-box.multi-image img { min-width: 0; object-fit: contain; }
@media (max-width: 480px) { .image-box.multi-image { height: auto; } }

/* 第8版 */
.photo-link { display:block; width:100%; height:100%; min-width:0; overflow:hidden; }
.photo-link img { display:block; width:100%; height:100%; object-fit:contain; }
.image-box.social-gallery {
  height:360px;
  display:grid;
  grid-template-columns:repeat(4,1fr);
  grid-template-rows:repeat(2,1fr);
  gap:2px;
  background:#d5d9d7;
}
.image-box.social-gallery .photo-link { background:#eeeeec; }
.image-box.social-gallery img { object-fit:cover; }
@media (max-width:760px) { .image-box.social-gallery { height:300px; } }
@media (max-width:480px) {
  .image-box.social-gallery { height:360px; grid-template-columns:repeat(2,1fr); grid-template-rows:repeat(4,1fr); }
}

/* 第9版：画像枚数に応じたタイル表示。サムネイルは通常画像、クリック先はoriginal。 */
.image-box[class*="gallery-"] {
  display: grid;
  height: 230px;
  gap: 2px;
  background: #d5d9d7;
}
.image-box[class*="gallery-"] .photo-link { background: #eeeeec; }
.image-box[class*="gallery-"] img { object-fit: cover; }
.image-box.gallery-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.image-box.gallery-3, .image-box.gallery-4 { grid-template-columns: repeat(2,minmax(0,1fr)); grid-template-rows: repeat(2,minmax(0,1fr)); }
.image-box.gallery-3 .photo-link:first-child { grid-row: span 2; }
.image-box.gallery-5, .image-box.gallery-6 { grid-template-columns: repeat(3,minmax(0,1fr)); grid-template-rows: repeat(2,minmax(0,1fr)); }
.image-box.gallery-5 .photo-link:first-child { grid-row: span 2; }
.image-box.gallery-7, .image-box.gallery-8 { grid-template-columns: repeat(4,minmax(0,1fr)); grid-template-rows: repeat(2,minmax(0,1fr)); }
@media (max-width: 480px) {
  .image-box[class*="gallery-"] { height: 260px; }
  .image-box.gallery-7, .image-box.gallery-8 { grid-template-columns: repeat(2,minmax(0,1fr)); grid-template-rows: repeat(4,minmax(0,1fr)); height: 360px; }
}

/* 第10版：9枚のギャラリーにも対応 */
.image-box.gallery-9 { grid-template-columns:repeat(3,minmax(0,1fr)); grid-template-rows:repeat(3,minmax(0,1fr)); height:360px; }
@media (max-width:480px) { .image-box.gallery-9 { height:360px; } }

/* 第11版：トップページと共通のヘッダー・フッター */
.header-band, .footer-band { width:100%; background:#e5eee9; border-bottom:1px solid #c8d5ce; }
.header-band { border-top:5px solid #527a70; }
.band-inner { width:calc(100% - 110px); max-width:1420px; margin:0 auto; }
.header-band .intro { padding:27px 0 25px; border:0; }
.header-band .intro h1 { margin:0 0 12px; padding-left:17px; font-size:30px; }
.header-band .intro h1::before { background:#51887d; }
.header-band .site-label { margin:0 0 8px; color:#69716e; font-size:13px; }
.header-band .intro-title { margin:0 0 8px; }
.header-band .editor-credit { margin:0; color:#69716e; font-size:12px; }
.header-band .editor-credit a { color:#315b7d; }
.page { padding-top:30px; }
.footer-band { margin-top:0; border-top:1px solid #c8d5ce; border-bottom:0; }
.footer-inner { display:flex; justify-content:space-between; align-items:center; gap:16px; padding:20px 0; color:#56645e; font-size:13px; }
.footer-inner a { font-weight:bold; color:#315b7d; }
@media (max-width:760px) { .band-inner { width:calc(100% - 30px); } .header-band .intro h1 { font-size:23px; } .footer-inner { flex-wrap:wrap; } }
