/**
 * Bonheur Ship membership apply form styles
 * Warm orange background, blue primary buttons
 * (Fonts loaded via HTML link in bonheur_form_stylesheet_tags())
 */

:root {
  --color-text: #333;
  --color-text-muted: #666;
  --color-border: #e8d4c4;
  --color-bg: #ffecd2;
  --color-bg-soft: #fff5e6;
  --color-bg-input: #fff;
  --color-primary: #4a7cff;
  --color-primary-hover: #3a6cef;
  --color-accent: #ffb366;
  --color-accent-soft: #fff0e0;
  --color-required: #c00;
  --color-error-bg: #fff0f0;
  --font-sans: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Nico Moji", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: linear-gradient(180deg, #ffd4a3 0%, #ffecd2 30%, #ffecd2 100%);
  min-height: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--color-text);
  background: linear-gradient(180deg, #ffd4a3 0%, #ffecd2 30%, #ffecd2 100%);
  margin: 0;
  padding: 28px 20px;
  min-height: 100vh;
}

/* Platform header */
.platform-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem 1.5rem 1.25rem;
  margin-bottom: 2rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  border: 1px solid var(--color-border);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.platform-header-inner {
  flex: 1;
  min-width: 0;
}

.platform-title {
  margin: 0 0 4px 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: 0.02em;
}

.platform-subtitle {
  margin: 0;
  font-size: 14px;
  color: var(--color-text-muted);
  font-weight: 400;
}

/* Form card wrapper */
.form-wrapper {
  max-width: 680px;
  margin: 0 auto;
  background: #fff;
  padding: 32px 36px 40px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
}

/* Form header */
.form-header {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-border);
}

.form-doc-title {
  margin: 0 0 8px 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text);
  text-align: center;
}

.step-flow {
  margin: 0 0 4px 0;
  font-size: 13px;
  color: var(--color-text-muted);
  text-align: center;
}

.step-label {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-primary);
  text-align: center;
}

.required-note {
  margin: 0 0 20px 0;
  font-size: 13px;
  color: var(--color-text-muted);
}

/* Validation errors */
.errors {
  list-style: none;
  margin: 0 0 18px 0;
  padding: 14px 18px;
  background: var(--color-error-bg);
  border: 1px solid #fcc;
  border-radius: 12px;
  color: var(--color-required);
  font-size: 14px;
}

.errors li + li {
  margin-top: 4px;
}

/* Form sections */
.section {
  margin-bottom: 28px;
}

.section-title {
  margin: 0 0 14px 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--color-border);
}

.section-note {
  margin: -4px 0 14px 0;
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.field-note {
  margin: -2px 0 8px 0;
  font-size: 12px;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* Field layout */
.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: 14px;
  color: var(--color-text);
}

.required {
  color: var(--color-required);
  font-size: 14px;
  margin-left: 2px;
}

.field input[type="text"],
.field input[type="password"],
.field input[type="tel"],
.field input[type="email"],
.field input[type="date"],
.field select,
.field textarea {
  width: 100%;
  max-width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  background: var(--color-bg-input);
}

.field input::placeholder,
.field textarea::placeholder {
  color: #999;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

.field textarea {
  resize: vertical;
  min-height: 80px;
  max-width: 100%;
}

.field-radio .label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: 14px;
  color: var(--color-text);
}

.radio-group {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.radio-group.radio-vertical {
  flex-direction: column;
  gap: 12px;
}

.radio-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 12px;
  transition: background 0.2s;
}

.radio-label:hover {
  background: rgba(255, 179, 102, 0.15);
}

.radio-label input {
  width: auto;
  margin: 0;
}

/* Custom choice buttons (LINE in-app browser) */
.field-choice .label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: 14px;
  color: var(--color-text);
}

.line-browser-notice {
  margin: 0 0 16px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.6;
  color: #5a3e00;
  background: #fff8e6;
  border: 1px solid #f0c878;
  border-radius: 8px;
}

.choice-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.choice-btn {
  flex: 1 1 calc(33% - 10px);
  min-width: 88px;
  min-height: 48px;
  padding: 12px 10px;
  font-size: 16px;
  font-family: inherit;
  font-weight: 500;
  color: var(--color-text);
  background: var(--color-bg-input);
  border: 2px solid var(--color-border);
  border-radius: 8px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.choice-btn.is-selected {
  border-color: var(--color-primary);
  background: rgba(74, 124, 255, 0.12);
  font-weight: 600;
  color: var(--color-primary);
}

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

/* Step 2: payment */
.step2-explanation {
  margin-bottom: 24px;
  padding: 20px 24px;
  background: var(--color-accent-soft);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  line-height: 1.8;
}

.step2-explanation p {
  margin: 0;
}

.section-payment .payment-info {
  margin-bottom: 20px;
}

.payment-fee {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
}

.bank-info {
  margin-top: 24px;
  padding: 18px 22px;
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  border-radius: 12px;
}

.payment-other-field {
  margin-top: 12px;
  margin-left: 24px;
}

.bank-label {
  margin: 0 0 6px 0;
  font-weight: 600;
  font-size: 14px;
  color: var(--color-text);
}

.bank-detail {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text);
  letter-spacing: 0.05em;
}

/* Step 3: agreements */
.section-agreement-item {
  margin-bottom: 28px;
}

.agreement-item-title {
  margin: 0 0 18px 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-text);
  padding-bottom: 12px;
  border-bottom: 3px solid var(--color-primary);
  border-radius: 0 0 4px 4px;
}

.agreement-guide {
  margin-bottom: 16px;
  padding: 18px 22px;
  background: var(--color-bg-soft);
  border-left: 4px solid var(--color-primary);
  border-radius: 0 12px 12px 0;
  line-height: 1.8;
}

.agreement-guide p {
  margin: 0;
  font-size: 14px;
  color: var(--color-text);
}

.agreement-doc-link-wrap {
  margin: 16px 0 20px 0;
}

.agreement-doc-btn {
  display: inline-block;
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  background: var(--color-primary);
  border: 1px solid var(--color-primary);
  border-radius: 24px;
  text-decoration: none;
  text-align: center;
  transition: background 0.2s, border-color 0.2s;
}

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

.agreement-confirm-block {
  padding: 20px 24px;
  background: var(--color-accent-soft);
  border: 1px solid var(--color-border);
  border-radius: 16px;
}

.agreement-confirm-block .field-checkbox {
  margin-bottom: 14px;
}

.agreement-sign-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.agreement-sign-row .field {
  flex: 1;
  min-width: 160px;
}

.agreement-date-display .agreement-date-value {
  margin: 0;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  background: #fff;
  border: 1px solid var(--color-border);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  cursor: pointer;
}

.checkbox-label input {
  width: auto;
  margin: 0;
}

/* Agent section */
.section-agents {
  padding-top: 4px;
}

/* Children blocks */
.section-children .child-block {
  background: var(--color-accent-soft);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 18px;
}

.child-title {
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--color-border);
}

#add-child {
  margin-top: 8px;
}

/* Form action buttons */
.form-actions {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  text-align: center;
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.2s, border-color 0.2s;
}

.btn-prev {
  color: var(--color-text-muted);
  background: #fff;
  border: 1px solid var(--color-border);
  cursor: default;
}

a.btn-prev {
  cursor: pointer;
  color: var(--color-primary);
}

a.btn-prev:hover {
  background: rgba(74, 124, 255, 0.08);
  border-color: var(--color-primary);
}

.btn-next,
.btn-primary {
  background: var(--color-primary);
  color: #fff;
  border: 1px solid var(--color-primary);
  cursor: pointer;
}

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

.btn-secondary {
  background: #fff;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  cursor: pointer;
}

.btn-secondary:hover {
  background: rgba(74, 124, 255, 0.08);
}

.form-footer-note {
  margin: 16px 0 0 0;
  font-size: 12px;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* Completion page */
.complete-message {
  padding: 24px 0;
}

.complete-message .lead {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--color-text);
}

.complete-message p {
  margin: 8px 0;
}

.complete-message .mail-sent {
  color: #0a7;
  font-weight: 500;
}

.complete-message .mail-error {
  color: var(--color-required);
  font-size: 0.95rem;
}

.complete-message .btn {
  margin-top: 18px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  cursor: pointer;
}

.complete-message .btn:hover {
  background: var(--color-primary-hover);
}

.complete-message-after {
  padding-top: 0;
  border-top: none;
}

.complete-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin: 24px 0 0 0 !important;
}

.complete-actions .btn {
  margin-top: 0 !important;
}

/* Confirmation page */
.confirm-intro {
  margin-bottom: 24px;
  padding: 20px 24px;
  background: var(--color-accent-soft);
  border: 1px solid var(--color-border);
  border-radius: 16px;
}

.confirm-lead {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: var(--color-text);
}

.confirm-note {
  margin: 0;
  font-size: 13px;
  color: var(--color-text-muted);
}

.confirm-registration-copy {
  margin: 24px 0;
  padding: 24px;
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  border-radius: 16px;
}

.confirm-section-title {
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}

.email-preview {
  margin: 0 0 20px 0;
  padding: 16px;
  font-size: 12px;
  line-height: 1.6;
  background: #fff;
  border: 1px solid var(--color-border);
  white-space: pre-wrap;
  word-break: break-all;
}

/* Registration copy (completion) */
.registration-copy-section {
  margin: 28px 0;
  padding: 24px;
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  border-radius: 16px;
}

.registration-copy-guide {
  margin: 0 0 16px 0;
  font-size: 15px;
  color: var(--color-text);
  line-height: 1.6;
}

.registration-copy-btn-wrap {
  margin: 0 0 24px 0;
}

.btn-pdf-output {
  display: inline-block;
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  background: var(--color-primary);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-pdf-output:hover {
  background: var(--color-primary-hover);
}

.registration-copy-block {
  margin-top: 0;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 12px;
}

.registration-copy {
  font-size: 14px;
}

.registration-copy-title {
  margin: 0 0 16px 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--color-primary);
}

.registration-copy h4 {
  margin: 20px 0 10px 0;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
  background: repeating-linear-gradient(
    -45deg,
    rgba(74, 124, 255, 0.08),
    rgba(74, 124, 255, 0.08) 4px,
    rgba(74, 124, 255, 0.04) 4px,
    rgba(74, 124, 255, 0.04) 8px
  );
  border-left: 4px solid var(--color-primary);
  border-radius: 4px;
}

.registration-copy h4:first-of-type {
  margin-top: 0;
}

.registration-copy-dl {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 6px 16px;
  margin: 0 0 12px 0;
}

.registration-copy-dl dt {
  color: var(--color-text);
  font-weight: 700;
}

.registration-copy-dl dd {
  margin: 0;
  color: var(--color-text);
  font-weight: 500;
}

.registration-copy-child {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}

.registration-copy-child:last-child {
  border-bottom: none;
}

.confirm-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  margin-top: 28px;
}

.confirm-form {
  margin: 0;
}

.btn-confirm-yes {
  min-width: 260px;
  padding: 16px 32px;
}

@media (max-width: 480px) {
  .registration-copy-dl {
    grid-template-columns: 1fr;
    gap: 2px 0;
  }

  .registration-copy-dl dt {
    margin-top: 8px;
  }

  .registration-copy-dl dt:first-child {
    margin-top: 0;
  }
}
