* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #111111;
  --bg2: #1c1c1c;
  --bg3: #252525;
  --text: #f0f0f0;
  --text-muted: #888;
  --accent: #d4a96a;
  --border: #333;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', sans-serif;
  min-height: 100vh;
}

/* ヘッダー */
header {
  padding: 48px 24px 32px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.site-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text);
}

.site-title span {
  color: var(--accent);
}

.site-sub {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

/* フィルター */
.filters {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 28px 24px;
}

.filter-btn {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 8px 20px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
  font-family: inherit;
}

.filter-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}

.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #111;
  font-weight: 600;
}

/* ギャラリーグリッド */
.gallery {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 80px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* 作品カード */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.card-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  background: var(--bg3);
}

.card-video-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  background: var(--bg3);
  position: relative;
}

.thumb-wrap {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--bg3);
  overflow: hidden;
}

.thumb-wrap img,
.thumb-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.play-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.3);
}

.play-icon svg {
  width: 48px;
  height: 48px;
  fill: rgba(255,255,255,0.9);
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}

.card-info {
  padding: 14px 16px;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.card-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.5;
}

/* 空状態 */
.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 24px;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.empty p {
  font-size: 0.9rem;
  line-height: 1.8;
}

/* モーダル */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay.open {
  display: flex;
}

.modal-inner {
  max-width: 900px;
  width: 100%;
  position: relative;
}

.modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.modal-close:hover {
  opacity: 1;
}

.modal-media {
  width: 100%;
  border-radius: 8px;
  display: block;
}

.modal-caption {
  margin-top: 16px;
  text-align: center;
}

.modal-caption h2 {
  font-size: 1.1rem;
  font-weight: 600;
}

.modal-caption p {
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* スマホ対応 */
@media (max-width: 600px) {
  .site-title {
    font-size: 1.5rem;
  }

  .gallery {
    grid-template-columns: 1fr;
    padding: 0 16px 60px;
  }
}
