:root {
  color-scheme: light;
  --bg: #f4f7f5;
  --panel: #ffffff;
  --ink: #1d261f;
  --muted: #607067;
  --line: #d6ded8;
  --accent: #146c5d;
  --accent-strong: #0f5449;
  --soft: #edf6f2;
  --warn: #b3422f;
  --focus: #f2b84b;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 18px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Yu Gothic", "Meiryo", system-ui, sans-serif;
}

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

.app-shell {
  width: min(860px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.page-head {
  margin-bottom: 18px;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 10px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  color: var(--accent);
  background: var(--soft);
  padding: 6px 10px;
  font-weight: 700;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: 2rem;
  line-height: 1.25;
  letter-spacing: 0;
}

.lead {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.8;
}

.progress-card,
.form-card,
.complete-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 6px 22px rgba(28, 48, 40, 0.06);
}

.progress-card {
  margin-bottom: 14px;
  padding: 16px;
}

.reset-draft-button {
  display: block;
  width: 100%;
  min-height: 44px;
  border-color: #c4d0c9;
  background: #fff;
  color: var(--muted);
  margin-top: 12px;
  padding: 9px 12px;
  font-size: 0.9rem;
}

.reset-draft-button:hover {
  background: var(--soft);
  color: var(--accent);
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.steps li {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 8px;
  color: var(--muted);
  text-align: center;
  font-weight: 700;
}

.steps li.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.steps li.done {
  border-color: var(--accent);
  background: var(--soft);
  color: var(--accent);
}

.form-card {
  padding: 24px;
}

.form-step {
  display: none;
}

.form-step.active {
  display: block;
}

.section-heading {
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
  padding-bottom: 14px;
}

.section-heading h2 {
  margin-bottom: 8px;
  font-size: 1.35rem;
}

.section-heading p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.7;
}

.field,
.choice-group {
  display: grid;
  gap: 9px;
  margin: 0 0 18px;
}

.field {
  font-weight: 700;
}

.field span,
legend span {
  display: inline-block;
  margin-left: 6px;
  border-radius: 4px;
  background: #fbe8e3;
  color: var(--warn);
  padding: 2px 6px;
  font-size: 0.78rem;
}

input,
textarea {
  width: 100%;
  min-height: 54px;
  border: 2px solid #c4d0c9;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 13px 14px;
  outline: none;
}

textarea {
  resize: vertical;
  min-height: 132px;
  line-height: 1.7;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(242, 184, 75, 0.35);
}

fieldset {
  border: 0;
  padding: 0;
}

legend {
  margin-bottom: 10px;
  font-weight: 700;
}

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

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

.choice-grid label,
.check-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  border: 2px solid #c4d0c9;
  border-radius: 6px;
  background: #fff;
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 700;
}

.choice-grid input,
.check-line input {
  width: 24px;
  height: 24px;
  min-height: 24px;
  flex: 0 0 24px;
  accent-color: var(--accent);
}

.choice-grid label:has(input:checked),
.check-line:has(input:checked) {
  border-color: var(--accent);
  background: var(--soft);
}

.request-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  margin-bottom: 18px;
  padding: 18px;
}

.request-box h3 {
  margin-bottom: 14px;
  font-size: 1.15rem;
}

.hint {
  color: var(--muted);
  line-height: 1.6;
}

.error-message {
  min-height: 1.2em;
  color: var(--warn);
  font-weight: 700;
  line-height: 1.5;
}

.is-error input,
.is-error textarea,
.is-error.choice-group .choice-grid label,
.is-error.check-line {
  border-color: var(--warn);
}

.confirm-list {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  border-top: 1px solid var(--line);
  margin: 0;
}

.confirm-list dt,
.confirm-list dd {
  border-bottom: 1px solid var(--line);
  padding: 13px 0;
}

.confirm-list dt {
  color: var(--muted);
  font-weight: 700;
}

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

.notice {
  border-left: 5px solid var(--focus);
  background: #fff8e9;
  margin-top: 18px;
  padding: 14px 16px;
  line-height: 1.7;
}

.important-notice {
  border-left-color: var(--accent);
  background: var(--soft);
  color: var(--ink);
  font-weight: 700;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 20px;
}

button {
  min-width: 142px;
  min-height: 54px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  padding: 13px 18px;
  cursor: pointer;
  font-weight: 700;
}

button:hover {
  background: var(--accent-strong);
}

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

button.secondary:hover {
  background: var(--soft);
}

button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.complete-card {
  padding: 26px;
}

.complete-card p {
  color: var(--muted);
  line-height: 1.8;
}

[hidden] {
  display: none !important;
}

@media (max-width: 720px) {
  html {
    font-size: 17px;
  }

  .app-shell {
    width: min(100% - 20px, 860px);
    padding-top: 18px;
  }

  .form-card,
  .complete-card {
    padding: 18px;
  }

  .steps {
    display: none;
  }

  .choice-grid,
  .choice-grid.two {
    grid-template-columns: 1fr;
  }

  .confirm-list {
    grid-template-columns: 1fr;
  }

  .confirm-list dt {
    border-bottom: 0;
    padding-bottom: 3px;
  }

  .confirm-list dd {
    padding-top: 3px;
  }

  .form-actions {
    flex-direction: column-reverse;
  }

  button {
    width: 100%;
  }
}
