/* ==========================================================================
   GALLERY PAGE (gallery.html) 専用スタイル
   他ページ(character.html/store.html等)と同じ骨格・書体・硬質な矩形基調の
   デザイン言語に合わせたフルワイド構成:
   eyebrow-strip → GALLERY見出し → 件数 → FILTERタブ(矩形トグル) →
   レスポンシブグリッド(YouTube動画タイル含む) →
   「Showing n of m items」フッターバー + 丸い下矢印ボタン
   ========================================================================== */

/* --- Header: GALLERYタブとの混同を避けるため共通ナビは出さずロゴのみ。
   レイアウトはそのままロゴだけが左に収まる --- */
.gallery-header {
  justify-content: flex-start;
}

/* --- Head block: eyebrow / title / counts --- */
.gallery-head {
  padding-block: var(--space-5) var(--space-3);
}

.gallery-title {
  margin-top: var(--space-2);
  font-family: var(--font-gothic);
  font-weight: 900;
  font-size: clamp(34px, 6vw, 48px);
  letter-spacing: 0.02em;
  color: var(--ink-bright);
}

.gallery-counts {
  margin-top: var(--space-2);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-gothic);
  font-weight: 500;
  font-size: 16px;
  color: var(--ink);
}

.gallery-counts .gallery-count-sep {
  color: var(--line-bright);
}

/* --- Filter row: 他ページの type-filter / global-nav と同じ矩形トグル --- */
.gallery-filter-row {
  padding-bottom: var(--space-4);
}

.gallery-filter-label {
  font-family: var(--font-gothic);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--ink-dim);
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}

.gallery-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.gallery-filter-tab {
  font-family: var(--font-gothic);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: #ffffff;
  padding: 6px 16px;
  border: 1px solid #ffffff;
  background: transparent;
  cursor: pointer;
  transition: background-color 0.2s var(--ease-out), color 0.2s var(--ease-out);
}

.gallery-filter-tab:hover,
.gallery-filter-tab:focus-visible {
  background-color: #ffffff;
  color: var(--bg-void);
}

.gallery-filter-tab.is-active {
  background-color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  color: var(--bg-void);
}

/* --- Grid: 他ページのcharacter-grid/store-gridと同じレスポンシブグリッド --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding-bottom: var(--space-4);
}

.gallery-tile {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--bg-panel);
  border: 1px solid var(--line);
}

.gallery-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-tile-video {
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  background: linear-gradient(160deg, #1b1d26 0%, #0a0a0e 100%);
}

.gallery-play-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 15px;
}

.gallery-video-label {
  font-family: var(--font-gothic);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: #c9cdd8;
  text-transform: uppercase;
}

.gallery-empty {
  font-family: var(--font-gothic);
  font-size: 14px;
  color: var(--ink-dim);
  padding: var(--space-4) 0;
}

/* --- Footer bar: Showing n of m / LOAD MORE --- */
.gallery-footer-bar {
  padding-block: var(--space-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  font-family: var(--font-gothic);
  font-size: 14px;
  color: var(--ink);
}

.gallery-load-more {
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--ink-bright);
  background: transparent;
}

.gallery-load-more:hover,
.gallery-load-more:focus-visible {
  color: var(--accent-cyan);
}

.gallery-load-more-wrap {
  display: flex;
  justify-content: center;
  padding-block: var(--space-3) var(--space-5);
}

.gallery-load-more-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-bright);
  background: var(--bg-panel-raised);
  color: var(--ink-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}

.gallery-load-more-circle:hover,
.gallery-load-more-circle:focus-visible {
  border-color: var(--accent-cyan);
  background: var(--bg-panel);
}

/* --- Footer spacing(type.htmlと同様、下に余白を設ける) --- */
.gallery-page .site-footer {
  margin-top: var(--space-6);
}

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

@media (max-width: 640px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .gallery-title {
    font-size: 34px;
  }

  .gallery-counts {
    font-size: 14px;
  }

  .gallery-filter-tab {
    padding: 5px 12px;
    font-size: 12px;
  }
}
