:root { color-scheme: light; --navy: #1a2d4c; --ink: #0d1425; --muted: #526273; --line: #dce3eb; --surface: #f4f7fa; font-family: Arial, Helvetica, sans-serif; color: var(--ink); background: var(--surface); }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-size: 16px; line-height: 1.6; }
.apply-page { animation: page-fade-in .4s ease-out both; }
@keyframes page-fade-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .apply-page { animation: none; } }
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1080px; margin: auto; min-height: 110px; padding: 15px 28px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.header-inner span { color: var(--muted); font-size: .9rem; }
.logo { display: block; width: 105px; height: 78px; }
main { max-width: 900px; margin: auto; padding: 58px 24px 64px; }
.welcome-page { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.welcome-main { width: 100%; flex: 1; display: flex; align-items: center; padding-top: 64px; padding-bottom: 64px; }
.welcome-card { width: 100%; }
.welcome-description { max-width: 620px; color: var(--muted); font-size: 1.125rem; margin: 0 0 28px; }
.start-questionnaire { display: inline-block; padding: 16px 24px; background: var(--navy); color: white; text-decoration: none; border-radius: 8px; font-size: 1rem; font-weight: 600; text-align: center; }
.start-questionnaire:hover { background: #263f65; }
.welcome-note { max-width: 540px; margin: 20px 0 0; color: var(--muted); font-size: .9rem; }
.intro { max-width: 680px; margin-bottom: 32px; }
.eyebrow { color: var(--navy); font-size: .8rem; font-weight: 700; letter-spacing: .12em; }
h1 { font-size: clamp(2.5rem, 6vw, 4rem); line-height: 1.08; letter-spacing: -.045em; font-weight: 600; margin: 20px 0 24px; color: var(--navy); }
.intro > p:last-child { font-size: 1.1rem; color: var(--muted); }
.preview-note { padding: 16px 20px; border-left: 3px solid var(--navy); background: #e8eef5; border-radius: 4px; margin-bottom: 24px; font-size: .9rem; }
form { background: white; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
form { scroll-margin-top: 20px; }
.step-progress { padding: 24px 36px; background: var(--surface); border-bottom: 1px solid var(--line); scroll-margin-top: 20px; }
.step-progress p { margin: 0 0 16px; color: var(--navy); font-weight: 600; }
.step-list { display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; padding: 0; margin: 0 0 18px; font-size: .875rem; color: var(--muted); }
.step-list li[aria-current="step"] { color: var(--navy); font-weight: 700; text-decoration: underline; text-underline-offset: 5px; }
.step-progress progress { display: block; width: 100%; height: 6px; border: 0; border-radius: 6px; overflow: hidden; background: var(--line); accent-color: var(--navy); }
.step-progress progress::-webkit-progress-bar { background: var(--line); }
.step-progress progress::-webkit-progress-value { background: var(--navy); }
.step-progress progress::-moz-progress-bar { background: var(--navy); }
.step-navigation { display: flex; justify-content: space-between; gap: 16px; padding: 24px 36px; }
.step-navigation button { border-radius: 7px; padding: 12px 24px; font-weight: 600; cursor: pointer; }
.back-button { border: 1px solid #b9c5d2; background: white; color: var(--navy); }
.next-button { margin-left: auto; border: 1px solid var(--navy); background: var(--navy); color: white; }
.step-navigation button:hover { filter: brightness(.93); }
.form-section { padding: 32px 36px; border-bottom: 1px solid var(--line); }
.form-section:last-child { border: 0; }
h2 { font-size: 1.35rem; line-height: 1.3; font-weight: 600; margin: 0 0 9px; color: var(--navy); }
.section-heading { margin-bottom: 24px; }
.section-heading p, .muted { color: var(--muted); margin-top: 0; font-size: .94rem; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
label { display: flex; flex-direction: column; gap: 8px; font-size: .94rem; font-weight: 600; }
input, textarea, button { font: inherit; }
input, textarea, select { font-size: max(16px, 1rem); }
.input-unit { position: relative; display: flex; align-items: center; }
.input-unit input { padding-right: 70px !important; }
.input-unit > span { position: absolute; right: 18px; color: var(--muted); font-size: 16px; font-weight: 400; pointer-events: none; }
.phone-input { position: relative; display: flex; align-items: center; }
.phone-input input { padding-left: 54px !important; }
.phone-flag { position: absolute; left: 16px; font-size: 22px; line-height: 1; pointer-events: none; }
input:not([type=radio]):not([type=checkbox]), textarea { width: 100%; min-width: 0; border: 1px solid #b9c5d2; background: #fff; color: var(--ink); border-radius: 7px; padding: 12px 14px; font-weight: 400; }
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: #677787; }
:focus-visible { outline: 3px solid #5479ac; outline-offset: 3px; }
small { font-size: .85rem; font-weight: 400; color: var(--muted); }
.question { margin: 26px 0; padding: 0; border: 0; }
legend { font-size: .94rem; font-weight: 600; margin-bottom: 12px; }
.choices { display: flex; gap: 16px; }
.choices label { flex-direction: row; align-items: center; border: 1px solid var(--line); padding: 10px 24px; border-radius: 6px; cursor: pointer; }
input[type=radio], input[type=checkbox] { accent-color: var(--navy); width: 18px; height: 18px; flex-shrink: 0; }
.upload { background: var(--surface); border: 1px dashed #8d9fb5; padding: 24px; border-radius: 8px; }
.upload input[type=file] { background: transparent; border: 0; padding: 8px 0; }
input::file-selector-button { background: white; color: var(--navy); border: 1px solid #b9c5d2; border-radius: 5px; padding: 8px 12px; margin-right: 12px; cursor: pointer; }
.photo-preview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.photo-preview figure { position: relative; margin: 0; min-width: 0; }
.photo-preview img { width: 100%; height: 130px; object-fit: cover; border-radius: 6px; }
.photo-preview figcaption { font-size: .8rem; overflow-wrap: anywhere; }
#photo-status { font-size: .9rem; }
.checkbox { flex-direction: row; align-items: flex-start; font-weight: 400; margin: 18px 0; }
.medical-question { margin: 24px 0 16px; padding: 0; border: 0; min-width: 0; }
.medical-question legend { line-height: 1.6; }
.choices label:has(input:checked) { border-color: var(--navy); background: #e8eef5; }
.medical-detail { margin: 12px 0 24px 26px; }
.consent-section a { color: var(--navy); text-underline-offset: 3px; }
.terms-accordion { margin: 18px 0; }
.terms-accordion summary { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border: 1px solid #b9c5d2; border-radius: 7px; background: white; color: var(--navy); cursor: pointer; font-size: .9rem; font-weight: 600; list-style: none; }
.terms-accordion summary::-webkit-details-marker { display: none; }
.terms-accordion summary::after { content: '+'; font-size: 20px; line-height: 1; }
.terms-accordion[open] summary::after { content: '−'; }
.terms-accordion summary:hover { background: var(--surface); }
.terms-content { margin-top: 18px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; font-size: 1rem; overflow-wrap: anywhere; }
.terms-content h3 { margin: 0 0 12px; color: var(--navy); font-size: 1.2rem; }
.terms-content h4 { margin: 24px 0 8px; color: var(--navy); font-size: 1rem; }
.terms-content p { margin: 0 0 14px; }
.terms-content p:last-child { margin-bottom: 0; }
.submit { display: block; border: 0; background: var(--navy); color: #fff; border-radius: 7px; padding: 15px 30px; margin: 28px 0 12px; font-weight: 600; }
.submit:disabled { opacity: .65; cursor: not-allowed; }
.submit { display: flex; align-items: center; justify-content: center; gap: 12px; cursor: pointer; }
.submit.is-sending { opacity: 1; cursor: wait; }
.submit-spinner { width: 20px; height: 20px; border: 2px solid #ffffff66; border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
.remove-photo { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 44px; height: 44px; border: 0; background: white; color: #c62828; padding: 0; border-radius: 50%; cursor: pointer; font-size: 30px; line-height: 1; box-shadow: 0 2px 8px #00000026; }
.remove-photo:hover { background: #fff1f1; color: #a31515; }
.form-section h2 { scroll-margin-top: 24px; }
.step-enter { animation: step-enter .3s ease-out both; }
.success-message { padding: 48px 28px; text-align: center; background: white; border: 1px solid var(--line); border-radius: 16px; scroll-margin-top: 24px; animation: step-enter .4s ease-out both; }
.success-check { width: 72px; height: 72px; display: grid; place-items: center; margin: 0 auto 24px; border-radius: 50%; background: #e5f3ed; color: #176743; font-size: 38px; animation: confirmed .5s ease-out both; }
#submit-status { overflow-wrap: anywhere; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes step-enter { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes confirmed { from { opacity: 0; transform: scale(.8); } to { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .step-enter, .success-message, .success-check, .submit-spinner { animation: none; } }
footer { border-top: 1px solid var(--line); padding: 26px; text-align: center; color: var(--muted); font-size: .9rem; }
@media (max-width: 600px) { main { padding: 32px 16px; } .header-inner { padding: 12px 20px; } .header-inner span { max-width: 145px; text-align: right; } .form-section { padding: 26px 20px; } .grid, .three { grid-template-columns: 1fr; gap: 18px; } .upload { padding: 16px; } .submit { width: 100%; } .photo-preview { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .step-progress, .step-navigation { padding: 20px; } .step-list { gap: 8px 14px; } }
