@charset "UTF-8";

/*
 * 販売申込フォーム（v5 §8: ご高齢のお客様でも迷わない画面）
 *
 *   §8.1 本文 18px・見出し 22px 以上・行間 1.8。入力欄の文字も 18px（iPhone の自動拡大を防ぐため 16px 未満にしない）
 *        ボタンは高さ 56px 以上・スマホでは横幅いっぱい。目立つボタン（btn--primary）は1画面に1つだけ
 *        チェックボックス・ラジオは 28px 以上。文言全体を <label> で包み、選択肢どうしの間隔は 12px 以上
 *        文字と背景のコントラスト比 4.5:1 以上（下の色はすべて白・生成り背景で 4.5:1 以上）
 *        エラー・必須を色だけで伝えない（「必須」「任意」の文字バッジ、エラーは ⚠ ＋文字）
 *        画面を 200% に拡大しても横スクロールが出ない（固定幅・横に並べっぱなしの要素を作らない）
 */

:root {
  --fg: #23201c;
  --fg-muted: #57524b;     /* 白背景で約 7.5:1（本文の補足にも使える濃さ） */
  --bg: #faf8f5;
  --card: #fff;
  --line: #d9d3c9;
  --accent: #7a5c30;       /* 白文字との比 約 6:1 */
  --accent-dark: #5e4624;
  --error: #a61f17;
  --error-bg: #fdecea;
  --warn-bg: #fff4d6;
  --ok: #24613f;
  --ok-bg: #e8f3ec;
  --radius: 12px;
  --tap: 56px;             /* ボタンの最小の高さ */
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  color: var(--fg);
  background: var(--bg);
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.8;
  overflow-wrap: anywhere;   /* 長い英数字（メール・URL）で横にはみ出さない */
}

a { color: var(--accent-dark); }

.wrap {
  width: 100%;
  max-width: 760px;
  margin-inline: auto;
  padding-inline: 16px;
}

/* ---------------------------------------------------------- header/footer */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.site-title {
  margin: 0;
  padding: 14px 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .04em;
  text-align: center;        /* 10/25 B-8: スマホ・PC とも中央 */
}
.site-footer {
  margin-top: 48px;
  padding: 24px 0 32px;
  border-top: 1px solid var(--line);
  background: var(--card);
}
.site-footer__copy {
  margin: 16px 0 0;
  color: var(--fg-muted);
  font-size: 16px;
  text-align: center;
}

.page-title {
  font-size: 26px;
  line-height: 1.5;
  margin: 28px 0 16px;
}

/* ---------------------------------------------------------- STEPバー（v5 §1.1） */
.stepbar {
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.stepbar__count {
  margin: 0;
  padding-top: 12px;
  font-size: 18px;
  text-align: center;
}
.stepbar__count strong { font-size: 22px; color: var(--accent-dark); }
.stepbar ol {
  display: flex;
  flex-wrap: wrap;          /* 200% 拡大でも横スクロールにしない */
  justify-content: center;
  gap: 8px 4px;
  /* 10/25 B-9: .wrap の中央寄せ（margin-inline: auto）を margin: 0 で消していたため、PC で左に寄っていた。
     本文（.wrap・最大 760px）と同じ幅で中央にそろえる。スマホ幅では .wrap が画面幅いっぱいなので見た目は変わらない */
  margin: 0 auto;
  padding: 8px 16px 14px;
  list-style: none;
}
.step {
  flex: 1 1 0;
  min-width: 64px;
  text-align: center;
  font-size: 14px;
  line-height: 1.4;
  color: var(--fg-muted);
}
.step__num {
  display: block;
  width: 34px;
  height: 34px;
  margin: 0 auto 4px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: #fff;
  font-size: 17px;
  line-height: 30px;
  font-weight: 700;
}
.step--current { color: var(--accent-dark); font-weight: 700; }
.step--current .step__num {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.step--done { color: var(--ok); }
.step--done .step__num { border-color: var(--ok); color: var(--ok); }

/* ---------------------------------------------------------- この画面でやること（v5 §8.2） */
.todo {
  margin: 0 0 20px;
  padding: 16px 18px;
  border-left: 6px solid var(--accent);
  border-radius: 8px;
  background: #fff;
}
.todo__title { margin: 0 0 4px; font-size: 16px; font-weight: 700; color: var(--accent-dark); }
.todo__text  { margin: 0; font-size: 19px; font-weight: 700; }

/* ---------------------------------------------------------- エラーのまとめ（v5 §8.3） */
.error-summary {
  margin: 0 0 20px;
  padding: 16px 18px;
  border: 3px solid var(--error);
  border-radius: var(--radius);
  background: var(--error-bg);
}
.error-summary:focus { outline: 3px solid var(--error); outline-offset: 2px; }
.error-summary__title { margin: 0 0 8px; font-weight: 700; color: var(--error); }
.error-summary__list { margin: 0; padding-left: 1.2em; }
.error-summary__list li { margin-bottom: 6px; }
.error-summary__list a { color: var(--error); font-weight: 700; }

/* ---------------------------------------------------------- card */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 20px;
}
.step-card { margin-bottom: 20px; }
.card--error { border-color: #e6bdb9; }
.card--done { text-align: center; }
.card--done .steps-guide,
.card--done .review { text-align: left; }
.card h2,
.step-card__title {
  font-size: 22px;
  line-height: 1.5;
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--line);
}
.card h2:not(:first-child) { margin-top: 28px; }
.step-card__no {
  display: inline-block;
  width: 36px;
  height: 36px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 20px;
  line-height: 36px;
  text-align: center;
  vertical-align: 2px;
}
.step-card__sub { font-size: 20px; }

.lead { margin-top: 0; }
.lead--strong { font-size: 22px; font-weight: 700; }
.note { color: var(--fg-muted); font-size: 16px; }
.note--plain { color: var(--fg); }
.muted { color: var(--fg-muted); }

.alert {
  margin: 0 0 18px;
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 17px;
}
.alert--error { background: var(--error-bg); color: var(--error); font-weight: 700; }
.alert--warn { background: var(--warn-bg); }
.alert--ok { background: var(--ok-bg); color: var(--ok); }

.notice {
  margin: 18px 0 0;
  padding-left: 1.2em;
  font-size: 16px;
  color: var(--fg-muted);
}
.notice--plain { color: var(--fg); font-size: 18px; }
.notice li { margin-bottom: 6px; }
.notice--env {
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

.notice-box,
.pricebox__notice {
  margin: 0 0 14px;
  padding: 14px 16px;
  border: 2px solid var(--accent);
  border-radius: 8px;
  background: #fffaf0;
  font-weight: 700;
}

.pricebox__notice p,
.notice-box p { margin: 0; }
.pricebox__notice .pricebox__caveat,
.notice-box .pricebox__caveat {
  margin-top: 6px;
  font-size: 16px;
  font-weight: 400;
}

.steps-guide { padding-left: 1.3em; margin: 16px 0; }
.steps-guide li { margin-bottom: 8px; }

/* ---------------------------------------------------------- form */
.field { margin-bottom: 26px; }
.field--tight { margin-bottom: 10px; }
.field > label,
.field__label {
  display: block;
  margin: 0 0 8px;
  font-weight: 700;
  font-size: 18px;
}
.req, .opt {
  display: inline-block;
  margin-left: 6px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.6;
  vertical-align: 2px;
  white-space: nowrap;
}
.req { background: var(--error); color: #fff; }
.opt { background: #e7e3dc; color: var(--fg); }

input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%;
  min-height: var(--tap);
  padding: 12px 14px;
  border: 2px solid #a59d91;
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-size: 18px;   /* iPhone で勝手に拡大されないよう 16px 未満にしない */
  color: inherit;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: 3px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
input[readonly], input.is-locked { background: #eeebe5; }

.field--error input,
.field--error select,
.field--error textarea { border-color: var(--error); background: #fffbfb; }
.field--error { padding-left: 12px; border-left: 4px solid var(--error); }

/* エラーは色だけでなく ⚠ と文字で伝える */
.error { margin: 8px 0 0; color: var(--error); font-size: 17px; font-weight: 700; }
.error::before { content: "⚠ "; }

/* チェックボックス・ラジオ: 28px 以上・文言全体を押せる・間隔 12px 以上 */
.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
  font-weight: 400;
  cursor: pointer;
}
.check input {
  flex: none;
  width: 28px;
  height: 28px;
  margin: 2px 0 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.check--big,
.check--radio {
  padding: 12px 14px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.check--big:has(input:checked),
.check--radio:has(input:checked) { border-color: var(--accent); background: #fbf6ee; }
.check--consent span { font-weight: 700; }

.fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.fieldset legend {
  padding: 0;
  margin-bottom: 10px;
  font-weight: 700;
  font-size: 18px;
}

.subfield {
  margin-top: 12px;
  padding: 14px 16px;
  background: #f7f5f1;
  border-radius: 8px;
}
.subfield > label { display: block; margin-bottom: 8px; font-weight: 700; }
.subfield .note { margin-bottom: 0; }

.fixed-value {
  margin: 0;
  padding: 12px 14px;
  border: 2px dashed #a59d91;
  border-radius: 8px;
  background: #f7f5f1;
}

.amount { display: flex; gap: 8px; align-items: center; }
.amount input { flex: 1 1 auto; min-width: 0; }
.amount__unit { flex: none; font-weight: 700; }
#card-remain.is-warn { color: var(--error); font-weight: 700; }
#card-remain.is-warn::before { content: "⚠ "; }

.consents { background: #fcfbf8; border-width: 2px; }

[hidden] { display: none !important; }

/* ---------------------------------------------------------- button */
.actions { margin: 26px 0 0; text-align: center; }
.actions--left { text-align: left; margin-top: 10px; }
.actions--sub { margin-top: 14px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  min-width: 260px;
  padding: 12px 28px;
  border: 2px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 19px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
/* 目立つボタン（1画面に1つだけ） */
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dark); }
/* 控えめなボタン（「追加」「全額をカードで払う」「ページを開く」など） */
.btn--sub,
.btn--ghost {
  background: #fff;
  color: var(--accent-dark);
  border-color: var(--accent);
}
.btn--sub:hover, .btn--ghost:hover { background: #fbf6ee; }
/* もっと控えめ（「戻る」「修正する」） */
.btn--text {
  min-width: 0;
  background: transparent;
  color: var(--accent-dark);
  text-decoration: underline;
  font-weight: 400;
}
.btn[disabled], .btn.is-busy { opacity: .55; cursor: default; pointer-events: none; }
.btn[hidden] { display: none !important; }

/* ---------------------------------------------------------- 確認画面 */
.review { margin: 0; border-top: 1px solid var(--line); }
.review__row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  padding: 14px 2px;
  border-bottom: 1px solid var(--line);
}
.review__row dt {
  flex: 0 0 30%;
  min-width: 140px;
  font-weight: 700;
  color: var(--fg-muted);
}
.review__row dd { flex: 1 1 55%; min-width: 0; margin: 0; }
.unit-chip {
  display: inline-block;
  margin: 0 8px 6px 0;
  padding: 2px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7f5f1;
}
.consented { margin: 0; padding: 0; list-style: none; }
.consented li { display: flex; gap: 10px; margin-bottom: 10px; }
.consented__mark { flex: none; color: var(--ok); font-weight: 700; }
.consented__text { flex: 1 1 auto; min-width: 0; }

/* ---------------------------------------------------------- 本人確認（v5 §8.8） */
.prepare { margin: 0 0 20px; padding: 14px 16px; border-radius: 8px; background: #f7f5f1; }
.prepare__row { display: flex; flex-wrap: wrap; gap: 0 16px; }
.prepare__row + .prepare__row { margin-top: 6px; }
.prepare__row dt { flex: 0 0 auto; font-weight: 700; }
.prepare__row dd { margin: 0; flex: 1 1 240px; min-width: 0; }
.steps-big { margin: 0 0 18px; padding: 0; list-style: none; }
.steps-big li {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 19px;
}
.steps-big__no { flex: none; font-weight: 700; color: var(--accent-dark); }
/* 番号の後ろの文章は1つの要素。太字が混ざっても1つの文章として折り返す */
.steps-big__text { flex: 1 1 auto; min-width: 0; }
.qr-block { margin: 24px 0; text-align: center; }
.qr {
  display: inline-block;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  line-height: 0;
  max-width: 100%;
}
.qr img, .qr canvas { display: block; max-width: 100%; height: auto; }
.qr textarea { width: 100%; }
.qr__caption { margin: 12px 0 0; font-size: 18px; }

/* ---------------------------------------------------------- 完了 */
.done-mark {
  margin: 0 auto 8px;
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--ok);
  color: #fff;
  font-size: 34px;
  line-height: 64px;
}
.appno {
  margin: 18px auto;
  padding: 12px;
  max-width: 340px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f5f1;
}
.appno strong { font-size: 26px; letter-spacing: .06em; }
.complete-thanks { margin: 24px 0 14px; font-size: 20px; }
.complete-shiho { margin-top: 18px; text-align: left; }

/* ---------------------------------------------------------- カート */
.cart__pick { display: grid; gap: 8px; }
.cart__label { font-weight: 700; margin-top: 4px; }
.cart__pick .btn { margin-top: 8px; justify-self: start; }
.cart__heading { margin: 20px 0 6px; font-weight: 700; }
.cart__list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.cart__item {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 2px;
  border-bottom: 1px solid var(--line);
}
.cart__unit { font-weight: 700; min-width: 0; }
.cart__remove {
  flex: none;
  min-height: 44px;
  padding: 6px 16px;
  border: 2px solid #a59d91;
  border-radius: 999px;
  background: #fff;
  font: inherit;
  font-size: 16px;
  color: var(--fg);
  cursor: pointer;
}
.cart__remove:hover { border-color: var(--error); color: var(--error); }
.cart__empty {
  padding: 12px 2px;
  border-bottom: 1px solid var(--line);
  color: var(--fg-muted);
}

/* ---------------------------------------------------------- 金額表示（v5 §8.6） */
.pricebox {
  margin: 0 0 12px;
  padding: 16px 18px;
  background: #f7f5f1;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.pricebox[aria-busy="true"] { opacity: .5; }
.pricebox__empty { margin: 0; color: var(--fg-muted); }
.pricebox__alert { margin: 0; color: var(--error); font-weight: 700; }
.pricebox__alert::before { content: "⚠ "; }

/* 明細より先に大きく1行 */
.pricebox__headline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 12px;
  margin: 0 0 10px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--line);
}
.pricebox__label  { font-weight: 700; }
.pricebox__amount { font-size: 30px; font-weight: 700; color: var(--accent-dark); font-variant-numeric: tabular-nums; }
.pricebox__tail   { font-size: 17px; }
.pricebox__split  { margin: 8px 0 12px; font-weight: 700; }

.pricebox__details { margin-top: 8px; }
.pricebox__details > summary {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 8px 14px;
  border: 2px solid var(--accent);
  border-radius: 8px;
  background: #fff;
  color: var(--accent-dark);
  font-weight: 700;
  cursor: pointer;
}
.pricebox__details[open] > summary { margin-bottom: 12px; }

.pricebox__tier {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-dark);
}
.pricebox__title { margin: 16px 0 8px; font-size: 19px; font-weight: 700; }
.pricebox__title:first-child { margin-top: 0; }

.pricebox__table {
  width: 100%;
  margin: 0 0 8px;
  border-collapse: collapse;
  font-size: 17px;
}
.pricebox__table th,
.pricebox__table td {
  padding: 10px 2px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.pricebox__table th { font-weight: 400; color: var(--fg); }
.pricebox__table td { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pricebox__table .sub {
  display: block;
  font-size: 15px;
  color: var(--fg-muted);
  white-space: normal;
}
.pricebox__table .is-total th { font-weight: 700; }
.pricebox__table .is-total td { font-weight: 700; font-size: 19px; }
.pricebox__table .is-total th,
.pricebox__table .is-total td { border-bottom: 0; border-top: 2px solid var(--line); }
.pricebox__table .is-grand th { font-size: 19px; }
.pricebox__table .is-grand td { font-size: 22px; color: var(--accent-dark); }
.pricebox__table .strike {
  text-decoration: line-through;
  color: var(--fg-muted);
  font-size: 15px;
}
.pricebox__table .tag {
  display: inline-block;
  margin-left: 6px;
  padding: 0 8px;
  border-radius: 4px;
  background: #efe9df;
  color: var(--accent-dark);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

/* ---------------------------------------------------------- 問い合わせ先（v5 §8.7） */
.contact {
  margin: 0;
  padding: 16px 18px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: #fff;
  text-align: left;
}
.contact p { margin: 0; }
.contact__lead { font-weight: 700; }
.contact__name { font-weight: 700; }
/* 電話番号・メールアドレスの後ろの説明文: 小さめ（本文の0.8倍）・うすめ。PC は同じ行で折り返さない */
.contact__note { font-size: .8em; color: var(--fg-muted); white-space: nowrap; }
.contact__nw { white-space: nowrap; }
.contact__tel a { font-size: 22px; font-weight: 700; color: var(--accent-dark); }

/* ---------------------------------------------------------- スマホ */
@media (max-width: 560px) {
  .card { padding: 20px 16px; }
  /* ボタンはスマホでは横幅いっぱい */
  .btn { width: 100%; min-width: 0; }
  .btn--text { width: auto; }
  .cart__pick .btn { justify-self: stretch; }
  .review__row dt { flex-basis: 100%; }
  .pricebox__table td { white-space: normal; }
  /* お問い合わせ先の説明文は番号・アドレスの下の行に。折り返すのはかたまり（.contact__nw）の間だけ */
  .contact__note { display: block; white-space: normal; }
}
