/* ============================================================
   Studio 3rd Avenue 予約システム — お客様向け画面
   ★社内画面（app.css）とは別物。理由:
     - 60代以上の方も使う → 文字を大きく、ボタンを大きく、1画面1タスク
     - スマートフォンからの利用がある → レスポンシブ必須
       （Bill Core の app.css はスマホ非対応なので、そのままでは使えない）
   ★色は Bill Core と同じトークンを使い、系統は揃える。
   ============================================================ */

:root {
  --bg: #f4f5f7;
  --panel: #fff;
  --ink: #1f2430;
  --muted: #6b7385;
  --line: #e3e6ec;
  --line-soft: #eef1f5;
  --brand: #2d6cdf;
  --brand-dark: #2357b8;
  --ok-bg: #e6f6ec;   --ok-ink: #1f7a44;
  --err-bg: #fdecec;  --err-ink: #b5292b;
  --warn-bg: #fff4e0; --warn-ink: #9a6300;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  font-size: 17px;
  line-height: 1.75;
  -webkit-text-size-adjust: 100%;
}

/* ---- 枠 ---- */
.c-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
}
.c-header-in {
  max-width: 720px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.c-header img { height: 26px; width: auto; }
.c-header .name { font-size: 16px; font-weight: 600; }
.c-header .who { margin-left: auto; font-size: 14px; color: var(--muted); }

.c-nav {
  background: #fff; border-bottom: 1px solid var(--line);
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.c-nav-in { max-width: 720px; margin: 0 auto; display: flex; gap: 4px; padding: 0 8px; }
.c-nav a {
  display: block; padding: 12px 14px; color: var(--muted);
  text-decoration: none; white-space: nowrap; font-size: 15px;
  border-bottom: 3px solid transparent;
}
.c-nav a.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }

.c-wrap { max-width: 720px; margin: 0 auto; padding: 20px 16px 60px; }

h1 { font-size: 22px; line-height: 1.5; margin: 0 0 4px; }
h2 { font-size: 18px; margin: 0 0 12px; }
.lead { color: var(--muted); font-size: 15px; margin: 0 0 20px; }

/* ---- カード ---- */
.c-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 22px 20px; margin-bottom: 18px;
  box-shadow: 0 1px 2px rgba(20, 26, 40, .04);
}
.c-card > :last-child { margin-bottom: 0; }

/* ---- 知らせ ---- */
.c-note { border-radius: 10px; padding: 14px 16px; margin-bottom: 18px; font-size: 16px; }
.c-note.ok   { background: var(--ok-bg);   color: var(--ok-ink); }
.c-note.err  { background: var(--err-bg);  color: var(--err-ink); }
.c-note.warn { background: var(--warn-bg); color: var(--warn-ink); }
.c-note.info { background: #eaf1fd; color: #2357b8; }

/* ---- 入力 ---- */
.c-field { display: block; margin-bottom: 20px; }
.c-field > span { display: block; font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.c-field .help { display: block; font-weight: 400; color: var(--muted); font-size: 14px; margin-top: 2px; }
.c-field input, .c-field select, .c-field textarea {
  width: 100%; font: inherit; font-size: 17px;
  padding: 12px 14px; min-height: 52px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
}
.c-field textarea { min-height: 100px; }
.c-field input:focus, .c-field select:focus, .c-field textarea:focus {
  outline: 3px solid #cfe0ff; border-color: var(--brand);
}
/* 6桁の番号は大きく・間隔をあけて */
.c-pin {
  font-size: 30px !important; letter-spacing: .5em; text-align: center;
  font-variant-numeric: tabular-nums; padding-left: .5em !important;
}

.c-choice { display: flex; gap: 10px; flex-wrap: wrap; }
.c-choice label {
  flex: 1 1 160px; display: flex; align-items: center; gap: 10px;
  border: 2px solid var(--line); border-radius: 10px; padding: 14px 16px;
  background: #fff; cursor: pointer; font-size: 16px;
}
.c-choice input { width: 22px; height: 22px; }
.c-choice label:has(input:checked) { border-color: var(--brand); background: #f2f7ff; }

/* ---- ボタン ---- */
.c-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 54px; padding: 12px 24px; font: inherit; font-size: 17px; font-weight: 600;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
  text-decoration: none; cursor: pointer; width: 100%;
}
.c-btn + .c-btn { margin-top: 10px; }
.c-btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.c-btn-primary:hover { background: var(--brand-dark); }
.c-btn-quiet { background: transparent; border-color: transparent; color: var(--brand); min-height: 44px; }

/* ---- 一覧 ---- */
.c-list { list-style: none; margin: 0; padding: 0; }
.c-item {
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
  padding: 16px 18px; margin-bottom: 12px;
}
.c-item .when { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.c-item .what { color: var(--muted); font-size: 15px; }
.c-item dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 12px 0 0; font-size: 15px; }
.c-item dt { color: var(--muted); }
.c-item dd { margin: 0; }

.c-badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 600; background: var(--line-soft); color: var(--muted);
}
.c-badge.ok { background: var(--ok-bg); color: var(--ok-ink); }
.c-badge.warn { background: var(--warn-bg); color: var(--warn-ink); }
.c-badge.err { background: var(--err-bg); color: var(--err-ink); }

.c-amount { font-variant-numeric: tabular-nums; font-weight: 600; }

/* ---- 空き状況 ---- */
.c-cal { width: 100%; border-collapse: collapse; }
.c-cal th, .c-cal td { border: 1px solid var(--line); text-align: center; padding: 6px 2px; }
.c-cal th { background: #f7f8fb; font-size: 14px; font-weight: 600; }
.c-cal td { height: 62px; vertical-align: top; font-size: 14px; }
.c-cal .day { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; }
.c-cal td.other { background: #fafbfc; color: #b9bfcb; }
.c-cal td.past { background: #fafbfc; color: #b9bfcb; }
.c-cal .mark { display: block; font-size: 20px; line-height: 1.2; margin-top: 2px; }
.c-cal .mark.free { color: var(--ok-ink); }
.c-cal .mark.some { color: var(--warn-ink); }
.c-cal .mark.full { color: #c2c7d2; }

.c-slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.c-slot {
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 4px; text-align: center;
  font-variant-numeric: tabular-nums; font-size: 15px; background: #fff;
}
.c-slot.busy { background: #f1f2f5; color: #b9bfcb; }
.c-slot.free { background: var(--ok-bg); color: var(--ok-ink); font-weight: 600; }

.c-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--muted); margin-top: 10px; }

/* ---- フッタ ---- */
.c-footer {
  max-width: 720px; margin: 0 auto; padding: 24px 16px 40px;
  color: var(--muted); font-size: 14px; line-height: 1.8;
}
.c-footer a { color: var(--brand); }

/* ---- 広い画面 ---- */
@media (min-width: 700px) {
  body { font-size: 17px; }
  .c-btn { width: auto; min-width: 220px; }
  .c-btn + .c-btn { margin-top: 0; margin-left: 10px; }
  h1 { font-size: 25px; }
}

/* ── 入力欄の右に単位や敬称を置く（枠外・同じ行）──────────────
   ★「様」を入力欄の中に入れない。中に入れるとお客様が消したり
     打ち直したりできてしまい、送信される氏名に混ざる。 */
/* ★詳細度に注意。上の `.c-field > span { display: block }` は (0,1,1) で、
     `.c-suffix-row` (0,1,0) より強い。同じ書き方だと block のままになり、
     「様」が次の行に落ちる（2026-08-08 に実際に落ちていた）。
     だから `.c-field > span.c-suffix-row` (0,2,1) で上書きする。 */
.c-field > span.c-suffix-row { display: flex; align-items: center; gap: 10px; }

/* ★入力欄も同じ理由。`.c-field input` (0,1,1) が width:100% を当てているので、
   ここも同じ強さ以上で打ち消す。min-width:0 が無いと、flex の既定（auto）で
   中身の幅より縮まず、「様」が押し出される。 */
.c-suffix-row > input { flex: 1 1 auto; width: auto; min-width: 0; }
.c-suffix { flex: 0 0 auto; font-size: 19px; font-weight: 600; white-space: nowrap; }
