/* Yonekawa Booking – お客さん側フォーム */

.ynb-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 28px 14px 60px;
  font-family: 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
  color: #3A2A1A;
  background: #FFF8F2;
  box-sizing: border-box;
}

/* ── 汎用hidden ───────────────────────── */
.ynb-wrap .hidden   { display: none !important; }
.ynb-hidden         { display: none !important; }

/* ── セクション ───────────────────────── */
.ynb-wrap .sect {
  margin-bottom: 16px;
  padding: 18px 20px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(201,123,42,0.09);
  border: 2px solid transparent;
}
.ynb-wrap .sect.active { border-color: #C97B2A; }
.ynb-wrap .sect-title {
  font-size: 0.96rem;
  font-weight: bold;
  color: #5A3A10;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.ynb-wrap .step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  background: #C97B2A;
  color: #fff;
  border-radius: 50%;
  font-size: 0.84rem;
  font-weight: bold;
  flex-shrink: 0;
}

/* ── グリッドナビ ─────────────────────── */
.ynb-wrap .grid-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.ynb-wrap .grid-nav-lbl { font-size: 0.84rem; color: #8B5523; font-weight: bold; }
.ynb-wrap .nav-btn {
  background: none;
  border: 1px solid #DDB880;
  border-radius: 6px;
  width: 46px; height: 46px;
  font-size: 1.6rem;
  cursor: pointer;
  color: #C97B2A;
}
.ynb-wrap .nav-btn:hover { background: #FFF3E0; }

/* ── ○/× グリッド外枠 ────────────────── */
.ynb-wrap .grid-outer {
  border: 1px solid #E0D0C0;
  border-radius: 8px;
  overflow: hidden;
}

/* ── ○/× テーブル ────────────────────── */
.ynb-wrap .time-grid {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.ynb-wrap .time-grid th {
  background: #C97B2A;
  color: #fff;
  padding: 6px 2px;
  text-align: center;
  font-size: 0.74rem;
  font-weight: bold;
}
.ynb-wrap .time-grid th.th-time  { background: #8B5523; width: 42px; }
.ynb-wrap .time-grid th.th-sat   { background: #C8DCF0; }
.ynb-wrap .time-grid th.th-sat .th-dnum,
.ynb-wrap .time-grid th.th-sat .th-dow { color: #1040A0; }
.ynb-wrap .time-grid th.th-sun   { background: #F0C8C8; }
.ynb-wrap .time-grid th.th-sun .th-dnum,
.ynb-wrap .time-grid th.th-sun .th-dow { color: #A01010; }
.ynb-wrap .time-grid th.th-past  { background: #B0A49C !important; }
.ynb-wrap .time-grid th.th-today { background: #E09030; }
.ynb-wrap .time-grid th.th-sel   { background: #A05A10; }
.ynb-wrap .th-dnum { font-size: 0.9rem; font-weight: bold; }
.ynb-wrap .th-dow  { font-size: 0.62rem; opacity: 0.9; }

.ynb-wrap .time-grid td {
  border: 1px solid #EEE;
  text-align: center;
  padding: 1px;
  height: 34px;
  vertical-align: middle;
  background: #fff;
}
.ynb-wrap .time-grid td.td-time {
  background: #FAF6F2 !important;
  font-size: 0.72rem;
  font-weight: bold;
  color: #8B5523;
  padding: 0 3px;
  white-space: nowrap;
}
.ynb-wrap .time-grid td.td-half { font-size: 0.62rem !important; color: #BBB !important; }
.ynb-wrap .time-grid td.td-sat   { background: #F0F6FC !important; }
.ynb-wrap .time-grid td.td-sun   { background: #FCF0F0 !important; }
.ynb-wrap .time-grid td.td-today { background: #FFFBF0 !important; }

/* ◎ × 休 ボタン */
.ynb-wrap .s-avail {
  display: block;
  width: 100%; height: 30px;
  background: none; border: none;
  cursor: pointer;
  color: #CC2200; font-size: 1.1rem; font-weight: bold;
  line-height: 30px;
}
.ynb-wrap .s-avail:hover { background: #FFEEEA; }
.ynb-wrap .s-avail.sel   { background: #CC2200; color: #fff; }
.ynb-wrap .s-x    { display: block; color: #CCC; font-size: 0.9rem; line-height: 30px; }
.ynb-wrap .s-rest { display: block; color: #FFAB91; font-size: 0.64rem; line-height: 30px; }

/* :30 行（低め） */
.ynb-wrap .tr-half td  { height: 24px; }
.ynb-wrap .tr-half .s-avail { height: 20px; font-size: 0.9rem; line-height: 20px; }
.ynb-wrap .tr-half .s-x    { font-size: 0.76rem; line-height: 20px; }
.ynb-wrap .tr-half .s-rest { line-height: 20px; }

/* 凡例 */
.ynb-wrap .grid-legend { margin-top: 8px; font-size: 0.75rem; color: #AAA; text-align: center; }
.ynb-wrap .grid-legend span { margin: 0 8px; }
.ynb-wrap .leg-o { color: #CC2200; font-weight: bold; }
.ynb-wrap .leg-x { color: #CCC; }

/* ── メニュー ─────────────────────────── */
.ynb-wrap .svcs { display: flex; flex-direction: column; gap: 9px; }
.ynb-wrap .svc-btn {
  padding: 13px 16px;
  border: 2px solid #FFD699;
  border-radius: 12px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.1s;
}
.ynb-wrap .svc-btn:hover { border-color: #C97B2A; background: #FFF8F2; }
.ynb-wrap .svc-btn.sel   { border-color: #C97B2A; background: #FFF3E0; }
.ynb-wrap .svc-name  { font-weight: bold; font-size: 0.92rem; color: #3A2A1A; }
.ynb-wrap .svc-badge {
  background: #FFF3E0; color: #C97B2A;
  border-radius: 20px; padding: 3px 11px;
  font-size: 0.78rem; font-weight: bold; white-space: nowrap;
}
.ynb-wrap .svc-btn.sel .svc-badge { background: #C97B2A; color: #fff; }
.ynb-wrap .svc-btn.svc-disabled {
  border-color: #E0D0C0;
  background: #F5F5F5;
  cursor: not-allowed;
  opacity: 0.5;
}
.ynb-wrap .svc-btn.svc-disabled:hover { border-color: #E0D0C0; background: #F5F5F5; }
.ynb-wrap .svc-btn.svc-disabled .svc-name  { color: #AAA; }
.ynb-wrap .svc-btn.svc-disabled .svc-badge { background: #EEE; color: #AAA; }
.ynb-wrap .svc-warn {
  margin-top: 8px;
  padding: 8px 12px;
  background: #FFEBEE;
  border-left: 3px solid #E53935;
  border-radius: 0 6px 6px 0;
  font-size: 0.82rem;
  color: #C62828;
  display: none;
}
.ynb-wrap .svc-warn.ynb-visible { display: block; }

/* ── サマリー ─────────────────────────── */
.ynb-wrap .summary {
  background: #FFF3E0;
  border: 2px solid #FFD699;
  border-radius: 10px;
  padding: 13px 16px;
  margin-bottom: 16px;
  font-size: 0.88rem;
  line-height: 1.9;
  color: #7A4A10;
}

/* ── フォーム ─────────────────────────── */
.ynb-wrap .fields { margin-bottom: 16px; }
.ynb-wrap .field  { margin-bottom: 12px; }
.ynb-wrap .field label {
  display: block;
  font-size: 0.86rem;
  font-weight: bold;
  color: #7A4A10;
  margin-bottom: 5px;
}
.ynb-wrap .field small { font-weight: normal; color: #AAA; display: block; margin-top: 2px; }
.ynb-wrap .req { color: #C0392B; font-size: 0.74rem; margin-left: 4px; }
.ynb-wrap .field input {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid #FFD699;
  border-radius: 9px;
  font-size: 0.96rem;
  box-sizing: border-box;
}
.ynb-wrap .field input:focus { outline: none; border-color: #C97B2A; }

/* ── 送信ボタン ───────────────────────── */
.ynb-wrap .btn-submit {
  display: block;
  width: 100%;
  padding: 16px;
  background: #C97B2A;
  color: #fff;
  border: none;
  border-radius: 11px;
  font-size: 1.05rem;
  font-weight: bold;
  cursor: pointer;
  letter-spacing: 0.07em;
}
.ynb-wrap .btn-submit:hover { background: #A05A10; }

/* ── 確定ボタン（緑・パルス） ─────────── */
.ynb-wrap .btn-confirm {
  background: linear-gradient(135deg, #4CAF50, #2E7D32) !important;
  box-shadow: 0 4px 18px rgba(76,175,80,0.45);
  font-size: 1.15rem !important;
  padding: 19px !important;
  letter-spacing: 0.1em !important;
  animation: ynb-pulse-confirm 2s ease-in-out infinite;
}
.ynb-wrap .btn-confirm:hover {
  background: linear-gradient(135deg, #388E3C, #1B5E20) !important;
  box-shadow: 0 6px 22px rgba(76,175,80,0.6);
}
@keyframes ynb-pulse-confirm {
  0%,100% { box-shadow: 0 4px 18px rgba(76,175,80,0.45); }
  50%      { box-shadow: 0 4px 28px rgba(76,175,80,0.75); }
}

/* ── 戻るボタン ───────────────────────── */
.ynb-wrap .btn-back-outline {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  background: none;
  border: 2px solid #DDB880;
  border-radius: 11px;
  font-size: 0.92rem;
  color: #8B5523;
  cursor: pointer;
  text-align: center;
}
.ynb-wrap .btn-back-outline:hover { background: #FFF3E0; }

/* ── 確認ボックス ─────────────────────── */
.ynb-wrap .confirm-box {
  background: #FFF8F2;
  border: 1px solid #E0D0C0;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 14px;
}
.ynb-wrap .confirm-box table { width: 100%; border-collapse: collapse; }
.ynb-wrap .confirm-box td { padding: 7px 10px; border-bottom: 1px solid #F0E0D0; font-size: 0.9rem; }
.ynb-wrap .confirm-box td:first-child { font-weight: bold; color: #8B5523; width: 80px; white-space: nowrap; }
.ynb-wrap .confirm-box td:last-child  { color: #3A2A1A; }
.ynb-wrap .confirm-warn { font-size: 0.86rem; color: #5A3A10; margin-bottom: 14px; }

/* ── エラー ───────────────────────────── */
.ynb-wrap .ynb-error {
  color: #c62828;
  background: #ffebee;
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 12px;
  font-size: 0.88rem;
  display: none;
}
.ynb-wrap .ynb-error.ynb-visible { display: block; }

/* ── 完了画面 ─────────────────────────── */
.ynb-wrap .done-wrap {
  text-align: center;
  padding: 44px 22px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(201,123,42,0.09);
}
.ynb-wrap .done-gaikotsu {
  width: 44px;
  display: block;
  margin: 0 auto 16px;
  transform-origin: center center;
  animation: ynb-bounce-out 3.0s ease forwards;
}
@keyframes ynb-bounce-out {
  0%   { transform: scale(0);   opacity: 0; }
  10%  { transform: scale(1.1); opacity: 1; }
  13%  { transform: scale(1)    translateY(0); opacity: 1; }
  20%  { transform: translateY(-26px); opacity: 1; }
  27%  { transform: translateY(0);     opacity: 1; }
  33%  { transform: translateY(-15px); opacity: 1; }
  39%  { transform: translateY(0);     opacity: 1; }
  44%  { transform: translateY(-8px);  opacity: 1; }
  49%  { transform: translateY(0);     opacity: 1; }
  53%  { transform: translateY(-4px);  opacity: 1; }
  57%  { transform: translateY(0);     opacity: 1; }
  61%  { transform: translateY(-2px);  opacity: 1; }
  100% { transform: translateY(0);     opacity: 1; }
}
.ynb-wrap .done-wrap h3 { color: #2E7D32; font-size: 1.15rem; margin-bottom: 8px; }
.ynb-wrap .done-wrap p  { color: #888; font-size: 0.86rem; margin-bottom: 12px; }
.ynb-wrap .done-detail {
  background: #FFF3E0;
  border-radius: 9px;
  padding: 14px;
  margin: 12px 0;
  text-align: left;
  font-size: 0.88rem;
  line-height: 2.1;
  color: #7A4A10;
}
.ynb-wrap .done-note { font-size: 0.8rem; color: #BBB; }

/* ── メールプレビュー ─────────────────── */
.ynb-wrap .email-preview {
  background: #fff;
  border-radius: 9px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin-top: 18px;
  overflow: hidden;
  text-align: left;
}
.ynb-wrap .email-hdr {
  background: #F5F5F5;
  padding: 10px 14px;
  font-size: 0.78rem;
  color: #555;
  border-bottom: 1px solid #E0E0E0;
}
.ynb-wrap .email-body {
  padding: 16px 20px;
  font-size: 0.83rem;
  line-height: 2;
  white-space: pre-wrap;
  color: #333;
}
.ynb-wrap .email-link { color: #1565C0; text-decoration: underline; }

/* ══════════════════════════════════════
   変更・キャンセルページ（ynb-manage）
══════════════════════════════════════ */
.ynb-wrap .ynb-booking-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
}
.ynb-wrap .ynb-booking-table th,
.ynb-wrap .ynb-booking-table td {
  padding: 10px 14px;
  border: 1px solid #e0d0c0;
  font-size: 0.95rem;
}
.ynb-wrap .ynb-booking-table th {
  background: #FFF3E0;
  width: 120px;
  font-weight: bold;
  color: #8B5523;
}
.ynb-wrap .ynb-current-booking { margin-bottom: 24px; }
.ynb-wrap #ynb-manage-actions  { display: flex; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }

.ynb-wrap .ynb-btn-reschedule {
  padding: 12px 24px;
  background: #C97B2A; color: #fff;
  border: none; border-radius: 8px;
  font-size: 1rem; cursor: pointer; font-weight: bold;
}
.ynb-wrap .ynb-btn-reschedule:hover { background: #A05A10; }
.ynb-wrap .ynb-btn-cancel {
  padding: 12px 24px;
  background: #fff; color: #c62828;
  border: 2px solid #c62828; border-radius: 8px;
  font-size: 1rem; cursor: pointer; font-weight: bold;
}
.ynb-wrap .ynb-btn-cancel:hover { background: #ffebee; }
.ynb-wrap .ynb-btn-danger {
  padding: 12px 24px;
  background: #c62828; color: #fff;
  border: none; border-radius: 8px;
  font-size: 1rem; cursor: pointer; font-weight: bold;
  margin-right: 10px;
}
.ynb-wrap .ynb-btn-back {
  padding: 12px 24px;
  background: #FFF3E0; color: #8B5523;
  border: 1px solid #DDB880; border-radius: 8px;
  font-size: 1rem; cursor: pointer;
}
.ynb-wrap #ynb-reschedule-form,
.ynb-wrap #ynb-cancel-confirm {
  padding: 24px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(201,123,42,0.09);
  margin-bottom: 24px;
}
.ynb-wrap #ynb-reschedule-form h4 { margin-top: 0; color: #8B5523; }

/* 月カレンダー（変更フォーム内） */
.ynb-wrap .ynb-cal-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 4px;
}
.ynb-wrap .ynb-cal-header span {
  text-align: center; font-size: 0.76rem; color: #AAA; padding: 3px 0; font-weight: bold;
}
.ynb-wrap .ynb-cal-header span:first-child { color: #C0392B; }
.ynb-wrap .ynb-cal-header span:last-child  { color: #1565C0; }
.ynb-wrap .ynb-cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px;
}
.ynb-wrap .ynb-cal-day {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  border-radius: 7px; font-size: 0.88rem; cursor: default; user-select: none; font-weight: bold;
}
.ynb-wrap .ynb-cal-day.ynb-available { cursor: pointer; background: #FFF3E0; color: #C97B2A; border: 1px solid #FFD699; }
.ynb-wrap .ynb-cal-day.ynb-available:hover { background: #FFE0B2; }
.ynb-wrap .ynb-cal-day.ynb-selected  { background: #C97B2A !important; color: #fff !important; }
.ynb-wrap .ynb-cal-day.ynb-past,
.ynb-wrap .ynb-cal-day.ynb-blocked   { color: #ddd; background: none; border: none; font-weight: normal; }
.ynb-wrap .ynb-cal-day.ynb-sunday    { color: #C0392B; }
.ynb-wrap .ynb-cal-day.ynb-saturday  { color: #1565C0; }
.ynb-wrap .ynb-cal-day.ynb-empty     { background: none; }
.ynb-wrap .ynb-calendar-nav {
  display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 12px;
}
.ynb-wrap .ynb-nav-btn {
  background: none; border: 1px solid #DDB880; border-radius: 6px;
  width: 34px; height: 34px; font-size: 1.2rem; cursor: pointer; color: #C97B2A;
}
.ynb-wrap .ynb-nav-btn:hover { background: #FFF3E0; }
.ynb-wrap #ynb-m-month-label { font-size: 1rem; font-weight: bold; min-width: 120px; text-align: center; color: #5A3A10; }
.ynb-wrap #ynb-m-confirm-wrap { margin-top: 16px; }

/* 時間スロット */
.ynb-wrap .ynb-slots   { display: flex; flex-wrap: wrap; gap: 8px; }
.ynb-wrap .ynb-slot-btn {
  padding: 10px 16px;
  border: 2px solid #C97B2A;
  border-radius: 8px;
  background: #fff; color: #C97B2A;
  font-size: 0.95rem; font-weight: bold; cursor: pointer;
  min-width: 80px; text-align: center;
}
.ynb-wrap .ynb-slot-btn:hover    { background: #FFF3E0; }
.ynb-wrap .ynb-slot-btn.ynb-selected { background: #C97B2A; color: #fff; }
.ynb-wrap .ynb-no-slots { color: #999; font-size: 0.9rem; }

.ynb-wrap .ynb-success {
  text-align: center; padding: 40px 24px;
  background: #fff; border-radius: 14px;
  box-shadow: 0 2px 10px rgba(201,123,42,0.09);
}
.ynb-wrap .ynb-success-icon {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, #4CAF50, #2E7D32);
  color: #fff; border-radius: 50%; font-size: 2rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.ynb-wrap .ynb-success h3 { color: #2E7D32; margin-bottom: 8px; }

/* ── スマホ対応 ───────────────────────── */
@media (max-width: 480px) {
  .ynb-wrap { padding: 14px 10px 40px; }
  .ynb-wrap .sect { padding: 14px 12px; }
  .ynb-wrap .btn-submit { font-size: 1rem; padding: 14px; }
  .ynb-wrap #ynb-manage-actions { flex-direction: column; }
  .ynb-wrap .ynb-btn-reschedule,
  .ynb-wrap .ynb-btn-cancel { width: 100%; text-align: center; }
}
