/* お問い合わせ（ナニーサービス）
   /familycare/contact/nanny-personal/ と /familycare/contact/nanny-corporation/
   header.php がこの2ページのときだけ読み込む。
   .head .body .card .btn .nav などクラス名が汎用なので、全セレクタを
   #rnw-nanny 配下にスコープしている。 */

#rnw-nanny {
  --nanny: #d4537e;
  --nanny-deep: #b23d64;
  --nanny-soft: #fbeaf0;
  --ink: #33384a;
  --sub: #8a90a2;
  --line: #e3e6ee;
  --bg: #f4eef1;

  margin: 0;
  font-family: -apple-system, "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.75;
  padding: 32px 16px;
  -webkit-font-smoothing: antialiased;
}

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

/* --- 旧CSS（/familycare/css/*.css）の打ち消し ---
   .head .body .card .btn .nav などは汎用名のため、旧CSS側の指定がこのフォームにも
   当たる。#rnw-nanny スコープで詳細度は勝つが、こちらが指定していないプロパティは
   漏れてくるので、ここで初期化しておく。 */
#rnw-nanny h1,
#rnw-nanny p,
#rnw-nanny dl,
#rnw-nanny dt,
#rnw-nanny dd,
#rnw-nanny form,
#rnw-nanny label { margin: 0; padding: 0; background: none; border: 0; }

#rnw-nanny input[type="text"],
#rnw-nanny input[type="checkbox"],
#rnw-nanny input[type="radio"],
#rnw-nanny select,
#rnw-nanny textarea { margin: 0; background: none; box-shadow: none; }

#rnw-nanny .shell { max-width: 640px; margin: 0 auto; }

#rnw-nanny .head { background: linear-gradient(135deg, var(--nanny) 0%, var(--nanny-deep) 100%); color: #fff; border-radius: 16px 16px 0 0; padding: 30px 32px 26px; }
#rnw-nanny .head h1 { margin: 0 0 6px; font-size: 20px; letter-spacing: .04em; }
#rnw-nanny .head p { margin: 0; font-size: 12.5px; color: rgba(255,255,255,.85); }

#rnw-nanny .steps { display: flex; margin: 22px 0 2px; }
#rnw-nanny .snode { flex: 1; text-align: center; position: relative; }
#rnw-nanny .snode::before { content: ""; position: absolute; top: 13px; left: -50%; width: 100%; height: 2px; background: rgba(255,255,255,.24); }
#rnw-nanny .snode:first-child::before { display: none; }
#rnw-nanny .snode.done::before, #rnw-nanny .snode.active::before { background: rgba(255,255,255,.9); }
#rnw-nanny .sdot { width: 28px; height: 28px; border-radius: 50%; margin: 0 auto 6px; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: rgba(255,255,255,.2); color: #fff; position: relative; z-index: 1; transition: background .25s, transform .25s; }
#rnw-nanny .snode.active .sdot { background: #fff; color: var(--nanny); transform: scale(1.08); }
#rnw-nanny .snode.done .sdot { background: rgba(255,255,255,.9); color: var(--nanny); }
#rnw-nanny .slabel { font-size: 10.5px; color: rgba(255,255,255,.8); }
#rnw-nanny .snode.active .slabel { color: #fff; }

#rnw-nanny .body { background: #fff; border-radius: 0 0 16px 16px; padding: 30px 32px 34px; box-shadow: 0 8px 30px rgba(178,61,100,.1); }
#rnw-nanny .panel { display: none; animation: rnw-nanny-fade .3s ease; }
#rnw-nanny .panel.active { display: block; }
@keyframes rnw-nanny-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

#rnw-nanny .lead { text-align: center; font-size: 15px; font-weight: 600; margin: 4px 0 8px; }
#rnw-nanny .psub { text-align: center; font-size: 12.5px; color: var(--sub); margin: 0 0 22px; }
#rnw-nanny .qhead { font-size: 14px; font-weight: 600; margin: 24px 0 12px; padding-top: 20px; border-top: 1px solid var(--line); }
#rnw-nanny .qhead:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }

#rnw-nanny .cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
#rnw-nanny .card { border: 2px solid var(--line); border-radius: 12px; padding: 16px 14px; cursor: pointer; transition: border-color .2s, box-shadow .2s, background .2s; position: relative; display: flex; align-items: center; min-height: 56px; }
#rnw-nanny .card:hover { border-color: var(--nanny); }
#rnw-nanny .card.selected { border-color: var(--nanny); background: var(--nanny-soft); box-shadow: 0 4px 14px rgba(178,61,100,.16); }
#rnw-nanny .card .tt { font-size: 13px; font-weight: 700; padding-right: 22px; }
#rnw-nanny .card .chk { position: absolute; top: 10px; right: 10px; width: 20px; height: 20px; border-radius: 5px; border: 2px solid var(--line); display: grid; place-items: center; font-size: 12px; color: #fff; }
#rnw-nanny .card.selected .chk { background: var(--nanny); border-color: var(--nanny); }
#rnw-nanny .card input { position: absolute; opacity: 0; pointer-events: none; }
#rnw-nanny .card.wide { grid-column: 1 / -1; }

#rnw-nanny .radios { display: flex; flex-direction: column; gap: 10px; }
#rnw-nanny .radio-row { display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--line); border-radius: 10px; padding: 13px 16px; cursor: pointer; font-size: 14px; transition: border-color .2s, background .2s; }
#rnw-nanny .radio-row:hover { border-color: var(--nanny); }
#rnw-nanny .radio-row.selected { border-color: var(--nanny); background: var(--nanny-soft); }
#rnw-nanny .radio-row .dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); flex: 0 0 auto; position: relative; }
#rnw-nanny .radio-row.selected .dot { border-color: var(--nanny); }
#rnw-nanny .radio-row.selected .dot::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--nanny); }
#rnw-nanny .radio-row input { position: absolute; opacity: 0; pointer-events: none; }

#rnw-nanny .field { margin-bottom: 18px; }
#rnw-nanny .field .lbl { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
#rnw-nanny .req { color: var(--nanny); font-size: 11px; margin-left: 6px; }
#rnw-nanny .opt { color: var(--sub); font-size: 11px; margin-left: 6px; }
#rnw-nanny .field input[type="text"], #rnw-nanny .field select, #rnw-nanny .field textarea { width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 8px; font-size: 15px; font-family: inherit; background: #fbfcfe; }
#rnw-nanny .field textarea { min-height: 84px; resize: vertical; }
#rnw-nanny .field input:focus, #rnw-nanny .field select:focus, #rnw-nanny .field textarea:focus { outline: none; border-color: var(--nanny); background: #fff; }
#rnw-nanny .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
#rnw-nanny .hint { font-size: 11.5px; color: var(--sub); margin-top: 5px; }
#rnw-nanny .err { color: #d64d6d; font-size: 12px; margin-top: 5px; }

/* formrun SDK のエラー表示。SDKは該当欄の error 要素に formrun-system-show を
   付け外しするだけで display は面倒を見ないので、既定を隠してここで出す。
   （id が付いている err1・errCorp はステップ判定用で、インラインstyleで制御している） */
#rnw-nanny [data-formrun-show-if-error] { display: none; }
#rnw-nanny [data-formrun-show-if-error].formrun-system-show { display: block; }

#rnw-nanny .consent { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; background: #f7f8fb; padding: 14px 16px; border-radius: 8px; }
#rnw-nanny .consent input { margin-top: 4px; }

#rnw-nanny .review { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 8px; }
#rnw-nanny .review dl { margin: 0; display: grid; grid-template-columns: 40% 60%; }
#rnw-nanny .review dt { background: #f7f8fb; padding: 11px 14px; font-size: 12.5px; color: var(--sub); border-bottom: 1px solid var(--line); }
#rnw-nanny .review dd { margin: 0; padding: 11px 14px; font-size: 13.5px; border-bottom: 1px solid var(--line); word-break: break-all; }
#rnw-nanny .review dl:last-child dt, #rnw-nanny .review dl:last-child dd { border-bottom: none; }

#rnw-nanny .nav { display: flex; gap: 12px; margin-top: 26px; }
#rnw-nanny .btn { flex: 1; padding: 13px; border-radius: 26px; font-size: 14.5px; font-weight: 700; font-family: inherit; cursor: pointer; border: none; transition: background .2s, opacity .2s; }
#rnw-nanny .btn-next { background: var(--nanny); color: #fff; }
#rnw-nanny .btn-next:hover { background: var(--nanny-deep); }
#rnw-nanny .btn-back { background: #fff; color: var(--nanny); border: 1.5px solid var(--line); flex: 0 0 120px; }
#rnw-nanny .btn-back:hover { border-color: var(--nanny); }
#rnw-nanny .btn-submit { background: var(--nanny); color: #fff; }
#rnw-nanny .btn-submit:disabled { opacity: .45; cursor: not-allowed; }

@media (max-width: 480px) {
  #rnw-nanny .cards, #rnw-nanny .row2, #rnw-nanny .review dl { grid-template-columns: 1fr; }
  #rnw-nanny .review dt { border-bottom: none; }
  #rnw-nanny .head, #rnw-nanny .body { padding-left: 20px; padding-right: 20px; }
  #rnw-nanny .slabel { font-size: 9.5px; }
}
