:root {
  --primary: rgb(4, 157, 179);
  --primary-hover: rgb(3, 130, 148);
  --bg: #f5f6f8;
  --card-bg: #fff;
  --text: #333;
  --text-sub: #555;
  --border: #ccc;
  --error: #d32f2f;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.container {
  max-width: 640px;
  margin: 40px auto;
  background: var(--card-bg);
  padding: 32px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
}
.logo img {
  height: 48px;
  width: auto;
}

.steps {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 32px;
}
.step {
  flex: 1;
  padding: 8px 4px;
  background: #e9edf0;
  border-radius: 2px;
  text-align: center;
  font-size: 12px;
  font-weight: bold;
  color: var(--text-sub);
  white-space: nowrap;
  cursor: default;
}
.step.active {
  background: rgba(4, 157, 179, 0.15);
  color: var(--primary);
}
.step-arrow {
  flex-shrink: 0;
  font-size: 10px;
  color: var(--primary);
}

.page-description {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.8;
  margin-bottom: 24px;
}

.section-title {
  color: var(--primary);
  font-size: 15px;
  font-weight: bold;
  margin: 28px 0 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--primary);
}
.section-title:first-of-type {
  margin-top: 0;
}

.form-group {
  margin-bottom: 16px;
}
.form-row {
  display: flex;
  gap: 16px;
}
.form-row .form-group {
  flex: 1;
}
.form-label {
  display: block;
  font-size: 14px;
  color: var(--text-sub);
  margin-bottom: 6px;
  font-weight: 500;
}
.optional-mark {
  display: inline-block;
  font-size: 11px;
  font-weight: bold;
  color: #fff;
  background: #aaa;
  border-radius: 2px;
  padding: 0 4px;
  margin-left: 6px;
  vertical-align: text-top;
  line-height: 1.6;
}
.form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.form-input:focus {
  border-color: var(--primary);
}
.form-input[readonly] {
  background: #f0f0f0;
  color: var(--text-sub);
  cursor: default;
}
.form-input.error {
  border-color: var(--error);
}

.error-message {
  font-size: 13px;
  color: var(--error);
  margin-top: 6px;
  display: none;
}

.field-description {
  font-size: 12px;
  color: var(--text-sub);
  margin-bottom: 6px;
  line-height: 1.8;
  border-left: 3px solid var(--primary);
  padding-left: 8px;
}

.btn-primary {
  display: inline-block;
  min-width: 200px;
  padding: 12px 36px;
  font-size: 16px;
  font-weight: bold;
  font-family: inherit;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}
.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
}
.btn-primary:disabled {
  background: #bdbdbd;
  cursor: not-allowed;
}

.btn-back {
  display: inline-block;
  min-width: 200px;
  padding: 12px 36px;
  font-size: 16px;
  font-weight: bold;
  font-family: inherit;
  background: #fff;
  color: var(--text-sub);
  border: 2px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}
.btn-back:hover {
  background: #f5f5f5;
}

.confirm-grid {
  display: grid;
  grid-template-columns: 140px 1fr;
  row-gap: 12px;
  padding-top: 12px;
}
.confirm-label {
  font-size: 14px;
  color: var(--text-sub);
  padding-right: 12px;
}
.confirm-value {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  min-width: 0;
  overflow-wrap: break-word;
}

.info-grid {
  display: grid;
  grid-template-columns: 140px 1fr;
  row-gap: 10px;
  padding-top: 10px;
}
.info-label {
  font-size: 14px;
  color: var(--text-sub);
  padding-right: 12px;
}
.info-value {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  min-width: 0;
  overflow-wrap: break-word;
}

.actions {
  text-align: center;
  margin-top: 28px;
}
.actions--flex {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 16px;
  margin-top: 32px;
}
.submit-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.actions-note {
  font-size: 12px;
  color: var(--error);
  margin-top: 6px;
}

.expire-notice {
  font-size: 14px;
  font-weight: bold;
  color: var(--text);
  background: #f0f4f8;
  padding: 10px 14px;
  margin-bottom: 24px;
  line-height: 1.8;
}

.notice {
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 4px;
  padding: 12px 16px;
  margin-bottom: 24px;
  font-size: 13px;
  color: #e65100;
  line-height: 1.8;
}

.complete-message {
  text-align: center;
  margin-bottom: 24px;
}
.complete-message p {
  font-size: 15px;
  font-weight: bold;
}
.complete-message .sub {
  font-size: 13px;
  color: var(--primary);
  font-weight: normal;
  margin-top: 12px;
}

.billing-summary {
  margin-top: 16px;
  padding: 16px;
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.billing-row {
  display: flex;
  align-items: baseline;
  padding: 4px 0;
}
.billing-label {
  font-size: 13px;
  color: var(--text-sub);
  width: 120px;
  flex-shrink: 0;
}
.billing-value {
  font-size: 14px;
  text-align: right;
  flex: 1;
}
.billing-unit {
  font-size: 13px;
  color: var(--text-sub);
  margin-left: 4px;
  flex-shrink: 0;
}
.billing-total {
  border-top: 1px solid var(--border);
  margin-top: 8px;
  padding-top: 8px;
}
.billing-total .billing-label {
  font-weight: 600;
  color: var(--text);
  font-size: 14px;
}
.billing-total .billing-value {
  font-weight: bold;
  color: var(--primary);
  font-size: 16px;
}

.help-link {
  font-size: 13px;
  color: var(--text-sub);
  text-align: center;
  margin-top: 24px;
}
.help-link a {
  color: var(--primary);
}

@media (max-width: 600px) {
  .container {
    margin: 16px;
    padding: 20px;
  }
  .steps {
    gap: 4px;
  }
  .step {
    font-size: 11px;
    padding: 6px 2px;
  }
  .step-arrow {
    font-size: 8px;
  }
  .form-row {
    gap: 12px;
  }
  .confirm-grid,
  .info-grid {
    grid-template-columns: 1fr;
    row-gap: 4px;
  }
  .confirm-label,
  .info-label {
    font-size: 12px;
    color: #888;
    margin-top: 8px;
  }
  .confirm-value,
  .info-value {
    margin-bottom: 4px;
  }
  .actions--flex {
    flex-direction: column-reverse;
  }
  .submit-wrap {
    width: 100%;
  }
  .btn-primary,
  .btn-back {
    width: 100%;
    padding: 14px;
    text-align: center;
  }
}
