/* KUROC の公開サイトの予約・個人情報のページの見た目（ホームは business/kuro-ai/lp/v3/home.html の中の style）
   決まり: business/design-library/checklist.md（2. 予約の入力・7. アイコン・ロゴ）・04_teardown.md 6章（予約フォームの10か条）
   色は 墨・生成り・白＋エラーの赤だけ（GovTech: 3色以内・背景は白）。強調の黄は完了の画面に1つだけ */
:root {
  --ink: #0b0b0a;
  --paper: #ffffff;
  --fg: #12110f;
  --sub: #57534c;
  --line: #e7e3da;
  --soft: #f6f4ef;
  --on-ink: #f3efe6;
  --on-ink-sub: #a8a49b;
  --ink-line: rgba(243,239,230,0.16);
  --mark: #ffd84a;
  --focus: #ffd84a;
  --err: #c4291c;         /* 白の上で 5.6:1 */
  --err-bg: #fdf1ef;
  --fs-h1: clamp(1.625rem, 1.2rem + 2.2vw, 2.5rem);
  --fs-h2: clamp(1.375rem, 1.1rem + 1.2vw, 1.75rem);
  --fs-m: 1rem;
  --fs-s: 0.875rem;
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "BIZ UDPGothic", "Yu Gothic", Meiryo, sans-serif;
  --latin: "Instrument Sans", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  --hand: "Klee One", "Hiragino Maru Gothic ProN", "Hiragino Sans", sans-serif;
  --r: 10px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--fg); font-family: var(--font); font-size: var(--fs-m); line-height: 1.75; letter-spacing: 0.02em; line-break: strict; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--ink); }
h1, h2, h3 { margin: 0; word-break: auto-phrase; text-wrap: balance; }
h1 { font-size: var(--fs-h1); line-height: 1.3; font-weight: 800; letter-spacing: 0; }
h2 { font-size: var(--fs-h2); line-height: 1.45; font-weight: 800; }
h3 { font-size: var(--fs-m); line-height: 1.6; font-weight: 700; }
p { margin: 0; }
a { color: inherit; text-underline-offset: 4px; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.w { display: inline-block; }
.small { font-size: var(--fs-s); line-height: 1.7; color: var(--sub); }
.dark { background: var(--ink); color: var(--on-ink); }
.dark .small { color: var(--on-ink-sub); }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: 640px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
@media (min-width: 768px) { .wrap { padding-left: 32px; padding-right: 32px; } }

.wm { font-family: "Instrument Sans", sans-serif; font-weight: 620; font-variation-settings: "wdth" 100; font-size: 1.5rem; line-height: 1; letter-spacing: 0.012em; text-decoration: none; white-space: nowrap; }
.wm .ku { margin-left: -0.010em; } .wm .ro { margin-left: -0.030em; } .wm .oc { margin-left: -0.006em; }

.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: var(--ink); color: var(--on-ink); border-bottom: 1px solid var(--ink-line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; max-width: 1120px; }
.top-nav { font-size: var(--fs-s); font-weight: 700; }
.top-nav a { text-decoration: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 26px; border-radius: var(--r); background: var(--fg); color: var(--paper); border: 1px solid var(--fg); font-weight: 700; text-decoration: none; cursor: pointer; }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.btn.full { width: 100%; }
.dark .btn { background: var(--on-ink); color: var(--ink); border-color: var(--on-ink); }
.textlink { background: none; border: 0; padding: 8px 0; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; min-height: 44px; }

/* 1. 上の帯（墨） */
.intro { padding-block: 22px 22px; }
@media (min-width: 768px) { .intro { padding-block: 48px 44px; } }
.eyebrow { font-size: var(--fs-s); font-weight: 700; color: var(--on-ink-sub); margin-bottom: 6px; }
.live { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding-left: 2px; font-size: var(--fs-s); color: var(--on-ink-sub); }
.live b { color: var(--on-ink); font-weight: 700; }
.live .dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--on-ink); box-shadow: 0 0 0 4px rgba(243,239,230,0.14); }

/* 2. 今どこか（入力・確認・完了） */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.steps li { display: flex; align-items: center; gap: 8px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: var(--fs-s); font-weight: 700; color: var(--sub); }
.steps li .n { font-family: var(--latin); font-weight: 600; font-variant-numeric: tabular-nums; }
.steps li[aria-current="step"] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.steps li.done { color: var(--fg); }

.panel { padding-block: 16px 56px; }
.panel[hidden] { display: none; }
.panel > * + * { margin-top: 18px; }
.panel h2:focus { outline: none; }

/* 3. 予約の条件（フォームの前に4行で） */
.terms { margin: 0; border-top: 1px solid var(--line); }
.terms > div { display: grid; grid-template-columns: 5.6em minmax(0, 1fr); gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-s); line-height: 1.6; }
.terms dt { font-weight: 700; }
.terms dd { margin: 0; min-width: 0; color: var(--sub); }

/* 4. 入力の欄（ラベルは上・例は欄の前・「必須」は文字で） */
.field { display: grid; gap: 6px; }
.field + .field { margin-top: 20px; }
.label { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.req { font-size: 0.75rem; font-weight: 700; line-height: 1; padding: 4px 6px; border-radius: 4px; background: var(--ink); color: var(--on-ink); }
.hint { font-size: var(--fs-s); color: var(--sub); line-height: 1.6; }
.box { display: flex; align-items: center; min-height: 52px; border: 1.5px solid #8c877e; border-radius: 8px; background: var(--paper); }
.box:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px var(--focus); }
.box .pre { padding-left: 14px; font-family: var(--latin); font-weight: 600; font-size: 1.125rem; color: var(--sub); }
.box input { flex: 1; min-width: 0; height: 50px; border: 0; background: transparent; padding: 0 14px 0 6px; font-size: 1.0625rem; letter-spacing: 0.01em; outline: none; }
.box input.plain { padding-left: 14px; }
.field.bad .box { border-color: var(--err); background: var(--err-bg); }
.field.ok .box::after { content: "✓"; padding-right: 14px; color: var(--sub); font-weight: 700; }
.msg { font-size: var(--fs-s); color: var(--err); font-weight: 700; line-height: 1.6; }
.msg:empty { display: none; }
.msg button { font-weight: 700; text-decoration: underline; background: none; border: 0; padding: 0; color: var(--fg); cursor: pointer; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.errsum { border: 2px solid var(--err); background: var(--err-bg); border-radius: var(--r); padding: 14px 16px; }
.errsum[hidden] { display: none; }
.errsum p { font-weight: 700; color: var(--err); }
.errsum ul { margin: 6px 0 0; padding-left: 1.2em; }
.errsum a { font-weight: 700; }

.calm { display: grid; gap: 4px; font-size: var(--fs-s); line-height: 1.7; color: var(--sub); }
.calm b { color: var(--fg); }
.act { display: grid; gap: 10px; }

/* 5. 確認 */
.lead { color: var(--sub); }
.review { margin: 0; border-top: 1px solid var(--line); }
.review > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: center; }
.review dt { grid-column: 1 / -1; font-size: var(--fs-s); color: var(--sub); font-weight: 700; }
.review dd { margin: 0; min-width: 0; font-size: 1.125rem; font-weight: 700; overflow-wrap: anywhere; }
.review .fix { min-height: 44px; padding: 0 4px; }
.check-ig { grid-column: 1 / -1; font-size: var(--fs-s); }
.consent { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; background: var(--soft); }
.consent details summary { cursor: pointer; font-weight: 700; font-size: var(--fs-s); min-height: 32px; }
.consent ul { margin: 8px 0 12px; padding-left: 1.2em; font-size: var(--fs-s); line-height: 1.7; color: var(--sub); }
.agree { display: flex; align-items: flex-start; gap: 12px; font-weight: 700; cursor: pointer; min-height: 44px; }
.agree input { flex: none; width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--ink); }
.consent.bad { border-color: var(--err); background: var(--err-bg); }

/* 6. 完了（ここがいちばんの山） */
.done-head { display: grid; gap: 10px; }
.done-head h2 { font-size: var(--fs-h1); line-height: 1.3; }
.hl { position: relative; display: inline-block; }
.hl svg { position: absolute; left: -3%; bottom: -0.12em; width: 106%; height: 0.3em; overflow: visible; pointer-events: none; }
.hl path { fill: none; stroke: var(--mark); stroke-width: 7; stroke-linecap: round; }
.next { list-style: none; margin: 0; padding: 0; counter-reset: s; border-top: 1px solid var(--line); }
.next li { counter-increment: s; display: grid; grid-template-columns: 2em minmax(0, 1fr); gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.next li::before { content: counter(s); font-family: var(--latin); font-weight: 600; font-size: 1.125rem; line-height: 1.6; }
.next .when { display: block; font-size: var(--fs-s); color: var(--sub); }
.hand { font-family: var(--hand); font-weight: 600; }
.share-ok { font-size: var(--fs-s); color: var(--sub); }

/* 個人情報のページ */
.doc { padding-block: 32px 64px; }
.doc h1 { margin-bottom: 8px; }
.doc h2 { font-size: 1.125rem; margin-top: 36px; margin-bottom: 8px; }
.doc p, .doc li { color: var(--fg); }
.doc ul { padding-left: 1.2em; margin: 8px 0 0; }
.doc table { width: 100%; border-collapse: collapse; font-size: var(--fs-s); margin-top: 8px; }
.doc th, .doc td { text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); padding: 8px 8px 8px 0; }
.doc th { white-space: nowrap; }

.foot { padding-block: 32px 44px; border-top: 1px solid var(--ink-line); }
.foot .wrap { max-width: 1120px; }
.foot ul { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; }
.foot .wm { font-size: 1.5rem; display: inline-block; margin-bottom: 10px; }

/* 版の出し分け（a = @だけ / b = @＋メール）。版が決まるまでは b の欄を隠す */
html:not([data-v="b"]) [data-b-only] { display: none !important; }
html[data-v="b"] [data-a-only] { display: none !important; }

/* 確認・完了では上の帯をたたむ（予約するボタンをスマホの1画面目に入れる） */
html[data-step="2"] .intro, html[data-step="3"] .intro { display: none; }
