/* =========================================================
   住ま居る 家づくりスケジュール＆進行チェックリスト専用スタイル
   public/css/schedule.css
   ========================================================= */

.schedule-main-wrap {
  background-color: #f1f5f9;
  background-image: radial-gradient(#cbd5e1 1px, transparent 1px);
  background-size: 24px 24px;
  padding: 30px 14px 60px;
  min-height: calc(100vh - 120px);
}

.schedule-container {
  max-width: 1140px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.08);
  padding: 40px 32px;
  border: 1px solid #e2e8f0;
}

/* ヘッダーエリア */
.schedule-header {
  text-align: center;
  margin-bottom: 30px;
  border-bottom: 2px dashed #cbd5e1;
  padding-bottom: 28px;
}

.schedule-sub-title {
  color: var(--accent-gold, #d97706);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.schedule-main-title {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--primary-green, #1b4332);
  letter-spacing: 0.04em;
  margin-bottom: 16px;
  line-height: 1.35;
}

.schedule-intro-text {
  max-width: 880px;
  margin: 0 auto 20px auto;
  font-size: 0.96rem;
  color: #334155;
  text-align: left;
  background: #f8fafc;
  padding: 18px 22px;
  border-left: 5px solid var(--accent-gold, #d97706);
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  line-height: 1.8;
}

/* ★打合せ録音・家カルテ透明性バナー */
.transparency-banner {
  max-width: 880px;
  margin: 0 auto;
  background: linear-gradient(135deg, #1b4332 0%, #064e3b 100%);
  color: #ffffff;
  border-radius: 12px;
  padding: 22px 26px;
  text-align: left;
  box-shadow: 0 6px 20px rgba(6, 78, 59, 0.25);
  border: 2px solid #f59e0b;
  position: relative;
  overflow: hidden;
}

.transparency-banner::after {
  content: "🎙️";
  position: absolute;
  right: 15px;
  bottom: -10px;
  font-size: 5rem;
  opacity: 0.12;
  pointer-events: none;
}

.transparency-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.15rem;
  font-weight: 900;
  color: #fde68a;
  margin-bottom: 10px;
}

.transparency-desc {
  font-size: 0.94rem;
  line-height: 1.8;
  color: #f1f5f9;
}

.transparency-desc strong {
  color: #ffffff;
  background: rgba(245, 158, 11, 0.3);
  padding: 1px 6px;
  border-radius: 4px;
}

/* 進捗バー ＆ コントロールパネル */
.schedule-control-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  margin: 28px 0;
  background: #f0fdf4;
  padding: 16px 22px;
  border-radius: 10px;
  border: 1px solid #bbf7d0;
}

.progress-container {
  flex: 1;
  min-width: 260px;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-weight: 800;
  font-size: 0.95rem;
  margin-bottom: 8px;
  color: var(--primary-green, #1b4332);
}

.progress-bar-bg {
  background: #cbd5e1;
  height: 14px;
  border-radius: 7px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #059669);
  width: 0%;
  transition: width 0.35s ease;
}

.btn-group {
  display: flex;
  gap: 10px;
}

button.schedule-btn {
  padding: 8px 16px;
  font-size: 0.88rem;
  font-weight: 700;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

button.schedule-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

button.schedule-btn.btn-primary {
  background: var(--accent-gold, #d97706);
  color: #ffffff;
  border-color: var(--accent-gold, #d97706);
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.25);
}

button.schedule-btn.btn-primary:hover {
  background: #b45309;
}

/* トースト通知 */
.schedule-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #0f172a;
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: 0 8px 25px rgba(0,0,0,0.4);
  border: 1px solid #38bdf8;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 10000;
}

.schedule-toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* 列ヘッダー */
.grid-header {
  display: grid;
  grid-template-columns: 1.1fr 190px 1.4fr;
  gap: 20px;
  align-items: center;
  text-align: center;
  font-weight: 800;
  font-size: 1.15rem;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 3px solid #e2e8f0;
}

.header-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--primary-green, #1b4332);
}

.header-arrow {
  color: var(--accent-gold, #d97706);
  font-size: 1.3rem;
  line-height: 1;
  margin-top: 4px;
}

.start-badge {
  background: var(--primary-green, #1b4332);
  color: white;
  font-weight: 900;
  font-size: 1.05rem;
  padding: 6px 20px;
  border-radius: 20px;
  letter-spacing: 0.08em;
  display: inline-block;
  box-shadow: 0 2px 8px rgba(27, 67, 50, 0.25);
}

/* タイムライン本体 */
.schedule-timeline {
  position: relative;
  display: flex;
  flex-direction: column;
}

.step-row {
  display: grid;
  grid-template-columns: 1.1fr 190px 1.4fr;
  gap: 20px;
  align-items: stretch;
  position: relative;
  margin-bottom: 24px;
}

.step-row::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 8%;
  right: 8%;
  height: 0;
  border-top: 2px dotted #cbd5e1;
  z-index: 1;
}

/* 左列：お金と書類の流れ */
.col-money {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
  z-index: 2;
}

.money-card {
  background: #ffffff;
  border: 2px solid #f59e0b;
  border-radius: 10px;
  padding: 10px 14px;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.08);
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}

.money-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.16);
}

.money-card.highlight-pay {
  background: #fffbeb;
  border-color: #d97706;
  border-width: 2.5px;
}

.money-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  color: #b45309;
  background: #fef3c7;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 4px;
}

.money-title {
  font-weight: 800;
  font-size: 0.95rem;
  color: #1e293b;
  line-height: 1.4;
}

.money-desc {
  font-size: 0.82rem;
  color: #475569;
  margin-top: 4px;
  line-height: 1.5;
}

/* 中央列：工程ステップ */
.col-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
  position: relative;
}

.col-step::after {
  content: "";
  position: absolute;
  top: 100%;
  bottom: -24px;
  width: 6px;
  background: #cbd5e1;
  z-index: 1;
}

.step-row:last-child .col-step::after {
  display: none;
}

.step-box {
  width: 100%;
  background: #334155;
  color: #ffffff;
  padding: 14px 10px;
  border-radius: 8px;
  text-align: center;
  font-weight: 800;
  font-size: 0.96rem;
  line-height: 1.35;
  box-shadow: 0 3px 8px rgba(0,0,0,0.12);
  position: relative;
  border: 2px solid transparent;
}

.step-box.highlight {
  background: var(--accent-gold, #d97706);
  border-color: #fde68a;
}

.step-box.plan-entry {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  border-color: #7dd3fc;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

.step-box.contract {
  background: linear-gradient(135deg, #b91c1c, #991b1b);
  border-color: #fca5a5;
  box-shadow: 0 4px 12px rgba(185, 28, 28, 0.3);
}

.step-box.milestone {
  background: var(--primary-green, #1b4332);
  border-color: #6ee7b7;
}

.step-box.start-end {
  background: linear-gradient(135deg, #1b4332, #064e3b);
  font-size: 1.05rem;
  border: 2px solid #34d399;
}

.step-subtext {
  font-size: 0.74rem;
  font-weight: 500;
  opacity: 0.95;
  display: block;
  margin-top: 4px;
}

/* 右列：チェックポイント */
.col-check {
  display: flex;
  align-items: center;
  z-index: 2;
}

.check-card {
  width: 100%;
  background: #ffffff;
  border: 2px solid #cbd5e1;
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.check-card:hover {
  background: #f8fafc;
  border-color: var(--accent-gold, #d97706);
  transform: translateY(-1px);
}

.check-card.is-checked {
  background: #f0fdf4;
  border-color: #10b981;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.15);
}

.check-card.is-checked .check-badge {
  background: #10b981;
  color: #fff;
  border-color: #10b981;
}

.check-card.is-checked .check-text {
  color: #475569;
  text-decoration: line-through;
}

.check-box-wrapper {
  margin-top: 3px;
  display: flex;
  align-items: center;
}

.real-checkbox {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--primary-emerald, #059669);
}

.check-content {
  flex: 1;
}

.check-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--accent-gold, #d97706);
  background: #fef3c7;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
  border: 1px solid #fde68a;
  transition: all 0.2s;
}

.check-badge.badge-green {
  color: #065f46;
  background: #d1fae5;
  border-color: #a7f3d0;
}

.check-text {
  font-size: 0.88rem;
  line-height: 1.6;
  color: #1e293b;
  transition: all 0.2s;
}

.check-carte-note {
  margin-top: 8px;
  padding: 6px 10px;
  background: #f0fdf4;
  border-left: 3px solid #10b981;
  font-size: 0.8rem;
  color: #065f46;
  border-radius: 0 4px 4px 0;
}

/* フェーズ区切り */
.phase-divider {
  grid-column: 1 / -1;
  text-align: center;
  position: relative;
  margin: 20px 0 28px 0;
}

.phase-divider span {
  background: var(--primary-green, #1b4332);
  color: #ffffff;
  padding: 6px 28px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  border: 1px solid #34d399;
}

/* 印刷用CSS */
@media print {
  body {
    background: none;
    padding: 0;
  }
  .site-header, .site-footer, .back-to-top-btn, .schedule-control-panel, .btn-group {
    display: none !important;
  }
  .schedule-container {
    box-shadow: none;
    border: none;
    padding: 0;
    max-width: 100%;
  }
  .step-row {
    page-break-inside: avoid;
    margin-bottom: 16px;
  }
  .money-card, .check-card, .step-box {
    box-shadow: none !important;
  }
}

/* レスポンシブ対応 */
@media (max-width: 820px) {
  .schedule-container {
    padding: 20px 14px;
  }
  .schedule-main-title {
    font-size: 1.65rem;
  }
  .grid-header {
    display: none;
  }
  .step-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 28px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
  }
  .step-row::before {
    display: none;
  }
  .col-step {
    width: 100%;
    order: 1;
  }
  .col-step::after {
    display: none;
  }
  .col-money {
    width: 100%;
    order: 2;
  }
  .col-check {
    width: 100%;
    order: 3;
  }
}
