.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 8px;
}

.filter-btn {
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.filter-btn__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--dot, var(--text-muted));
  display: inline-block;
}

.filter-btn[aria-pressed="true"] {
  color: var(--text);
  border-color: var(--dot, var(--accent));
  background: var(--bg);
  font-weight: 600;
}

.timeline-meta {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 4px 0 0;
}

.timeline {
  position: relative;
  margin-top: 36px;
}

.timeline-era {
  margin: 0;
}

.timeline-era:not(:first-child) {
  margin-top: 52px;
}

.timeline-era h2 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.timeline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.timeline-item.is-hidden {
  display: none;
}

.timeline-card {
  width: 100%;
  text-align: left;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow);
  color: var(--text);
  font: inherit;
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.timeline-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--bg);
  overflow: hidden;
}

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

.timeline-card__media--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(155deg, color-mix(in srgb, var(--dot, var(--accent)) 22%, var(--bg-elevated)), var(--bg-elevated));
}

.timeline-card__media--fallback svg {
  width: 42%;
  height: 42%;
  color: var(--dot, var(--accent));
  opacity: 0.85;
}

.timeline-card__media--quote {
  background: linear-gradient(155deg, color-mix(in srgb, var(--dot, var(--accent)) 30%, var(--bg-elevated)), var(--bg-elevated));
  display: flex;
  align-items: center;
  padding: 16px;
}

.timeline-card__media--quote blockquote {
  margin: 0;
  font-size: 0.82rem;
  font-style: italic;
  line-height: 1.4;
  color: var(--text);
}

.timeline-card__media__badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(20, 22, 28, 0.72);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.timeline-card__media__count {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(20, 22, 28, 0.72);
  color: #fff;
  font-size: 0.68rem;
  padding: 2px 7px;
  border-radius: 999px;
}

.timeline-card__body {
  padding: 12px 14px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.timeline-card__year {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--dot, var(--accent));
  font-size: 0.85rem;
}

.timeline-card__title {
  font-weight: 600;
  margin: 2px 0 6px;
  font-size: 1rem;
  line-height: 1.3;
}

.timeline-card__summary {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.45;
  flex: 1;
}

/* Detail panel (modal) */
.detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 16, 0.6);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 5vh 16px;
  z-index: 50;
  overflow-y: auto;
}

.detail-overlay[hidden] {
  display: none;
}

.detail-panel {
  background: var(--bg-elevated);
  border-radius: 16px;
  max-width: 640px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  margin-bottom: 5vh;
  overflow: hidden;
}

.detail-panel__gallery {
  position: relative;
  background: var(--bg);
}

.detail-panel__gallery img {
  display: block;
  width: 100%;
  height: min(65vh, 480px);
  object-fit: contain;
}

.detail-panel__gallery--fallback,
.detail-panel__gallery--quote {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  background: linear-gradient(155deg, color-mix(in srgb, var(--dot, var(--accent)) 25%, var(--bg-elevated)), var(--bg-elevated));
  padding: 32px;
}

.detail-panel__gallery--fallback svg {
  width: 30%;
  height: 30%;
  color: var(--dot, var(--accent));
  opacity: 0.85;
}

.detail-panel__gallery--quote blockquote {
  margin: 0;
  font-size: 1.3rem;
  font-style: italic;
  line-height: 1.45;
  color: var(--text);
  text-align: center;
}

.detail-panel__gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(20, 22, 28, 0.6);
  color: #fff;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-panel__gallery-nav--prev {
  left: 10px;
}

.detail-panel__gallery-nav--next {
  right: 10px;
}

.detail-panel__gallery-dots {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.detail-panel__gallery-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
}

.detail-panel__gallery-dots span.is-active {
  background: #fff;
}

.detail-panel__close {
  position: absolute;
  top: 10px;
  right: 10px;
  border: none;
  background: rgba(20, 22, 28, 0.6);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  z-index: 2;
}

.detail-panel__content {
  padding: 24px 28px 28px;
}

.detail-panel__tag {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px;
  margin-bottom: 14px;
}

.detail-panel__year {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--dot, var(--accent));
}

.detail-panel__title {
  margin: 4px 0 12px;
  font-size: 1.3rem;
}

.detail-panel__body {
  color: var(--text);
  font-size: 0.98rem;
}

.detail-panel__source {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-style: italic;
}
