/* =========================================================
   phenix 汎用ページ スタイル（お問い合わせ／プライバシーポリシー）
   lower.css のデザイントークンを継承する。単独では成立しないため
   必ず lower.css のあとに読み込むこと。

   下層3ページが「見せる」ページなのに対し、この2ページは
   「手続きする・読む」ページのため、写真を使わず余白と罫線で構成する。
   ========================================================= */

/* ---------------------------------------------------------
   ヒーロー（写真なしの簡素版）
   事業ページのような大判写真は置かず、墨面と真鍮の罫線だけで受ける
   --------------------------------------------------------- */
.page-hero.is-plain {
  min-height: clamp(260px, 38vh, 380px);
  background: var(--ink-950);
}
/* 単色だと平坦なので、右上から淡く起こして奥行きを作る */
.page-hero.is-plain::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 90% at 78% 8%, rgba(192, 164, 104, 0.10), transparent 58%),
    linear-gradient(to bottom, var(--ink-900), var(--ink-950));
}

/* パンくず */
.crumb {
  font-size: clamp(11px, 0.95vw, 12.5px);
  letter-spacing: 0.14em;
  color: var(--text-low);
  margin-bottom: clamp(18px, 2.4vw, 28px);
}
.crumb a {
  color: var(--text-mid);
  transition: color 0.4s ease;
}
.crumb a:hover { color: var(--brass); }
.crumb .sep { margin: 0 0.9em; color: var(--text-low); }

/* ---------------------------------------------------------
   本文ブロック共通
   --------------------------------------------------------- */
.doc {
  padding: clamp(64px, 8vw, 120px) var(--pad-x);
}
.doc-inner {
  max-width: 940px;
  margin-inline: auto;
}
.doc-lead {
  font-size: clamp(13.5px, 1.15vw, 15px);
  line-height: 2.3;
  color: var(--text-ink-mid);
  padding-bottom: clamp(40px, 5vw, 64px);
  border-bottom: 1px solid var(--line-ink);
}

/* 条項 */
.article + .article { margin-top: clamp(44px, 5.5vw, 72px); }
.article:first-of-type { margin-top: clamp(44px, 5.5vw, 72px); }
.article h2 {
  font-family: var(--font-min);
  font-weight: 500;
  font-size: clamp(17px, 1.7vw, 23px);
  letter-spacing: 0.1em;
  line-height: 1.7;
  margin-bottom: 22px;
  padding-left: 18px;
  border-left: 2px solid var(--brass-soft);
}
.article p {
  font-size: clamp(13px, 1.05vw, 14.5px);
  line-height: 2.3;
  color: var(--text-ink-mid);
}
.article p + p { margin-top: 1.5em; }
.article ul { margin-top: 1.2em; }
.article li {
  position: relative;
  padding-left: 1.5em;
  font-size: clamp(13px, 1.05vw, 14.5px);
  line-height: 2.2;
  color: var(--text-ink-mid);
}
/* 中黒ではなく真鍮の細い横罫で受ける */
.article li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 1.05em;
  width: 10px; height: 1px;
  background: var(--brass-soft);
}

/* 事業者情報テーブル */
.info-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.4em;
  background: #fff;
  border: 1px solid var(--line-ink);
}
.info-table th,
.info-table td {
  text-align: left;
  vertical-align: top;
  padding: 16px 22px;
  font-size: clamp(12.5px, 1vw, 14px);
  line-height: 2;
  border-bottom: 1px solid var(--line-ink);
}
.info-table tr:last-child th,
.info-table tr:last-child td { border-bottom: 0; }
.info-table th {
  width: 12em;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--text-ink);
  background: var(--paper-dim);
  border-right: 1px solid var(--line-ink);
}
.info-table td { color: var(--text-ink-mid); }
@media (max-width: 640px) {
  .info-table th, .info-table td { display: block; width: auto; border-right: 0; }
  .info-table th { border-bottom: 0; padding-bottom: 0; background: #fff; }
}

/* ---------------------------------------------------------
   フォーム
   --------------------------------------------------------- */
.form-step { display: none; }
.form-step.is-active { display: block; }

.form-note {
  font-size: clamp(12.5px, 1vw, 13.5px);
  line-height: 2.1;
  color: var(--text-ink-mid);
  margin-bottom: clamp(36px, 4.5vw, 56px);
}
.form-note .req { color: var(--brass-soft); margin: 0 0.2em; }

.field + .field { margin-top: clamp(26px, 3vw, 38px); }
.field > label {
  display: block;
  font-size: clamp(12.5px, 1.05vw, 14px);
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--text-ink);
  margin-bottom: 12px;
}
.field .req {
  color: var(--brass-soft);
  font-size: 11px;
  letter-spacing: 0.1em;
  margin-left: 0.7em;
}

.field input,
.field textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: clamp(13.5px, 1.1vw, 15px);
  line-height: 1.9;
  letter-spacing: 0.06em;
  color: var(--text-ink);
  background: #fff;
  border: 1px solid var(--line-ink);
  border-radius: 0;
  padding: 15px 18px;
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
  -webkit-appearance: none;
  appearance: none;
}
.field textarea { min-height: 190px; resize: vertical; }
.field input::placeholder,
.field textarea::placeholder { color: #b3aca3; }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brass-soft);
  box-shadow: 0 0 0 1px var(--brass-soft);
}

.error-msg {
  display: none;
  font-size: 12px;
  letter-spacing: 0.06em;
  line-height: 1.9;
  color: #a4352c;
  margin-top: 9px;
}
.has-error .error-msg { display: block; }
.has-error input,
.has-error textarea { border-color: #a4352c; }

/* 同意チェック */
.consent {
  margin-top: clamp(36px, 4.5vw, 52px);
  padding-top: clamp(30px, 3.6vw, 42px);
  border-top: 1px solid var(--line-ink);
}
.consent-row { display: flex; align-items: flex-start; gap: 12px; }
.consent input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px; height: 18px;
  margin-top: 0.5em;
  border: 1px solid var(--line-ink);
  border-radius: 0;
  background: #fff;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.consent input[type="checkbox"]:checked {
  background: var(--brass);
  border-color: var(--brass);
}
/* チェック記号は擬似要素で描く（環境差を避けるため文字は使わない） */
.consent input[type="checkbox"]:checked::after {
  content: '';
  display: block;
  width: 5px; height: 10px;
  margin: 1px auto 0;
  border-right: 1.5px solid var(--ink-950);
  border-bottom: 1.5px solid var(--ink-950);
  transform: rotate(45deg);
}
.consent input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--brass-soft);
}
.consent label {
  font-size: clamp(12.5px, 1.02vw, 14px);
  line-height: 2;
  color: var(--text-ink-mid);
  cursor: pointer;
}
.consent label a {
  color: var(--text-ink);
  border-bottom: 1px solid var(--brass-soft);
  padding-bottom: 1px;
  transition: color 0.35s ease;
}
.consent label a:hover { color: var(--brass-soft); }
.consent .error-msg { margin-left: 30px; }

/* ---------------------------------------------------------
   ボタン
   .btn（真鍮塗り）は lower.css を継承。紙面用の輪郭ボタンを追加する
   --------------------------------------------------------- */
.form-actions {
  margin-top: clamp(40px, 5vw, 60px);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.btn-line {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: clamp(12.5px, 1.05vw, 14px);
  letter-spacing: 0.14em;
  padding: 16px 34px;
  border: 1px solid var(--line-ink);
  background: transparent;
  color: var(--text-ink);
  cursor: pointer;
  transition: background 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}
.btn-line:hover {
  background: var(--ink-950);
  border-color: var(--ink-950);
  color: var(--text-hi);
}
/* button 要素にも .btn を使うため、既定の外観を打ち消す */
button.btn { font-family: var(--font-sans); cursor: pointer; }

/* ---------------------------------------------------------
   確認画面
   --------------------------------------------------------- */
.confirm-lead {
  font-size: clamp(13px, 1.05vw, 14.5px);
  line-height: 2.2;
  color: var(--text-ink-mid);
  margin-bottom: clamp(30px, 3.6vw, 44px);
}
.confirm-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line-ink);
}
.confirm-table th,
.confirm-table td {
  text-align: left;
  vertical-align: top;
  padding: 18px 22px;
  font-size: clamp(12.5px, 1vw, 14px);
  line-height: 2.1;
  border-bottom: 1px solid var(--line-ink);
}
.confirm-table tr:last-child th,
.confirm-table tr:last-child td { border-bottom: 0; }
.confirm-table th {
  width: 13em;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--text-ink);
  background: var(--paper-dim);
  border-right: 1px solid var(--line-ink);
}
.confirm-table td { color: var(--text-ink-mid); white-space: pre-wrap; word-break: break-word; }
@media (max-width: 640px) {
  .confirm-table th, .confirm-table td { display: block; width: auto; border-right: 0; }
  .confirm-table th { border-bottom: 0; padding-bottom: 0; background: #fff; }
}

/* 送信失敗時の通知。ブラウザの alert を使わず画面内で伝える */
.form-alert {
  display: none;
  margin-bottom: 28px;
  padding: 18px 22px;
  border: 1px solid #a4352c;
  border-left-width: 2px;
  background: #fff;
  font-size: clamp(12.5px, 1vw, 13.5px);
  line-height: 2;
  color: #8d2e26;
  white-space: pre-wrap;
}
.form-alert.is-shown { display: block; }

/* ---------------------------------------------------------
   送信中
   --------------------------------------------------------- */
.sending {
  text-align: center;
  padding: clamp(60px, 8vw, 110px) 0;
}
.spinner {
  width: 42px; height: 42px;
  margin: 0 auto 26px;
  border: 1px solid var(--line-ink);
  border-top-color: var(--brass);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.sending p {
  font-size: clamp(12.5px, 1vw, 13.5px);
  letter-spacing: 0.16em;
  color: var(--text-ink-mid);
}

/* ---------------------------------------------------------
   送信完了
   --------------------------------------------------------- */
.done {
  text-align: center;
  padding: clamp(40px, 6vw, 80px) 0;
}
.done .mark {
  width: 68px; height: 68px;
  margin: 0 auto clamp(26px, 3vw, 38px);
  border: 1px solid var(--brass-soft);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.done .mark svg {
  width: 26px; height: 26px;
  stroke: var(--brass); fill: none;
  stroke-width: 1.2; stroke-linecap: square;
}
.done h2 {
  font-family: var(--font-min);
  font-weight: 500;
  font-size: clamp(19px, 2.1vw, 28px);
  letter-spacing: 0.1em;
  line-height: 1.7;
  margin-bottom: 20px;
}
.done p {
  font-size: clamp(13px, 1.05vw, 14.5px);
  line-height: 2.3;
  color: var(--text-ink-mid);
  margin-bottom: clamp(34px, 4vw, 48px);
}

/* モーション低減時はスピナーを止める（回転は情報を持たないため） */
@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; }
}

/* ---------------------------------------------------------
   スマートフォン
   --------------------------------------------------------- */
@media (max-width: 767px) {
  /* iOS Safari は 16px 未満の入力欄をタップすると自動でズームインし、
     戻す操作をユーザーに強いる。ここだけは 16px を下回らせない。 */
  .field input,
  .field textarea { font-size: 16px; }

  /* 指で押す前提のため、チェックボックスと余白を広げる */
  .consent input[type="checkbox"] { width: 20px; height: 20px; }
  .consent input[type="checkbox"]:checked::after { width: 6px; height: 11px; }
  .consent .error-msg { margin-left: 32px; }

  /* 確認画面の2つのボタンは横に並べず、主操作を上に積む */
  .form-actions { flex-direction: column; align-items: stretch; }
  .form-actions .btn,
  .form-actions .btn-line { justify-content: center; }

  /* 見出しの字間を詰めて折り返しを減らす */
  .article h2 { letter-spacing: 0.06em; padding-left: 14px; }
}
