/* ════════════════════════════════════════
   SynerGym 予約システム スタイルシート
   カラーパレット: ソフトイエロー系
════════════════════════════════════════ */

:root {
  --bg-main:     #FFF8DC;
  --bg-page:     #FFFEF5;
  --bg-card:     #FFFFFF;
  --accent:      #D4A017;
  --accent-dark: #B8860B;
  --accent-light:#FFF0A0;
  --text:        #333333;
  --text-sub:    #666666;
  --border:      #E8D87A;
  --error:       #D32F2F;
  --disabled:    #CCCCCC;
  --disabled-bg: #F5F5F5;
  --selected-bg: #D4A017;
  --selected-txt:#FFFFFF;
  --today-border:#D4A017;
  --shadow:      0 2px 8px rgba(0,0,0,0.08);
  --radius:      10px;
  --radius-sm:   6px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Noto Sans JP', Meiryo, sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--bg-page);
  line-height: 1.6;
  min-height: 100vh;
}

/* ──── ページ構造 ──── */
.page-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 0 60px;
  background: var(--bg-card);
  min-height: 100vh;
  box-shadow: var(--shadow);
}

@media (min-width: 700px) {
  body { background: var(--bg-page); }
  .page-wrap {
    margin: 24px auto;
    border-radius: var(--radius);
    min-height: auto;
  }
}

/* ──── ヘッダー ──── */
.site-header {
  background: var(--bg-main);
  padding: 24px 20px 20px;
  text-align: center;
  border-bottom: 2px solid var(--border);
}
.site-header .brand {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-dark);
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 6px;
}
.site-header .page-title {
  font-size: 14px;
  color: var(--text-sub);
  font-weight: 400;
}

/* ──── セクション共通 ──── */
.form-section {
  padding: 22px 20px 4px;
  border-bottom: 1px solid #F0E8B0;
}
.form-section:last-child { border-bottom: none; }

.section-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-label .step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.required-badge {
  font-size: 11px;
  color: var(--error);
  font-weight: 400;
  margin-left: auto;
}

/* ──── エラー ──── */
.form-error {
  display: none;
  color: var(--error);
  font-size: 12px;
  margin-top: 6px;
  margin-bottom: 10px;
  padding: 6px 10px;
  background: #FFF0F0;
  border-left: 3px solid var(--error);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* ──── 店舗選択グリッド ──── */
.store-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.store-btn {
  padding: 12px 8px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: #FFFDF0;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
  line-height: 1.4;
}
.store-btn:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}
.store-btn.active {
  border-color: var(--accent);
  background: var(--selected-bg);
  color: var(--selected-txt);
  font-weight: 700;
}

/* ──── メニュー選択 ──── */
.menu-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}
.menu-btn {
  padding: 13px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: #FFFDF0;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}
.menu-btn:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}
.menu-btn.active {
  border-color: var(--accent);
  background: var(--selected-bg);
  color: var(--selected-txt);
  font-weight: 700;
}

/* ──── カレンダーコンテナ ──── */
.picker-placeholder {
  color: var(--text-sub);
  font-size: 13px;
  padding: 10px 0;
}

.calendar-wrap {
  background: #FFFDF0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 12px;
}

/* カレンダーヘッダー */
.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-main);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.cal-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-dark);
}
.cal-nav {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  width: 30px;
  height: 30px;
  font-size: 18px;
  cursor: pointer;
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s;
}
.cal-nav:hover { background: var(--accent-light); }

/* カレンダーグリッド */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  padding: 8px;
}
.cal-dow {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-sub);
  padding: 4px 0;
}
.cal-dow.dow-sun { color: #C62828; }
.cal-dow.dow-sat { color: #1565C0; }

.cal-cell {
  aspect-ratio: 1;
  border: none;
  background: none;
  border-radius: 50%;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: background 0.1s;
  width: 100%;
  padding: 0;
}
.cal-cell:hover:not(:disabled) { background: var(--accent-light); }
.cal-cell.cal-empty { background: none; cursor: default; }
.cal-cell.cal-disabled {
  color: var(--disabled);
  cursor: not-allowed;
}
.cal-cell.cal-today {
  border: 2px solid var(--today-border);
  font-weight: 700;
}
.cal-cell.cal-selected {
  background: var(--selected-bg) !important;
  color: var(--selected-txt) !important;
  font-weight: 700;
}
.cal-cell.dow-sun:not(:disabled):not(.cal-disabled) { color: #C62828; }
.cal-cell.dow-sat:not(:disabled):not(.cal-disabled) { color: #1565C0; }

/* ──── 時間スロット ──── */
.time-wrap {
  margin-bottom: 12px;
}
.time-label {
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 8px;
}
.time-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
@media (max-width: 380px) {
  .time-grid { grid-template-columns: repeat(3, 1fr); }
}
.time-slot {
  padding: 9px 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #FFFDF0;
  font-size: 13px;
  cursor: pointer;
  text-align: center;
  transition: all 0.1s;
  color: var(--text);
}
.time-slot:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--accent-light);
}
.time-slot.time-selected {
  background: var(--selected-bg);
  color: var(--selected-txt);
  border-color: var(--accent);
  font-weight: 700;
}
.time-slot.time-disabled {
  background: var(--disabled-bg);
  color: var(--disabled);
  cursor: not-allowed;
}
.time-slot.time-duplicate {
  background: #FFF3CD;
  color: #856404;
  cursor: not-allowed;
  border-color: #FFEAA7;
}

/* 選択済み表示 */
.selected-display {
  font-size: 13px;
  color: var(--accent-dark);
  font-weight: 700;
  padding: 8px 12px;
  background: var(--accent-light);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 10px;
}

/* ──── テキスト入力 ──── */
.input-group {
  margin-bottom: 16px;
}
.input-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.input-hint {
  font-size: 11px;
  color: var(--text-sub);
  font-weight: 400;
  margin-left: 6px;
}
.form-input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 16px; /* 16px以上でiOSズームを防ぐ */
  color: var(--text);
  background: #FFFDF0;
  transition: border-color 0.15s;
  -webkit-appearance: none;
}
.form-input:focus {
  outline: none;
  border-color: var(--accent);
  background: #FFFFFF;
}
.form-input::placeholder { color: #AAAAAA; }

/* ──── 送信ボタン ──── */
.submit-section {
  padding: 24px 20px;
}
.submit-btn {
  width: 100%;
  padding: 17px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: background 0.15s;
  box-shadow: 0 3px 10px rgba(212,160,23,0.4);
}
.submit-btn:hover:not(:disabled) { background: var(--accent-dark); }
.submit-btn:disabled {
  background: var(--disabled);
  cursor: not-allowed;
  box-shadow: none;
}

/* ──── サンクスページ ──── */
.thanks-wrap {
  text-align: center;
  padding: 48px 24px;
}
.thanks-icon {
  margin-bottom: 16px;
  display: flex;
  justify-content: center;
}
.thanks-icon svg {
  width: 64px;
  height: 64px;
}
.thanks-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-dark);
  margin-bottom: 20px;
}
.thanks-body {
  font-size: 14px;
  color: var(--text);
  line-height: 1.9;
  margin-bottom: 12px;
}
.thanks-note {
  font-size: 13px;
  color: var(--text-sub);
  background: var(--bg-main);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 20px;
  line-height: 1.8;
}
.thanks-back {
  display: inline-block;
  margin-top: 28px;
  padding: 13px 32px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 15px;
}

/* ──── 初心者サポート ──── */
.beginner-card {
  background: #FFFDF0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}
.beginner-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-dark);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.beginner-badge {
  display: inline-block;
  padding: 2px 8px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 20px;
}
.beginner-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}
.beginner-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.beginner-icon {
  flex-shrink: 0;
  margin-top: 1px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.beginner-icon svg {
  width: 24px;
  height: 24px;
}
.beginner-list strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.beginner-list p {
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.6;
}
.beginner-list small {
  font-size: 11px;
}
.beginner-note {
  font-size: 12px;
  color: var(--accent-dark);
  font-weight: 600;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.beginner-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 4px;
}
.beginner-btn {
  padding: 14px 10px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: #FFFDF0;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  line-height: 1.4;
}
.beginner-btn:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}
.beginner-btn.active {
  border-color: var(--accent);
  background: var(--selected-bg);
  color: var(--selected-txt);
}
.beginner-btn-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.beginner-btn-icon svg {
  width: 28px;
  height: 28px;
}
.beginner-btn.active .beginner-btn-icon svg {
  color: #fff;
}

/* ──── ユーティリティ ──── */
.hidden { display: none !important; }
