/* 予約ページ — スマホファースト */
:root {
  --primary: #2f5d50;
  --primary-dark: #234439;
  --bg: #f7f6f3;
  --card: #ffffff;
  --text: #222;
  --muted: #777;
  --border: #ddd;
  --warn-bg: #fff4e5;
  --warn-border: #f0b264;
  --error-bg: #fdecea;
  --error-border: #e08a80;
}

* { box-sizing: border-box; }

/* 背景は青空の写真(sky.jpg)。
   ⚠️ body に background-attachment: fixed を付けるとiOSでガタつく。
      固定配置の擬似要素に敷くのが確実。 */
body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", sans-serif;
  background-color: #8cc6ee; /* 画像が出るまでの下地 */
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: #8cc6ee url('/sky.jpg?v=20260916123435') center top / cover no-repeat;
}

/* 下端を白く霞ませて、長いページでも背景が唐突に切れないようにする */
body::after {
  content: '';
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 32vh;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.75) 100%);
}

.site-header {
  color: #fff;
  padding: 26px 16px 14px;
  text-align: center;
}
/* ロゴは背景透過PNG(logo.png)。白い台紙は敷かず、空に直接置く。
   ⚠️ 丸く抜くと「c」と「hajime business club」の端が欠けるので、切り抜きはしない。 */
.site-logo {
  display: block;
  width: 260px;
  max-width: 74%;
  height: auto;
  margin: 4px auto 12px;
  /* 空に沈まないよう、白い淡い影だけで浮かせる */
  filter: drop-shadow(0 2px 6px rgba(255, 255, 255, 0.9));
}
/* 空の上に載る文字。白抜き＋濃い影で、どの雲の上でも読める */
.site-header h1 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 4px rgba(20, 70, 110, 0.45);
}
.site-sub {
  margin: 3px 0 0;
  font-size: 0.82rem;
  opacity: 0.95;
  text-shadow: 0 1px 3px rgba(20, 70, 110, 0.4);
}

/* 空の上に本文をそのまま置くと読みにくいので、白い板に載せる */
main {
  max-width: 560px;
  width: calc(100% - 24px);
  margin: 0 auto 48px;
  padding: 10px 18px 30px;
  background: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(10px) saturate(115%);
  -webkit-backdrop-filter: blur(10px) saturate(115%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  box-shadow: 0 12px 34px rgba(20, 70, 110, 0.18);
}

h2 { font-size: 1.05rem; margin: 20px 0 12px; }
h3 { font-size: 0.95rem; margin: 16px 0 8px; }

.banner {
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 0.9rem;
  margin: 12px 0;
}
.banner-error { background: var(--error-bg); border: 1px solid var(--error-border); }
.banner-warn { background: var(--warn-bg); border: 1px solid var(--warn-border); }

/* ステップインジケーター */
.steps-nav {
  display: flex;
  gap: 4px;
  padding: 0;
  margin: 16px 0 4px;
  list-style: none;
  font-size: 0.72rem;
  color: var(--muted);
}
.steps-nav li {
  flex: 1;
  text-align: center;
  padding: 6px 2px;
  border-bottom: 3px solid var(--border);
}
.steps-nav li.active {
  color: var(--primary);
  font-weight: 700;
  border-bottom-color: var(--primary);
}

/* メニュー選択 */
.menu-list { display: grid; gap: 10px; }
.menu-card {
  display: block;
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  font-size: 1rem;
  text-align: left;
  cursor: pointer;
}
.menu-card:active { background: #eef4f2; }
.menu-card .duration { color: var(--muted); font-size: 0.85rem; margin-left: 8px; }

/* カレンダー */
.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.cal-title { font-weight: 700; }
.btn-nav {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 44px;
  height: 40px;
  font-size: 1.2rem;
  cursor: pointer;
}
.btn-nav:disabled { opacity: 0.3; cursor: default; }

.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
}
.cal-weekday {
  text-align: center;
  font-size: 0.72rem;
  color: var(--muted);
  padding: 4px 0;
}
.cal-day {
  position: relative;
  aspect-ratio: 1 / 1;
  border: none;
  background: none;
  border-radius: 8px;
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: default;
  color: var(--text);
  padding: 0;
}
.cal-day.available {
  background: #eef4f2;
  cursor: pointer;
  font-weight: 700;
}
.cal-day.available:active { background: #dcebe6; }
.cal-day.selected { outline: 2px solid var(--primary); }
.cal-day.unavailable { color: #bbb; }
.cal-day .mark { font-size: 0.65rem; line-height: 1; color: var(--primary); }
.cal-day.unavailable .mark { color: #ccc; }
.cal-note { font-size: 0.78rem; color: var(--muted); }

/* 枠選択 */
.slot-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.slot-btn {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 0;
  font-size: 1rem;
  cursor: pointer;
}
.slot-btn:active { background: #eef4f2; }
.slot-btn:disabled {
  background: #eee;
  color: #aaa;
  cursor: default;
  text-decoration: line-through;
}

/* フォーム */
.field { margin-bottom: 18px; }
.label { display: block; font-weight: 700; font-size: 0.9rem; margin-bottom: 6px; }
input[type="text"], input[type="email"] {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  background: var(--card);
}
.hint { font-size: 0.78rem; color: var(--muted); margin: 6px 0 0; }
.format-list { display: grid; gap: 8px; }
.format-option {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
}
.format-option input { width: 20px; height: 20px; }

/* 確認 */
.confirm-detail {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 16px;
  margin: 0 0 14px;
}
.confirm-detail dt {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 10px;
}
.confirm-detail dd { margin: 0 0 10px; font-weight: 700; }
.policy { font-size: 0.8rem; color: var(--muted); }

/* ボタン */
.btn-primary {
  display: block;
  width: 100%;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 15px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
}
.btn-primary:active { background: var(--primary-dark); }
.btn-primary:disabled { opacity: 0.5; cursor: default; }

.back-row { margin-top: 24px; }
.btn-back {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 8px 0;
}

.loading { text-align: center; color: var(--muted); }

@media (min-width: 480px) {
  .slot-list { grid-template-columns: repeat(4, 1fr); }
}

/* 予約変更ページのキャンセル導線。日程変更より目立たせない */
.manage-cancel {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.manage-cancel .hint { margin: 0 0 10px; }
.btn-danger {
  width: 100%;
  padding: 12px 16px;
  font-size: 0.95rem;
  color: #b3261e;
  background: #fff;
  border: 1px solid #e3b4b0;
  border-radius: 10px;
  cursor: pointer;
}
.btn-danger:hover { background: #fdf3f2; }
.btn-danger:disabled { opacity: 0.5; cursor: default; }
