/* ご相談フォーム */
.rf-contact {
  --rf-paper: var(--paper, #f5f2ec);
  --rf-paper-2: var(--paper-2, #ece6db);
  --rf-white: var(--white, #fffdf9);
  --rf-sand: var(--sand, #b9a98f);
  --rf-ink: var(--ink, #23211e);
  --rf-ink-2: var(--ink-2, #47433d);
  --rf-muted: var(--muted, #6b655c);
  --rf-line: var(--line, #d8cfbf);
  --rf-accent: var(--accent, #2f5061);
  --rf-accent-dark: var(--accent-dark, #223b48);
  --rf-accent-pale: var(--accent-pale, #e3e9ea);
  --rf-line-green: var(--line-green, #06C755);
  --rf-line-green-dark: var(--line-green-dark, #05B34C);
  --rf-serif: var(--serif, 'Noto Serif JP', 'Hiragino Mincho ProN', serif);
  --rf-sans: var(--sans, 'Noto Sans JP', 'Hiragino Sans', system-ui, sans-serif);
  --rf-err: #a3322b;
  --rf-err-pale: #fbefec;
  --rf-r: 14px;

  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  font-family: var(--rf-sans);
  color: var(--rf-ink);
  font-size: 17px;
  line-height: 1.8;
}
.rf-contact *, .rf-contact *::before, .rf-contact *::after { box-sizing: border-box; }
.rf-contact p { margin: 0; }
.rf-contact svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

@media (min-width: 900px) {
  .rf-contact { grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
  .rf-aside { position: sticky; top: calc(var(--hh, 0px) + 24px); }
}

/* フォームの台紙 */
.rf-form {
  background: var(--rf-white);
  border: 1px solid var(--rf-line);
  border-radius: 20px;
  padding: 28px 16px 32px;
}
@media (min-width: 600px) { .rf-form { padding: 40px 40px 44px; } }

.rf-intro {
  display: grid; gap: 4px;
  padding: 16px 20px;
  background: var(--rf-paper);
  border-left: 4px solid var(--rf-accent);
  border-radius: 0 10px 10px 0;
  margin-bottom: 8px;
}
.rf-intro-lead { font-family: var(--rf-serif); font-size: 1.2rem; font-weight: 600; letter-spacing: .04em; color: var(--rf-accent-dark); }
.rf-intro-text { font-size: 1rem; color: var(--rf-ink-2); }
.rf-intro-text .rf-badge { margin: 0 2px; vertical-align: 2px; }

/* 番号つきの見出し */
.rf-step { border: 0; margin: 0; padding: 32px 0 0; min-width: 0; }
.rf-step + .rf-step { border-top: 1px solid var(--rf-line); margin-top: 32px; }
.rf-step-head {
  display: flex; align-items: center; flex-wrap: nowrap; gap: 10px;
  float: left; padding: 0; margin: 0 0 16px; width: 100%;
  font-family: var(--rf-serif); font-size: 1.25rem; font-weight: 600; letter-spacing: .04em; line-height: 1.5;
}
.rf-step-head + * { clear: both; }
.rf-step-no {
  flex: none; display: inline-grid; place-items: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--rf-accent); color: #fff;
  font-family: var(--rf-serif); font-size: 1.1rem; font-weight: 600; line-height: 1;
}
.rf-step-title small { font-size: .85rem; font-weight: 500; color: var(--rf-muted); font-family: var(--rf-sans); letter-spacing: .02em; }

.rf-badge {
  display: inline-flex; align-items: center;
  padding: 1px 10px; border-radius: 4px;
  font-family: var(--rf-sans); font-size: .78rem; font-weight: 700; letter-spacing: .06em; line-height: 1.7;
  background: var(--rf-paper-2); color: var(--rf-muted);
}
.rf-badge--req { background: var(--rf-accent); color: #fff; }

.rf-help { font-size: .95rem; color: var(--rf-muted); margin-bottom: 12px !important; line-height: 1.7; }

/* 1 直したい場所の札 */
.rf-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 600px) { .rf-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; } }

.rf-tile { position: relative; display: block; cursor: pointer; }
.rf-tile input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.rf-tile-body {
  position: relative; height: 100%;
  display: flex; align-items: center; gap: 10px;
  min-height: 68px; padding: 10px 26px 10px 10px;
  background: var(--rf-white);
  border: 1.5px solid var(--rf-line); border-radius: var(--rf-r);
  transition: background-color .15s, border-color .15s, color .15s;
}
.rf-tile-ico { flex: none; width: 30px; height: 30px; color: var(--rf-accent); stroke-width: 1.5; }
.rf-tile-ico .rf-dot { stroke-width: 2.6; }
.rf-tile-name { font-size: 1rem; font-weight: 700; line-height: 1.4; }
.rf-tile-check {
  position: absolute; top: 7px; right: 7px;
  width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid var(--rf-line); background: var(--rf-white);
  display: grid; place-items: center;
}
.rf-tile-check svg { width: 14px; height: 14px; stroke-width: 2.6; color: #fff; opacity: 0; }

@media (min-width: 600px) {
  .rf-tile-body { flex-direction: column; justify-content: center; text-align: center; gap: 8px; min-height: 118px; padding: 18px 10px 14px; }
  .rf-tile-ico { width: 42px; height: 42px; }
  .rf-tile-check { top: 10px; right: 10px; transform: none; }
}

.rf-tile:hover .rf-tile-body { border-color: var(--rf-sand); }
.rf-tile input:checked + .rf-tile-body { background: var(--rf-accent-pale); border-color: var(--rf-accent); color: var(--rf-accent-dark); }
.rf-tile input:checked + .rf-tile-body .rf-tile-check { background: var(--rf-accent); border-color: var(--rf-accent); }
.rf-tile input:checked + .rf-tile-body .rf-tile-check svg { opacity: 1; }
.rf-tile input:focus-visible + .rf-tile-body { outline: 3px solid var(--rf-accent); outline-offset: 3px; }

/* 2 3 と連絡方法のチップ */
.rf-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.rf-chip { position: relative; cursor: pointer; }
.rf-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.rf-chip span {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 52px; padding: 10px 20px;
  border-radius: 999px; border: 1.5px solid var(--rf-line); background: var(--rf-white);
  font-size: 1rem; font-weight: 500; line-height: 1.4; color: var(--rf-ink);
  transition: background-color .15s, border-color .15s, color .15s;
}
.rf-chip:hover span { border-color: var(--rf-sand); }
.rf-chip input:checked + span { background: var(--rf-accent); border-color: var(--rf-accent); color: #fff; font-weight: 700; }
.rf-chip input:checked + span::before {
  content: ""; width: 12px; height: 7px; margin: -3px 2px 0 -4px;
  border-left: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: rotate(-45deg);
}
.rf-chip input:focus-visible + span { outline: 3px solid var(--rf-accent); outline-offset: 3px; }

/* 4 写真 */
.rf-drop {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  gap: 4px; min-height: 150px; padding: 22px 16px;
  border: 2px dashed var(--rf-sand); border-radius: var(--rf-r);
  background: var(--rf-paper); cursor: pointer;
  transition: background-color .15s, border-color .15s;
}
.rf-drop:hover, .rf-drop.rf-is-drag { border-color: var(--rf-accent); background: var(--rf-accent-pale); }
.rf-drop:focus-within { outline: 3px solid var(--rf-accent); outline-offset: 3px; }
.rf-drop-ico { width: 40px; height: 40px; color: var(--rf-accent); margin-bottom: 4px; }
.rf-drop-main { font-weight: 700; font-size: 1.05rem; color: var(--rf-accent-dark); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.rf-drop-sub { font-size: .92rem; color: var(--rf-muted); line-height: 1.6; }
.rf-drop-sub--pc { display: none; }
@media (min-width: 900px) and (hover: hover) {
  .rf-drop-sub--pc { display: block; }
  .rf-drop-sub--sp { display: none; }
}
.rf-drop-input { margin-top: 12px; font-size: 16px; max-width: 100%; }
.rf-js .rf-drop-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; }

.rf-thumbs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.rf-thumbs:not(:empty) { margin-top: 14px; }
.rf-thumb { position: relative; width: 96px; }
.rf-thumb img { display: block; width: 96px; height: 96px; object-fit: cover; border-radius: 10px; border: 1px solid var(--rf-line); background: var(--rf-paper-2); }
.rf-thumb-del {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  width: 100%; min-height: 40px; margin-top: 6px; padding: 4px 6px;
  border: 1.5px solid var(--rf-line); border-radius: 999px; background: var(--rf-white);
  font: inherit; font-size: .88rem; font-weight: 700; color: var(--rf-ink-2); cursor: pointer;
}
.rf-thumb-del svg { width: 14px; height: 14px; stroke-width: 2.2; }
.rf-thumb-del:hover { border-color: var(--rf-err); color: var(--rf-err); }
.rf-thumb-del:focus-visible { outline: 3px solid var(--rf-accent); outline-offset: 2px; }

/* 5 ご連絡先 */
.rf-field { margin: 0 0 22px; min-width: 0; }
.rf-subset { border: 0; padding: 0; }
.rf-label {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  padding: 0; margin: 0 0 8px; font-size: 1rem; font-weight: 700; line-height: 1.5; color: var(--rf-ink);
}
.rf-label--sub { font-weight: 500; color: var(--rf-ink-2); font-size: .98rem; }
.rf-input {
  display: block; width: 100%; min-height: 56px; padding: 12px 16px;
  border: 1.5px solid var(--rf-line); border-radius: 10px; background: #fff;
  font-family: var(--rf-sans); font-size: 17px; line-height: 1.5; color: var(--rf-ink);
  transition: border-color .15s, background-color .15s;
  -webkit-appearance: none; appearance: none;
}
.rf-input::placeholder { color: #9a9286; }
.rf-input:hover { border-color: var(--rf-sand); }
.rf-input:focus { outline: 3px solid var(--rf-accent-pale); border-color: var(--rf-accent); }
.rf-textarea { min-height: 150px; resize: vertical; }
.rf-select-wrap { position: relative; max-width: 360px; }
.rf-select-wrap::after {
  content: ""; position: absolute; right: 20px; top: 50%; width: 9px; height: 9px; margin-top: -7px;
  border-right: 2px solid var(--rf-ink-2); border-bottom: 2px solid var(--rf-ink-2); transform: rotate(45deg); pointer-events: none;
}
.rf-select { padding-right: 48px; cursor: pointer; }

.rf-pair { margin: 0 0 22px; padding: 18px 16px 4px; border-radius: var(--rf-r); background: var(--rf-paper); }
.rf-pair > .rf-label { margin-bottom: 2px; }
.rf-pair .rf-help { margin-bottom: 12px !important; }
.rf-pair-grid { display: grid; gap: 0 16px; }
@media (min-width: 600px) and (max-width: 899px), (min-width: 1200px) { .rf-pair-grid { grid-template-columns: 1fr 1fr; } }
.rf-pair .rf-field { margin-bottom: 14px; }
.rf-pair .rf-error:not(:empty) { margin: -4px 0 14px; }

/* 入力漏れの表示 */
.rf-error { font-size: .95rem; font-weight: 700; color: var(--rf-err); line-height: 1.6; }
.rf-error:not(:empty) { display: flex; gap: 6px; margin-top: 8px; }
.rf-error:not(:empty)::before {
  content: "!"; flex: none; display: inline-grid; place-items: center;
  width: 20px; height: 20px; margin-top: 2px; border-radius: 50%;
  background: var(--rf-err); color: #fff; font-size: .78rem; line-height: 1;
}
.rf-input[aria-invalid="true"] { border-color: var(--rf-err); background: var(--rf-err-pale); }
.rf-step.rf-is-invalid .rf-tile-body { border-color: #d9a39c; }

/* 送信 */
.rf-submit-area { margin-top: 36px; padding-top: 32px; border-top: 1px solid var(--rf-line); }
.rf-summary:not(:empty) {
  margin-bottom: 16px; padding: 14px 16px; border-radius: 10px;
  background: var(--rf-err-pale); color: var(--rf-err); font-weight: 700; font-size: 1rem; line-height: 1.7;
}
.rf-submit {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; min-height: 66px; padding: 14px 24px;
  border: 0; border-radius: 999px; background: var(--rf-accent); color: #fff;
  font-family: var(--rf-sans); font-size: 1.15rem; font-weight: 700; letter-spacing: .08em; cursor: pointer;
  transition: background-color .15s;
}
.rf-submit svg { width: 22px; height: 22px; stroke-width: 2; }
.rf-submit:hover { background: var(--rf-accent-dark); }
.rf-submit:focus-visible { outline: 3px solid var(--rf-accent); outline-offset: 3px; }
@media (min-width: 600px) { .rf-submit { max-width: 440px; margin: 0 auto; } }
.rf-submit-note { margin-top: 14px !important; text-align: center; font-size: .9rem; color: var(--rf-muted); line-height: 1.8; }

.rf-done {
  margin-top: 20px; padding: 20px; border-radius: var(--rf-r);
  background: var(--rf-accent-pale); border: 1.5px solid var(--rf-accent);
  font-size: 1rem; line-height: 1.8;
}
.rf-done[hidden] { display: none; }
.rf-done:focus { outline: 3px solid var(--rf-accent); outline-offset: 3px; }
.rf-done-title { font-family: var(--rf-serif); font-size: 1.2rem; font-weight: 600; color: var(--rf-accent-dark); margin-bottom: 6px !important; }

/* お電話・LINEの案内枠 */
.rf-aside-card {
  background: var(--rf-paper-2); border-radius: 20px; padding: 26px 22px;
}
.rf-aside-title { font-family: var(--rf-serif); font-size: 1.2rem; font-weight: 600; letter-spacing: .04em; line-height: 1.6; }
.rf-aside-text { margin-top: 8px !important; font-size: .95rem; color: var(--rf-ink-2); line-height: 1.8; }
.rf-aside-tel {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  margin-top: 16px; padding: 12px 14px; border-radius: 14px;
  background: var(--rf-white); border: 1px solid var(--rf-line); color: var(--rf-ink); text-decoration: none;
}
.rf-aside-tel:hover { border-color: var(--rf-sand); color: var(--rf-ink); }
.rf-aside-tel small { font-size: .8rem; color: var(--rf-muted); line-height: 1.6; }
.rf-aside-tel b { display: flex; align-items: center; gap: 8px; font-size: 1.45rem; letter-spacing: .06em; line-height: 1.5; }
.rf-aside-tel b svg { width: 22px; height: 22px; color: var(--rf-accent); }
.rf-aside-line {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: 10px; min-height: 56px; padding: 12px 20px; border-radius: 999px;
  background: var(--rf-line-green); color: #fff; font-weight: 700; font-size: 1rem; text-decoration: none;
}
.rf-aside-line:hover { background: var(--rf-line-green-dark); color: #fff; }
.rf-aside-line svg { width: 20px; height: 20px; }
.rf-aside-tel:focus-visible, .rf-aside-line:focus-visible { outline: 3px solid var(--rf-accent); outline-offset: 3px; }
.rf-aside-list { list-style: none; margin: 18px 0 0; padding: 16px 0 0; border-top: 1px solid var(--rf-line); display: grid; gap: 8px; }
.rf-aside-list li { position: relative; padding-left: 22px; font-size: .92rem; line-height: 1.7; color: var(--rf-ink-2); }
.rf-aside-list li::before {
  content: ""; position: absolute; left: 2px; top: .55em; width: 10px; height: 6px;
  border-left: 2px solid var(--rf-accent); border-bottom: 2px solid var(--rf-accent); transform: rotate(-45deg);
}

/* 狭い画面の調整 */
.rf-badge { flex: none; white-space: nowrap; }
.rf-tile-name { word-break: keep-all; overflow-wrap: anywhere; }
@media (max-width: 599px) {
  .rf-intro { padding: 14px 16px; }
  .rf-intro-lead { font-size: 1.08rem; }
  .rf-step-head { font-size: 1.12rem; }
  .rf-step-no { width: 34px; height: 34px; font-size: 1rem; }
}

/* 写真つきの札（900px以上） */
.rf-tile-photo { display: none; }
@media (min-width: 900px) {
  .rf-tile-body { justify-content: flex-start; padding: 10px 10px 14px; min-height: 0; }
  .rf-tile-photo { display: block; width: 100%; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--rf-paper-2); }
  .rf-tile-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .rf-tile-photo.is-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--rf-accent); background: linear-gradient(160deg, var(--rf-paper-2), var(--rf-paper)); border: 1px dashed var(--rf-sand); }
  .rf-tile-photo.is-empty svg { width: 52px; height: 52px; stroke-width: 1.3; }
  .rf-tile-photo.is-empty span { font-size: .8rem; color: var(--rf-muted); font-weight: 500; }
  .rf-tile-body .rf-tile-ico { width: 30px; height: 30px; margin-top: 4px; }
  .rf-tile-check { top: 16px; right: 16px; width: 26px; height: 26px; box-shadow: 0 1px 6px rgba(0,0,0,.18); }
  .rf-tile-check svg { width: 16px; height: 16px; }
  .rf-tile input:checked + .rf-tile-body { box-shadow: 0 0 0 1.5px var(--rf-accent) inset; }
}
