/*
  イサミーズサービス お問い合わせフォーム
  © ISAMI ABE / 2026-10-29
  【ほかの CSS を読み込まないこと】以前は汎用のスタイルシート(PusyuuStyleSheet20.10.3.css)を @import していましたが、
  このフォームに要る分だけをここに書きました。色は :root の変数だけで決め、暗い画面の設定では下で変数だけを差し替えます。
*/

:root {
  --bg: #f3f5f9;
  --surface: #ffffff;
  --text: #1d2433;
  --muted: #5d6779;
  --border: #d7dce5;
  --accent: #2f6fde;
  --accent-text: #ffffff;
  --accent-soft: #e6eefc;
  --required: #d93a3a;
  --optional: #2e9a5b;
  --alert-bg: #fdecec;
  --alert-text: #9b1c1c;
  --shadow: 0 1px 2px rgba(20, 30, 50, 0.06), 0 8px 24px rgba(20, 30, 50, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12151c;
    --surface: #1b2029;
    --text: #e6e9ef;
    --muted: #9aa3b2;
    --border: #333b48;
    --accent: #6c9cf0;
    --accent-text: #0e1420;
    --accent-soft: #1f2b40;
    --required: #ff7b7b;
    --optional: #5fd18f;
    --alert-bg: #3a1d1f;
    --alert-text: #ffb4b4;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

/* ---- 見出しの帯 ---- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  max-width: 680px;
  margin: 0 auto;
  padding: 18px 16px;
}

.site-header__brand {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.site-header__title {
  margin: 2px 0 0;
  font-size: 22px;
  line-height: 1.4;
}

/* ---- 本文 ---- */
.page {
  max-width: 680px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 28px 24px;
}

.card__title {
  margin: 0 0 6px;
  font-size: 20px;
  line-height: 1.4;
}

.card__lead {
  margin: 0 0 22px;
  color: var(--muted);
}

.card--notice .card__lead,
.card--done .card__lead {
  margin-bottom: 0;
}

.card--done {
  text-align: center;
}

.done-mark {
  width: 56px;
  height: 56px;
  margin: 4px auto 14px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 28px;
  font-weight: 700;
  line-height: 56px;
}

/* ---- 進み具合(入力 → 確認 → 完了) ---- */
.steps {
  display: flex;
  gap: 6px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  flex: 1;
  padding: 6px 4px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  counter-increment: step;
}

.steps li::before {
  content: counter(step) ". ";
}

.steps li.is-done {
  color: var(--accent);
}

.steps li.is-current {
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 700;
}

/* ---- 入力欄 ---- */
.form {
  margin: 0;
}

.field {
  margin: 0 0 20px;
  padding: 0;
  border: 0;
  min-width: 0;
}

.field__label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  padding: 0;
  font-weight: 700;
}

.field__input {
  display: block;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  line-height: 1.5;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field__input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.field__input--area {
  min-height: 180px;
  resize: vertical;
}

.field__note {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

/* contact.js が、入力に誤りのある欄へ付けます。 */
.error-form {
  border-color: var(--required);
}

.error {
  margin-top: 6px;
  color: var(--required);
  font-size: 14px;
  font-weight: 700;
}

.badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.7;
  vertical-align: middle;
}

.badge--required {
  background: var(--required);
}

.badge--optional {
  background: var(--optional);
}

.card__lead .badge {
  margin: 0 2px;
}

/* 性別の選択(丸いボタンの並び) */
.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.choice {
  position: relative;
  cursor: pointer;
}

.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice span {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  transition: background 0.15s, border-color 0.15s;
}

.choice input:checked + span {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.choice input:focus-visible + span {
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ---- 知らせ ---- */
.alert {
  margin: 0 0 20px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--alert-bg);
  color: var(--alert-text);
  font-weight: 700;
}

/* ---- 確認画面の一覧 ---- */
.review {
  margin: 0 0 24px;
  border-top: 1px solid var(--border);
}

.review__row {
  display: grid;
  grid-template-columns: 9em 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.review dt {
  color: var(--muted);
  font-weight: 700;
}

.review dd {
  margin: 0;
  overflow-wrap: anywhere;
}

/* ---- ボタン ---- */
.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}

.actions form {
  margin: 0;
}

.button {
  display: inline-block;
  min-width: 180px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 10px;
  font: inherit;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: filter 0.15s, background 0.15s;
}

.button--primary {
  background: var(--accent);
  color: var(--accent-text);
}

.button--primary:hover {
  filter: brightness(1.08);
}

.button--secondary {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
}

.button--secondary:hover {
  background: var(--bg);
}

.button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ---- 幅の狭い画面 ---- */
@media (max-width: 520px) {
  .card {
    padding: 22px 16px;
    border-radius: 12px;
  }

  .review__row {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .actions,
  .actions form {
    width: 100%;
  }

  .actions .button {
    width: 100%;
  }
}
