/* 予約画面のスタイル（スマホ優先） */
:root{
  --accent:#1f7a8c;
  --ink:#232a2e; --sub:#6b757b; --line:#dde3e6; --bg:#f5f7f8;
  --sun:#d64545; --sat:#2f6fb5; --ok:#2b7a4b;
}
*{box-sizing:border-box}
/* HTMLの hidden 指定を、下のCSSの display 指定より優先させる。
   これが無いと .alert{display:flex} などが hidden を打ち消してしまう。 */
[hidden]{display:none !important}
html{-webkit-text-size-adjust:100%}
body{
  margin:0; background:var(--bg); color:var(--ink);
  font-family:-apple-system,BlinkMacSystemFont,"Hiragino Sans","Noto Sans JP","Yu Gothic",sans-serif;
  font-size:16px; line-height:1.7;
}

/* ---- ヘッダー ---- */
.hd{background:#fff;border-bottom:1px solid var(--line);padding:16px;text-align:center}
.hd-logo{max-width:180px;height:auto;display:block;margin:0 auto 8px}
.hd-name{font-size:17px;font-weight:700;color:var(--ink);letter-spacing:.04em;line-height:1.5}
.hd-access{margin-top:3px;font-size:12px;color:var(--ink);letter-spacing:.02em;line-height:1.5}
.hd-title{margin:10px 0 0;font-size:19px;font-weight:700;letter-spacing:.04em}

/* ---- レイアウト ---- */
.wrap{max-width:720px;margin:0 auto;padding:14px 12px 40px}
.box{background:#fff;border:1px solid var(--line);border-radius:10px;padding:16px;margin-bottom:14px}
.box h2{
  display:flex;align-items:center;gap:8px;
  margin:0 0 12px;font-size:16px;font-weight:700;
}
.policy{white-space:normal}
.num{
  display:inline-grid;place-items:center;width:24px;height:24px;flex:none;
  background:var(--accent);color:#fff;border-radius:50%;font-size:13px;font-weight:700;
}
.req{background:#c0392b;color:#fff;font-size:11px;padding:2px 7px;border-radius:3px;font-weight:700}
.opt{background:#8d9599;color:#fff;font-size:11px;padding:2px 7px;border-radius:3px;font-weight:700}
.hint{margin:0 0 10px;font-size:13px;color:var(--sub)}

/* ---- メニュー ---- */
.menu-fixed{background:#f0f5f6;border:1px solid var(--line);border-radius:8px;padding:12px 14px}
.menu-name{font-weight:700;font-size:16px}
.menu-desc{margin-top:5px;font-size:14px;color:var(--ink);line-height:1.6}
.menu-opt{display:flex;gap:10px;align-items:flex-start;padding:12px;border:1px solid var(--line);
  border-radius:8px;margin-bottom:8px;cursor:pointer}
.menu-opt input{margin-top:5px;flex:none;width:18px;height:18px;accent-color:var(--accent)}
.menu-opt span{display:block}

/* ---- キャンセルポリシー ---- */
.policy{background:#fbf6ee;border:1px solid #e8d9bf;border-radius:8px;padding:12px 14px;font-size:14px}
.check{display:inline-flex;align-items:center;gap:8px;margin-top:12px;cursor:pointer;font-size:15px;font-weight:700}
.check input{width:20px;height:20px;accent-color:var(--accent);flex:none}

/* ---- カレンダー ---- */
.cal-nav{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px}
.cal-arrow{
  background:#fff;border:1px solid var(--line);border-radius:6px;
  padding:8px 12px;font-size:13px;font-weight:700;color:var(--accent);cursor:pointer;
}
.cal-arrow.is-off{color:#c3cbcf;background:#f4f6f7;cursor:default}
.cal-range{font-size:14px;font-weight:700;color:var(--sub)}

.cal-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
.cal{width:100%;border-collapse:separate;border-spacing:0;table-layout:fixed;font-size:13px}
.cal th,.cal td{border-bottom:1px solid var(--line);border-right:1px solid var(--line);text-align:center}
.cal thead th{
  position:sticky;top:0;z-index:3;background:#eef2f4;padding:6px 0;
  border-top:1px solid var(--line);font-weight:700;line-height:1.3;
}
.cal-th-time{width:52px}
.cal-md{display:block;font-size:12px}
.cal-wd{display:block;font-size:11px;color:var(--sub)}
.cal thead th.is-sun .cal-md,.cal thead th.is-sun .cal-wd{color:var(--sun)}
.cal thead th.is-sat .cal-md,.cal thead th.is-sat .cal-wd{color:var(--sat)}
.cal tbody th.cal-time{
  position:sticky;left:0;z-index:2;background:#f7f9fa;
  font-weight:500;font-size:12px;color:var(--sub);padding:0;height:34px;
  border-left:1px solid var(--line);
}
.cal tbody td{height:34px;padding:0;background:#fff}
.cal-o .slot{
  width:100%;height:34px;border:0;background:none;cursor:pointer;
  font-size:15px;color:var(--accent);line-height:34px;padding:0;
}
.cal-o .slot:active{background:#e3eef1}
.cal-o .slot.is-on{background:var(--accent);color:#fff;font-weight:700}
.cal-x span,.cal-none span{color:#c3cbcf}
.cal-closed{background:#f0f2f3}
.cal-closed span{color:#9aa4a9;font-size:12px}
.cal-empty{padding:20px;text-align:center;color:var(--sub);font-size:14px}
#calendar.is-loading{opacity:.45;pointer-events:none;transition:opacity .1s}

/* ---- 選択中の日時 ---- */
.picked{border-color:var(--accent);border-width:2px;scroll-margin-top:12px}
.picked h2{font-size:14px;color:var(--sub);margin-bottom:6px}
#pickedText{margin:0;font-size:20px;font-weight:700;color:var(--accent)}
#pickedText.picked-none{font-size:15px;font-weight:400;color:#a7b0b4}

/* ---- 入力欄 ---- */
.fld{display:block;margin-bottom:16px}
.fld:last-child{margin-bottom:0}
.lbl{display:flex;align-items:center;gap:8px;font-size:14px;font-weight:700;margin-bottom:6px}
.fld input,.fld textarea{
  width:100%;padding:12px;font-size:16px;font-family:inherit;
  border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--ink);
}
.fld input:focus,.fld textarea:focus{outline:2px solid var(--accent);outline-offset:-1px;border-color:var(--accent)}
.fld textarea{resize:vertical;line-height:1.6}

/* ---- 送信 ---- */
.submit-area{margin-top:18px}
.privacy{font-size:12px;color:var(--sub);line-height:1.7;margin:0 0 12px;text-align:center}
.privacy a{color:var(--accent)}
.btn{
  width:100%;padding:17px;border:0;border-radius:10px;
  background:var(--accent);color:#fff;font-size:17px;font-weight:700;
  font-family:inherit;cursor:pointer;
}
.btn:disabled{background:#c3cbcf;cursor:not-allowed}
.btn:not(:disabled):active{opacity:.85}
.form-msg{margin:10px 0 0;font-size:13px;color:var(--sub);text-align:center;min-height:1.2em}

.ft{padding:18px;text-align:center;font-size:12px;color:var(--sub)}

/* ---- 画面が広いとき ---- */
@media (min-width:600px){
  .cal{font-size:14px}
  .cal-th-time{width:64px}
  .cal tbody th.cal-time,.cal tbody td,.cal-o .slot{height:36px}
  .cal-o .slot{line-height:36px}
}

/* ---- 入力の不足をお知らせする表示 ---- */
.alert{
  display:flex;gap:10px;align-items:flex-start;
  background:#fdeaea;border:1px solid #e5a9a4;border-radius:10px;
  padding:14px;margin-bottom:14px;font-size:14px;font-weight:700;color:#a5281c;line-height:1.6;
}
.alert-icon{
  display:inline-grid;place-items:center;flex:none;width:22px;height:22px;
  border:2px solid #c0392b;border-radius:50%;color:#c0392b;font-size:14px;
}
.err{
  display:block;margin-top:6px;color:#c0392b;font-size:13px;font-weight:700;line-height:1.6;
}
.box.has-error{border-color:#e5a9a4;background:#fef7f6}
.box.has-error .policy{border-color:#e5a9a4}
.fld input.is-error,.fld textarea.is-error{border-color:#c0392b;background:#fffafa}

/* ---- 送信エラー ---- */
.form-msg.is-err{color:#c0392b;font-weight:700;font-size:14px}

/* ---- 完了画面 ---- */
.done{text-align:center;padding:26px 16px 6px}
.done-mark{
  width:64px;height:64px;margin:0 auto 14px;border-radius:50%;
  background:var(--accent);color:#fff;font-size:34px;line-height:64px;font-weight:700;
}
.done-lead{margin:0;font-size:16px;font-weight:700;line-height:1.8}
.detail{margin:0;display:grid;grid-template-columns:auto 1fr;gap:10px 14px;font-size:15px}
.detail dt{color:var(--sub);font-size:13px;padding-top:3px;white-space:nowrap}
.detail dd{margin:0;font-weight:700;word-break:break-all}
.detail dd.detail-date{font-size:18px;color:var(--accent)}
.note-box{background:#fbf6ee;border-color:#e8d9bf}
.small{font-size:13px;color:var(--sub);line-height:1.8;margin:0}
.small a{color:var(--accent)}

/* ---- キャンセル画面 ---- */
.btn-danger{background:#c0392b}
a.btn{display:block;text-align:center;text-decoration:none;line-height:1.4}

/* ---- 完了画面：メールの案内 ---- */
.mail-note{background:#fbf6ee;border-color:#e8d9bf}
.mail-note h2{font-size:15px}

/* 自動投稿よけ（人には見えない） */
.hp-field{position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden}
