:root {
  color-scheme: light;
  --cream: #fff9f2;
  --paper: #fffdfa;
  --beige: #f6ede3;
  --brown: #522c25;
  --muted: #79665f;
  --line: #e5d8cf;
  --roast: #b9320a;
  --roast-dark: #952707;
  --error: #a12716;
  --font-body: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 28px;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--brown);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-underline-offset: 4px;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
input,
select,
textarea,
summary,
a {
  -webkit-tap-highlight-color: rgb(185 50 10 / 12%);
}

:focus-visible {
  outline: 3px solid var(--roast);
  outline-offset: 4px;
}

h1,
h2,
h3,
p,
figure {
  margin: 0;
}

.preview-banner {
  padding: 9px 24px;
  border-bottom: 1px solid #e6d6bb;
  background: #f3e7cf;
  color: #624822;
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1200px;
  min-height: 105px;
  margin: 0 auto;
  padding: 21px 44px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
  text-decoration: none;
}

.brand img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.brand span {
  max-width: 190px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.65;
  letter-spacing: 0.12em;
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 12px;
  text-decoration: none;
  white-space: nowrap;
}

.back-link:hover {
  color: var(--roast);
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 44px 100px;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr);
  align-items: center;
  gap: 72px;
  padding: 66px 0 59px;
}

.intro-copy,
.intro-photo,
.form-aside,
.form-panel,
.field {
  min-width: 0;
}

.eyebrow {
  margin-bottom: 20px;
  color: var(--roast);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1.7;
}

h1 {
  margin-bottom: 25px;
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 600;
  letter-spacing: 0.045em;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.lead {
  max-width: 540px;
  font-size: 15px;
  line-height: 2.1;
}

.intro-notes {
  margin: 25px 0 0;
  padding: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.95;
  list-style: none;
}

.intro-notes li + li {
  margin-top: 5px;
}

.intro-photo img {
  width: 100%;
  aspect-ratio: 1 / 1.08;
  border-radius: 2px;
  object-fit: cover;
  object-position: 50% 50%;
}

.intro-photo figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-align: right;
}

.process {
  margin-bottom: 56px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.process ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 24px 0;
  list-style: none;
  counter-reset: process;
}

.process li {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  column-gap: 14px;
  align-items: baseline;
  min-width: 0;
  padding: 0 26px;
  counter-increment: process;
}

.process li + li {
  border-left: 1px solid var(--line);
}

.process li::before {
  grid-column: 1;
  grid-row: 1 / 3;
  content: "0" counter(process);
  color: var(--roast);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.process strong {
  grid-column: 2;
  font-size: 13px;
  font-weight: 600;
}

.process span {
  grid-column: 2;
  color: var(--muted);
  font-size: 11px;
}

.form-layout {
  display: grid;
  grid-template-columns: 242px minmax(0, 1fr);
  align-items: start;
  gap: 44px;
}

.aside-card {
  padding-top: 22px;
  border-top: 2px solid var(--brown);
}

.aside-card h2 {
  margin-bottom: 18px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.aside-card p,
.aside-card ol,
.aside-card ul {
  color: var(--muted);
  font-size: 12px;
  line-height: 2;
}

.aside-card p + p {
  margin-top: 14px;
}

.aside-card ol,
.aside-card ul {
  margin: 21px 0 0;
  padding-left: 19px;
}

.aside-card li + li {
  margin-top: 12px;
}

.aside-card a {
  display: inline-block;
  padding: 8px 0;
}

.form-panel {
  padding: 40px 40px 36px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
}

.form-section {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.form-section + .form-section {
  margin-top: 42px;
  padding-top: 35px;
  border-top: 1px solid var(--line);
}

.form-section legend {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  padding: 0;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0.035em;
}

.form-section + .form-section legend {
  padding-top: 8px;
  padding-right: 12px;
}

.section-number {
  color: var(--roast);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.section-intro {
  margin: 13px 0 25px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.9;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 25px 20px;
}

.field.full {
  grid-column: 1 / -1;
}

.field > label,
.field > .field-label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.8;
}

.required {
  display: inline-block;
  margin-left: 7px;
  color: var(--roast);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.6;
  vertical-align: 1px;
}

.hint {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}

input:not([type="radio"]):not([type="checkbox"]),
select,
textarea {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #cdbcb0;
  border-radius: 2px;
  background-color: #fff;
  color: var(--brown);
  font-size: 16px;
  line-height: 1.5;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

select {
  padding-right: 30px;
}

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

input::placeholder,
textarea::placeholder {
  color: #8b8079;
  opacity: 1;
}

input:not([type="radio"]):not([type="checkbox"]):focus,
select:focus,
textarea:focus {
  border-color: var(--brown);
  box-shadow: 0 0 0 2px rgb(82 44 37 / 8%);
}

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--error);
  background-color: #fff9f6;
}

.field-error {
  margin-top: 7px;
  color: var(--error);
  font-size: 12px;
  line-height: 1.75;
}

.field-error:empty {
  display: none;
}

.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.choice {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
}

.choice:has(input:checked) {
  border-color: var(--brown);
  background: var(--beige);
}

input[type="radio"],
input[type="checkbox"] {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  margin: 0;
  accent-color: var(--brown);
  cursor: pointer;
}

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

.consent-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 48px;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #fff;
  cursor: pointer;
}

.consent-card:has(input:checked) {
  border-color: #bbaa99;
  background: #faf5ed;
}

.consent-card input {
  margin-top: 3px;
}

.consent-card span {
  min-width: 0;
}

.consent-card strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.8;
}

.consent-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.85;
}

.privacy-note {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.privacy-note summary {
  min-height: 48px;
  padding: 14px 0;
  color: var(--brown);
  cursor: pointer;
}

.privacy-note p,
.privacy-note ul {
  margin: 0 0 18px;
  line-height: 1.9;
}

.privacy-note ul {
  padding-left: 18px;
}

.form-actions {
  margin-top: 34px;
  text-align: center;
}

.form-actions p {
  margin-bottom: 17px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.85;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-width: 240px;
  min-height: 54px;
  max-width: 100%;
  padding: 15px 25px;
  border: 1px solid var(--roast);
  border-radius: 2px;
  background: var(--roast);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0.04em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease;
}

.button:hover {
  border-color: var(--roast-dark);
  background: var(--roast-dark);
}

.button-secondary {
  border-color: #cdbcb0;
  background: transparent;
  color: var(--brown);
}

.button-secondary:hover {
  border-color: var(--brown);
  background: var(--beige);
}

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

.error-summary {
  margin-bottom: 28px;
  padding: 18px 20px;
  border: 1px solid #d69d89;
  border-left: 3px solid var(--error);
  background: #fff3ec;
  color: var(--error);
  font-size: 13px;
  line-height: 1.8;
}

.error-summary h2 {
  font-size: 15px;
}

.error-summary ul {
  margin: 9px 0 0;
  padding-left: 19px;
}

.error-summary a {
  display: inline-block;
  padding: 5px 0;
}

#review-panel,
#complete-panel {
  scroll-margin-top: 28px;
}

#review-panel > h2,
#complete-panel h2 {
  margin-bottom: 12px;
  font-size: 25px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0.035em;
}

#review-panel > p,
#complete-panel > p {
  color: var(--muted);
  font-size: 13px;
}

.review-group {
  margin-top: 30px;
}

.review-group h3 {
  padding-bottom: 13px;
  border-bottom: 1px solid var(--brown);
  font-size: 16px;
  font-weight: 600;
}

.review-group dl {
  display: grid;
  grid-template-columns: minmax(105px, 0.8fr) minmax(0, 1.6fr);
  margin: 0;
  font-size: 13px;
}

.review-group dt,
.review-group dd {
  min-width: 0;
  margin: 0;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}

.review-group dt {
  padding-right: 20px;
  color: var(--muted);
}

.review-group dd {
  white-space: pre-wrap;
}

.review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.review-actions .button {
  flex: 1;
  min-width: 180px;
}

.verification-block {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.verification-block h3 { margin-bottom: 14px; font-size: 15px; }
.captcha-widget { max-width: 100%; min-height: 140px; }
.submission-status { margin-top: 14px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.verification-retry { margin-top: 16px; }
.submission-contact { display: block; width: fit-content; padding: 10px 0; font-size: 13px; }
.request-reference { overflow-wrap: anywhere; }

#complete-panel {
  padding-top: 12px;
  text-align: center;
}

.completion-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 0 auto 24px;
  border: 1px solid #b4b5a0;
  border-radius: 50%;
  background: #f2f2e8;
  color: #59643c;
  font-size: 24px;
  line-height: 1;
}

.completion-card {
  margin: 28px 0;
  padding: 23px;
  border: 1px solid var(--line);
  background: var(--beige);
  font-size: 13px;
  text-align: left;
}

.completion-card h3 {
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 600;
}

.completion-card p + p {
  margin-top: 10px;
}

.completion-card ul {
  margin: 12px 0 0;
  padding-left: 20px;
}

.site-footer {
  padding: 28px 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.07em;
  line-height: 1.9;
  text-align: center;
}

.site-footer p + p {
  margin-top: 6px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1000px) {
  .site-header {
    margin: 0 28px;
    padding-right: 0;
    padding-left: 0;
  }

  main {
    padding-right: 28px;
    padding-left: 28px;
  }

  .intro {
    gap: 38px;
  }

  .form-layout {
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 28px;
  }

  .form-panel {
    padding: 30px 26px;
  }

  .process li {
    padding-right: 18px;
    padding-left: 18px;
    column-gap: 8px;
  }
}

@media (max-width: 760px) {
  .site-header {
    min-height: 85px;
    margin: 0 22px;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .brand {
    gap: 10px;
  }

  .brand img {
    width: 46px;
    height: 46px;
  }

  .brand span {
    max-width: 145px;
    font-size: 9px;
  }

  .back-link {
    font-size: 11px;
  }

  main {
    padding: 0 22px 64px;
  }

  .intro {
    gap: 26px;
    padding-top: 42px;
    padding-bottom: 38px;
  }

  h1 {
    margin-bottom: 18px;
    font-size: 27px;
  }

  .lead {
    font-size: 13px;
    line-height: 2;
  }

  .eyebrow {
    margin-bottom: 15px;
    font-size: 10px;
  }

  .intro-notes {
    margin-top: 17px;
    font-size: 11px;
  }

  .process {
    margin-bottom: 36px;
  }

  .process ol {
    padding: 20px 0;
  }

  .process li {
    display: block;
    padding: 0 14px;
  }

  .process li::before,
  .process strong,
  .process span {
    display: block;
  }

  .process li::before {
    margin-bottom: 4px;
    font-size: 11px;
  }

  .process strong {
    font-size: 12px;
  }

  .process span {
    margin-top: 3px;
    font-size: 10px;
  }

  .form-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }

  .aside-card {
    padding-top: 18px;
  }

  .aside-card h2 {
    margin-bottom: 10px;
    font-size: 16px;
  }

  .aside-card ol,
  .aside-card ul {
    margin-top: 12px;
  }

  .aside-card li + li {
    margin-top: 5px;
  }

  .form-panel {
    padding: 30px 25px;
  }
}

@media (max-width: 520px) {
  .preview-banner {
    padding: 8px 18px;
    font-size: 10px;
    text-align: left;
  }

  .site-header {
    gap: 14px;
    margin-right: 18px;
    margin-left: 18px;
  }

  .brand span {
    max-width: 125px;
    font-size: 8px;
  }

  .back-link {
    font-size: 10px;
  }

  main {
    padding-right: 18px;
    padding-left: 18px;
  }

  .intro {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
    padding-top: 34px;
    padding-bottom: 30px;
  }

  h1 {
    font-size: 28px;
    line-height: 1.6;
  }

  .lead {
    font-size: 14px;
  }

  .intro-photo img {
    aspect-ratio: 1.85 / 1;
    object-position: 50% 48%;
  }

  .intro-photo figcaption {
    font-size: 9px;
  }

  .process li {
    padding: 0 10px;
  }

  .process li:first-child {
    padding-left: 0;
  }

  .process li:last-child {
    padding-right: 0;
  }

  .process strong {
    font-size: 11px;
  }

  .form-panel {
    padding: 27px 19px;
  }

  .form-section legend {
    gap: 9px;
    font-size: 17px;
  }

  .form-section + .form-section {
    margin-top: 34px;
    padding-top: 27px;
  }

  .field-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .section-intro {
    margin-bottom: 23px;
  }

  .choice-row {
    gap: 8px;
  }

  .choice {
    flex: 1 1 110px;
    padding: 10px 12px;
    font-size: 12px;
  }

  .consent-card {
    gap: 10px;
    padding: 15px 13px;
  }

  .button {
    width: 100%;
    min-width: 0;
    padding-right: 18px;
    padding-left: 18px;
    font-size: 13px;
  }

  .review-group dl {
    display: block;
  }

  .review-group dt {
    padding: 15px 0 4px;
    border-bottom: 0;
    font-size: 11px;
  }

  .review-group dd {
    padding: 0 0 15px;
  }

  .review-actions {
    flex-direction: column;
  }

  .review-actions .button {
    min-width: 0;
  }

  #review-panel > h2,
  #complete-panel h2 {
    font-size: 22px;
  }

  .completion-card {
    padding: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Page integration details */
.skip-link { position: absolute; left: 12px; top: -80px; z-index: 10; padding: 12px; background: #fff; }
.skip-link:focus { top: 12px; }
.preview-banner strong { margin-right: 14px; }
.field label .hint { display: inline; margin-left: 6px; }
.consent-card { flex-wrap: wrap; }
.consent-card > span:not(.field-error) { flex: 1; }
.consent-card .field-error { flex-basis: 100%; margin-left: 31px; }
.form-actions > small { display: block; margin-top: 14px; color: var(--muted); }
.completion-card p { margin-bottom: 18px; }
.aside-small { margin-top: 24px; }
@media (max-width: 520px) {
  .process ol { grid-template-columns: 1fr; gap: 18px; }
  .process li { display: grid; grid-template-columns: 28px 1fr; padding: 0; }
  .process li + li { border-left: 0; }
  .process li::before { grid-row: 1 / 3; }
  .process strong { font-size: 14px; }
  .process span { font-size: 12px; }
  .consent-card small { font-size: 13px; }
  .consent-card strong { font-size: 14px; }
  .aside-card ol, .aside-card .aside-small { display: none; }
}
