@charset "UTF-8";

/* ========== 検索モーダル ========== */
.tl-search-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tl-search-modal[hidden] {
  display: none;
}

.tl-search-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.tl-search-modal__dialog {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(192, 217, 211, 0.45);
  width: min(480px, 92vw);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tl-search-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 12px;
  background: #c0d9d3;
  color: #22343b;
}

.tl-search-modal__title {
  margin: 0;
  font-size: 1.8rem;
  font-family: "Zen Kaku Gothic New", "Yu Gothic", sans-serif;
  font-weight: 700;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tl-search-modal__title .las {
  font-size: 1.8rem;
  color: #22343b;
  top: 0;
}

.tl-search-modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  color: #22343b;
  cursor: pointer;
  transition: background 0.2s;
}

.tl-search-modal__close:hover {
  background: rgba(255, 255, 255, 0.7);
}

.tl-search-modal__close .las {
  font-size: 1.6rem;
  color: #22343b;
  top: 0;
}

.tl-search-modal__body {
  padding: 20px 20px 16px;
  min-height: 120px;
  max-height: 60vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tl-search-field {
  display: flex;
  flex-direction: column;
}

.tl-search-field__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 1.6rem;
  font-weight: 700;
  color: #111;
}

.tl-search-field__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #111;
}

.tl-search-field__input {
  width: 100%;
  box-sizing: border-box;
  border: 2px solid #d8d8d8;
  border-radius: 4px;
  padding: 14px 16px;
  font-size: 1.3rem;
  line-height: 1.3;
}

.tl-search-field__select {
  width: 100%;
  box-sizing: border-box;
  border: 2px solid #d8d8d8;
  border-radius: 4px;
  padding: 10px 12px;
  font-size: 1.3rem;
  line-height: 1.3;
  background-color: #fff;
}

.tl-search-field__select[multiple] {
  max-height: 150px;
}

.tl-search-field__hint {
  margin: 6px 0 0;
  font-size: 1.1rem;
  color: #666;
}

.tl-search-field__date-range {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tl-search-field__date-input {
  flex: 1;
  box-sizing: border-box;
  border: 2px solid #d8d8d8;
  border-radius: 4px;
  padding: 14px 16px;
  font-size: 1.3rem;
  line-height: 1.3;
  background-color: #fff;
}

.tl-search-field__date-separator {
  flex-shrink: 0;
  color: #111;
  font-size: 1.4rem;
}

@media (max-width: 640px) {
  .tl-search-field:nth-child(5) {
    order: -1;
  }

  .tl-search-field__date-range {
    flex-direction: column;
    align-items: stretch;
  }

  .tl-search-field__date-input {
    width: 100%;
  }

  .tl-search-field__date-separator {
    align-self: flex-start;
  }
}

.tl-search-field__input:focus {
  outline: none;
  border-color: #9ec5bb;
  box-shadow: 0 0 0 3px rgba(192, 217, 211, 0.35);
}

.tl-search-field__select:focus {
  outline: none;
  border-color: #9ec5bb;
  box-shadow: 0 0 0 3px rgba(192, 217, 211, 0.35);
}

.tl-search-field__date-input:focus {
  outline: none;
  border-color: #9ec5bb;
  box-shadow: 0 0 0 3px rgba(192, 217, 211, 0.35);
}

.tl-search-modal__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px 16px;
  gap: 8px;
}

.tl-search-modal__clear {
  padding: 8px 16px;
  background: #fff;
  color: #555;
  border: 1px solid #c7c7c7;
  border-radius: 8px;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.tl-search-modal__clear:hover {
  background: #f2f2f2;
  color: #333;
  border-color: #b9b9b9;
}

.tl-search-modal__apply {
  padding: 8px 24px;
  background: #c0d9d3;
  color: #22343b;
  border: none;
  border-radius: 8px;
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
}

.tl-search-modal__apply:hover {
  opacity: 0.85;
}
/* ========== 検索モーダルここまで ========== */

.event-timeline-page {
  overflow-x: clip;
}

.timeline-main {
  position: relative;
}

.timeline-prototype {
  --timeline-ink: #3f45bf;
  --timeline-bg: #eef0fa;
  --timeline-soft: #dde2ff;
  --timeline-accent: #84d0d4;
  --timeline-card: #ffffff;
  overflow: visible;
  background: #fff;
}

.timeline-toolbar {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 4px 8px 0;
  margin-bottom: 12px;
}

.timeline-toolbar__btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 10px;
  border: 2px solid #c0d9d3;
  background: transparent;
  color: #000;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
  gap: 2px;
}

.timeline-toolbar__label {
  font-size: 1rem;
  line-height: 1;
  color: #000;
  transition: color 0.2s;
}

/* タイプボタン */
.type-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.type-btn {
  padding: 8px 12px;
  background: #fff;
  border: 2px solid #c0d9d3;
  border-radius: 6px;
  color: #22343b;
  cursor: pointer;
  font-size: 1.4rem;
  font-family: "Zen Kaku Gothic New", "Yu Gothic", sans-serif;
  transition: background-color 0.2s, border-color 0.2s;
}

.type-btn:hover {
  background: #f0f8f5;
  border-color: #9ec5bb;
}

.type-btn.selected {
  background: #c0d9d3;
  border-color: #9ec5bb;
  color: #22343b;
}

.timeline-toolbar__btn:hover .timeline-toolbar__label {
  color: #fff;
}

.timeline-toolbar__btn:hover {
  background-color: #c0d9d3;
  border-color: #c0d9d3;
}

.timeline-toolbar__btn .las {
  font-size: 2.2rem;
  top: 0;
  color: #000;
  transition: color 0.2s;
}

.timeline-toolbar__btn:hover .las {
  color: #fff;
}

.timeline-prototype__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 132px minmax(300px, 520px);
  justify-content: center;
  align-items: stretch;
  gap: 0 4px;
  padding: clamp(16px, 2vw, 28px) 0;
  max-height: 540px;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.timeline-prototype__inner--empty {
  grid-template-columns: minmax(300px, 520px);
}

.timeline-prototype__inner::-webkit-scrollbar {
  width: 6px;
}

.timeline-prototype__inner::-webkit-scrollbar-track {
  background: transparent;
}

.timeline-prototype__inner::-webkit-scrollbar-thumb {
  background-color: #b2b8e4;
  border-radius: 99px;
}

.timeline-years {
  position: relative;
  display: block;
  width: 132px;
  padding-right: 12px;
  isolation: isolate;
}

.timeline-years--hidden {
  display: none;
}

.timeline-years::after {
  content: "";
  position: absolute;
  right: 16px;
  top: var(--timeline-line-start, 22px);
  bottom: var(--timeline-line-end, 22px);
  border-right: 2px dotted #8a919d;
  z-index: 0;
}

.timeline-year {
  position: absolute;
  left: 0;
  z-index: 1;
  margin: 0;
  padding-top: 2px;
  white-space: nowrap;
  font-size: clamp(3.6rem, 3.1rem + 0.8vw, 4.6rem);
  line-height: 1;
  letter-spacing: 2px;
  font-family: "Zen Kaku Gothic New", "Yu Gothic", sans-serif;
  text-transform: none;
  word-break: keep-all;
}

.timeline-year::after {
  content: "";
  position: absolute;
  right: -33px;
  top: 0.45em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #6f7780;
  border: 3px solid #fff;
  z-index: 2;
}

.timeline-phone {
  background-color: var(--timeline-card);
  border-radius: 26px;
  box-shadow: 0 20px 30px rgba(63, 69, 191, 0.15);
  overflow: hidden;
}

.timeline-phone__head {
  background-color: var(--timeline-ink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  padding: 14px 16px 10px;
}

.timeline-phone__head h3 {
  margin: 0;
  font-size: 2.4rem;
  letter-spacing: 1px;
  font-family: "Zen Kaku Gothic New", "Yu Gothic", sans-serif;
  word-break: keep-all;
  text-transform: none;
}

.timeline-phone__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.2);
}

.timeline-phone__icon .las {
  font-size: 1.8rem;
  color: #fff;
  top: 0;
}

.timeline-days {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin: -16px 14px 0;
  position: relative;
  z-index: 2;
}

.timeline-days span {
  min-height: 52px;
  border-radius: 14px;
  font-size: 1rem;
  line-height: 1.2;
  letter-spacing: 0.6px;
  text-align: center;
  padding-top: 8px;
  background-color: #f1f3ff;
  color: #5b5f7a;
}

.timeline-days .is-active {
  background-color: #4c52d3;
  color: #fff;
  font-weight: 700;
}

.timeline-task-list {
  margin-top: 0;
  background-color: #fff;
  border-radius: 22px;
  padding: 14px 14px 12px;
}

.timeline-task-list h4 {
  margin: 0;
  text-align: left;
  font-family: "Zen Kaku Gothic New", "Yu Gothic", sans-serif;
  text-transform: none;
  letter-spacing: 1px;
  font-size: 1.9rem;
  line-height: 1.2;
}

.timeline-task {
  --task-bg: #d9dcff;
  --task-line: #b2b8e4;
  margin-top: 8px;
  border-left: 4px solid var(--task-line);
  background-color: var(--task-bg);
  color: #333;
  border-radius: 14px;
  padding: 10px 12px 8px 14px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.timeline-task--oridare {
  --task-bg: #dcd7ff;
  --task-line: #aaa3eb;
}

.timeline-task--daredeza {
  --task-bg: #d3ebff;
  --task-line: #87bfe8;
}

.timeline-task--naizu {
  --task-bg: #d8f2e4;
  --task-line: #8cc9aa;
}

.timeline-task__date {
  margin: 0;
  font-size: 1.2rem;
  color: #4d5478;
  line-height: 1.25;
}

.timeline-task__title {
  margin: 1px 0 2px;
  font-size: 1.8rem;
  font-weight: 700;
  color: #000000;
  letter-spacing: 1px;
  line-height: 1.3;
}

.timeline-task__meta {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.6;
}

.timeline-task__label {
  font-weight: 700;
}

.timeline-task-empty {
  margin: 12px auto 4px;
  border: 2px dashed #c8cde8;
  background: #f8f9ff;
  border-radius: 12px;
  padding: 14px 12px;
  max-width: 520px;
  font-size: 1.3rem;
  line-height: 1.6;
  color: #4d5478;
  text-align: center;
}

.timeline-task-list--empty {
  padding-left: 0;
}

.timeline-task-list--empty::before {
  content: none;
}

/* モバイル用年区切り: デスクトップでは非表示 */
.timeline-year-divider {
  display: none;
}

.timeline-phone--detail .timeline-phone__head {
  justify-content: flex-start;
  gap: 10px;
}

.timeline-phone__head--detail {
  border-bottom-left-radius: 28px;
}

.timeline-detail {
  background-color: #f5f5f7;
  margin-top: -8px;
  border-radius: 20px 20px 0 0;
  padding: 18px 14px 14px;
  min-height: 278px;
}

.timeline-detail__monthnav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  text-align: center;
  gap: 6px;
  margin-bottom: 12px;
}

.timeline-detail__monthnav span {
  background-color: #ececf3;
  border-radius: 9999px;
  font-size: 1.1rem;
  padding: 4px 6px;
  color: #7a7f95;
}

.timeline-detail__monthnav .is-active {
  color: #fff;
  background-color: #4c52d3;
  font-weight: 700;
}

.timeline-detail__list {
  margin: 0;
  display: grid;
  gap: 10px;
}

.timeline-detail__list div {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  gap: 8px;
}

.timeline-detail__list dt,
.timeline-detail__list dd {
  margin: 0;
}

.timeline-detail__list dt {
  font-size: 1.2rem;
  font-weight: 700;
  color: #4c52d3;
  letter-spacing: 1px;
}

.timeline-detail__list dd {
  background-color: #ebecf0;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 1.4rem;
  line-height: 1.4;
}

@media screen and (max-width: 820px) {
  .timeline-prototype__inner {
    grid-template-columns: 1fr;
    gap: 0;
    align-items: start;
  }

  /* デスクトップ年列を非表示 */
  .timeline-years {
    display: none;
  }

  /* タスクリストを縦1列 + 左に点線エリアを確保 */
  .timeline-task-list {
    position: relative;
    padding-left: 36px;
  }

  .timeline-task-list.timeline-task-list--empty {
    padding-left: 0;
  }

  /* 縦の点線 (上端はJSが--mobile-line-startを設定) */
  .timeline-task-list::before {
    content: "";
    position: absolute;
    left: 12px;
    top: var(--mobile-line-start, 34px);
    bottom: 0;
    border-left: 2px dotted #8a919d;
    z-index: 0;
  }

  .timeline-task-list.timeline-task-list--empty::before {
    content: none;
    border-left: none;
  }

  /* 年区切り表示 */
  .timeline-year-divider {
    display: block;
    position: relative;
    margin: 20px 0 8px;
    font-size: clamp(2.8rem, 2.4rem + 1vw, 3.6rem);
    font-family: "Zen Kaku Gothic New", "Yu Gothic", sans-serif;
    font-weight: normal;
    letter-spacing: 2px;
    line-height: 1;
    color: #333;
    z-index: 1;
    text-align: left;
    text-transform: none;
  }

  /* 最初の年区切りは上マージンを詰める */
  .timeline-year-divider:first-child {
    margin-top: 4px;
  }

  /* 年区切りの左側ドット（点線の上に重ねる） */
  .timeline-year-divider::before {
    content: "";
    position: absolute;
    left: -31px;
    top: 0.5em;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #6f7780;
    border: 3px solid #fff;
    z-index: 2;
  }
}

@media screen and (max-width: 520px) {
  .timeline-prototype {
    margin: 84px 0 100px;
    /* 左右余白を縮小し全体を左寄せ */
    padding-left: 8px;
    padding-right: 8px;
  }

  .timeline-phone__head h3 {
    font-size: 2.1rem;
  }

  /* ページタイトルを縮小 */
  .timeline-prototype .headingL {
    font-size: clamp(2rem, 1.6rem + 2vw, 2.6rem);
  }

  /* タスクリスト右パディングを詰めてカード幅を拡大 */
  .timeline-task-list {
    padding-right: 6px;
  }

  /* タスク内文字を縮小 */
  .timeline-task__date {
    font-size: 1.1rem;
  }

  .timeline-task__title {
    font-size: 1.5rem;
  }

  .timeline-task__meta {
    font-size: 1.1rem;
  }
}
