/* 画面の構成は、参考にした NO BRAND CLINIC の予約フォームに合わせている（縦一列・上に残る進み具合・番号つきのカード）。
   色・書体・角の丸みは、クリニックごとのデザイン（theme.js）が CSS 変数として上書きする。ここにあるのは標準の値。 */
:root {
  --accent: #2f5d62;
  --accent-strong: #24494d;
  --accent-soft: #e6efef;
  --ink: #22252a;
  --ink-sub: #5d646e;
  --line: #d9dce1;
  --bg: #f6f5f2;
  --radius: 8px;
  --head-font: "Hiragino Mincho ProN", "Yu Mincho", YuMincho, "Noto Serif JP", serif;

  /* クリニックによらず共通 */
  --paper: #ffffff;
  --body-font: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, system-ui, sans-serif;
  --num-font: "Cormorant Garamond", Didot, "Bodoni 72", "Bodoni MT", "Hoefler Text", Georgia, "Times New Roman", serif;
  --error: #a8372e;
  --sat: #2f5f9e;
  --sun: #b23a3a;
  --r: min(var(--radius), 14px);
  --r-s: min(var(--radius), 8px);
  /* 上に残る帯（進み具合）の高さ。項目へ移るときの位置合わせ（scroll-margin-top）が、この値に頼る */
  --bar-h: 40px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  /* 内容が短い画面（種類を選ぶ画面・ページが見つかりません）でも、フッターを画面の一番下に寄せる。内容が長いときは、これまでどおり内容の後ろ。
     高さは、スマホのアドレスバーの出入りに合わせる dvh（古い端末には、先に書いた vh） */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body-font);
  font-size: 15px;
  line-height: 1.75;
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }

/* ---- 見出し（スクロールで流れる）。クリニック名は出さない。色・書体・角は、クリニックごとのデザインの変数だけで決める ---- */
/* body が flex の縦並びなので、左右 auto の余白の子は、幅が内容の幅に縮む。width: 100% で、これまでの幅（最大 560px）と中央そろえを保つ */
.hero { width: 100%; max-width: 560px; margin: 0 auto; padding: 22px 16px 18px; text-align: center; }
.hero__en {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin: 0;
  font-family: var(--head-font);
  font-size: 19px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.3em;
  white-space: nowrap;
  color: var(--ink);
}
/* 左右の短い線は飾り（文字ではないので、読み上げの対象にならない）。幅の狭い端末では、文字より先に線が縮む */
.hero__en::before, .hero__en::after { content: ""; flex: 0 1 28px; min-width: 6px; height: 1px; background: var(--accent); }
/* 最後の1文字の後ろにも字間が付くので、その分を右の線の側で引いて、左右の間隔をそろえる */
.hero__en::after { margin-left: -0.3em; }
.hero__title {
  margin: 8px 0 0;
  font-family: var(--head-font);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.12em;
  color: var(--ink);
}
.hero__badge {
  display: inline-block;
  margin: 12px 0 0;
  padding: 1px 14px;
  border: 1px solid var(--accent);
  border-radius: var(--r-s);
  font-size: 11px;
  line-height: 1.8;
  letter-spacing: 0.1em;
  color: var(--accent);
}

/* ---- 上に残る帯（進み具合だけ） ---- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 96%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar__in { max-width: 560px; margin: 0 auto; padding: 0 16px; }

.steps__list { display: flex; margin: 0; padding: 0; list-style: none; }
.steps__item { flex: 1; min-width: 0; }
.steps__btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%;
  padding: 7px 0 8px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  white-space: nowrap;
  color: var(--ink-sub);
  cursor: pointer;
}
.steps__no {
  flex: none;
  width: 18px; height: 18px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-family: var(--num-font);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  text-align: center;
  color: var(--ink-sub);
}
.steps__item.is-current .steps__btn { color: var(--ink); font-weight: 700; border-bottom-color: var(--ink); }
.steps__item.is-current .steps__no,
.steps__item.is-done .steps__no { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.steps__item.is-done .steps__no { font-size: 0; }
.steps__item.is-done .steps__no::before { content: "✓"; font-family: var(--body-font); font-size: 10px; }
.steps__btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* ---- 本文（縦一列） ---- */
.wrap { width: 100%; max-width: 560px; margin: 0 auto; padding: 16px 16px 0; }
.loading { color: var(--ink-sub); text-align: center; padding: 24px 0; }

.card {
  scroll-margin-top: calc(var(--bar-h) + 12px);
  margin: 0 0 14px;
  padding: 26px 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  transition: opacity 0.2s;
}
.card h2 {
  display: flex; align-items: baseline; gap: 12px;
  margin: 0 0 6px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-family: var(--head-font);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: 0.1em;
}
.card h2 .no {
  font-family: var(--num-font);
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.05em;
  color: var(--ink);
}
.card h2 .no:empty { display: none; }
.card h2 .req {
  margin-left: auto;
  padding: 0 7px;
  border: 1px solid var(--ink);
  font-family: var(--body-font);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  line-height: 1.7;
  color: var(--ink);
}
.card .lead { margin: 10px 0 16px; font-size: 12.5px; color: var(--ink-sub); }
.card > p:last-child { margin-bottom: 0; }
/* 前の項目を選ぶまでは、薄くして押せなくする */
.card.is-locked { opacity: 0.4; pointer-events: none; }
.card.is-locked .lead::after { content: "　※前の項目を選ぶと選べます"; color: var(--ink); }

.error { margin: 12px 0 0; color: var(--error); font-weight: 600; font-size: 13.5px; }

/* ---- 選ぶ項目の共通（院・施術） ---- */
.opt { position: relative; display: block; }
.opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.opt__body {
  display: flex; align-items: center; gap: 12px;
  padding: 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--r);
  background: var(--paper);
  transition: border-color 0.15s, background-color 0.15s;
}
.opt input:checked + .opt__body { border-color: var(--accent); background: var(--accent-soft); }
.opt input:focus-visible + .opt__body { outline: 2px solid var(--accent); outline-offset: 2px; }
.opt__mark {
  flex: none;
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg);
  color: var(--accent);
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.opt input:checked + .opt__body .opt__mark { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.opt__mark svg { width: 16px; height: 16px; }
/* 施術の画像（あれば、左の印の代わり）。56px の角丸。幅と高さを決めてあるので、読み込みでレイアウトが動かない。
   選んだときは、色だけに頼らず、右下に印（.opt__thumb-check）を重ねる */
.opt__thumb {
  position: relative; flex: none;
  width: 56px; height: 56px;
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  overflow: hidden;
  background: var(--bg);
}
.opt__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.opt__thumb-check {
  position: absolute; right: 3px; bottom: 3px;
  display: none; place-items: center;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--paper);
}
.opt__thumb-check svg { width: 12px; height: 12px; }
.opt input:checked + .opt__body .opt__thumb-check { display: grid; }
.opt__text { min-width: 0; }
.opt__name { display: block; font-family: var(--head-font); font-size: 16px; font-weight: 600; letter-spacing: 0.06em; line-height: 1.5; }
.opt__sub { display: block; font-size: 12px; line-height: 1.6; color: var(--ink-sub); }

.shop-list, .menu-list { display: grid; gap: 10px; }

/* ---- 院の選び方（エリア → 院 → 選んだ院の案内）。色・書体・角は、クリニックごとのデザインの変数だけで決める ----
   スマホで、エリアを選んでから院を選ぶまでの縦の移動が短くなるよう、エリアは1行に3つ（狭い端末では2つ）の小さな選択肢
   （7つは 3・3・1。最後の1つは左寄せで、ほかと同じ幅）、院の一覧は名前だけの背の低い1列の行にする（住所などは、選んだあとの案内に出す）。 */
.pick + .pick { margin-top: 18px; }
.pick__title { margin: 0 0 8px; font-family: var(--head-font); font-size: 13px; font-weight: 600; letter-spacing: 0.14em; color: var(--ink-sub); }
.pick .hint { margin: 0; padding: 12px 0; text-align: center; border: 1px dashed var(--line); border-radius: var(--r-s); }

.area-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.area { position: relative; display: flex; min-width: 0; }
.area input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.area__body {
  display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center;
  min-height: 46px;
  padding: 6px 4px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-s);
  background: var(--paper);
  font-size: 13.5px;
  line-height: 1.4;
  text-align: center;
  color: var(--ink);
  transition: border-color 0.15s, background-color 0.15s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
/* 2行目（関東の「東京以外」）は、1行目より小さく、控えめな色で。選択中は枠・字の色に揃える */
.area__note { font-size: 11px; font-weight: 400; line-height: 1.3; color: var(--ink-sub); }
/* 選択中は色だけに頼らず、太い枠と太い字で示す */
.area input:checked + .area__body { border-color: var(--accent); border-width: 2.5px; padding: 5px 3px; background: var(--accent-soft); color: var(--accent-strong); font-weight: 700; }
.area input:checked + .area__body .area__note { color: var(--accent-strong); font-weight: 600; }
.area input:focus-visible + .area__body { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 340px) {
  .area-list { grid-template-columns: repeat(2, 1fr); }
}

.shop-list { gap: 6px; }
.opt--slim .opt__body { gap: 10px; padding: 9px 12px; }
.opt--slim .opt__mark { width: 26px; height: 26px; }
.opt--slim .opt__mark svg { width: 13px; height: 13px; }
.opt--slim .opt__name { font-size: 15px; letter-spacing: 0.04em; }

/* 選んだ院の案内は、一覧の中の、選んだ行のすぐ下に出る（行との間隔は .shop-list の gap） */
.shop-info { padding: 12px 14px; border: 1px solid var(--accent); border-radius: var(--r); background: var(--accent-soft); }
.shop-info__name { margin: 0 0 4px; font-family: var(--head-font); font-size: 15px; font-weight: 600; letter-spacing: 0.06em; line-height: 1.5; color: var(--ink); }
.shop-info__list { margin: 0; }
.shop-info__row { display: grid; grid-template-columns: 5em 1fr; gap: 10px; align-items: baseline; padding: 4px 0; font-size: 13px; line-height: 1.7; }
.shop-info__row dt { font-size: 12px; color: var(--ink-sub); }
.shop-info__row dd { margin: 0; overflow-wrap: anywhere; }
.shop-info__line { display: block; }
/* 選べる日が1日もない院の、案内の中の文。院の一覧からは隠さない（シートの反映が遅れているだけのとき、院が消えると混乱するため）。色は、デザインの変数だけ */
.shop-info__none { margin: 8px 0 0; padding: 8px 10px; border-left: 3px solid var(--error); background: var(--paper); font-size: 13px; font-weight: 600; line-height: 1.7; color: var(--ink); }

/* ---- 種類を選ぶ画面（女性の方／男性の方）。色・書体・角は、クリニックごとのデザインの変数だけで決める ---- */
.card--entry { padding: 22px 18px 24px; }
.card--entry .lead { margin: 0 0 16px; font-size: 13.5px; text-align: center; color: var(--ink); }
.entry-list { display: grid; gap: 12px; }
.entry {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  min-height: 72px;
  padding: 16px 48px;
  border: 1.5px solid var(--line);
  border-radius: var(--r);
  background: var(--paper);
  font-family: var(--head-font);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s, background-color 0.15s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
/* 右の矢印は飾り（文字ではないので、読み上げの対象にならない） */
.entry::after { content: "›"; position: absolute; right: 20px; top: 50%; transform: translateY(-54%); font-size: 28px; line-height: 1; color: var(--accent); }
.entry[href]:hover { border-color: var(--accent); background: var(--accent-soft); }
.entry[href]:active { background: var(--accent-soft); }
.entry:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.entry:not([href]) { color: var(--ink-sub); pointer-events: none; }

/* ---- 性別（女性／男性）の項目（フォームの最初のカード）。選択肢の見た目は、エリアの選択肢（.area）と同じ。色・書体・角は、クリニックごとのデザインの変数だけで決める ---- */
.audience-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 14px; }
.audience-list .area__body { min-height: 48px; font-family: var(--head-font); font-size: 15px; letter-spacing: 0.1em; }

/* ---- ご予約の日時（月のカレンダーで1日、時間は1つ。別の時間を押すと入れ替わる） ---- */
.cal__nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 2px 8px; }
.cal__month { margin: 0; font-family: var(--head-font); font-size: 18px; font-weight: 600; letter-spacing: 0.08em; }
.cal__arrow {
  width: 44px; height: 44px;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}
.cal__arrow:disabled { color: #b9bfc4; cursor: not-allowed; opacity: 0.6; }
.cal__arrow:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal__dow { padding: 4px 0; font-size: 12px; font-weight: 700; text-align: center; color: var(--ink-sub); }
.cal__dow--sat { color: var(--sat); }
.cal__dow--sun { color: var(--sun); }
.cal__cell {
  display: grid; place-items: center;
  aspect-ratio: 1 / 1;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 1.5px solid transparent;
  border-radius: var(--r-s);
  background: none;
  font-family: var(--num-font);
  font-size: 19px;
  font-weight: 600;
}
/* 選べる日: 色のついた枠つきのボタン */
button.cal__cell {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
button.cal__cell.cal__cell--sat { color: var(--sat); }
button.cal__cell.cal__cell--sun { color: var(--sun); }
/* 選択中: 色だけに頼らず、塗りつぶしと内側の線で示す */
button.cal__cell[aria-pressed="true"] { border-color: var(--accent-strong); background: var(--accent); color: var(--paper); box-shadow: 0 0 0 2px var(--paper) inset; }
button.cal__cell:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* 選べない日 */
span.cal__cell { color: #a9aeb3; font-weight: 400; }
.cal__legend { margin: 10px 2px 0; font-size: 12px; color: var(--ink-sub); }

.sub {
  margin: 22px 0 6px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-family: var(--head-font);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.08em;
}
.hint { margin: 0 0 10px; font-size: 12.5px; color: var(--ink-sub); }
/* 選んだ院に選べる日が1日もないとき、カレンダーと時間の欄の代わりに出す文 */
.wish-none { margin: 0; padding: 12px 14px; border: 1px dashed var(--error); border-radius: var(--r-s); font-size: 13px; font-weight: 600; line-height: 1.7; color: var(--ink); }
/* 選んだ院で選べる施術が1つもないときの案内（施術の項目の中）。見た目は、選べる日がないときの案内（.wish-none）と同じ */
.menu-none { margin: 0; padding: 12px 14px; border: 1px dashed var(--error); border-radius: var(--r-s); font-size: 13px; font-weight: 600; line-height: 1.7; color: var(--ink); }

.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; padding: 8px 4px 2px; }
.choice {
  min-height: 48px;
  padding: 8px 10px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-s);
  background: var(--paper);
  font-family: var(--num-font);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
/* 選択中は色だけに頼らず、太い枠で示す */
.choice[aria-pressed="true"] { border-color: var(--accent); border-width: 2.5px; padding: 7px 9px; background: var(--accent-soft); color: var(--accent-strong); }
.choice:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- 送る（選んだ内容と、LINE へのボタン） ---- */
.submit-area { scroll-margin-top: calc(var(--bar-h) + 12px); padding: 10px 0 48px; text-align: center; }
.picked {
  margin: 0 0 10px;
  padding: 12px 14px;
  border: 1px solid var(--accent);
  border-radius: var(--r);
  background: var(--accent-soft);
  text-align: left;
}
.picked__row { display: grid; grid-template-columns: 4.6em 1fr; gap: 10px; align-items: baseline; padding: 3px 0; }
.picked__row dt { font-size: 12px; color: var(--ink-sub); }
.picked__row dd { margin: 0; font-family: var(--head-font); font-size: 16px; font-weight: 600; letter-spacing: 0.04em; line-height: 1.5; }
.picked__row.is-empty dd { font-family: var(--body-font); font-size: 13px; font-weight: 400; letter-spacing: 0; color: var(--ink-sub); }

.notice { margin: 0 0 14px; font-size: 12px; line-height: 1.7; color: var(--ink-sub); }
.notice p { margin: 0; }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%;
  padding: 18px;
  border: 1px solid var(--accent);
  border-radius: var(--r);
  background: var(--accent);
  font-family: var(--head-font);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-decoration: none;
  color: var(--paper);
  transition: background-color 0.2s, color 0.2s;
}
.btn::before {
  /* LINE の吹き出しの印 */
  content: "";
  flex: none;
  width: 22px; height: 22px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C6.48 2 2 5.94 2 10.7c0 3.15 2.23 5.9 5.55 7.42-.24.9-.87 3.23-.99 3.73-.15.61.22.6.47.44.2-.13 3.19-2.12 4.5-2.99.47.07.95.1 1.44.1 5.52 0 10-3.94 10-8.7S17.52 2 12 2z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C6.48 2 2 5.94 2 10.7c0 3.15 2.23 5.9 5.55 7.42-.24.9-.87 3.23-.99 3.73-.15.61.22.6.47.44.2-.13 3.19-2.12 4.5-2.99.47.07.95.1 1.44.1 5.52 0 10-3.94 10-8.7S17.52 2 12 2z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.btn[href]:hover { background: var(--accent-strong); }
.btn[href]:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn:not([href]) { border-color: #cccccc; background: var(--paper); color: #9a9a9a; pointer-events: none; }

.wait { margin: 10px 0 0; font-size: 12px; color: var(--ink-sub); }
.guide { margin: 12px 0 0; padding: 8px 12px; border-left: 3px solid var(--accent); background: var(--paper); font-size: 12px; line-height: 1.7; text-align: left; color: var(--ink); }

.qrbox { display: flex; align-items: center; gap: 14px; margin: 14px 0 0; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); text-align: left; }
.qrbox__code { flex: none; width: 120px; padding: 4px; background: #fff; }
.qrbox__code svg { display: block; width: 100%; height: auto; }
.qrbox__text { margin: 0; font-size: 12px; line-height: 1.7; }

/* ---- 最下部 ---- */
.foot {
  margin-top: auto;   /* 内容が短いとき、余った高さを上に取って、フッターを画面の一番下へ */
  padding: 36px 16px 44px;
  background: var(--accent-strong);
  text-align: center;
  font-size: 11px;
  line-height: 1.9;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.75);
}
.foot p { margin: 0; }
.foot a { color: inherit; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
