:root {
  --preapply-accent: #ff8a3d;
  --preapply-accent-dark: #ee6f22;
  --preapply-bg: #f7f7f5;
  --preapply-card: #ffffff;
  --preapply-soft: #f4f5f2;
  --preapply-text: #1f2328;
  --preapply-muted: #6f7782;
  --preapply-line: #e2e4df;
}

body.preapply-page {
  min-width: 320px;
  background: var(--preapply-bg);
  color: var(--preapply-text);
}

.preapply-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--preapply-line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
}

.preapply-topbar-inner {
  width: min(100%, 760px);
  min-height: 62px;
  margin: 0 auto;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.preapply-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.preapply-logo img {
  width: 142px;
  height: auto;
}

.preapply-step-state {
  min-width: 42px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--preapply-line);
  border-radius: 999px;
  background: var(--preapply-soft);
  color: var(--preapply-muted);
  font-size: 13px;
  font-weight: 900;
}

.preapply-progress {
  height: 3px;
  background: #ebede8;
}

.preapply-progress span {
  display: block;
  width: 50%;
  height: 100%;
  background: var(--preapply-accent);
  transition: width 0.22s ease;
}

.preapply-container {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 32px 14px 54px;
}

.preapply-card-form {
  display: grid;
  gap: 14px;
}

.preapply-screen {
  display: none;
  gap: 14px;
}

.preapply-screen.is-active {
  display: grid;
}

.preapply-intro-card,
.preapply-question {
  overflow: hidden;
  border: 1px solid var(--preapply-line);
  border-radius: 10px;
  background: var(--preapply-card);
  box-shadow: 0 8px 24px rgba(25, 31, 28, 0.04);
}

.preapply-hero-icon {
  min-height: 176px;
  display: grid;
  place-items: center;
  background: var(--preapply-accent);
  color: rgba(255, 255, 255, 0.82);
}

.preapply-hero-icon img {
  width: 74px;
  height: 74px;
  opacity: 0.9;
}

.preapply-intro-card.compact .preapply-intro-body {
  padding-bottom: 26px;
}

.preapply-intro-body {
  padding: 26px 26px 30px;
}

.preapply-intro-body h1 {
  margin: 0 0 16px;
  font-size: 22px;
  line-height: 1.38;
  letter-spacing: 0;
}

.preapply-intro-body p {
  margin: 0 0 16px;
  color: #3d444d;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.72;
}

.preapply-intro-body .preapply-highlight {
  margin-top: 4px;
  font-weight: 900;
}

.preapply-rejection-box {
  margin: 0 0 22px;
  padding: 15px 16px;
  border: 1px solid #f0c8bd;
  border-radius: 10px;
  background: #fff5f2;
  color: #8f3325;
}

.preapply-rejection-box strong {
  display: block;
  margin-bottom: 7px;
  font-size: 15px;
  font-weight: 900;
}

.preapply-rejection-box p {
  margin: 0;
  color: #5e2a22;
  line-height: 1.65;
  white-space: pre-wrap;
}

.preapply-info-list {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.preapply-info-list section {
  display: grid;
  gap: 6px;
}

.preapply-info-list h2 {
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
}

.preapply-info-list ul {
  margin: 0;
  padding-left: 20px;
  color: #343b44;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.65;
}

.preapply-info-list p {
  margin: 0;
  font-size: 14px;
}

.preapply-minor-notice {
  margin-top: 8px !important;
  padding: 12px 13px;
  border: 1px solid #ffd1b4;
  border-radius: 8px;
  background: #fff4eb;
  color: #8d3f12 !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  line-height: 1.55 !important;
}

.preapply-open-time {
  display: inline-flex;
  margin: 20px 0 0 !important;
  padding: 9px 13px;
  border-radius: 999px;
  background: var(--preapply-soft);
  color: var(--preapply-muted) !important;
  font-size: 13px !important;
  font-weight: 850 !important;
}

.preapply-required-note {
  margin: 0;
  color: #d33a2c;
  text-align: right;
  font-size: 13px;
  font-weight: 900;
}

.preapply-question {
  padding: 20px 18px;
}

.preapply-question .field {
  gap: 10px;
}

.preapply-question .field > span {
  color: var(--preapply-text);
  font-size: 17px;
  font-weight: 900;
}

.preapply-question .field > span em {
  color: #d33a2c;
  font-style: normal;
}

.preapply-question .field small {
  justify-self: start;
  color: var(--preapply-muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.55;
}

.preapply-question input[type="text"],
.preapply-question input[type="tel"],
.preapply-question input[type="email"],
.preapply-question textarea {
  border-color: #e6e8e4;
  background: #f6f7f4;
}

.preapply-question textarea {
  min-height: 104px;
}

.preapply-options {
  display: grid;
  gap: 8px;
}

.preapply-options label {
  min-height: 52px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 13px 13px;
  box-sizing: border-box;
  border: 1px solid #e6e8e4;
  border-radius: 8px;
  background: #ffffff;
  color: #36404b;
  font-weight: 850;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.preapply-options input {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  min-width: 20px;
  max-width: 20px;
  height: 20px;
  min-height: 20px;
  margin: 0;
  padding: 0;
  border: 2px solid #a9afb6;
  border-radius: 50%;
  background: #ffffff;
  box-sizing: border-box;
  box-shadow: none;
  display: grid;
  place-content: center;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.preapply-options input[type="radio"]::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffffff;
  content: "";
  transform: scale(0);
  transition: transform 0.12s ease;
}

.preapply-options input[type="radio"]:checked {
  border-color: var(--preapply-accent);
  background: var(--preapply-accent);
}

.preapply-options input[type="radio"]:checked::before {
  transform: scale(1);
}

.preapply-options input[type="checkbox"] {
  border-radius: 5px;
}

.preapply-options input[type="checkbox"]::before {
  width: 9px;
  height: 5px;
  border-bottom: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  content: "";
  transform: rotate(-45deg) scale(0);
  transform-origin: center;
  transition: transform 0.12s ease;
}

.preapply-options input[type="checkbox"]:checked {
  border-color: var(--preapply-accent);
  background: var(--preapply-accent);
}

.preapply-options input[type="checkbox"]:checked::before {
  transform: rotate(-45deg) scale(1);
}

.preapply-options label:has(input:checked) {
  border-color: var(--preapply-accent);
  background: #fffaf6;
}

.preapply-options input:focus-visible {
  outline: 3px solid rgba(255, 138, 61, 0.24);
  outline-offset: 2px;
}

.preapply-description {
  display: grid;
  gap: 8px;
  margin: 2px 0 10px;
  color: #3e4650;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.65;
}

.preapply-description p {
  margin: 0;
}

.preapply-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 18px 0 28px;
}

.preapply-actions.two-up {
  justify-content: center;
}

.preapply-actions .primary-button,
.preapply-actions .ghost-button {
  min-width: 128px;
  text-decoration: none;
}

.preapply-actions .primary-button {
  background: var(--preapply-accent);
  box-shadow: none;
}

.preapply-actions .primary-button:hover {
  background: var(--preapply-accent-dark);
}

.preapply-actions .ghost-button {
  border-color: var(--preapply-line);
  background: #fff;
}

.primary-button:disabled,
.ghost-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
  box-shadow: none;
}

.field.is-invalid input,
.field.is-invalid textarea,
.preapply-options.is-invalid label:first-child {
  border-color: #d33a2c;
  box-shadow: 0 0 0 4px rgba(211, 58, 44, 0.1);
}

.field-error {
  color: #d33a2c;
  font-size: 12px;
  font-weight: 850;
}

.preapply-footer {
  margin-top: 22px;
  color: var(--preapply-muted);
  text-align: center;
  font-size: 13px;
  font-weight: 800;
}

@media (max-width: 760px) {
  .preapply-topbar-inner {
    min-height: 54px;
  }

  .preapply-logo img {
    width: 118px;
  }

  .preapply-container {
    padding-top: 24px;
  }

  .preapply-hero-icon {
    min-height: 140px;
  }

  .preapply-intro-body {
    padding: 22px 16px 24px;
  }

  .preapply-intro-body h1 {
    font-size: 19px;
  }

  .preapply-question {
    padding: 18px 14px;
  }

  .preapply-actions {
    position: sticky;
    bottom: 0;
    z-index: 9;
    margin: 0 -14px;
    padding: 12px 14px max(12px, env(safe-area-inset-bottom));
    background: rgba(247, 247, 245, 0.96);
    backdrop-filter: blur(14px);
  }

  .preapply-actions .primary-button,
  .preapply-actions .ghost-button {
    flex: 1;
  }
}
