:root {
  --navy-900: #16144a;
  --navy-800: #201d72;
  --navy-700: #2b2894;
  --navy-600: #3c38b0;
  --gold-500: #f6d617;
  --gold-600: #e0bd00;
  --gray-50: #f7f8fc;
  --gray-100: #eef0f7;
  --gray-200: #e1e4ef;
  --gray-300: #cdd1e2;
  --gray-400: #9a9fb8;
  --gray-600: #5c6079;
  --gray-800: #2a2c3f;
  --white: #ffffff;
  --danger: #d1453f;
  --danger-bg: #fdecec;
  --success: #1f9d55;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --shadow-card: 0 1px 2px rgba(20, 20, 60, 0.04), 0 20px 40px -20px rgba(22, 20, 74, 0.25);
  --font-jp: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-jp);
  color: var(--gray-800);
  background: radial-gradient(120% 140% at 50% -10%, #eef0fb 0%, var(--gray-50) 45%, var(--gray-50) 100%);
  min-height: 100vh;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px clamp(16px, 4vw, 48px);
}

.site-header__logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}

.site-header__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy-800);
  letter-spacing: 0.02em;
}

.site-header__subtitle {
  font-size: 12px;
  color: var(--gray-400);
  margin-top: 1px;
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px clamp(16px, 4vw, 48px) 64px;
}

.container {
  width: 100%;
  max-width: 720px;
}

.container--narrow {
  max-width: 620px;
}

/* Step indicator */
.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 8px 0 32px;
  padding: 0;
  list-style: none;
}

.steps__item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--gray-400);
  font-weight: 600;
}

.steps__circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  border: 2px solid var(--gray-300);
  color: var(--gray-400);
  background: var(--white);
  flex-shrink: 0;
}

.steps__item--done .steps__circle {
  background: var(--navy-800);
  border-color: var(--navy-800);
  color: var(--white);
}

.steps__item--active .steps__circle {
  background: var(--gold-500);
  border-color: var(--gold-500);
  color: var(--navy-900);
}

.steps__item--done,
.steps__item--active {
  color: var(--navy-800);
}

.steps__label {
  display: none;
}

@media (min-width: 560px) {
  .steps__label {
    display: inline;
  }
}

.steps__line {
  width: clamp(16px, 4vw, 40px);
  height: 2px;
  background: var(--gray-300);
}

.steps__item--done + .steps__line {
  background: var(--navy-800);
}

/* Card */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: clamp(24px, 5vw, 48px);
  border: 1px solid var(--gray-100);
}

.card__eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--gold-600);
  text-transform: uppercase;
  margin: 0 0 8px;
}

.card__title {
  font-size: clamp(20px, 3.4vw, 26px);
  font-weight: 700;
  color: var(--navy-900);
  margin: 0 0 10px;
}

.card__lead {
  color: var(--gray-600);
  font-size: 14.5px;
  margin: 0 0 28px;
}

/* Form */
.form-section {
  margin-bottom: 30px;
}

.form-section__title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--navy-800);
  border-left: 4px solid var(--gold-500);
  padding-left: 10px;
  margin: 0 0 18px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 560px) {
  .form-row--split {
    grid-template-columns: 1fr 1fr;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.field:last-child {
  margin-bottom: 0;
}

.field label {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-800);
}

.field label .required {
  color: var(--danger);
  font-weight: 700;
  margin-left: 4px;
  font-size: 11px;
}

.field label .optional {
  color: var(--gray-400);
  font-weight: 500;
  margin-left: 4px;
  font-size: 11px;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="date"],
.field input[type="password"],
.field select,
.field textarea {
  font-family: var(--font-jp);
  font-size: 15px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-800);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  width: 100%;
}

.field textarea {
  resize: vertical;
  min-height: 90px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--navy-700);
  box-shadow: 0 0 0 3px rgba(43, 40, 148, 0.12);
}

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

.field .hint {
  font-size: 12px;
  color: var(--gray-400);
}

.field .error {
  font-size: 12.5px;
  color: var(--danger);
  font-weight: 600;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-jp);
  font-size: 15px;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.15s ease, background 0.15s ease;
  text-decoration: none;
}

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

.btn-primary {
  background: var(--navy-800);
  color: var(--white);
  box-shadow: 0 10px 24px -10px rgba(32, 29, 114, 0.55);
}

.btn-primary:hover {
  background: var(--navy-700);
}

.btn-primary:disabled {
  background: var(--gray-300);
  color: var(--gray-400);
  box-shadow: none;
  cursor: not-allowed;
}

.btn-gold {
  background: var(--gold-500);
  color: var(--navy-900);
  box-shadow: 0 10px 24px -10px rgba(224, 189, 0, 0.5);
}

.btn-gold:hover {
  background: var(--gold-600);
}

.btn-outline {
  background: var(--white);
  color: var(--navy-800);
  border: 1.5px solid var(--gray-200);
}

.btn-outline:hover {
  border-color: var(--navy-700);
}

.btn-block {
  width: 100%;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 32px;
}

@media (min-width: 560px) {
  .actions--row {
    flex-direction: row-reverse;
    justify-content: flex-start;
  }
}

/* Review / definition list */
.review-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--gray-100);
}

.review-list__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--gray-100);
  font-size: 14.5px;
}

@media (min-width: 520px) {
  .review-list__row {
    grid-template-columns: 140px 1fr;
    gap: 12px;
  }
}

.review-list__row dt {
  color: var(--gray-400);
  font-weight: 700;
  font-size: 12.5px;
}

.review-list__row dd {
  margin: 0;
  color: var(--gray-800);
  font-weight: 600;
  word-break: break-word;
}

/* Notice / alert boxes */
.notice-box {
  display: flex;
  gap: 12px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  font-size: 13.5px;
  color: var(--gray-600);
  margin: 24px 0;
}

.notice-box--warning {
  background: #fff9e8;
  border-color: #f3e3a3;
  color: #6b5900;
}

.notice-box strong {
  color: inherit;
}

/* Checkbox agree row */
.agree-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  color: var(--gray-600);
  margin: 20px 0;
}

.agree-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 1px;
  accent-color: var(--navy-800);
  flex-shrink: 0;
}

/* Input with inline action button */
.input-with-button {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.input-with-button input {
  flex: 1;
  min-width: 0;
}

.input-with-button .btn {
  padding: 0 20px;
  font-size: 13.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.hint--error {
  color: var(--danger);
}

.hint--success {
  color: var(--success);
}

/* Choice group (segmented control) */
.choice-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.choice-group__option {
  position: relative;
}

.choice-group__option input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.choice-group__option span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-600);
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.choice-group__option input:checked + span {
  border-color: var(--navy-800);
  background: var(--navy-800);
  color: var(--white);
}

.choice-group__option input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(43, 40, 148, 0.25);
}

/* Date picker */
.datepicker {
  position: relative;
}

.datepicker__input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.datepicker__display {
  cursor: pointer;
  padding-right: 42px !important;
  background: var(--white);
}

.datepicker__icon {
  position: absolute;
  right: 14px;
  color: var(--gray-400);
  pointer-events: none;
  display: flex;
}

.datepicker__panel {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  left: 0;
  width: 300px;
  max-width: 90vw;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--gray-100);
  padding: 16px;
}

.datepicker__panel[hidden] {
  display: none;
}

.datepicker__panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.datepicker__panel-title {
  font-weight: 700;
  color: var(--navy-900);
  font-size: 14px;
}

.datepicker__nav {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: var(--gray-50);
  color: var(--navy-800);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-jp);
}

.datepicker__nav:hover {
  background: var(--gray-100);
}

.datepicker__weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 11px;
  color: var(--gray-400);
  font-weight: 700;
  margin-bottom: 6px;
}

.datepicker__weekdays span:first-child {
  color: var(--danger);
}

.datepicker__weekdays span:last-child {
  color: var(--navy-700);
}

.datepicker__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.datepicker__day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  border-radius: 50%;
  font-size: 13px;
  font-family: var(--font-jp);
  color: var(--gray-800);
  cursor: pointer;
}

.datepicker__day:hover:not(:disabled) {
  background: var(--gray-100);
}

.datepicker__day:disabled {
  color: var(--gray-300);
  cursor: not-allowed;
}

.datepicker__day--outside {
  visibility: hidden;
}

.datepicker__day--today {
  box-shadow: inset 0 0 0 1.5px var(--navy-700);
  font-weight: 700;
}

.datepicker__day--selected {
  background: var(--gold-500);
  color: var(--navy-900);
  font-weight: 700;
}

/* Signature pad */
.sigpad {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-md);
  background: var(--gray-50);
  overflow: hidden;
  position: relative;
  touch-action: none;
}

.sigpad canvas {
  display: block;
  width: 100%;
  height: 220px;
  touch-action: none;
  cursor: crosshair;
}

.sigpad__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  font-size: 13.5px;
  pointer-events: none;
}

.sigpad-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.sigpad-toolbar__hint {
  font-size: 12px;
  color: var(--gray-400);
}

.link-btn {
  background: none;
  border: none;
  color: var(--navy-700);
  font-family: var(--font-jp);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 8px;
}

.link-btn:hover {
  text-decoration: underline;
}

/* Complete / success state */
.result-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  box-shadow: 0 12px 24px -8px rgba(224, 189, 0, 0.5);
}

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

.footer-note {
  text-align: center;
  font-size: 12px;
  color: var(--gray-400);
  padding: 24px 16px 8px;
}
