/* =========================================================
   Reset / Base
========================================================= */

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont,
               "Segoe UI", "Hiragino Kaku Gothic ProN",
               "Noto Sans JP", sans-serif;
  background-color: #c0c0c0;
  color: #222;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* =========================================================
   共通リンク
========================================================= */

a {
  color: inherit;
  text-decoration: none;
}

a:active {
  opacity: 0.7;
}

/* =========================================================
   一覧ページ（Gallery Index）
========================================================= */

.gallery-index {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 16px 80px;
  background-color: #fafafa;
}

/* --- Header --- */

.gallery-header {
  text-align: center;
  margin-bottom: 40px;
}

.gallery-header h1 {
  font-size: 1.4rem;
  font-weight: 500;
  margin: 0 0 12px;
  letter-spacing: 0.05em;
}

.gallery-lead {
  font-size: 1rem;
  color: #666;
  margin: 0;
}

/* --- Grid --- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* --- Grid Item --- */

.gallery-item {
  display: block;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  background-color: #eaeaea;
}

/* =========================================================
   個別ページ（Artwork）
========================================================= */

.artwork-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 16px 80px;
  background-color: #fafafa;
}

/* --- 戻るナビ --- */

.artwork-nav {
  margin-bottom: 40px;
  font-size: 1rem;
  color: #666;
}

.artwork-nav a {
  color: #666;
}

/* --- Artwork --- */

.artwork {
  text-align: center;
}

.artwork img {
  width: 90%;
  max-width: 700px;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* --- Caption --- */

.artwork figcaption {
  margin-top: 24px;
}

.artwork .title {
  font-size: 1rem;
  margin: 0 0 6px;
}

.artwork .credit {
  font-size: 1rem;
  color: #666;
  margin: 0;
}

/* =========================================================
   前後ナビ（Pager）
========================================================= */

.artwork-pager {
  display: flex;
  justify-content: space-between;
  margin-top: 60px;
  font-size: 0.85rem;
}

.artwork-pager a {
  color: #666;
}

/* =========================================================
   PC表示調整
========================================================= */

@media (min-width: 768px) {

  /* 一覧 */

  .gallery-index {
    padding-top: 60px;
  }

  .gallery-grid {
    gap: 24px;
  }

  /* 個別 */

  .artwork-page {
    padding-top: 60px;
  }

  .artwork-nav {
    margin-bottom: 60px;
  }

  .artwork-pager {
    margin-top: 80px;
  }
}

/* =========================================================
   微調整（展示感）
========================================================= */

/* 画像選択禁止（展示物を触らせない感） */
img {
  user-select: none;
  -webkit-user-drag: none;
}

/* フォーカス時の装飾を抑制 */
a:focus {
  outline: none;
}

/* ===== フィルタ ===== */

.gallery-filter {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  width: 75%;
  margin-bottom: 40px;
  margin: 0 auto;
}

.gallery-filter button {
  padding: 6px 12px;
  font-size: 16px;
  border-radius: 999px;
  border: 1px solid #ccc;
  background: #f7f7f7;
  cursor: pointer;
  user-select: none;
}

.gallery-filter button:active {
  opacity: 0.5;
}

/* ===== Credit Section ===== */

.credit-section {
  margin-bottom: 60px;
}

.credit-section h2 {
  font-size: 1rem;
  font-weight: 400;
  color: #666;
  text-align: center;
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}

/* =========================================================
   Author Bar（個別ページ上部）
========================================================= */

.artwork-author {
  width: 100%;
  text-align: center;
  font-size: 1rem;
  color: #666;
  letter-spacing: 0.05em;
  padding: 8px 0 24px;
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 32px;
}


/* =========================================================
   Creator Bar（index ページ）
========================================================= */

.creator-bar {
  width: 100%;
  text-align: center;
  font-size: 1rem;
  color: #666;
  letter-spacing: 0.05em;
  padding: 12px 0;
  border-top: 1px solid #e0e0e0;
  border-bottom: 1px solid #e0e0e0;
  margin: 40px 0 24px;
}

.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;

  background: transparent; /* ← 透明 */
  z-index: 100;
}

.footer-inner {
  max-width: 768px;
  margin: 0 auto;
  padding: 5px;
  background: #fafafa; /* ← 展示室と同色 */
  display: flex;
  justify-content: center;
}

#affiliate-footer {
		background-color:#ffffff;
		transition: opacity 0.3s ease, visibility 0.3s ease;
}

#affiliate-footer.hidden {
  		opacity: 0;
  		visibility: hidden;
}

button.sa {
 	padding: 10px 20px;
  	font-size: 16px;
  	background-color: #303030;
  	color: white;
  	border: none;
  	border-radius: 5px;
  	text-align:center;
  	cursor: pointer;
		}

button:hover.sa {
  			background-color: #0056b3;
  			}