/* ── sub-history.css ── */

html { scroll-behavior: smooth; }

/* ── 연도 바로가기 네비 ── */
.ht-section {
  padding: 4px 0 48px;
}

.ht-year-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 44px;
  padding: 20px 24px;
  background: #f5f8ff;
  border: 1px solid #dce8f8;
  border-radius: 16px;
}

.ht-year-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 18px;
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #2c3e6b;
  background: #fff;
  border: 1.5px solid #d0daf0;
  text-decoration: none;
  transition: background 0.18s, color 0.18s, border-color 0.18s, box-shadow 0.18s;
  white-space: nowrap;
}

.ht-year-btn:hover {
  background: var(--color-primary, #3A7BD5);
  border-color: var(--color-primary, #3A7BD5);
  color: #fff;
  box-shadow: 0 4px 12px rgba(58, 123, 213, 0.22);
}

.ht-year-btn-range {
  background: #eff6ff;
  border-color: var(--color-primary, #3A7BD5);
  color: var(--color-primary, #3A7BD5);
}

/* ── 타임라인 ── */
.ht-timeline {
  display: flex;
  flex-direction: column;
}

.ht-year-block {
  scroll-margin-top: 90px;
  padding-bottom: 44px;
  border-bottom: 1px dashed #d0dce8;
  margin-bottom: 44px;
}

.ht-year-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* ── 연도 헤더 ── */
.ht-year-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--color-primary, #3A7BD5);
}

.ht-year-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--color-primary, #3A7BD5);
  margin: 0;
  line-height: 1;
  letter-spacing: -0.02em;
}

.ht-year-title span {
  font-size: 1rem;
  font-weight: 500;
  color: #99aabb;
  margin-left: 4px;
}

.ht-top-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #eff6ff;
  color: var(--color-primary, #3A7BD5);
  border: 1.5px solid #d0e4f8;
  font-size: 15px;
  text-decoration: none;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
  flex-shrink: 0;
}

.ht-top-btn:hover {
  background: var(--color-primary, #3A7BD5);
  color: #fff;
  border-color: var(--color-primary, #3A7BD5);
}

/* ── 이벤트 목록 ── */
.ht-event-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ht-event {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 20px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid #eef2f8;
  position: relative;
}

.ht-event:first-child {
  padding-top: 4px;
}

.ht-event:last-child {
  border-bottom: none;
}

.ht-month {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  background: var(--color-primary, #3A7BD5);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 7px;
  white-space: nowrap;
  padding: 0 4px;
  margin-top: 2px;
  flex-shrink: 0;
}

.ht-desc {
  margin: 0;
  font-size: 0.93rem;
  color: #2c3e55;
  line-height: 1.7;
  word-break: keep-all;
}

/* ── 반응형 ── */
@media (max-width: 640px) {
  .ht-year-nav { padding: 16px; gap: 6px; }

  .ht-year-btn {
    padding: 6px 12px;
    font-size: 0.82rem;
  }

  .ht-year-title { font-size: 1.7rem; }

  .ht-event {
    grid-template-columns: 56px 1fr;
    gap: 12px;
    padding: 12px 0;
  }

  .ht-month {
    font-size: 0.7rem;
    height: 26px;
  }

  .ht-desc { font-size: 0.88rem; }
}
