/* ==========================================================================
   timeline.css — 年表ページ専用スタイル
   .listing-hero / .breadcrumb / .listing__empty は style.css を継承。
   ========================================================================== */

.timeline-page { padding-block: 40px 100px; }

/* ---------- Controls ---------- */
.tl-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.tl-genre-tabs {
  display: inline-flex;
  gap: 4px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
  flex-wrap: wrap;
}
.tl-genre-tabs button {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: 999px;
  color: var(--text-dim);
  transition: background 0.2s, color 0.2s;
}
.tl-genre-tabs button.is-active { background: var(--gradient); color: #041018; }

.tl-decade-select {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.84rem;
  color: var(--text-muted);
}
.tl-decade-select select {
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
}
.tl-decade-select select:focus { outline: none; border-color: var(--cyan); }

.tl-count {
  font-size: 0.84rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  margin-bottom: 28px;
}

/* ---------- Vertical timeline ---------- */
.timeline {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--border-strong) 4%, var(--border-strong) 96%, transparent);
  transform: translateX(-50%);
}

.tl-year-group { position: relative; }
.tl-year-heading {
  position: sticky;
  top: 78px;
  z-index: 3;
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}
.tl-year-heading span {
  font-family: var(--font-mono);
  font-weight: 900;
  font-size: 1.2rem;
  color: var(--cyan);
  background: var(--bg);
  border: 1px solid rgba(34, 211, 238, 0.4);
  border-radius: 999px;
  padding: 6px 20px;
}

.tl-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 40px 1fr;
  margin-bottom: 20px;
}
.tl-row .tl-dot {
  grid-column: 2;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gradient);
  justify-self: center;
  align-self: center;
  z-index: 2;
  box-shadow: 0 0 0 4px var(--bg);
}
.tl-row.is-left .tl-card { grid-column: 1; margin-right: 24px; text-align: right; }
.tl-row.is-right .tl-card { grid-column: 3; margin-left: 24px; }

.tl-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  backdrop-filter: blur(8px);
  transition: border-color 0.2s, background 0.2s, transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.tl-card:hover { border-color: rgba(34, 211, 238, 0.4); background: var(--surface-hover); box-shadow: 0 10px 24px -14px rgba(34, 211, 238, 0.3); }
.tl-row.is-left .tl-card:hover { transform: translateX(-4px); }
.tl-row.is-right .tl-card:hover { transform: translateX(4px); }

.tl-card__cat {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--cyan);
  border: 1px solid rgba(34, 211, 238, 0.35);
  padding: 2px 9px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.tl-card__work { font-weight: 700; font-size: 0.92rem; }
.tl-card__song { margin-top: 6px; font-size: 0.86rem; }
.tl-card__song .type { color: var(--text-dim); font-size: 0.72rem; margin-right: 5px; }
.tl-card__artist { margin-top: 3px; font-size: 0.78rem; color: var(--text-muted); }
.tl-card__note { margin-top: 6px; font-size: 0.72rem; color: var(--text-dim); }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .timeline::before { left: 24px; }
  .tl-row { grid-template-columns: 48px 1fr; }
  .tl-row .tl-dot { grid-column: 1; }
  .tl-row.is-left .tl-card, .tl-row.is-right .tl-card { grid-column: 2; margin: 0; text-align: left; }
  .tl-year-heading { top: 64px; }
}
