/* 公開予約フォーム
   色はフォームごとの設定を CSS変数で流し込む。
   チャット型とフォーム型で同じ部品を使い、並べ方だけ変える。 */

:root {
  --accent: #2b8455;
  --bg: #f3f9f5;
  --r: 8px;
  --ink: #1d2b24;
  --ink-2: #55645c;
  --muted: #8a978f;
  --line: #e2e8e4;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Hiragino Sans", "Yu Gothic UI", "Noto Sans JP", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 540px; margin: 0 auto; padding: 0 0 120px; }
.hidden { display: none !important; }

/* ---------- ヘッダ ---------- */
.fhead {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 18px; background: #fff;
  position: sticky; top: 0; z-index: 10;
  border-bottom: 1px solid var(--line);
}
.fhead__logo { max-height: 38px; width: auto; }
.fhead__step {
  background: var(--accent); color: #fff; font-size: 12px; font-weight: 700;
  padding: 4px 12px; border-radius: 100px; white-space: nowrap;
}

.hero { display: block; width: 100%; height: auto; }

.badges {
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
  padding: 14px 18px 0;
}
.badges img { height: 54px; width: auto; }

/* ---------- 吹き出し ---------- */
.chat { padding: 18px; display: flex; flex-direction: column; gap: 14px; }

.say { display: flex; gap: 10px; align-items: flex-start; }
.say__icon {
  width: 42px; height: 42px; border-radius: 50%; flex: 0 0 42px;
  object-fit: cover; background: #fff; border: 1px solid var(--line);
}
.say__icon--letter {
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 16px;
}
.say__body { min-width: 0; }
.say__name { font-size: 11px; color: var(--muted); margin-bottom: 3px; }
.say__bubble {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  padding: 12px 15px; font-size: 14.5px;
  border-top-left-radius: 3px;
}

/* ---------- 質問 ---------- */
.q { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.q__t { font-size: 14px; font-weight: 700; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.q__req { background: #c0392b; color: #fff; font-size: 10px; padding: 1px 7px; border-radius: 3px; font-weight: 700; }
.q__note { font-size: 12px; color: var(--muted); margin: 0 0 10px; }

.opts { display: grid; gap: 8px; }
.opts--grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.opt {
  display: block; cursor: pointer; text-align: center;
  border: 1.5px solid var(--line); border-radius: var(--r);
  padding: 10px 8px; background: #fff; font-size: 13.5px;
  transition: border-color .12s, background .12s;
}
.opt:hover { border-color: var(--accent); }
.opt input { display: none; }
.opt:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, #fff); font-weight: 700; }
.opt--left { text-align: left; }
.opt__sub { display: block; font-size: 11px; color: var(--muted); font-weight: 400; }
.opt--full { opacity: .38; cursor: not-allowed; }
.opt--full:hover { border-color: var(--line); }

input[type=text], input[type=tel], input[type=email], input[type=date], select, textarea {
  font: inherit; font-size: 15px; width: 100%; padding: 11px 12px;
  border: 1.5px solid var(--line); border-radius: var(--r); background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent);
}
textarea { resize: vertical; }

/* ---------- 進む・戻る ---------- */
.foot {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: #fff; border-top: 1px solid var(--line);
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  display: flex; gap: 10px; align-items: center;
}
.foot__in { max-width: 540px; margin: 0 auto; width: 100%; display: flex; gap: 10px; }
.btn {
  font: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
  border: none; border-radius: var(--r); padding: 13px 20px; flex: 1;
  background: var(--accent); color: #fff;
}
.btn:disabled { opacity: .35; cursor: default; }
.btn--back { flex: 0 0 92px; background: #fff; color: var(--ink-2); border: 1.5px solid var(--line); font-weight: 400; }

.msg { border-radius: var(--r); padding: 11px 14px; font-size: 13.5px; margin-top: 10px; }
.msg--bad { background: #fdf2f0; border: 1px solid #f0cdc7; color: #a8352a; }
.msg--ok { background: color-mix(in srgb, var(--accent) 10%, #fff); border: 1px solid color-mix(in srgb, var(--accent) 30%, #fff); }

/* ---------- 完了 ---------- */
.done { text-align: center; padding: 40px 18px; }
.done__mark {
  width: 62px; height: 62px; border-radius: 50%; margin: 0 auto 18px;
  background: var(--accent); color: #fff; font-size: 30px;
  display: flex; align-items: center; justify-content: center;
}
.done__t { font-size: 19px; font-weight: 700; margin-bottom: 8px; }
.summary {
  text-align: left; background: #fff; border: 1px solid var(--line);
  border-radius: var(--r); padding: 16px 18px; margin-top: 20px;
}
.summary__row { display: flex; gap: 12px; padding: 6px 0; border-bottom: 1px solid #f2f5f3; }
.summary__row:last-child { border-bottom: none; }
.summary__k { flex: 0 0 92px; color: var(--muted); font-size: 12.5px; }
.summary__v { font-size: 14px; }


/* 好きな位置に挟める部品 */
.blockimg { display: block; width: 100%; height: auto; border-radius: var(--r); }
.blocktext { font-size: 14px; color: var(--ink-2); white-space: pre-wrap; }

/* 編集中のプレビューで、押せることが分かるように */
.chat--preview { min-height: 100%; }

/* ---------- 会員登録のおすすめ（予約が終わったあとに出す） ---------- */
.invite {
  margin-top: 22px; text-align: left;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  padding: 20px 20px 16px;
}
.invite__t { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.invite__s { font-size: 13px; color: var(--ink-2); margin: 0 0 4px; line-height: 1.8; }
.invite .form { display: grid; gap: 8px; }
.invite .btn { width: 100%; }
.invite__skip {
  display: block; width: 100%; margin-top: 10px; padding: 8px;
  background: none; border: 0; color: var(--muted); font: inherit; font-size: 12.5px; cursor: pointer;
}
.invite__skip:hover { color: var(--ink-2); }

/* ---------- マイページ ---------- */
.mplink {
  background: none; border: 0; color: var(--accent); font: inherit; font-size: 13px;
  cursor: pointer; padding: 4px 0; text-decoration: underline;
}
.mplink--bad { color: #a8352a; font-size: 12.5px; }
.mp { border-top: 1px solid var(--line); padding: 12px 0; }
.mp:first-of-type { border-top: 0; }
.mp__d { font-size: 15px; font-weight: 700; }
.mp__s { font-size: 12.5px; color: var(--muted); }
.mp__m { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.mp__l { font-size: 12px; color: var(--muted); margin-top: 6px; display: block; }
.chat .form { display: grid; gap: 8px; }
