/* =========================================================
   J4C これまでの歩み（history.html）専用スタイル
   ※ページ見出し・左の目次・2カラムの枠は common.css の「下層ページ共通」
   ========================================================= */

:root {
  --c-green-label: #8cbf1f;
}

/* ---------- メイン写真（右端まで伸ばす） ---------- */
.history-visual {
  height: clamp(280px, 30vw, 440px);
  margin-right: calc(-1 * (max(0px, (100vw - var(--page-max)) / 2) + var(--page-pad)));
  overflow: hidden;
}
.history-visual img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }

/* =========================================================
   タイムライン
   ========================================================= */
.timeline {
  position: relative;
  margin: 100px 0 0;
  padding: 0;
  list-style: none;
}
/* 縦の線 */
.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 22px;
  bottom: 0;
  width: 1px;
  background: #dcdcdc;
}

.tl-item {
  position: relative;
  padding-left: 84px;
  padding-bottom: 120px;
}
/* オレンジの丸 */
.tl-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--c-orange);
  box-shadow: 0 0 0 5px #fff;
}

.tl-date {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
}
.tl-date .num {
  font-family: var(--f-en);
  font-size: 46px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.tl-card {
  position: relative;
  margin-top: 32px;
  border: 1px solid #e2e2e0;
  border-radius: 8px;
  background: #fff;
}
.tl-label {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.6;
}
.tl-label-wish { color: var(--c-orange); }
.tl-label-done { color: var(--c-green-label); }

.tl-wish {
  padding: 44px 56px 46px;
  border-bottom: 1px solid #e2e2e0;
  border-radius: 8px 8px 0 0;
  background: #f8f8f6;
}
.tl-wish-text {
  margin-top: 10px;
  font-size: clamp(16px, 1.45vw, 20px);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.7;
  color: #444;
}

.tl-done {
  position: relative;
  padding: 52px 56px 56px;
}
.tl-done.has-photos {
  min-height: 250px;
  padding-right: 370px;
}
.tl-done .tl-label { margin-bottom: 8px; }
.tl-done-title {
  font-size: clamp(20px, 2vw, 28px);
  word-break: keep-all;          /* 「開設」などが1文字ずつ折り返されないよう、スペースの位置で改行 */
  overflow-wrap: anywhere;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.5;
}
.tl-done-title + .tl-done-title { margin-top: 6px; }
.tl-done-text {
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.9;
  letter-spacing: 0.06em;
  color: var(--c-sub);
}

/* ---------- 傾けて重ねた写真 ---------- */
.tl-photos {
  position: absolute;
  right: -22px;
  bottom: -34px;
  width: 350px;
  height: 300px;
  pointer-events: none;
}
.tl-photos img {
  position: absolute;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .14);
}
.tl-photos img:nth-child(1) {
  top: 0;
  left: 0;
  width: 66%;
  transform: rotate(8deg);
}
.tl-photos img:nth-child(2) {
  right: 0;
  bottom: 0;
  width: 64%;
  transform: rotate(-11deg);
}
/* 写真が1枚だけのとき */
.tl-photos img:only-child { top: auto; bottom: 20px; left: auto; right: 20px; width: 78%; transform: rotate(-6deg); }

/* ---------- 年表の終わり ---------- */
.tl-end {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 40px;
  margin-top: -20px;
}
.tl-end-arrow {
  position: relative;
  flex-shrink: 0;
  width: 13px;
  height: 46px;
}
.tl-end-arrow::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 0;
  width: 1px;
  height: 36px;
  background: #dcdcdc;
}
.tl-end-arrow::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  border-left: 7px solid transparent;
  border-right: 6px solid transparent;
  border-top: 10px solid var(--c-text);
}
.tl-end-hand {
  margin: 10px 0 0 30px;
  font-family: var(--f-hand);
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.6;
  letter-spacing: 0.14em;
  transform: rotate(-6deg);
  transform-origin: left top;
}
.tl-end-hand span { display: inline-block; padding-left: 2.2em; }

/* =========================================================
   レスポンシブ
   ========================================================= */
@media (max-width: 1180px) {
  .tl-done.has-photos { padding-right: 300px; }
  .tl-photos { width: 300px; height: 260px; }
  .tl-wish { padding: 36px 40px; }
  .tl-done { padding: 44px 40px 48px; }
}

@media (max-width: 960px) {
  .history-visual { height: 56vw; max-height: 360px; }

  .timeline { margin-top: 60px; }
  .tl-item { padding-left: 34px; padding-bottom: 70px; }
  .tl-item::before { top: 11px; width: 11px; height: 11px; left: 1px; }
  .timeline::before { top: 16px; }
  .tl-date { font-size: 18px; }
  .tl-date .num { font-size: 32px; }
  .tl-card { margin-top: 20px; }
  .tl-wish { padding: 24px 22px; }
  .tl-done,
  .tl-done.has-photos { padding: 26px 22px 30px; min-height: 0; }
  .tl-label { font-size: 13px; }

  .tl-photos {
    position: relative;
    right: auto;
    bottom: auto;
    width: 100%;
    max-width: 380px;
    height: 0;
    padding-bottom: 72%;
    margin: 26px auto 0;
  }

  .tl-end { gap: 20px; margin-top: -10px; }
  .tl-end-hand { margin-left: 10px; }
}

@media (max-width: 560px) {
  .tl-photos { padding-bottom: 80%; }
}
