:root {
  color-scheme: light;
  --ink: #2d2925;
  --muted: #756d65;
  --paper: #f6f3ed;
  --surface: #fffefa;
  --wash: #f1ece3;
  --line: #d9d0c3;
  --accent: #87664e;
  --accent-dark: #5b4233;
  --accent-pale: #eee2d4;
  --vermillion: #a64b3c;
  --danger: #a13f35;
  --ok: #497258;
  --max: 900px;
  --shadow: 0 18px 48px rgba(74, 54, 40, .08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 2%, rgba(135, 102, 78, .08), transparent 25rem),
    linear-gradient(180deg, #fbfaf6 0, var(--paper) 28rem);
  font-family: "Noto Sans JP", "Yu Gothic", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

a { color: var(--accent-dark); text-underline-offset: .2em; }

.site-header {
  border-top: 4px solid var(--accent-dark);
  border-bottom: 1px solid rgba(91, 66, 51, .14);
  background: rgba(255, 254, 250, .94);
  backdrop-filter: blur(12px);
}

.site-header__inner,
main,
.site-footer__inner {
  width: min(calc(100% - 36px), var(--max));
  margin-inline: auto;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 88px;
  gap: 20px;
}

.brand-lockup { display: flex; align-items: center; gap: 12px; }

.brand-mark {
  display: block;
  width: 48px;
  height: 49px;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand {
  display: block;
  color: var(--ink);
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 1.25rem;
  letter-spacing: .1em;
  line-height: 1.25;
}

.brand-sub {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-family: Georgia, serif;
  font-size: .62rem;
  letter-spacing: .22em;
  line-height: 1;
}

.header-note {
  color: var(--muted);
  font-size: .78rem;
  letter-spacing: .04em;
}

main { padding-block: 58px 84px; }

.page-heading { text-align: center; }

.page-heading::after {
  content: "";
  display: block;
  width: 48px;
  height: 1px;
  margin: 24px auto 0;
  background: var(--accent);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-family: Georgia, serif;
  font-size: .76rem;
  letter-spacing: .26em;
}

h1, h2, h3 {
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 600;
  letter-spacing: .08em;
  line-height: 1.4;
}

.page-heading > p:last-child {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: .92rem;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 550px;
  margin: 42px auto 34px;
  padding: 0;
  list-style: none;
}

.steps li {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 7px;
  color: #9a9188;
  font-size: .8rem;
}

.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 15px;
  left: calc(50% + 20px);
  width: calc(100% - 40px);
  height: 1px;
  background: var(--line);
}

.steps span {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  font-family: Georgia, serif;
}

.steps .is-current { color: var(--accent-dark); }
.steps .is-current span { color: #fff; border-color: var(--accent-dark); background: var(--accent-dark); }

.lead,
.notice,
.contract-note,
.result-box {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.notice {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 0 0 34px;
  border-color: #ddcdb9;
  background: #fffaf1;
}

.notice-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  margin-top: 2px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--accent-dark);
  font-family: Georgia, serif;
  font-style: italic;
  font-weight: 700;
}

.notice strong { display: block; color: var(--accent-dark); }
.notice p { margin: 4px 0 0; color: #5f554c; font-size: .9rem; }

.form-section {
  margin-top: 28px;
  padding: 34px 38px 38px;
  border: 1px solid rgba(135, 102, 78, .2);
  border-radius: 14px;
  background: rgba(255, 254, 250, .97);
  box-shadow: var(--shadow);
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 0 0 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.section-number {
  flex: 0 0 auto;
  color: var(--accent);
  font-family: Georgia, serif;
  font-size: 1.35rem;
  font-style: italic;
}

.section-heading p {
  margin: 0 0 2px;
  color: var(--muted);
  font-family: Georgia, serif;
  font-size: .66rem;
  letter-spacing: .18em;
  line-height: 1.2;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 0;
  font-size: 1.28rem;
  font-weight: 600;
  letter-spacing: .04em;
  line-height: 1.45;
}

.form-section > h2 {
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 1.28rem;
}

.field { margin-top: 24px; }
.section-heading + .field { margin-top: 0; }

label,
.field-title {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

.required {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 7px;
  color: #fff;
  background: var(--vermillion);
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 700;
  line-height: 1.65;
  vertical-align: .12em;
}

.optional {
  margin-left: 8px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 400;
}

input,
select,
textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #bfb4a7;
  border-radius: 8px;
  font: inherit;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

input:hover,
select:hover,
textarea:hover { border-color: #978675; }

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(135, 102, 78, .13);
}

textarea { min-height: 130px; resize: vertical; }

.choice-list { display: grid; gap: 10px; }
.choice-list--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.choice-list label,
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: 0;
  font-weight: 400;
}

.choice-list--cards label {
  position: relative;
  align-items: center;
  min-height: 54px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.choice-list--cards label:hover {
  border-color: var(--accent);
  background: #fffaf4;
}

.choice-list--cards label:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-pale);
  box-shadow: inset 3px 0 0 var(--accent);
}

.choice-list input,
.check-row input {
  flex: 0 0 auto;
  width: 1.15rem;
  min-height: auto;
  height: 1.15rem;
  margin-top: .33rem;
  accent-color: var(--accent-dark);
}

.choice-list--cards input { margin-top: 0; }

.help {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: .86rem;
}

.fee-display {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--wash);
}

.fee-display span { color: var(--muted); font-size: .82rem; }
.fee-display strong { color: var(--accent-dark); font-family: "Yu Mincho", serif; font-size: 1.1rem; text-align: right; }

.field-error {
  margin: 7px 0 0;
  color: var(--danger);
  font-size: .88rem;
  font-weight: 700;
}

.has-error input,
.has-error select,
.has-error textarea { border-color: var(--danger); }

.conditional[hidden] { display: none; }

.contract-note { margin-top: 0; background: #f8f4ed; }
.contract-note h3 { margin: 0 0 14px; font-size: 1.05rem; }
.contract-note > p { margin: .45em 0; }
.contract-note dl { margin: 0; }
.contract-note dl div { display: grid; grid-template-columns: 8.2em 1fr; padding: 8px 0; border-top: 1px dotted #d3c8ba; }
.contract-note dl div:first-child { border-top: 0; }
.contract-note dt { color: var(--muted); font-size: .86rem; font-weight: 700; }
.contract-note dd { margin: 0; font-size: .9rem; }

.consent-list { display: grid; gap: 12px; margin-top: 20px; }

.check-row {
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
}

.check-row:has(input:checked) { border-color: var(--accent); background: #fffaf4; }

.legal-links { margin: 18px 0 0; text-align: center; font-size: .88rem; }

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 38px;
}

.submit-progress {
  margin: 1rem 0 0;
  text-align: center;
  color: var(--color-ink-soft);
  font-weight: 600;
}

.button:disabled {
  cursor: wait;
  opacity: .68;
}

.action-note { flex: 0 0 100%; margin: 0; color: var(--muted); font-size: .84rem; text-align: center; }

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-width: 250px;
  min-height: 54px;
  padding: 13px 24px;
  border: 1px solid var(--accent-dark);
  border-radius: 8px;
  font: inherit;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.button-primary {
  color: #fff;
  background: var(--accent-dark);
  box-shadow: 0 10px 24px rgba(91, 66, 51, .18);
}

.button-secondary { color: var(--accent-dark); background: #fff; }

.button:hover,
button:hover { transform: translateY(-1px); filter: brightness(.98); }

.button:focus-visible,
button:focus-visible { outline: 3px solid rgba(135, 102, 78, .3); outline-offset: 3px; }

.summary {
  width: 100%;
  margin-top: 20px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.summary th,
.summary td {
  padding: 13px 15px;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.summary tr:first-child th,
.summary tr:first-child td { border-top: 0; }
.summary th { width: 30%; color: #62584e; background: var(--wash); }

.result-box { margin-top: 28px; box-shadow: var(--shadow); }
.result-box h2 { margin-top: 0; }
.result-box--success { border-color: #b8cdbc; background: #f5faf6; }
.result-box--error { border-color: #dfb7b0; background: #fff8f6; }

.site-footer { border-top: 1px solid var(--line); background: #ede7de; }
.site-footer__inner { padding-block: 34px; text-align: center; }

.legal-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 10px;
  font-size: .86rem;
}

.copyright { margin: 12px 0 0; color: var(--muted); font-size: .78rem; }

.hp-field {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

@media (max-width: 640px) {
  body { font-size: 15px; }
  .site-header__inner { min-height: 74px; }
  .brand-mark { width: 38px; height: 38px; font-size: 1.25rem; }
  .brand { font-size: 1.08rem; }
  .header-note { display: none; }
  main { padding-block: 40px 60px; }
  .steps { margin-block: 34px 28px; }
  .form-section { padding: 25px 18px 28px; border-radius: 11px; }
  .section-heading { gap: 12px; margin-bottom: 24px; }
  .choice-list--two { grid-template-columns: 1fr; }
  .fee-display { align-items: flex-start; flex-direction: column; gap: 2px; }
  .fee-display strong { text-align: left; }
  .contract-note dl div { grid-template-columns: 1fr; gap: 2px; }
  .summary,
  .summary tbody,
  .summary tr,
  .summary th,
  .summary td { display: block; width: 100%; }
  .summary { border: 0; }
  .summary tr { margin-bottom: 12px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; }
  .summary th,
  .summary td { border: 0; }
  .summary th { border-bottom: 1px solid var(--line); }
  .button,
  button { width: 100%; min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
