* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  font-family: 'Noto Sans JP', sans-serif;
  color: #0b1a3c;
  background-color: #fff;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  text-decoration: none;
  color: inherit;
}

input,
button {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
}

/* Header */
.header {
  background-color: #fff;
  height: 90px;
  width: 100%;
}

.header-inner {
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 100px;
  height: 100%;
  display: flex;
  align-items: center;
}

.logo {
  display: block;
}

.logo-img {
  width: 165px;
  height: 28px;
}

/* Main */
.main {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.container {
  max-width: 1380px;
  width: 100%;
  padding: 0 0 80px;
}

/* Title Section */
.title-section {
  padding: 24px 16px;
  text-align: center;
}

.page-title {
  font-size: 40px;
  font-weight: 500;
  letter-spacing: 2.4px;
}

.page-title br {
  display: none;
}

@media screen and (max-width: 768px) {
  .page-title br {
    display: block;
  }
}

.page-description {
  margin-top: 24px;
  font-size: 16px;
  letter-spacing: 0.8px;
}

.page-description--error {
  margin-top: 8px;
  color: #b82430;
  font-weight: 700;
}

@media screen and (max-width: 768px) {
  .page-description {
    text-align: left;
    font-size: 14px;
  }
  .page-description--center {
    text-align: center;
  }
}

/* Form */
.form {
  max-width: 768px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

@media screen and (max-width: 768px) {
  .form {
    padding-left: 16px;
    padding-right: 16px;
  }
}

.form-wrapper {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
  padding-top: 40px;
}

/* Form Section */
.form-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding-bottom: 40px;
}

.form-section--border {
  border-bottom: 1px solid #ccc;
}

.section-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-section-wrapper > .section-header {
  margin-bottom: 20px;
}

.form-section-wrapper--confirm {
  padding: 24px 0;
}
@media screen and (max-width: 768px) {
  .form-section-wrapper--confirm {
    padding-top: 0;
    padding-bottom: 0;
  }
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.8px;
  line-height: 25px;
}

.section-description {
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.8px;
}

@media screen and (max-width: 768px) {
  .section-description {
    font-size: 14px;
  }
}

/* Form Row */
.form-row {
  display: flex;
  gap: 24px;
  width: 100%;
}

@media screen and (max-width: 768px) {
  .form-row.form-row--sp {
    flex-direction: row;
  }
}

.form-row--half {
  width: 348px;
  max-width: 100%;
}

/* Form Group */
.form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 12px;
}

.label-text {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.8px;
}

.required-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #fcce47;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.8px;
}

/* Input */
.input-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-input {
  width: 100%;
  max-height: 60px;
  background-color: #fff;
  border: 1px solid #d8d8d8;
  border-radius: 5px;
  padding: 18px 16px 18px;
  font-size: 16px;
  color: #757575;
  transition: border-color 0.2s ease, color 0.2s ease;
}

@media screen and (max-width: 768px) {
  .form-input {
    padding-top: 10px;
    padding-bottom: 10px;
  }
}

.form-input::placeholder {
  color: #757575;
}

/* Focus state - yellow border */
.form-input:focus {
  border-color: #fcce47;
  outline: none;
}

/* Complete state - navy border, black text */
.form-input:not(:placeholder-shown) {
  border-color: #0b1a3c;
  color: #000;
}

/* Keep focus state even when has value */
.form-input:focus:not(:placeholder-shown) {
  border-color: #fcce47;
}

.input-hint {
  font-size: 12px;
  letter-spacing: 0.8px;
}

/* Agreement Section */
.agreement-section {
  width: 100%;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.checkbox-input {
  display: none;
}

.checkbox-custom {
  width: 20px;
  height: 20px;
  border: 1px solid #767676;
  border-radius: 2px;
  background-color: #fff;
  flex-shrink: 0;
  position: relative;
}

.checkbox-input:checked + .checkbox-custom::after {
  width: 20px;
  height: 20px;
  content: '';
  background-image: url('../images/check-arrow.svg');
  position: absolute;
  left: -1px;
  top: -1px;
}

.checkbox-text {
  font-size: 15px;
  font-family: 'Noto Sans JP', sans-serif;
  letter-spacing: 0.8px;
  line-height: 150%;
}

.link {
  color: #fcce47;
  font-weight: 700;
  text-decoration: underline;
}

/* Submit Section */
.submit-section {
  width: 100%;
  display: flex;
  justify-content: center;
}

.submit-button {
  width: 295px;
  height: 60px;
  background-color: #b82430;
  border-radius: 100px;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.submit-button:hover {
  opacity: 0.9;
}

.submit-button:active {
  opacity: 0.8;
}

.submit-button:disabled,
.submit-button.is-submitting {
  opacity: 0.7;
  cursor: not-allowed;
}

.submit-status {
  display: none;
  width: 100%;
  margin-top: -24px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: #0b1a3c;
}

body.is-loading {
  cursor: progress;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(11, 26, 60, 0.64);
  backdrop-filter: blur(2px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.loading-overlay.is-visible {
  display: flex;
}

.loading-overlay__content {
  min-width: 280px;
  max-width: 440px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.loading-overlay__spinner {
  width: 36px;
  height: 36px;
  border: 4px solid #d8d8d8;
  border-top-color: #b82430;
  border-radius: 50%;
  animation: loading-spin 0.9s linear infinite;
}

.loading-overlay__text {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
  color: #0b1a3c;
  white-space: pre-line;
}

@keyframes loading-spin {
  to {
    transform: rotate(360deg);
  }
}

/* reCAPTCHA Notice */
.recaptcha-notice {
  width: 100%;
}

.recaptcha-notice p {
  font-size: 13px;
  font-family: 'Noto Sans JP', sans-serif;
  letter-spacing: 0.8px;
  line-height: 150%;
}

/* Footer */
.footer {
  background-color: #0b1a3c;
  height: 150px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-link {
  font-size: 14px;
  font-weight: 500;
  color: #fff;
}

.footer-link:hover {
  opacity: 0.8;
}

.footer-divider {
  width: 1px;
  height: 20px;
  background-color: #d0d0d0;
  transform: rotate(0deg);
}

.copyright {
  font-size: 12px;
  font-family: 'Noto Sans', sans-serif;
  color: #fff;
}

/* ===================================
   Confirm Page Styles
   =================================== */

.confirm-form {
  max-width: 768px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

@media screen and (max-width: 768px) {
  .confirm-form {
    padding-left: 16px;
    padding-right: 16px;
  }
}

.confirm-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding-top: 40px;
}

.confirm-section {
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}


.confirm-section .section-title {
  margin-bottom: 16px;
}

.confirm-row {
  display: flex;
  gap: 24px;
  width: 100%;
}

@media screen and (max-width: 768px) {
  .confirm-row.confirm-row--sp {
    flex-direction: row;
    gap: 24px;
  }
}

.confirm-row--single {
  width: 50%;
}

.confirm-row--triple {
  display: flex;
  gap: 24px;
  width: 100%;
}

.confirm-row--triple > .confirm-group {
  padding-top: 20px;
  flex: 1;
}


.confirm-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid #ccc;
}

@media screen and (max-width: 768px) {
  .confirm-group {
    padding-top: 0;
    gap: 12px;
  }
}

.confirm-label {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.8px;
}

@media screen and (max-width: 768px) {
  .confirm-label {
    font-size: 16px;
  }
}

.confirm-value {
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.8px;
}

.agreement-section--confirm {
  padding: 0;
}

.checkbox-label--checked {
  cursor: default;
}

.checkbox-checked {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.button-section {
  display: flex;
  justify-content: center;
  gap: 16px;
  width: 100%;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 200px;
  height: 60px;
  padding: 0;
  border-radius: 100px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s ease;
  text-decoration: none;
}

.button:disabled,
.button.is-submitting {
  opacity: 0.7;
  cursor: not-allowed;
}

.button--outline {
  background-color: #fff;
  border: 1px solid #0b1a3c;
  color: #0b1a3c;
}

.button--outline:hover {
  background-color: #f5f5f5;
}

.button--primary {
  background-color: #b82430;
  border: none;
  color: #fff;
  min-width: 160px;
}

.button--primary:hover {
  opacity: 0.9;
}

.button--primary:active {
  opacity: 0.8;
}

/* ===================================
   Complete Page Styles
   =================================== */

.complete-content {
  max-width: 768px;
  margin: 0 auto;
  padding: 60px 24px 120px;
  text-align: center;
}

.complete-title {
  font-size: 40px;
  font-weight: 500;
  letter-spacing: 0.8px;
  color: #0b1a3c;
  margin-bottom: 32px;
}

.complete-notice {
  margin-bottom: 24px;
}

.notice-highlight {
  display: inline;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.8px;
  color: #0b1a3c;
  background: linear-gradient(transparent 60%, #fcce47 60%);
  padding: 0 4px;
}

.complete-message {
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.8px;
  line-height: 1.8;
  color: #0b1a3c;
}

.complete-message p {
  margin: 0;
}

/* ===================================
   Application Page Styles
   =================================== */

.form-row--triple {
  display: flex;
  gap: 24px;
  width: 100%;
}

.form-row--triple .form-group {
  flex: 1;
  gap: 4px;
}

.section-title-with-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.8px;
}

.label-text-small {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.8px;
}

/* File Upload */
.file-input {
  display: none;
}

.file-upload-container {
  width: 100%;
}

.file-upload {
  width: 100%;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: #fff;
  border: 1px solid #0b1a3c;
  border-radius: 5px;
  padding: 16px 16px 14px;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.file-upload:hover {
  border-color: #fcce47;
}

.file-upload-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 30px;
}

.file-upload-text {
  font-size: 15px;
  font-weight: 500;
  color: #0b1a3c;
}

/* File Uploaded */
.file-uploaded {
  width: 100%;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: #fff;
  border: 1px solid #d8d8d8;
  border-radius: 5px;
  padding: 16px;
}

.file-uploaded-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.file-uploaded-name {
  flex: 1;
  font-size: 15px;
  font-weight: 500;
  color: #0b1a3c;
}

.file-delete-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background-color: #b82430;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.file-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.file-delete-button:hover {
  opacity: 0.9;
}

.input-hint--link {
  display: flex;
  align-items: center;
  gap: 4px;
}

.input-hint--link svg {
  flex-shrink: 0;
}

/* Important Notice */
.important-notice {
  width: 100%;
}

.important-notice-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.8px;
  margin-bottom: 12px;
}

.important-notice-text {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.8px;
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
  .header-inner {
    padding: 0 24px;
  }


  .important-notice-title {
    font-size: 14px;
  }

  .form-section {
    width: 100%;
    gap: 20px;
  }

  .form-section:nth-last-of-type(1) {
    padding-bottom: 0;
  }

  .form-group {
    gap: 12px;
  }

  .form-row {
    flex-direction: column;
  }

  .form-row--half {
    width: 100%;
  }

  .form-row--triple {
    flex-direction: column;
    gap: 12px;
  }

  .form-section-wrapper > .section-header {
    margin-bottom: 12px;
  }

  .checkbox-text {
    font-size: 14px;
  }

  .confirm-section {
    width: 100%;
    gap: 20px;
  }

  .confirm-section .section-title {
    margin-bottom: 0;
  }

  .confirm-row {
    flex-direction: column;
  }

  .confirm-row--single {
    width: 100%;
  }

  .confirm-row--triple {
    flex-direction: column;
    gap: 0;
  }

  .confirm-row .confirm-group:not(:last-child),
  .confirm-row--triple .confirm-group:not(:last-child) {
    border-bottom: 1px solid #ccc;
  }

  .button-section {
    gap: 12px;
  }

  .button {
    max-width: 200px;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .header {
    height: auto;
    padding-top: 11px;
    padding-bottom: 8px;
  }
  .header-inner {
    padding-left: 16px;
    padding-right: 16px;
  }
  .logo-img {
    width: 120px;
  }
  .title-section {
    padding-bottom: 0;
  }
  .page-title {
    font-size: 32px;
  }

  .section-title {
    font-size: 20px;
  }

  .label-text {
    font-size: 16px;
  }

  .submit-button {
    width: 100%;
    max-width: 295px;
  }

  .footer {
    padding: 20px;
    height: auto;
  }

  .footer-nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .complete-title {
    font-size: 24px;
  }

  .complete-notice ,
  .complete-message {
    text-align: left;
  }
}

/* ===========================================
   Validation Styles
   =========================================== */
.error-message {
  color: #e53935;
  font-size: 13px;
  margin-top: 8px;
  display: none;
}

.form-input.is-error,
.file-input.is-error + .file-upload-icon + .file-upload-text {
  border-color: #e53935;
}

.form-input.is-error {
  border-color: #e53935;
}

.form-input.is-error:focus {
  border-color: #e53935;
}

.file-upload:has(.is-error) {
  border-color: #e53935;
}

.file-upload-container .error-message {
  margin-top: 8px;
}

.checkbox-input.is-error + .checkbox-custom {
  border-color: #e53935;
}

.agreement-section .error-message {
  margin-top: 12px;
  text-align: left;
}
