/* =============================================
   Archive ウィジェット（サイドバー）
   ============================================= */
.archives-tree details {
  margin-bottom: .25rem;
}
.archives-tree summary.arch-year {
  cursor: pointer;
  font-weight: bold;
  list-style: none;         /* デフォルトの ▶ を消す */
  display: flex;
  align-items: center;
  gap: .3em;
  padding: .15rem 0;
  user-select: none;
}
.archives-tree summary.arch-year::before {
  content: "▶";
  font-size: .7em;
  transition: transform .2s;
  flex-shrink: 0;
}
.archives-tree details[open] > summary.arch-year::before {
  transform: rotate(90deg);
}
.arch-months {
  list-style: none;
  margin: .2rem 0 .4rem 1.2rem;
  padding: 0;
}
.arch-months li a {
  display: flex;
  justify-content: space-between;
  padding: .1rem .2rem;
  border-radius: 3px;
  text-decoration: none;
  font-size: .9em;
}
.arch-months li a:hover {
  background: var(--color-surface-dynamic, #e8e8e8);
}
.arch-count {
  font-size: .8em;
  color: #888;
  margin-left: .3em;
}

/* =============================================
   Archive ページ（タイムライン）
   ============================================= */
.archives-page {
  max-width: 860px;
}
.archives-page__title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: baseline;
  gap: .6rem;
}
.archives-page__total {
  font-size: .85rem;
  font-weight: normal;
  color: #888;
}

/* 年ジャンプナビ */
.arch-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem .6rem;
  margin-bottom: 2rem;
  padding: .6rem .8rem;
  background: #f5f5f5;
  border-radius: 6px;
  font-size: .85rem;
}
.arch-nav a {
  text-decoration: none;
  color: inherit;
  padding: .1rem .3rem;
  border-radius: 3px;
}
.arch-nav a:hover {
  background: #e0e0e0;
}

/* 年セクション */
.arch-year-section {
  margin-bottom: 2.5rem;
  scroll-margin-top: 4rem;   /* 固定ヘッダー分のオフセット */
}
.arch-year-heading {
  font-size: 1.25rem;
  border-bottom: 2px solid #ccc;
  padding-bottom: .3rem;
  margin-bottom: 1rem;
}

/* 月ブロック */
.arch-month-block {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 0 1rem;
  margin-bottom: 1.2rem;
  scroll-margin-top: 4rem;
}
.arch-month-label {
  font-weight: bold;
  font-size: .95rem;
  padding-top: .1rem;
  color: #555;
  position: sticky;
  top: 4rem;          /* 固定ヘッダー分 */
  align-self: start;
}
.arch-month-count {
  display: block;
  font-size: .75rem;
  font-weight: normal;
  color: #999;
}
.arch-post-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.arch-post-list li {
  display: flex;
  gap: .6rem;
  align-items: baseline;
  padding: .15rem 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: .9rem;
}
.arch-post-date {
  flex-shrink: 0;
  color: #999;
  font-size: .8rem;
  width: 3.2rem;
  font-variant-numeric: tabular-nums;
}
.arch-post-list a {
  text-decoration: none;
}
.arch-post-list a:hover {
  text-decoration: underline;
}

/* モバイル対応 */
@media (max-width: 640px) {
  .arch-month-block {
    grid-template-columns: 1fr;
  }
  .arch-month-label {
    position: static;
    margin-bottom: .3rem;
  }
}
