:root {
  --primary: #1F497D;
  --main: #93c5fd;
  --accent: #FFFFFF;
  --bg: #f3f5f7;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --border: #d1d5db;
  --border-strong: rgba(31, 73, 125, 0.22);
  --focus-ring: rgba(147, 197, 253, 0.35);
  --shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  --info-bg: rgba(31, 73, 125, 0.06);
  --info-line: rgba(31, 73, 125, 0.18);
  --info-text: #1F497D;
  --danger-bg: rgba(185, 28, 28, 0.06);
  --danger-line: rgba(185, 28, 28, 0.25);
  --danger-text: #b91c1c;
  --success-bg: rgba(6, 95, 70, 0.06);
  --success-line: rgba(6, 95, 70, 0.25);
  --success-text: #065f46;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Noto Sans JP', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
}

.topbar {
  background: var(--primary);
  color: #fff;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.lang-toggle {
  font-size: 1.4rem;
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 10px;
  line-height: 1;
}

.lang-toggle:hover {
  background: rgba(255,255,255,.12);
  filter: brightness(1.2);
}

.lang-toggle:focus-visible {
  outline: 2px solid var(--main);
  outline-offset: 2px;
}

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

.page--narrow {
  max-width: 680px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.page-header {
  margin-bottom: 24px;
}

.page-header__title {
  margin: 0 0 10px;
  font-size: 28px;
  color: var(--primary);
}

.page-header__lead {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.page-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.notice-box,
.alert {
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 18px;
  font-size: 14px;
  line-height: 1.8;
}

.notice-box--warn {
  background: var(--info-bg);
  border: 1px solid var(--info-line);
  color: var(--info-text);
}

.notice-box--success {
  background: var(--success-bg);
  border: 1px solid var(--success-line);
  color: var(--success-text);
}

.alert {
  background: var(--danger-bg);
  border: 1px solid var(--danger-line);
  color: var(--danger-text);
}

.alert ul {
  margin: 0;
  padding-left: 18px;
}

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

.field {
  margin-bottom: 18px;
}

.field:last-of-type {
  margin-bottom: 0;
}

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

.label-row label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.badge--required {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge--optional {
  background: #f3f4f6;
  color: #4b5563;
}

input,
select,
textarea {
  width: 100%;
  padding: 12px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--text);
  font-size: 14px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--main);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

textarea {
  min-height: 180px;
  resize: vertical;
  line-height: 1.8;
}

input::placeholder,
textarea::placeholder {
  color: var(--muted);
}

.help-text {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.field-error {
  margin-top: 6px;
  color: var(--danger-text);
  font-size: 13px;
  font-weight: 700;
}

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  min-height: 44px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.btn:hover {
  opacity: 0.92;
}

.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible {
  outline: 2px solid var(--main);
  outline-offset: 2px;
}

.btn-sub {
  background: #fff;
  border-color: var(--border);
  color: var(--primary);
}

.btn-main {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.confirm-list {
  display: grid;
  gap: 14px;
}

.confirm-item {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  background: #fff;
}

.confirm-item__label {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.confirm-item__value {
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
}

.complete-meta {
  margin-top: 20px;
}

.complete-meta .confirm-item {
  background: #fff;
}

@media (max-width: 640px) {
  .topbar {
    min-height: 54px;
    padding: 8px 12px;
  }

  .page {
    padding: 24px 16px 48px;
  }

  .card {
    padding: 20px 16px;
    border-radius: 16px;
  }

  .page-header__title {
    font-size: 24px;
  }

  .actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    min-height: 46px;
  }
}