/* 予約ページ（週表・ウィザード）— 朱印（決まる）デザインに統一。
   styles.css の後に読み込まれ、予約フロー固有のレイアウトを上書きする。
   色は朱印トークン（vermilion=決定 / 暖白カード / やわらか角丸）。 */
body[data-page="booking"] .two-column{
  grid-template-columns:minmax(280px,.78fr) minmax(0,1.22fr);
}

body[data-page="booking"] .panel:nth-of-type(2){
  background:var(--surface);
  border-color:var(--line);
}

body[data-page="booking"] .slot-grid{
  margin-top:14px;
}

.week-schedule-card{
  display:grid;
  gap:14px;
}

.week-schedule-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
  padding:16px 18px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  box-shadow:var(--shadow);
}

.week-schedule-head h3{
  margin:0;
  color:var(--ink);
  font-family:var(--display);
  font-weight:700;
  font-size:22px;
  line-height:1.25;
  letter-spacing:-.01em;
}

.week-schedule-meta{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:8px;
}

.week-schedule-meta span,
.week-schedule-meta strong{
  display:inline-flex;
  align-items:center;
  min-height:32px;
  padding:0 11px;
  color:var(--ink-2);
  background:var(--accent-soft);
  border:0;
  border-radius:var(--radius-pill);
  font-size:13px;
  font-weight:700;
  white-space:nowrap;
}
.week-schedule-meta strong{color:var(--accent-ink);font-family:var(--mono)}

.week-table-wrap{
  width:100%;
  overflow:auto;
  border:1px solid var(--line);
  border-radius:var(--radius);
  background:var(--surface);
  box-shadow:var(--shadow);
}

.week-table{
  width:100%;
  min-width:860px;
  border-collapse:separate;
  border-spacing:0;
  table-layout:fixed;
}

.week-table th,
.week-table td{
  border-right:1px solid var(--line);
  border-bottom:1px solid var(--line);
}

.week-table thead th{
  position:sticky;
  top:0;
  z-index:2;
  min-height:48px;
  padding:12px 8px;
  color:var(--muted);
  background:var(--surface-2);
  font-family:var(--mono);
  font-size:12px;
  font-weight:700;
  letter-spacing:.04em;
  text-align:center;
}

.week-table thead th:first-child,
.week-table tbody th{
  position:sticky;
  left:0;
  z-index:3;
  width:76px;
  background:var(--surface-2);
}

.week-table tbody th{
  padding:8px 9px;
  color:var(--ink-2);
  font-family:var(--mono);
  font-size:12px;
  font-weight:700;
  text-align:right;
  vertical-align:top;
}

.week-table td{
  height:48px;
  padding:5px;
  background:var(--surface);
  text-align:center;
  vertical-align:middle;
}

.week-table tr:nth-child(even) td{
  background:var(--accent-soft);
}

.week-table th:last-child,
.week-table td:last-child{
  border-right:0;
}

.week-table tbody tr:last-child th,
.week-table tbody tr:last-child td{
  border-bottom:0;
}

.week-slot{
  display:grid;
  place-items:center;
  gap:1px;
  width:100%;
  min-height:38px;
  padding:6px 4px;
  color:#fff;
  background:var(--accent);
  border:0;
  border-radius:var(--radius-sm);
  box-shadow:0 8px 16px -10px rgba(222,74,46,.6);
  cursor:pointer;
  font:inherit;
  font-family:var(--mono);
  font-weight:700;
  transition:filter .12s ease;
}

.week-slot span{
  display:block;
  font-size:13px;
  line-height:1.1;
}

.week-slot small{
  display:block;
  color:rgba(255,255,255,.85);
  font-family:var(--jp);
  font-size:10px;
  font-weight:700;
  line-height:1.1;
}

.week-slot:hover{
  filter:brightness(1.07);
}

.week-slot.selected{
  background:var(--accent-ink);
  box-shadow:inset 0 0 0 3px #fff,0 8px 16px -10px rgba(222,74,46,.6);
}

.week-busy{
  color:var(--muted-2);
  font-size:12px;
}

@media(max-width:900px){
  body[data-page="booking"] .two-column{
    grid-template-columns:1fr;
  }
}

/* ===== 3ステップ・ウィザード（日程調整 → 確認 → 完了）===== */
.booking-flow{display:grid;gap:24px}

.stepper{display:flex;list-style:none;margin:0;padding:0;gap:8px}
.stepper .step{flex:1;display:flex;align-items:center;gap:10px;min-width:0;padding:13px 16px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}
.stepper .step-num{flex:none;display:grid;place-items:center;width:28px;height:28px;font-family:var(--mono);font-weight:700;font-size:14px;color:var(--muted);background:var(--surface-2);border:0;border-radius:50%;transition:background .2s ease,color .2s ease}
.stepper .step-label{font-family:var(--sans);font-weight:700;font-size:13px;letter-spacing:.02em;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.stepper .step.is-active{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent),var(--shadow)}
.stepper .step.is-active .step-num{color:#fff;background:var(--accent)}
.stepper .step.is-active .step-label{color:var(--ink)}
.stepper .step.is-done .step-num{color:#fff;background:var(--accent-ink)}
.stepper .step.is-done .step-num::after{content:"✓";font-size:13px}
.stepper .step.is-done .step-num{font-size:0}
.stepper .step.is-done .step-label{color:var(--ink-2)}

.flow-step[hidden]{display:none}
.flow-step{animation:stepIn .34s cubic-bezier(.22,1,.36,1) both}
@keyframes stepIn{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}

.form-section-label{margin:4px 0 0;font-family:var(--mono);font-size:12px;font-weight:700;letter-spacing:.1em;color:var(--accent-ink);text-transform:uppercase}
.selected-slot{margin:0 0 6px;padding:12px 14px;font-family:var(--display);font-weight:700;font-size:17px;color:var(--accent-ink);background:var(--accent-soft);border:0;border-radius:var(--radius-sm)}

.confirm-card,.done-card{max-width:640px;margin:0 auto}
.confirm-list{display:grid;gap:0;margin:20px 0 24px;border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;background:var(--surface);box-shadow:var(--shadow)}
.confirm-list>div{display:grid;grid-template-columns:108px 1fr;gap:16px;padding:13px 18px;border-bottom:1px solid var(--line)}
.confirm-list>div:last-child{border-bottom:0}
.confirm-list>div.is-primary{background:var(--accent-soft)}
.confirm-list dt{margin:0;font-family:var(--mono);font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);align-self:center}
.confirm-list dd{margin:0;color:var(--ink);font-size:15px;font-weight:600;line-height:1.55;word-break:break-word}
.confirm-list>div.is-primary dd{font-family:var(--display);font-weight:700;font-size:17px;color:var(--accent-ink)}
.confirm-list dd .sub{display:block;margin-top:3px;color:var(--muted);font-size:13px;font-weight:500}

.flow-actions{display:flex;gap:12px;flex-wrap:wrap}
.flow-actions .primary,.flow-actions .button{flex:1;min-width:170px}

.done-card{text-align:center}
.done-card .confirm-list{text-align:left}
.done-stamp{display:grid;place-items:center;width:64px;height:64px;margin:0 auto 16px;font-size:30px;font-weight:700;color:#fff;background:var(--accent);border:0;border-radius:50%;transform:rotate(-6deg);box-shadow:0 14px 30px -12px rgba(222,74,46,.6);animation:stampPop .4s cubic-bezier(.22,1.4,.36,1) both}
@keyframes stampPop{from{opacity:0;transform:scale(.6) rotate(-8deg)}to{opacity:1;transform:rotate(-6deg)}}
.done-note{margin-top:20px;padding:14px 16px;font-size:14px;line-height:1.7;color:var(--ink-2);background:var(--accent-soft);border:0;border-radius:var(--radius-sm);text-align:left}

@media(max-width:560px){
  .stepper{gap:6px}
  .stepper .step{padding:11px 10px;gap:7px}
  .stepper .step-label{font-size:12px}
  .confirm-list>div{grid-template-columns:88px 1fr;gap:12px}
}
@media(prefers-reduced-motion:reduce){
  .flow-step,.done-stamp{animation:none}
}

/* ===== 予約管理ページ（確認/キャンセル/日程変更）===== */
.rs-slots{display:grid;gap:16px;margin:10px 0 16px}
.rs-day h4{margin:0 0 8px;font-family:var(--display);font-size:14px;font-weight:700;color:var(--ink)}
.rs-day-slots{display:flex;flex-wrap:wrap;gap:8px}
.rs-slot{padding:10px 14px;font-family:var(--mono);font-weight:700;font-size:14px;color:var(--ink-2);background:var(--surface);border:1.5px solid var(--line-2);border-radius:var(--radius-sm);cursor:pointer;transition:border-color .12s,color .12s}
.rs-slot:hover{color:var(--accent-ink);border-color:var(--accent)}
.rs-slot.selected{color:#fff;background:var(--accent);border-color:var(--accent)}

@media(max-width:620px){
  .week-schedule-head{
    display:grid;
  }

  .week-schedule-meta{
    justify-content:flex-start;
  }

  .week-table{
    min-width:760px;
  }

  .week-table thead th:first-child,
  .week-table tbody th{
    width:66px;
  }
}
