:root {
  --paper: #f5f1e8;
  --paper-deep: #eee8dc;
  --ink: #302f2a;
  --muted: #625f58;
  --faint: #aaa397;
  --line: #d8d1c4;
  --line-dark: #a9a294;
  --gold: #b49a54;
  --error: #8c463c;
  --serif: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", "Hiragino Mincho Pro", "Noto Serif JP", serif;
  --sans: "Yu Gothic", "YuGothic", "Hiragino Kaku Gothic ProN", "Hiragino Sans", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 2;
  letter-spacing: 0.045em;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.topography {
  position: fixed;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.topography svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: #c9c2b6;
  stroke-width: 1;
  opacity: 0.25;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1240px, calc(100% - 96px));
  min-height: 124px;
  margin: 0 auto;
  border-bottom: 1px solid rgba(191, 183, 169, 0.52);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold);
  font-family: var(--serif);
  font-size: 14px;
}

.brand-name {
  font-family: var(--serif);
  letter-spacing: 0.26em;
}

.brand-line {
  width: 29px;
  height: 1px;
  background: var(--gold);
}

.brand-en,
.eyebrow,
.step,
.privacy-label,
.result-kicker {
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 10px;
  letter-spacing: 0.28em;
}

.header-back,
.text-link {
  color: #676d67;
  font-size: 12px;
  text-decoration: none;
}

.header-back {
  letter-spacing: 0.1em;
}

.header-back span,
.text-link span {
  color: var(--gold);
}

.page-shell {
  display: grid;
  grid-template-columns: minmax(300px, 0.74fr) minmax(520px, 1.26fr);
  gap: clamp(72px, 9vw, 150px);
  width: min(1160px, calc(100% - 96px));
  min-height: 960px;
  margin: 0 auto;
  padding: 118px 0 150px;
}

.intro {
  align-self: start;
  position: sticky;
  top: 72px;
}

.eyebrow {
  margin: 0 0 25px;
  color: var(--gold);
}

.intro h1,
.section-heading h2,
.result-view h2 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: 0.12em;
}

.intro h1 {
  margin: 0;
  font-size: clamp(38px, 4vw, 58px);
  line-height: 1.45;
  white-space: nowrap;
}

.series-title {
  margin: 12px 0 0;
  color: var(--muted);
  font-family: var(--serif);
  letter-spacing: 0.12em;
}

.intro-copy {
  margin: 58px 0 48px;
  padding-top: 33px;
  border-top: 1px solid var(--line);
  color: #56534d;
  font-size: 15px;
}

.intro-copy p {
  margin: 0 0 18px;
}

.intro-back {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line-dark);
}

.content-area {
  min-width: 0;
}

.view[hidden] {
  display: none;
}

.section-heading {
  margin-bottom: 54px;
}

.step {
  margin: 0 0 15px;
  color: var(--gold);
}

.section-heading h2 {
  margin: 0 0 12px;
  font-size: 27px;
}

.section-heading > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.field {
  margin-bottom: 39px;
}

.label-row {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 10px;
}

.label-row label {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.09em;
}

.required-mark,
.optional-mark {
  display: inline-block;
  padding: 0 6px;
  border: 1px solid;
  font-size: 9px;
  line-height: 18px;
  letter-spacing: 0.12em;
}

.required-mark {
  border-color: #b59c61;
  color: #8b743e;
}

.optional-mark {
  border-color: #beb8ac;
  color: var(--muted);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #bdb6aa;
  border-radius: 0;
  outline: none;
  background: #faf8f2;
  transition: border-color 160ms ease, background-color 160ms ease;
}

input,
select {
  min-height: 54px;
  padding: 11px 15px;
}

textarea {
  min-height: 220px;
  padding: 14px 15px;
  line-height: 1.8;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #756f64;
  background: #faf8f2;
  box-shadow: 0 0 0 1px #756f64;
}

[aria-invalid="true"] {
  border-color: var(--error);
  background: #fbf6f1;
}

.select-wrap {
  position: relative;
}

.select-wrap::after {
  position: absolute;
  top: 50%;
  right: 18px;
  width: 7px;
  height: 7px;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  content: "";
  pointer-events: none;
  transform: translateY(-70%) rotate(45deg);
}

select {
  appearance: none;
  padding-right: 48px;
}

.field-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.field-meta p,
.field-error {
  margin: 0;
}

.field-error {
  min-height: 0;
  color: var(--error);
  font-size: 14px;
  line-height: 1.7;
}

.field-error:not(:empty) {
  margin-top: 7px;
}

.field-error:not(:empty)::before {
  content: "※ ";
}

/* 個人情報の取扱いページ（privacy.html） */
.legal-shell {
  width: min(760px, calc(100% - 96px));
  margin: 0 auto;
  padding: 96px 0 120px;
  color: #56534d;
  font-size: 15px;
}

.legal-shell h1 {
  margin: 0 0 40px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 400;
  letter-spacing: 0.1em;
  line-height: 1.6;
}

.legal-shell h2 {
  margin: 44px 0 12px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.legal-shell p,
.legal-shell ul {
  margin: 0 0 14px;
}

.legal-shell ul {
  padding-left: 1.4em;
}

.legal-shell .text-link {
  font-size: inherit;
  border-bottom: 1px solid var(--line-dark);
}

.legal-date {
  margin-top: 56px !important;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 600px) {
  .legal-shell {
    width: calc(100% - 40px);
    padding: 62px 0 88px;
  }
}

/* 迷惑送信対策のおとり項目（画面外に置き、利用者には表示しない） */
.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.privacy {
  margin: 65px 0 43px;
  padding: 30px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.privacy-label {
  margin: 0 0 6px;
  color: var(--gold);
}

.privacy h3 {
  margin: 0 0 17px;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.1em;
}

.privacy > p:not(.privacy-label) {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 14px;
}

.privacy .text-link {
  padding-bottom: 3px;
  border-bottom: 1px solid var(--line-dark);
}

.button {
  display: inline-flex;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  gap: 38px;
  border: 1px solid var(--line-dark);
  border-radius: 0;
  padding: 12px 23px;
  background: transparent;
  color: #4d554f;
  cursor: pointer;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease;
}

.button:hover {
  background: #ebe6dc;
}

.button:focus-visible,
a:focus-visible {
  outline: 2px solid #766f63;
  outline-offset: 4px;
}

.button-primary {
  width: 100%;
  border-color: #686d65;
  background: #62685f;
  color: #fffdf6;
}

.button-primary:hover {
  background: #4f554e;
}

.confirm-list {
  margin: 0 0 52px;
  border-top: 1px solid var(--line);
}

.confirm-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  margin: 0;
  padding: 25px 0;
  border-bottom: 1px solid var(--line);
}

.confirm-row dt {
  color: var(--muted);
  font-size: 12px;
}

.confirm-row dd {
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.button-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.button-group .button {
  width: 100%;
}

.submit-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.result-view {
  padding-top: 45px;
}

.result-kicker {
  margin: 47px 0 20px;
  color: var(--gold);
}

.result-view h2 {
  margin: 0 0 34px;
  font-size: clamp(28px, 3vw, 39px);
  line-height: 1.7;
}

.result-view > p:not(.step, .result-kicker) {
  margin: 0 0 48px;
  color: var(--muted);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  width: min(1240px, calc(100% - 96px));
  margin: 0 auto;
  padding: 48px 0 52px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.8;
}

.site-footer p {
  margin: 0;
}

.footer-brand {
  font-family: var(--serif);
  letter-spacing: 0.25em;
}

.site-footer > div {
  text-align: right;
}

@media (max-width: 900px) {
  .site-header,
  .page-shell,
  .site-footer {
    width: min(100% - 56px, 720px);
  }

  .page-shell {
    display: block;
    padding: 76px 0 110px;
  }

  .intro {
    position: static;
    margin-bottom: 92px;
  }

  .intro-copy {
    max-width: 580px;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 16px;
  }

  .site-header,
  .page-shell,
  .site-footer {
    width: calc(100% - 40px);
  }

  .site-header {
    min-height: 92px;
  }

  .brand {
    gap: 9px;
  }

  .brand-mark {
    width: 27px;
    height: 27px;
  }

  .brand-line,
  .brand-en {
    display: none;
  }

  .header-back {
    max-width: 110px;
    font-size: 10px;
    line-height: 1.6;
    text-align: right;
  }

  .page-shell {
    padding: 62px 0 88px;
  }

  .intro {
    margin-bottom: 79px;
  }

  .intro h1 {
    font-size: 34px;
  }

  .series-title {
    font-size: 14px;
  }

  .intro-copy {
    margin: 44px 0 40px;
    padding-top: 27px;
    font-size: 15px;
  }

  .section-heading {
    margin-bottom: 42px;
  }

  .section-heading h2 {
    font-size: 22px;
  }

  .field {
    margin-bottom: 32px;
  }

  input,
  select {
    min-height: 55px;
    font-size: 16px;
  }

  textarea {
    min-height: 240px;
    font-size: 16px;
  }

  .privacy {
    margin-top: 52px;
  }

  .confirm-row {
    display: block;
  }

  .confirm-row dt {
    margin-bottom: 8px;
  }

  .button-group {
    grid-template-columns: 1fr;
  }

  .button-group .button-secondary {
    order: 2;
  }

  .site-footer {
    display: block;
    padding: 35px 0 40px;
  }

  .site-footer > div {
    margin-top: 22px;
    text-align: left;
  }
}

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

  * {
    transition: none !important;
  }
}
