.theme-block {
  margin-bottom: 3rem;
}

.theme-heading {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  margin-bottom: 1.1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}

.theme-heading h2 { font-size: 1.15rem; margin: 0; }
.theme-heading .count { color: var(--brown-500); font-size: 0.82rem; }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.6rem;
}

.photo-card {
  cursor: pointer;
  border-radius: 12px;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}

.photo-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.photo-card .thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--cream-dark);
}

.photo-card.stacked {
  box-shadow: 4px 4px 0 var(--cream-dark), 4px 4px 0 1px var(--line), 8px 8px 0 -1px var(--cream), 8px 8px 0 var(--line);
}

.count-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(20, 15, 10, 0.72);
  color: #f3e9d8;
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.photo-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-card .caption {
  padding: 0.65rem 0.8rem 0.8rem;
}

.photo-card .caption .title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brown-800);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.photo-card .caption .date {
  font-size: 0.76rem;
  color: var(--gold);
  margin-top: 0.2rem;
}

/* Lightbox */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 15, 10, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.lightbox-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  max-width: min(90vw, 900px);
  max-height: 88vh;
  text-align: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 72vh;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  margin: 0 auto;
}

.lightbox-caption {
  color: #f3e9d8;
  margin-top: 1rem;
  font-family: var(--serif);
  font-size: 1.05rem;
}

.lightbox-caption .date { color: var(--gold-light); font-size: 0.85rem; display: block; margin-top: 0.2rem; }

.lightbox-close,
.lightbox-nav {
  position: fixed;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  color: #f3e9d8;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}

.lightbox-close:hover, .lightbox-nav:hover { background: rgba(255,255,255,0.2); }

.lightbox-close { top: 1.4rem; right: 1.4rem; }
.lightbox-nav.prev { left: 1.4rem; top: 50%; transform: translateY(-50%); }
.lightbox-nav.next { right: 1.4rem; top: 50%; transform: translateY(-50%); }

@media (max-width: 560px) {
  .lightbox-nav.prev { left: 0.5rem; }
  .lightbox-nav.next { right: 0.5rem; }
}
