/* ==========================================
   history.css 整理版
   目的：
   - 装飾は維持
   - 年月バッジは残す
   - 月の強調を少し抑える
   - スマホで月表示が崩れないよう整理
   ========================================== */


/* ===============================
   1) ページ変数
   =============================== */

body.page-history {
  --hero-anim: hero-zoomfade-history;
  --hero-duration: 2s;
  --hero-scale-start: 1.06;
  --hero-gray-start: 80%;
  --hero-bright-start: 1.15;
  --cap-delay: 1.2s;
}


/* ===============================
   2) タイムライン
   =============================== */

.page-history .history-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px 20px;
}

.page-history .history-timeline > li {
  display: grid;
  grid-template-columns: 9rem 1fr;
  align-items: start;
  column-gap: 16px;
  padding: 10px 0;
  border-top: 1px solid #e6e9ee;
}

.page-history .history-timeline > li:first-child {
  border-top: none;
}


/* ===============================
   3) 年月バッジ
   =============================== */

.page-history .history-timeline .point {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.18em;
  min-width: 0;
  min-height: 36px;
  margin: 0;
  padding: 0 12px;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  line-height: 1;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
  hyphens: none;
  font-size: 0.9rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.page-history .history-timeline .point .era,
.page-history .history-timeline .point .year,
.page-history .history-timeline .point .month {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 0;
  white-space: nowrap;
}

/* 色と強弱 */
.page-history .history-timeline .point .era {
  color: #334155;
  font-weight: 700;
}

.page-history .history-timeline .point .year {
  color: #0f172a;
  font-weight: 700;
}

.page-history .history-timeline .point .month {
  color: #64748b;     /* 少し控えめ */
  font-weight: 500;   /* 強調を少し弱める */
  letter-spacing: 0;
}


/* ===============================
   4) 内容
   =============================== */

.page-history .history-timeline .desc {
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  box-shadow: none;
  color: #1f2937;
  font-size: 0.94rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}

.page-history .history-timeline .desc:hover {
  box-shadow: none;
}


/* ===============================
   5) 区切り
   =============================== */

.page-history .history-timeline > li.hr {
  list-style: none;
  grid-column: 1 / -1;
  border-top: 1px solid #e5e7eb;
  margin: 5px 0;
  padding: 0;
}

.page-history .history-timeline > li.era-hr {
  grid-column: 1 / -1;
  list-style: none;
  margin: 24px 0 10px;
  padding: 0;
  position: relative;
  height: 0;
  border-top: 0;
}

.page-history .history-timeline > li.era-hr::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: #e5e7eb;
}

.page-history .history-timeline > li.era-hr .label {
  position: absolute;
  top: 0;
  left: 0;
  transform: translateY(-50%);
  padding: 2px 8px;
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  border: 1px solid #e5e7eb;
}

.page-history .history-timeline > li.era-hr[data-era="M"] .label {
  background: #fff5f6;
  border-color: #fde2e7;
  color: #a11234;
}

.page-history .history-timeline > li.era-hr[data-era="S"] .label {
  background: #f7f8fb;
  border-color: #e5e7eb;
  color: #334155;
}

.page-history .history-timeline > li.era-hr[data-era="H"] .label {
  background: #f0fbfd;
  border-color: #cfeff6;
  color: #0e7490;
}

.page-history .history-timeline > li.era-hr[data-era="R"] .label {
  background: #eef4ff;
  border-color: #dbe7ff;
  color: #1d4ed8;
}


/* ===============================
   6) レスポンシブ（timeline）
   =============================== */

@media (max-width: 1024px) {
  .page-history .history-timeline {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .page-history .history-timeline > li {
    grid-template-columns: 8.2rem 1fr;
    column-gap: 12px;
    padding: 8px 0;
  }

  .page-history .history-timeline .point {
    justify-content: flex-start;
    text-align: left;
    font-size: 0.88rem;
    padding: 0 10px;
  }
}

@media (max-width: 560px) {
  .page-history .history-timeline > li {
    grid-template-columns: 7.6rem 1fr;
    column-gap: 10px;
  }

  .page-history .history-timeline .point {
    min-height: 34px;
    padding: 0 9px;
    font-size: 0.84rem;
  }

  .page-history .history-timeline .desc {
    font-size: 0.92rem;
  }
}

@media (max-width: 480px) {
  .page-history .history-timeline > li {
    grid-template-columns: 1fr;
    row-gap: 6px;
  }

  .page-history .history-timeline .point {
    justify-content: flex-start;
    width: fit-content;
  }
}


/* ===============================
   7) HISTORY PAGE
   history.html 専用
   =============================== */

.page-history .section {
  margin-bottom: 26px;
}

.page-history .panel {
  padding: 22px 26px 26px;
}

.page-history .hero-history {
  position: relative;
  min-height: clamp(240px, 34vh, 420px);
  border-radius: 18px;
  overflow: hidden;
}

.page-history .hero-history img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-history .hero-history .hero-title {
  font-size: clamp(28px, 4vw, 36px);
  line-height: 1.2;
}


/* ===============================
   8) テーブル版沿革
   =============================== */

.page-history .history-table {
  width: 100%;
  border-collapse: collapse;
}

.page-history .history-table th {
  width: 140px;
  text-align: left;
  padding: 12px 16px;
  font-weight: 600;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  color: #1f2937;
  white-space: nowrap;
}

.page-history .history-table td {
  padding: 12px 16px;
  line-height: 1.65;
  border-bottom: 1px solid #e5e7eb;
}

@media (max-width: 768px) {
  .page-history .panel {
    padding: 18px 16px 20px;
  }

  .page-history .history-table th {
    width: 100px;
    font-size: 13px;
    padding: 10px 12px;
  }

  .page-history .history-table td {
    font-size: 13px;
    padding: 10px 12px;
  }
}

/* 左カラム幅は戻す */
.page-history .history-timeline > li {
  grid-template-columns: 9rem 1fr;
}

/* 年月バッジの中身だけ整える */
.page-history .history-timeline .point {
  justify-content: center;
  padding: 0 12px;
  min-width: 8.8rem;   /* 月あり・月なしの見た目を揃える */
  gap: 0.14em;
}

/* 月の主張を少し下げる */
.page-history .history-timeline .point .month {
  color: #64748b;
  font-weight: 500;
}


