/**
 * 専用テンプレート（お問い合わせ）デザイン用スタイル。
 *
 * 新デザイン（dev/contact.html）から抽出した CSS。テーマを完全バイパスして
 * 出力する自己完結ページのため、全体に適用する。条件付きブロック
 * （ご希望種類／物件概要）の表示制御は contact-design.js（.relo-conditional /
 * is-hidden）で行う。
 */

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

  :root {
    --blue: #1B5EAE;
    --blue-dark: #134a8c;
    --blue-light: #e8f0fb;
    --blue-mid: #2d73cc;
    --orange: #f07820;
    --gold: #b8922a;
    --gold-light: #d4af5a;
    --bg: #f9f6f1;
    --white: #ffffff;
    --gray-text: #374151;
    --gray-sub: #6b7280;
    --red: #d72f2f;
    --line: rgba(27,94,174,0.12);
    --radius: 16px;
  }

  html { scroll-behavior: smooth; }
  body {
    font-family: 'Noto Sans JP', sans-serif;
    background: var(--bg);
    color: var(--gray-text);
    line-height: 1.8;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
  }

  .wrap {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 0 20px;
  }
  @media (min-width: 768px)  { .wrap { max-width: 800px;  padding: 0 36px; } }
  @media (min-width: 1100px) { .wrap { max-width: 960px; padding: 0 56px; } }

  /* ── Header ── */
  .header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(27,94,174,0.08);
  }
  .header-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 60px;
  }
  .logo img { height: 32px; width: auto; display: block; }
  @media (min-width: 768px) { .logo img { height: 38px; } .header-inner { height: 68px; } }
  .header-back {
    display: inline-flex; align-items: center; gap: 6px;
    border: 1.5px solid var(--orange);
    color: var(--orange);
    font-size: 11px; font-weight: 700;
    padding: 6px 12px; border-radius: 50px;
    background: transparent; text-decoration: none;
    transition: background 0.18s, color 0.18s;
    white-space: nowrap;
  }
  .header-back:hover { background: var(--orange); color: white; }
  @media (min-width: 768px) { .header-back { font-size: 13px; padding: 8px 18px; } }

  /* ── Hero ── */
  .form-hero {
    position: relative;
    overflow: hidden;
    background: #143a73 url("contact-design/hero-bg.jpg") center center / cover no-repeat;
    padding: 52px 0 56px;
    text-align: center;
    color: white;
  }
  .form-hero::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(15,28,55,0.62) 0%, rgba(15,28,55,0.52) 50%, rgba(15,28,55,0.66) 100%);
  }
  .form-hero .wrap { position: relative; z-index: 1; }
  .form-hero-eyebrow {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: 11px; font-weight: 700; letter-spacing: 0.22em;
    color: var(--gold-light); text-transform: uppercase;
    margin-bottom: 16px;
  }
  .form-hero-eyebrow::before, .form-hero-eyebrow::after {
    content: ''; width: 26px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
  }
  .form-hero-title {
    font-size: clamp(26px, 7vw, 46px);
    font-weight: 900; letter-spacing: 0.04em; line-height: 1.3;
    text-shadow: 0 2px 18px rgba(0,0,0,0.45);
  }
  @media (min-width: 768px) { .form-hero { padding: 70px 0 76px; } }

  /* ── Intro ── */
  .form-intro { padding: 44px 0 8px; text-align: center; }
  .form-intro p {
    font-size: 14px; color: var(--gray-text); line-height: 1.95;
    max-width: 640px; margin: 0 auto;
  }
  @media (min-width: 768px) { .form-intro p { font-size: 15.5px; } }
  .form-intro .req-note {
    color: var(--red); font-weight: 700; font-size: 13.5px;
    margin-top: 14px;
  }

  /* ── Form ── */
  .form-section { padding: 28px 0 72px; }
  form { margin: 0; }

  .form-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 8px 30px rgba(10,20,50,0.06);
    overflow: hidden;
  }

  .form-row {
    padding: 24px 22px;
    border-bottom: 1px solid var(--line);
  }
  .form-row:last-child { border-bottom: none; }
  @media (min-width: 768px) {
    .form-row {
      display: grid;
      grid-template-columns: 220px 1fr;
      gap: 28px;
      padding: 30px 36px;
      align-items: start;
    }
  }

  .form-label {
    display: flex; align-items: center; gap: 8px;
    font-size: 15px; font-weight: 700; color: var(--blue);
    margin-bottom: 14px; line-height: 1.5;
  }
  @media (min-width: 768px) { .form-label { margin-bottom: 0; padding-top: 10px; } }
  .form-label .req {
    color: var(--red); font-size: 16px; line-height: 1; font-weight: 700;
  }
  .form-label small {
    display: block; font-weight: 500; font-size: 11.5px;
    color: var(--gray-sub); margin-top: 2px;
  }
  .form-label-text { display: flex; flex-direction: column; }

  .form-field { min-width: 0; }

  /* radios */
  .radio-group { display: flex; flex-direction: column; gap: 14px; }
  .radio-opt {
    display: flex; align-items: flex-start; gap: 12px;
    cursor: pointer; font-size: 14.5px; line-height: 1.6;
    color: var(--gray-text);
  }
  .radio-opt input { position: absolute; opacity: 0; pointer-events: none; }
  .radio-mark {
    flex-shrink: 0; width: 20px; height: 20px; margin-top: 3px;
    border: 1.5px solid rgba(27,94,174,0.4); border-radius: 50%;
    position: relative; transition: border-color 0.18s, box-shadow 0.18s;
  }
  .radio-opt:hover .radio-mark { border-color: var(--blue); }
  .radio-opt input:checked + .radio-mark {
    border-color: var(--blue);
    box-shadow: inset 0 0 0 4px var(--blue);
  }
  .radio-opt input:checked ~ .radio-text { color: var(--blue); font-weight: 700; }

  /* checkboxes (ご希望種類) */
  /* ご希望種類の表示制御は .relo-conditional.is-hidden で行う */
  .check-group { display: flex; flex-direction: column; gap: 14px; }
  .check-opt {
    display: flex; align-items: flex-start; gap: 12px;
    cursor: pointer; font-size: 14.5px; line-height: 1.6;
    color: var(--gray-text);
  }
  .check-opt input { position: absolute; opacity: 0; pointer-events: none; }
  .check-mark {
    flex-shrink: 0; width: 20px; height: 20px; margin-top: 3px;
    border: 1.5px solid rgba(27,94,174,0.4); border-radius: 5px;
    position: relative; display: flex; align-items: center; justify-content: center;
    transition: border-color 0.18s, background 0.18s;
  }
  .check-mark svg { width: 13px; height: 13px; stroke: #fff; opacity: 0; transition: opacity 0.18s; }
  .check-opt:hover .check-mark { border-color: var(--blue); }
  .check-opt input:checked + .check-mark { background: var(--blue); border-color: var(--blue); }
  .check-opt input:checked + .check-mark svg { opacity: 1; }
  .check-opt input:checked ~ .check-text { color: var(--blue); font-weight: 700; }
  .form-row.has-error .check-mark { border-color: var(--red); }

  /* text inputs */
  .field-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
  input[type="text"], input[type="tel"], input[type="email"], textarea {
    font-family: inherit; font-size: 15px; color: var(--gray-text);
    background: #fbfaf8;
    border: 1.5px solid rgba(27,94,174,0.18);
    border-radius: 10px;
    padding: 11px 14px;
    transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
    width: 100%;
  }
  .input-md { max-width: 280px; }
  input:focus, textarea:focus {
    outline: none; border-color: var(--blue); background: #fff;
    box-shadow: 0 0 0 3px rgba(27,94,174,0.12);
  }
  input::placeholder, textarea::placeholder { color: #b8b2a8; }
  .field-eg { font-size: 13.5px; color: var(--gray-sub); white-space: nowrap; }
  textarea { resize: vertical; min-height: 130px; line-height: 1.7; }
  .field-hint { font-size: 12.5px; color: var(--gray-sub); margin-top: 8px; }
  .field-hint.warn { color: var(--red); }

  .err-msg { color: var(--red); font-size: 12.5px; font-weight: 700; margin-top: 8px; display: none; }
  .form-row.has-error .err-msg { display: block; }
  .form-row.has-error input, .form-row.has-error textarea { border-color: var(--red); background: #fff6f5; }
  .form-row.has-error .radio-mark { border-color: var(--red); }

  /* selects */
  select {
    font-family: inherit; font-size: 15px; color: var(--gray-text);
    background: #fbfaf8;
    border: 1.5px solid rgba(27,94,174,0.18);
    border-radius: 8px;
    padding: 11px 40px 11px 14px;
    width: 100%; max-width: 280px;
    cursor: pointer; -webkit-appearance: none; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231B5EAE' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 13px center; background-size: 16px;
  }
  select:focus { outline: none; border-color: var(--blue); background-color: #fff; box-shadow: 0 0 0 3px rgba(27,94,174,0.12); }
  .form-row.has-error select { border-color: var(--red); background-color: #fff6f5; }
  .input-zip { max-width: 110px; text-align: center; }
  .zip-sep { color: var(--gray-sub); font-weight: 700; }

  /* property section (リフォーム選択時) */
  /* 物件概要の表示制御は .relo-conditional.is-hidden で行う */
  .prop-header { display: flex; justify-content: center; margin: 40px 0 4px; position: relative; z-index: 2; }
  .prop-header span {
    color: var(--blue); font-weight: 900;
    font-size: 19px; letter-spacing: 0.1em;
  }
  @media (min-width: 768px) { .prop-header span { font-size: 22px; } }

  /* privacy box */
  .privacy-box {
    margin-top: 34px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fcfbf8;
    padding: 22px 22px;
    font-size: 13px; line-height: 1.95; color: var(--gray-text);
  }
  @media (min-width: 768px) { .privacy-box { padding: 28px 32px; font-size: 13.5px; } }
  .privacy-box h3 { font-size: 14px; font-weight: 700; color: #1a2840; margin-bottom: 8px; }
  .privacy-box a { color: var(--blue); font-weight: 700; text-decoration: none; }
  .privacy-box a:hover { text-decoration: underline; }

  .form-warn {
    text-align: center; color: var(--red); font-weight: 700;
    font-size: 13.5px; line-height: 1.8; margin: 30px auto 0; max-width: 720px;
  }
  @media (min-width: 768px) { .form-warn { font-size: 14.5px; } }

  .agree-wrap { display: flex; justify-content: center; margin: 22px 0 36px; }
  .agree {
    display: inline-flex; align-items: center; gap: 12px;
    cursor: pointer; font-size: 15px; font-weight: 700; color: var(--gray-text);
  }
  @media (min-width: 768px) { .agree { font-size: 16.5px; } }
  .agree input { position: absolute; opacity: 0; pointer-events: none; }
  .agree-mark {
    flex-shrink: 0; width: 24px; height: 24px;
    border: 1.5px solid rgba(27,94,174,0.45); border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.18s, border-color 0.18s;
  }
  .agree-mark svg { width: 15px; height: 15px; stroke: #fff; opacity: 0; transition: opacity 0.18s; }
  .agree input:checked + .agree-mark { background: var(--blue); border-color: var(--blue); }
  .agree input:checked + .agree-mark svg { opacity: 1; }

  /* submit */
  .submit-wrap { display: flex; justify-content: center; }
  .btn-submit {
    display: inline-flex; align-items: center; justify-content: center; gap: 14px;
    background: linear-gradient(135deg, #f5891e 0%, #e86f10 100%);
    color: white; font-size: 16px; font-weight: 700; font-family: inherit;
    letter-spacing: 0.02em;
    padding: 17px 44px; border-radius: 50px; border: none; cursor: pointer;
    box-shadow: 0 8px 26px rgba(240,120,32,0.38);
    transition: transform 0.18s, box-shadow 0.18s, opacity 0.18s;
  }
  @media (min-width: 768px) { .btn-submit { font-size: 17px; padding: 18px 56px; } }
  .btn-submit:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(240,120,32,0.48); }
  .btn-submit .arrow {
    width: 28px; height: 28px; border-radius: 50%;
    background: rgba(255,255,255,0.22);
    display: flex; align-items: center; justify-content: center;
  }
  .btn-submit .arrow svg { width: 14px; height: 14px; stroke: #fff; }
  .btn-submit:disabled { opacity: 0.42; cursor: not-allowed; transform: none; box-shadow: 0 6px 20px rgba(240,120,32,0.22); }

  .btn-ghost {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: #fff; color: var(--blue);
    border: 1.5px solid rgba(27,94,174,0.3);
    font-size: 15px; font-weight: 700; font-family: inherit;
    padding: 16px 36px; border-radius: 50px; cursor: pointer;
    transition: background 0.18s, border-color 0.18s;
  }
  .btn-ghost:hover { background: var(--blue-light); border-color: var(--blue); }

  /* ── Confirm view ── */
  .confirm-list .form-row { display: block; }
  @media (min-width: 768px) {
    .confirm-list .form-row { display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: start; }
  }
  .confirm-val { font-size: 15px; color: var(--gray-text); white-space: pre-wrap; word-break: break-word; line-height: 1.8; }
  .confirm-val.empty { color: var(--gray-sub); }
  .confirm-label { color: var(--blue); font-weight: 700; font-size: 15px; margin-bottom: 10px; }
  @media (min-width: 768px) { .confirm-label { margin-bottom: 0; padding-top: 2px; } }
  .confirm-actions {
    display: flex; flex-direction: column-reverse; gap: 16px;
    align-items: center; margin-top: 36px;
  }
  @media (min-width: 600px) { .confirm-actions { flex-direction: row; justify-content: center; } }

  /* ── Thanks view ── */
  .thanks {
    text-align: center; padding: 70px 0 90px;
  }
  .thanks-icon {
    width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 28px;
    background: var(--blue-light); color: var(--blue);
    display: flex; align-items: center; justify-content: center;
  }
  .thanks-icon svg { width: 38px; height: 38px; stroke: var(--blue); }
  .thanks h2 { font-size: 24px; font-weight: 900; color: #1a2840; margin-bottom: 18px; letter-spacing: 0.02em; }
  @media (min-width: 768px) { .thanks h2 { font-size: 30px; } }
  .thanks p { font-size: 14.5px; color: var(--gray-text); line-height: 1.95; max-width: 560px; margin: 0 auto 32px; }

  .hidden { display: none !important; }

  /* ── Footer ── */
  .footer { background: #0f1e3a; padding: 28px 20px; text-align: center; }
  .footer-logo { font-size: 13px; font-weight: 700; color: rgba(255,255,255,0.7); margin-bottom: 8px; }
  .footer-copy { font-size: 11px; color: rgba(255,255,255,0.3); letter-spacing: 0.06em; }


  /* ── プラグイン追加分 ── */

  /* 条件付きブロックの表示制御（JS が is-hidden をトグル） */
  .relo-conditional.is-hidden { display: none !important; }

  /* スパム対策のハニーポット（画面外へ隠す） */
  .relocation-lp-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px; height: 1px;
    opacity: 0; pointer-events: none;
  }

  /* 確認画面の送信エラー表示 */
  .send-error {
    display: none;
    margin: 18px auto 0; max-width: 720px;
    color: var(--red); font-weight: 700; font-size: 13.5px;
    text-align: center; line-height: 1.8;
  }
  .send-error.is-visible { display: block; }

  /* 条件付きブロック内のネスト要素（発送先の住所欄・送付先ラジオ）も隠す */
  .is-hidden { display: none !important; }

  /* 日付入力（ご希望訪問日時：ネイティブ date ピッカー） */
  input[type="date"] {
    font-family: inherit; font-size: 15px; color: var(--gray-text);
    background: #fbfaf8;
    border: 1.5px solid rgba(27,94,174,0.18);
    border-radius: 10px;
    padding: 10px 14px;
    transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
  }
  input[type="date"]:focus {
    outline: none; border-color: var(--blue); background: #fff;
    box-shadow: 0 0 0 3px rgba(27,94,174,0.12);
  }
  .input-date { max-width: 200px; }
  .form-row.has-error input[type="date"] { border-color: var(--red); background: #fff6f5; }

  /* ご希望訪問日時：第1希望／第2希望のインライン行 */
  .visit-line { align-items: center; margin-bottom: 12px; }
  .visit-line:last-of-type { margin-bottom: 0; }
  .visit-pref { font-size: 14px; font-weight: 700; color: var(--blue); white-space: nowrap; }
  .visit-line .input-date { max-width: 170px; }
  .visit-line .select-md { max-width: 170px; }
