/* PiCO 予約画面（2026-10-22 デザイン変更: 見本 review-1322 の色と並び）。
   生成りの地・白い角丸カード・細い線・紺のボタン。外部フォントは読み込まない（端末の日本語フォント）。
   老眼でも読みやすいように: 文字は最小18px（本文・補助とも）、タップ領域48px以上、文字のコントラスト WCAG AA 4.5:1 以上。ぼかし等の装飾なし */
:root {
  --bg: #F7F5F0;        /* 地（生成り） */
  --card: #FFFFFF;      /* カード */
  --line: #E6E2D9;      /* カードの枠 */
  --divider: #EEEBE4;   /* カード内の区切り */
  --text: #22211F;      /* 文字 */
  --text2: #33312D;     /* 時間など */
  --muted: #5A5751;     /* 補助の灰色（見本 #6B6862 より濃く: 地 6.61:1・白 7.20:1） */
  --navy: #1F3A5F;      /* ボタン */
  --navy-dark: #142840;
  --field: #8A857B;     /* 入力欄の枠（地・白とも 3:1 以上） */
  --chip: #DCD7CC;
  --ok-bg: #E6F0EA; --ok: #2B6448;          /* 完了・お知らせ（5.97:1） */
  --err-bg: #FBEDEC; --err-line: #E3B9B5; --err: #8A1F1F;
  --danger: #A12A2A;
  --test-bg: #FBF1D6; --test: #5E4610;      /* テスト帯（7.91:1） */
  --r-card: 16px; --r-btn: 12px;
}
* { box-sizing: border-box; }
html { font-size: 18px; -webkit-text-size-adjust: 100%; background: var(--bg); }
/* 日本語の端末フォントを先に（system-ui だけだと環境によって中国語の字形になるため）。Google Fonts 等は使わない */
body { margin: 0; font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Noto Sans CJK JP", "Yu Gothic UI", "Yu Gothic", Meiryo, system-ui, -apple-system, sans-serif;
  font-size: 1rem; line-height: 1.7; color: var(--text); background: var(--bg); overflow-wrap: break-word; }
.test-banner { background: var(--test-bg); color: var(--test); font-weight: 500; font-size: 1rem; letter-spacing: 0.02em; text-align: center; padding: 8px 16px; }
.top { display: flex; align-items: center; gap: 10px; background: var(--card); border-bottom: 1px solid var(--line);
  padding: 14px max(16px, calc((100% - 480px) / 2 + 16px)); }
.mark { flex: 0 0 auto; min-width: 36px; height: 36px; padding: 0 6px; border-radius: 10px; background: var(--navy); color: #fff; font-size: 1rem; font-weight: 700; line-height: 36px; text-align: center; }
.mark:empty { display: none; }
.shop { margin: 0; font-weight: 700; font-size: 1.05rem; letter-spacing: 0.02em; line-height: 1.4; min-width: 0; }
main { max-width: 480px; margin: 0 auto; padding: 24px 16px 48px; }
h1 { font-size: 1.45rem; font-weight: 700; line-height: 1.4; letter-spacing: 0.02em; margin: 8px 0 12px; }
h1:focus { outline: none; }
h2 { font-size: 1rem; margin: 0; }
p { margin: 0 0 16px; }
.lead, .note, p[data-kind="after"] { color: #55524C; font-size: 1rem; line-height: 1.7; }
.lead { margin-bottom: 20px; }
.muted { color: var(--muted); font-weight: 400; }
.foot { color: var(--muted); font-size: 1rem; text-align: center; margin: 4px 0 0; }

/* ステップ表示: 「ステップ n / 全体」・ステップ名・バー */
.stephead { margin: 0 0 8px; }
.stepline { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.step, .step-name { margin: 0; font-size: 1rem; color: var(--muted); }
.step { font-weight: 500; letter-spacing: 0.04em; }
.bars { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; }
.bars span { height: 4px; border-radius: 2px; background: var(--chip); }
.bars span.on { background: var(--navy); }

/* 選択肢（メニュー・担当・日付・時間） */
.list { display: grid; gap: 10px; margin: 0 0 20px; padding: 0; list-style: none; }
.grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
button, .btn { display: block; width: 100%; min-height: 56px; padding: 12px 16px; font: inherit; font-size: 1.05rem; font-weight: 700; line-height: 1.5; text-align: left;
  color: var(--text); background: var(--card); border: 1px solid var(--chip); border-radius: var(--r-btn); cursor: pointer; text-decoration: none; }
.list button:not(.center):not(.danger) { padding-right: 44px; background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%231F3A5F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18l6-6-6-6'/%3E%3C/svg%3E") no-repeat right 16px center; }
.list button:not(:disabled):not(.danger):hover { border-color: var(--navy); }
button .sub { display: block; font-weight: 400; font-size: 1rem; color: var(--muted); }
button.center { text-align: center; }
button:disabled { color: var(--muted); background: #EFECE5; border: 1px dashed #B9B3A7; cursor: not-allowed; }
button:disabled .sub { color: var(--muted); }
/* 主ボタン（紺）・枠線ボタン・取り消し */
button.primary, .btn.primary { background: var(--navy); color: #fff; border: 0; text-align: center; letter-spacing: 0.06em; font-size: 1.1rem; }
button.primary:hover, .btn.primary:hover { background: var(--navy-dark); }
button.primary:disabled { background: #3D5878; color: #fff; border: 0; cursor: progress; }
.btn[data-variant="outline"], button.secondary { background: var(--card); color: var(--navy); border: 1.5px solid var(--navy); text-align: center; letter-spacing: 0.04em; }
.btn[data-variant="outline"]:hover, button.secondary:hover { background: #F1F4F8; color: var(--navy-dark); }
.list button.danger, button.danger { background: var(--danger); color: #fff; border: 0; text-align: center; }
button.danger:hover { background: #861F1F; }
button:focus-visible, input:focus-visible, .btn:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }
/* もどる（文字のリンク風。タップ領域は48px） */
button.back { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; margin-top: 8px; background: transparent; border: 0; color: var(--navy); font-weight: 500; font-size: 1rem; text-align: center; }
button.back:hover { color: var(--navy-dark); text-decoration: underline; }
.ico { flex: 0 0 auto; display: inline-block; vertical-align: middle; }

/* 入力 */
form { margin: 0 0 4px; }
.field { margin-bottom: 20px; }
label { display: block; font-weight: 700; margin: 0 0 6px; font-size: 1.05rem; }
.hint { font-size: 1rem; color: var(--muted); margin: 0 0 8px; }
input { width: 100%; min-height: 56px; font: inherit; font-size: 1.1rem; padding: 10px 14px; border: 1.5px solid var(--field); border-radius: var(--r-btn); color: var(--text); background: var(--card); }
.req, .opt { display: inline-block; font-size: 1rem; font-weight: 500; line-height: 1.5; padding: 0 8px; margin-left: 6px; border-radius: 6px; vertical-align: 1px; }
.req { background: var(--navy); color: #fff; border: 1px solid var(--navy); }
.opt { background: var(--card); color: var(--muted); border: 1px solid var(--field); }

/* 内容のカード（確認・完了・変更・キャンセル） */
.summary, .card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); margin: 0 0 20px; }
.summary { padding: 0 0 4px; overflow: hidden; }
.summary .when { display: flex; flex-direction: column; gap: 2px; padding: 18px 20px; border-bottom: 1px solid var(--divider); }
.summary .when dt { font-size: 1rem; font-weight: 500; color: var(--muted); letter-spacing: 0.04em; }
.summary dd { margin: 0; }
.summary .when .when-date { font-size: 1.35rem; font-weight: 700; line-height: 1.4; }
.summary .when .when-time { font-size: 1.15rem; font-weight: 500; color: var(--text2); }
.summary > .row { margin: 0 20px; }
.card { padding: 4px 20px; }
.card-label { font-size: 1rem; font-weight: 500; color: var(--muted); letter-spacing: 0.04em; padding: 14px 0 2px; }
.rows { margin: 0; }
.row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--divider); }
.row:last-child { border-bottom: 0; }
.row dt { flex: 0 0 auto; font-size: 1rem; color: var(--muted); }
.row dd { margin: 0; min-width: 0; font-size: 1.05rem; font-weight: 500; text-align: right; }
.row.wrap dd { overflow-wrap: anywhere; font-weight: 400; }
.row.before dd { font-weight: 400; color: var(--text2); }
.row.total { padding-top: 14px; }
.price { font-size: 1.35rem; font-weight: 700; }
.yen { font-size: 1rem; font-weight: 500; margin-left: 2px; }
.status { display: inline-block; font-weight: 700; font-size: 1rem; padding: 4px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--chip); }
.status[data-status="confirmed"] { background: var(--ok-bg); border-color: #BCD6C6; color: var(--ok); }

/* お知らせ・エラー */
.err { background: var(--err-bg); border: 1px solid var(--err-line); color: var(--err); padding: 12px 16px; border-radius: var(--r-btn); font-weight: 700; }
.ok { background: var(--ok-bg); border: 1px solid #BCD6C6; color: var(--ok); padding: 12px 16px; border-radius: var(--r-btn); font-weight: 700; }
/* 完了画面: 確認メールの案内（白いカード＋封筒の印） */
.ok[data-kind="mail"] { display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 12px; row-gap: 2px; background: var(--card); border-color: var(--line); color: var(--text); padding: 14px 16px; margin-bottom: 20px; }
.ok[data-kind="mail"]::before { content: ""; grid-row: 1 / span 3; width: 20px; height: 20px; margin-top: 5px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%232B6448' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='M3 7l9 6 9-6'/%3E%3C/svg%3E") no-repeat center; }
.ok-title { font-weight: 700; }
.ok-mail { font-weight: 400; color: var(--text2); overflow-wrap: anywhere; }
.ok-sub { font-weight: 400; color: var(--muted); font-size: 1rem; }

/* 完了画面の見出し: 上に緑のチェック */
h1[data-icon="done"] { text-align: center; margin: 8px 0 16px; }
h1[data-icon="done"]::before { content: ""; display: block; width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 999px;
  background: var(--ok-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 24 24' fill='none' stroke='%232B6448' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") no-repeat center; }

/* 完了画面の予約番号: 本文より大きく・等幅・太字（大きさは従来の 1.3rem のまま）。番号だけを1回のタップ/クリックで選択できる。右上にコピーボタン */
.booking-no { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 8px; row-gap: 2px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 10px 10px 12px 18px; margin: 0 0 16px; font-size: 1rem; }
.booking-label { color: var(--muted); font-size: 1rem; }
.booking-id { grid-column: 1 / -1; display: inline-block; justify-self: start; max-width: 100%; overflow-wrap: anywhere; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Noto Sans Mono", "DejaVu Sans Mono", monospace; font-size: 1.3rem; font-weight: 700; letter-spacing: 0.02em; line-height: 1.5; -webkit-user-select: all; user-select: all; }
button.copy { grid-row: 1; grid-column: 2; display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: auto; min-width: 48px; min-height: 48px; padding: 0 14px;
  border: 0; border-radius: 999px; background: #F2EFE8; color: var(--text2); font-size: 1rem; font-weight: 500; }
button.copy::after { content: "コピー"; }
button.copy[data-state="done"] { background: var(--ok-bg); color: var(--ok); }
button.copy[data-state="done"]::after { content: "コピーしました"; }
button.copy[data-state="fail"]::after { content: "長押しでコピー"; }
button.copy:hover { background: #EAE6DC; }

/* ロボット判定（Turnstile）の枠: 確認画面だけ・予約ボタンの上。interaction-only なので通常は高さ0（余白もなし）で、チェックが必要なときだけ表示・余白を付ける */
.ts-box.ts-shown { margin: 0 0 16px; }
#tsErr { margin-bottom: 12px; }
