/* ベースリセット */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #111;
  color: #f5f5f5;
}

/* ヘッダー */
.site-header {
  background: #181818;
  border-bottom: 1px solid #222;
  padding: 1rem 1rem;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-text h1 {
  margin: 0;
  font-size: 1.6rem;
}

.site-desc {
  margin: 0.4rem 0 0;
  font-size: 0.9rem;
  color: #ccc;
}

/* 言語切り替え */
.lang-switch {
  display: flex;
  gap: 0.5rem;
}

.lang-button {
  border: 1px solid #444;
  border-radius: 999px;
  padding: 0.25rem 0.8rem;
  font-size: 0.8rem;
  background: #202020;
  color: #ddd;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.1s;
}

.lang-button:hover {
  background: #2b2b2b;
}

.lang-button.active-lang {
  background: #f06292;
  border-color: #f06292;
  color: #111;
  transform: translateY(1px);
}

/* メインレイアウト */
.site-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem;
}

.filter-section,
.gallery-section {
  margin-bottom: 2rem;
}

.filter-section h2,
.gallery-section h2 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

/* タグフィルタ */
.tag-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.tag-button {
  border: 1px solid #444;
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-size: 0.8rem;
  background: #202020;
  color: #ddd;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.1s;
}

.tag-button:hover {
  background: #2a2a2a;
}

.tag-button.active {
  background: #f06292;
  border-color: #f06292;
  color: #111;
  transform: translateY(1px);
}

.clear-filters {
  border: none;
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.8rem;
  background: #333;
  color: #ddd;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.clear-filters:hover {
  background: #444;
}

.clear-filters:active {
  transform: translateY(1px);
}

/* セット絞り込み */
.set-filter-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.set-filter-label {
  font-size: 0.85rem;
  color: #ccc;
}

.set-filter {
  min-width: 180px;
  max-width: 260px;
  padding: 0.3rem 0.5rem;
  font-size: 0.85rem;
  border-radius: 999px;
  border: 1px solid #444;
  background: #202020;
  color: #eee;
  outline: none;
}

.set-filter:focus {
  border-color: #f06292;
}

/* ▼▼ ここからギャラリー（縦一列レイアウト） ▼▼ */

/* ギャラリー全体：縦1列でゆったり */
.gallery {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;           /* 作品同士の間隔 */
  padding-bottom: 2rem;
}

/* 各カード：中央寄せ・最大幅を決める */
.gallery-card {
  max-width: 900px;       /* PC時の最大幅 */
  margin: 0 auto;
  background: #181818;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid #222;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45);
}

/* 画像ラッパー：比率固定はやめて、そのまま表示 */
.gallery-thumb-wrapper {
  position: relative;
  background: #000;       /* 画像外側の縁取り的な黒背景 */
}

/* 画像本体：幅100%・縦は自動でゆったり */
.gallery-thumb {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;    /* はみ出さずに収まるように */
}

/* タグ表示 */
.gallery-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.6rem 0.9rem 0.3rem;
}

.gallery-tag {
  font-size: 0.75rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: #252525;
  color: #ccc;
}

/* メタ情報（公開日など） */
.gallery-meta {
  padding: 0 0.9rem 0.8rem;
  font-size: 0.8rem;
  color: #aaa;
  text-align: right;
}

.gallery-empty {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #bbb;
}

/* ▲▲ ギャラリーここまで ▲▲ */

/* フッター */
.site-footer {
  padding: 1rem;
  text-align: center;
  background: #181818;
  border-top: 1px solid #222;
}

.site-footer p {
  margin: 0;
  font-size: 0.8rem;
  color: #888;
}

/* スマホ対応 */
@media (max-width: 600px) {
  .site-main {
    padding: 0.75rem;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .lang-switch {
    align-self: flex-end;
  }

  .gallery-card {
    max-width: 100%;
    border-radius: 0.5rem;
  }
}

/* ▼ 右下のトップへ戻るボタン ▼ */
.back-to-top {
  position: fixed;
  right: 1.2rem;
  bottom: 1.6rem;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: #f06292;
  border: none;
  color: #111;
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s, transform 0.15s;
  z-index: 9999;
}

.back-to-top:hover {
  transform: translateY(-3px);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}
/* ▲ トップへ戻るボタンここまで ▲ */
