/* Bloom 日程調整 — 公開予約ページ（Spir型のUI/UX・Bloomブランド） */
:root {
  --brand: #c7406d;
  --brand-strong: #b23962;
  --brand-soft: #fff2f6;
  --brand-line: #f7d4e1;
  --ink: #1f2329;
  --sub: #6b7280;
  --faint: #9aa1ab;
  --line: #e6e8ec;
  --bg: #f7f8fa;
  --card: #ffffff;
  --danger: #d43c3c;
  --ok: #1e9e6a;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', system-ui, sans-serif;
  color: var(--ink); background: var(--bg); font-size: 14px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
button { font: inherit; cursor: pointer; }
input { font: inherit; }

/* ---- ヘッダー ---- */
.bk-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 18px; background: #fff; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.bk-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
.bk-brand span { font-weight: 800; color: var(--brand); letter-spacing: .02em; }
.bk-brand small { color: var(--faint); font-size: 11px; margin-top: 2px; }
.bk-tz { font-size: 11px; color: var(--faint); }

/* ---- レイアウト ---- */
#app { max-width: 1240px; margin: 0 auto; padding: 0 0 40px; }
.bk-step { display: flex; gap: 0; min-height: calc(100vh - 100px); }
#step-pick { background: #fff; border: 1px solid var(--line); border-radius: 0 0 12px 12px; overflow: hidden; }

/* ---- 左パネル ---- */
.bk-side {
  width: 372px; min-width: 372px; padding: 20px 22px 30px; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; overflow-y: auto; max-height: calc(100vh - 100px);
}
.bk-lang { font-size: 12px; color: var(--sub); margin-bottom: 10px; }
.bk-title { font-size: 21px; font-weight: 800; margin-bottom: 14px; }
.bk-meta { list-style: none; display: flex; flex-direction: column; gap: 7px; color: var(--sub); font-size: 13px; }
.bk-meta li { display: flex; align-items: center; gap: 8px; }
.bk-meta li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--brand-line); flex: none; }
.bk-desc { margin-top: 12px; font-size: 13px; color: var(--sub); white-space: pre-wrap; }
.bk-hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0 14px; }
.bk-pick-head h2 { font-size: 16px; font-weight: 800; }
.bk-pick-sub { display: flex; align-items: center; justify-content: space-between; margin: 10px 0 6px; font-size: 12px; color: var(--sub); }

/* スロットリスト */
.bk-slotlist { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.bk-date-h {
  display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; color: var(--ink);
  margin: 14px 0 4px;
}
.bk-date-h::after { content: ''; flex: 1; border-top: 1px dashed var(--line); }
.bk-slot {
  width: 100%; padding: 9px 10px; text-align: center; background: #fff;
  border: 1px solid var(--line); border-radius: 8px; font-size: 13.5px; font-weight: 600; color: var(--ink);
  transition: border-color .12s, background .12s;
}
.bk-slot:hover { border-color: var(--brand); background: var(--brand-soft); }
.bk-slot.sel { background: var(--brand); border-color: var(--brand); color: #fff; }
.bk-empty { padding: 22px 6px; color: var(--sub); font-size: 13px; }

/* ---- カレンダー ---- */
.bk-calwrap { flex: 1; min-width: 0; display: flex; flex-direction: column; background: #fff; }
.bk-caltop { display: flex; align-items: center; gap: 6px; padding: 12px 14px; }
.bk-month { font-size: 15px; font-weight: 800; margin-left: 6px; }
.bk-nav {
  width: 30px; height: 30px; border: 1px solid transparent; background: none; border-radius: 8px;
  font-size: 18px; color: var(--sub); line-height: 1;
}
.bk-nav:hover { background: var(--bg); }
.bk-nav:disabled { opacity: .3; cursor: default; }
.bk-caldays {
  display: grid; grid-template-columns: 52px repeat(7, 1fr);
  border-bottom: 1px solid var(--line); padding-right: 10px;
}
.bk-dayh { text-align: center; padding: 6px 0 8px; font-size: 11px; color: var(--sub); }
.bk-dayh b { display: block; font-size: 16px; color: var(--ink); font-weight: 700; }
.bk-dayh.today b { color: var(--brand); }
.bk-dayh.off { opacity: .45; }
.bk-calscroll { overflow-y: auto; flex: 1; max-height: calc(100vh - 210px); }
.bk-calgrid { display: grid; grid-template-columns: 52px 1fr; padding-right: 10px; }
.bk-gutter { position: relative; }
.bk-gline { position: relative; height: 44px; }
.bk-gline span { position: absolute; top: -7px; right: 8px; font-size: 10px; color: var(--faint); }
.bk-cols { display: grid; grid-template-columns: repeat(7, 1fr); position: relative; }
.bk-col { position: relative; border-left: 1px solid var(--line); }
.bk-cell { height: 44px; border-bottom: 1px solid #f0f1f4; }
.bk-cand {
  position: absolute; left: 3px; right: 3px; border: 1.6px dashed var(--brand);
  border-radius: 6px; background: rgba(199, 64, 109, .04); color: var(--brand);
  font-size: 10.5px; line-height: 1.35; padding: 3px 5px; overflow: hidden; cursor: pointer;
  transition: background .12s;
}
.bk-cand:hover { background: rgba(199, 64, 109, .1); }
.bk-cand small { display: block; font-size: 10px; opacity: .85; }
.bk-selblock {
  position: absolute; left: 3px; right: 3px; border-radius: 6px; background: var(--brand);
  color: #fff; font-size: 10.5px; line-height: 1.35; padding: 3px 5px; z-index: 3; pointer-events: none;
  box-shadow: 0 2px 8px rgba(199, 64, 109, .35);
}

/* ---- ボタン ---- */
.bk-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink);
  padding: 8px 16px; font-size: 13px; font-weight: 700; text-decoration: none;
}
.bk-btn:hover { background: var(--bg); }
.bk-btn.sm { padding: 3px 10px; font-size: 11px; }
.bk-btn.ghost { border-color: var(--line); color: var(--sub); background: #fff; }
.bk-btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.bk-btn.primary:hover { background: var(--brand-strong); }
.bk-btn.primary:disabled { opacity: .4; cursor: default; }
.bk-btn.outline-danger { border-color: var(--danger); color: var(--danger); background: #fff; }
.bk-btn.outline-danger:hover { background: #fdf2f2; }

/* ---- フォーム ---- */
#step-form, #step-done, #step-cancel, #step-load, #step-error { justify-content: center; align-items: flex-start; padding-top: 34px; }
.bk-formcard {
  width: 560px; max-width: calc(100vw - 32px); background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 26px 28px; box-shadow: 0 8px 30px rgba(31, 35, 41, .06);
}
.bk-formcard h2 { font-size: 17px; font-weight: 800; margin-bottom: 16px; }
.bk-selected {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--bg); border-radius: 10px; padding: 13px 16px; margin-bottom: 18px;
}
.bk-selected b { font-size: 14.5px; }
.bk-selected small { display: block; color: var(--faint); font-size: 10.5px; margin-top: 2px; }
.bk-field { display: block; margin-bottom: 16px; }
.bk-field span { display: block; font-size: 12px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.bk-field em { color: var(--danger); font-style: normal; }
.bk-field input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px;
  background: #fff; color: var(--ink);
}
.bk-field input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(199, 64, 109, .12); }
.bk-field small { display: block; color: var(--faint); font-size: 11px; margin-top: 5px; }
.bk-err { display: block; color: var(--danger); font-size: 12px; font-style: normal; margin-top: 6px; }
.bk-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.bk-guests { border-top: 1px solid var(--line); padding-top: 14px; margin-bottom: 20px; }
.bk-guests-head { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 700; }
.bk-guest-row { display: grid; grid-template-columns: 1fr 1.3fr auto; gap: 8px; margin-top: 10px; }
.bk-guest-row input { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; min-width: 0; }
.bk-guest-row button { border: none; background: none; color: var(--faint); font-size: 16px; padding: 0 4px; }
.bk-guest-row button:hover { color: var(--danger); }
.bk-form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }

/* ---- 完了 ---- */
.bk-donecard {
  width: 640px; max-width: calc(100vw - 32px); background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 34px 34px 26px; text-align: center; box-shadow: 0 8px 30px rgba(31, 35, 41, .06);
}
.bk-check {
  width: 46px; height: 46px; border-radius: 50%; background: var(--brand); color: #fff;
  font-size: 24px; font-weight: 800; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px;
}
.bk-donecard h2 { font-size: 18px; font-weight: 800; margin-bottom: 8px; }
.bk-done-sub { color: var(--sub); font-size: 13px; margin-bottom: 20px; }
.bk-done-detail {
  text-align: left; border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; background: #fafbfc;
  display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px;
}
.bk-done-row { display: flex; gap: 14px; font-size: 13.5px; }
.bk-done-row .k { color: var(--faint); font-size: 12px; min-width: 64px; padding-top: 1px; }
.bk-done-row .v { flex: 1; word-break: break-all; }
.bk-done-row a { color: var(--brand); font-weight: 700; }
.bk-done-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.bk-powered { color: var(--faint); font-size: 11px; margin-top: 14px; }
.bk-powered b { color: var(--brand); }

/* ---- 読み込み ---- */
.bk-load { display: flex; align-items: center; gap: 10px; color: var(--sub); padding: 60px; }
.bk-spin {
  width: 18px; height: 18px; border: 2.5px solid var(--brand-line); border-top-color: var(--brand);
  border-radius: 50%; animation: bkspin .8s linear infinite;
}
@keyframes bkspin { to { transform: rotate(360deg); } }

/* カレンダーを閉じる（リスト表示のみ） */
#step-pick.nocal .bk-calwrap { display: none !important; }
#step-pick.nocal .bk-side { width: 100%; min-width: 0; border-right: none; max-height: none; }
#step-pick.nocal .bk-slotlist { max-width: 560px; }

/* ---- レスポンシブ ---- */
@media (max-width: 880px) {
  .bk-step { flex-direction: column; min-height: 0; }
  .bk-side { width: 100%; min-width: 0; border-right: none; max-height: none; }
  .bk-calwrap { display: none !important; }
  #cal-toggle { display: none; }
  #step-pick { border-radius: 0; border-left: 0; border-right: 0; }
}
@media (max-width: 620px) {
  .bk-formcard, .bk-donecard { padding: 20px 16px; }
  .bk-guest-row { grid-template-columns: 1fr; }
}

/* 空き枠の説明（2026-08-05: 「希望の時間が出てこない」問い合わせ対策の一文） */
.bk-pick-note { font-size: 11.5px; color: var(--faint); margin-top: 2px; }
