/* =========================================================
   Cocotone renewal 2026-11-23 — pages.css
   下層ページ（お問い合わせ・送信完了・利用規約・プライバシーポリシー）。
   base.css のトークンと部品を使い、ここでは並べ方と下層専用の部品だけを書く。
   作り：空の色の背景に、クリーム色の紙を1枚。上に「← トップへ戻る」、下にフッターと庭の地面（動かない）。
   ========================================================= */

/* ---------- 1. ページの地（空）と並び ---------- */
.page {
  /* 空：トップと同じ（上 クリーム → 地平線 はちみつクリーム）。上に雲を1列だけ */
  background:
    url("../img/scene/garden-clouds.svg") repeat-x left top / 800px 150px,
    linear-gradient(to bottom, var(--c-cream), var(--c-honey-cream) 70%);
  min-height: 100vh;
  min-height: 100svh;
  display: flex; flex-direction: column;
}
.page__wrap {
  flex: 1 0 auto;
  width: 100%; max-width: calc(720px + var(--gutter) * 2);
  margin: 0 auto;
  padding: var(--sp-4) var(--gutter) 0;
  display: flex; flex-direction: column; gap: var(--sp-4);
}
.page--legal .page__wrap { max-width: calc(760px + var(--gutter) * 2); }

.page__back { font-family: var(--font-heading); font-weight: 700; font-size: 0.9375rem; }
.page__back a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--sp-4);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.7); border: 1.5px solid var(--c-border);
  color: var(--c-green-deep); text-decoration: none;
  transition: background-color 300ms var(--ease-soft);
}
.page__back a:hover { background: var(--c-mint); }

/* ---------- 2. 紙 ---------- */
.paper {
  background: var(--c-cream);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-soft);
  padding: var(--sp-6) var(--sp-5) var(--sp-7);
  display: flex; flex-direction: column; gap: var(--sp-6);
  min-width: 0;
}
.paper__head { display: grid; gap: var(--sp-3); }
.paper__lead { line-height: 1.85; }
.paper__date { font-size: var(--fs-note); color: var(--c-ink-sub); }
.paper a { text-decoration: underline; text-decoration-thickness: 1px; }

@media (min-width: 768px) {
  .page__wrap { padding-top: var(--sp-6); gap: var(--sp-5); }
  .paper { padding: var(--sp-7) var(--sp-7) var(--sp-8); }
}

/* ---------- 3. フォーム ---------- */
.form { display: grid; gap: var(--sp-5); }
.field { display: grid; gap: var(--sp-2); min-width: 0; }
.field__label {
  display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-2);
  font-family: var(--font-heading); font-weight: 700; font-size: 1rem; line-height: 1.5;
  color: var(--c-ink);
}
.field__hint { font-size: var(--fs-note); line-height: 1.7; color: var(--c-ink-sub); }
.field__label + .field__hint { margin-top: calc(var(--sp-1) * -1); }

/* 「必須」「任意」の小さなラベル */
.tag {
  display: inline-flex; align-items: center;
  padding: 0 10px; border-radius: var(--r-pill);
  font-family: var(--font-heading); font-size: var(--fs-label); font-weight: 700; line-height: 1.75;
  letter-spacing: 0.06em;
}
.tag--req { background: var(--c-paw-soft); color: #8a4436; border: 1.5px solid var(--c-paw); } /* 文字色は base.css の .badge--work と同じ */
.tag--opt { background: var(--c-mint); color: var(--c-green-deep); border: 1.5px solid #a9c4ba; } /* 線は base.css の .badge--anon と同じ */

/* 入力欄：高さ48px以上・文字16px（iPhoneで拡大されない） */
.field__input {
  display: block; width: 100%; min-width: 0; min-height: 52px;
  margin: 0; padding: 12px var(--sp-4);
  border: 1.5px solid var(--c-border); border-radius: var(--r-md);
  background: var(--c-white); color: var(--c-ink);
  font-family: var(--font-body); font-size: 1rem; line-height: 1.6;
  box-shadow: inset 0 1px 2px rgba(59, 43, 24, 0.05);
  transition: border-color 200ms var(--ease-soft), box-shadow 200ms var(--ease-soft);
}
.field__input::placeholder { color: var(--c-ink-sub); opacity: 0.75; }
.field__input:hover { border-color: var(--c-green); }
.field__input:focus { outline: 3px solid var(--c-chatora); outline-offset: 2px; border-color: var(--c-green-deep); }
.field__textarea { min-height: 180px; resize: vertical; }
.field__select {
  -webkit-appearance: none; appearance: none;
  padding-right: 44px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%233b5e55' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; background-size: 16px 16px;
}

/* 迷惑送信よけの欄：画面の外へ */
.form__hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.form__actions {
  display: grid; gap: var(--sp-3); justify-items: center; text-align: center;
  margin-top: var(--sp-2); padding-top: var(--sp-5);
  border-top: 2px dashed var(--c-border);
}
.form__privacy { font-size: var(--fs-note); line-height: 1.7; }
.btn-submit {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; max-width: 360px; min-height: 56px; padding: 0 var(--sp-6);
  border: 0; border-radius: var(--r-pill);
  background: var(--c-green-deep); color: var(--c-cream);
  font-family: var(--font-heading); font-size: 1.0625rem; font-weight: 700; letter-spacing: 0.06em;
  box-shadow: var(--shadow-soft); cursor: pointer;
  transition: transform 300ms var(--ease-soft), box-shadow 300ms var(--ease-soft), opacity 300ms var(--ease-soft);
}
.btn-submit:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.btn-submit:active { transform: translateY(0); }
.btn-submit:disabled { opacity: 0.55; cursor: default; transform: none; box-shadow: none; }
.form__after { font-family: var(--font-heading); font-weight: 700; color: var(--c-green-deep); }
.form__note { font-size: var(--fs-label); line-height: 1.6; color: var(--c-ink-sub); }

/* 結果の表示（空のときは場所を取らない） */
.form__status { width: 100%; }
.form__status:empty { display: none; }
.form__status--error {
  padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md);
  background: var(--c-paw-soft); border: 1.5px solid var(--c-paw);
  color: var(--c-ink); font-size: var(--fs-note); line-height: 1.75; text-align: left;
}

/* LINEの案内（フォームの下） */
.line-aside {
  display: grid; gap: var(--sp-3); justify-items: center; text-align: center;
  padding: var(--sp-5) var(--sp-4); border-radius: var(--r-lg);
  background: var(--c-mint); border: 1.5px solid #c9ddd5; /* 線は index.html の .line-block と同じ */
}
.line-aside__title { font-size: var(--fs-h3); }
.line-aside p { font-size: var(--fs-note); line-height: 1.75; }
.line-aside .btn-line { text-decoration: none; }

/* ---------- 4. 送信完了 ---------- */
.thanks { text-align: center; align-items: center; }
.thanks .paper__head { justify-items: center; }
.thanks__body { display: grid; gap: var(--sp-3); max-width: 32em; }
.thanks__links { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-3); }
.thanks__links .btn-sub { text-decoration: none; }
.thanks__links .btn-sub--main { background: var(--c-green-deep); color: var(--c-cream); }
.thanks__links .btn-sub--main:hover { background: var(--c-green); }

/* ---------- 5. 規約・ポリシー ---------- */
.legal { gap: var(--sp-6); }
.legal__intro { line-height: 1.9; }
.legal__body { display: grid; gap: var(--sp-6); }
.legal-sec {
  display: grid; gap: var(--sp-3);
  padding-top: var(--sp-5); border-top: 2px dashed var(--c-border);
  scroll-margin-top: var(--sp-5); /* #hachumofu-api で開いたとき、章の先頭が上端にくっつかない */
}
.legal-sec h2 {
  font-size: var(--fs-h3);
  display: flex; align-items: baseline; gap: var(--sp-2);
}
.legal-sec h3 {
  margin-top: var(--sp-3);
  font-size: 1rem; color: var(--c-green);
  padding-left: var(--sp-3); border-left: 4px solid var(--c-honey);
}
.legal-sec p { line-height: 1.9; }
.legal-sec ul { display: grid; gap: var(--sp-2); padding-left: 1.4em; }
.legal-sec li { line-height: 1.8; }
.legal-sec li::marker { color: var(--c-green); }
.legal-sec .legal__aside { font-size: var(--fs-note); color: var(--c-ink-sub); }
.legal-sec--api {
  padding: var(--sp-5) var(--sp-4); border: 1.5px solid #c9ddd5; border-radius: var(--r-lg);
  background: var(--c-mint);
}
@media (min-width: 768px) {
  .legal-sec--api { padding: var(--sp-6); }
}
.legal__contact { word-break: normal; }

/* ---------- 6. フッター＋庭の地面（動かない） ---------- */
.page-footer {
  margin-top: var(--sp-4); padding: var(--sp-5) 0 var(--sp-3);
  display: grid; gap: var(--sp-2); justify-items: center; text-align: center;
  color: var(--c-ink-sub); font-size: var(--fs-note); line-height: 1.75;
}
.page-footer__logo { width: 130px; }
.page-footer__name { font-family: var(--font-heading); font-weight: 700; color: var(--c-ink); font-size: 1rem; }
.page-footer__links {
  list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 var(--sp-1);
  margin-top: var(--sp-2);
}
.page-footer__links a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--sp-2);
  color: var(--c-green-deep); font-weight: 500;
}
.page-footer__links a[aria-current="page"] { font-weight: 700; text-decoration-color: var(--c-honey); text-decoration-thickness: 3px; }
.page-footer__copy { font-size: var(--fs-label); }

.page__ground {
  flex: none; height: 120px; margin-top: var(--sp-2);
  background:
    url("../img/scene/garden-fore.svg") repeat-x left bottom / 640px 44px,
    url("../img/scene/garden-ground.svg") repeat-x left bottom / 800px 95px,
    url("../img/scene/garden-far.svg") repeat-x 40% bottom / 560px 182px;
  pointer-events: none;
}
@media (min-width: 768px) {
  .page__ground {
    height: 150px;
    background-size: 800px 55px, 1067px 127px, 747px 243px;
  }
}
