:root {
  --brand-navy: #002e4b;
  --navy: var(--brand-navy);
  --navy-2: #001c38;
  --ink: #001c38;
  --muted: #5f6d7c;
  --line: #e5e9ef;
  --line-strong: #c6d0da;
  --paper: #ffffff;
  --canvas: #f5f7f9;
  --wash: #f4f6f8;
  --teal: #395c80;
  --teal-dark: #001c38;
  --gold: #a8976a;
  --danger: #b84c54;
  --shadow: none;
  --radius-lg: 12px;
  --radius-md: 13px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

button, input, select, textarea { font: inherit; }
button, input, select { font-family: "Poppins", "Inter", sans-serif; }
button { cursor: pointer; }

.app-shell { min-height: 100vh; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 92px;
  padding: 0 max(28px, calc((100vw - 1180px) / 2));
  color: var(--navy);
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid #edf1f3;
}

.brand { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 3px; color: var(--navy); text-decoration: none; }
.brand-logo { display: block; width: 220px; height: auto; }
.brand-context { margin-left: 2px; color: var(--teal); font-family: "Poppins", sans-serif; font-size: 10px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; }
.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid #aebfc5;
  border-radius: 50%;
  color: var(--navy);
  font-family: "Cinzel", Georgia, serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
}
.brand-name { display: block; font-family: "Cinzel", Georgia, serif; font-size: 18px; font-weight: 500; letter-spacing: .01em; }
.brand-subtitle { display: block; margin-top: -1px; color: var(--teal); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.header-tools { display: flex; align-items: center; gap: 20px; color: var(--muted); font-size: 12px; }
.secure-pill { display: inline-flex; align-items: center; gap: 7px; }
.secure-dot { width: 7px; height: 7px; border-radius: 50%; background: #6fd0a7; box-shadow: 0 0 0 4px rgba(111,208,167,.14); }
.save-indicator { color: var(--muted); }

.main-content { width: min(1180px, calc(100% - 44px)); margin: 0 auto; padding: 46px 0 36px; }
.welcome { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 31px; }
.eyebrow { margin: 0 0 9px; color: var(--teal); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--brand-navy); font-family: "Cinzel", Georgia, serif; font-weight: 400; line-height: 1.12; }
h4 { color: var(--brand-navy); }
h1 { margin-bottom: 12px; font-size: clamp(34px, 4vw, 50px); letter-spacing: -.045em; }
h2 { margin-bottom: 10px; font-size: 30px; letter-spacing: -.035em; }
h3 { margin-bottom: 4px; font-size: 17px; line-height: 1.25; }
.welcome-copy { max-width: 800px; margin-bottom: 0; color: var(--muted); font-size: 16px; line-height: 1.5; }
.welcome-copy p { margin: 0 0 10px; }
.welcome-copy p:last-child { margin-bottom: 0; }
.welcome-copy a { color: var(--navy); }
.application-meta { min-width: 150px; padding: 14px 17px; border-left: 2px solid var(--gold); }
.meta-label { display: block; margin-bottom: 4px; color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.application-meta strong { color: var(--navy); font-family: "Poppins", sans-serif; font-size: 17px; }

.progress-card { margin-bottom: 24px; padding: 21px 0 18px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--paper); box-shadow: var(--shadow); }
.progress-topline { display: flex; align-items: end; justify-content: space-between; margin-bottom: 14px; }
.step-count { display: block; margin-bottom: 3px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.progress-topline strong { color: var(--brand-navy); font-size: 16px; }
.progress-percent { color: var(--teal); font-size: 13px; font-weight: 700; }
.progress-track { height: 6px; overflow: hidden; border-radius: 999px; background: #e8eef2; }
.progress-track span { display: block; height: 100%; width: 14%; border-radius: inherit; background: linear-gradient(90deg, var(--navy), var(--teal)); transition: width .35s ease; }
.step-nav { display: grid; grid-template-columns: repeat(var(--step-count, 7), minmax(0, 1fr)); gap: 8px; margin-top: 17px; }
.step-item { display: flex; align-items: center; gap: 8px; min-width: 0; color: #96a5b1; font-size: 11px; font-weight: 600; }
.step-bullet { display: grid; flex: 0 0 auto; width: 20px; height: 20px; place-items: center; border: 1px solid #d4dfe7; border-radius: 50%; font-size: 10px; }
.step-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.step-item.active { color: var(--brand-navy); }
.step-item.active .step-bullet { border-color: var(--teal); color: white; background: var(--teal); }
.step-item.complete { color: var(--teal-dark); }
.step-item.complete .step-bullet { border-color: #aec1d2; color: var(--navy); background: #e8eef4; }

.page { animation: pageIn .32s ease both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
.page-intro { display: flex; justify-content: space-between; gap: 24px; align-items: start; margin: 32px 4px 21px; }
.page-intro p { max-width: 740px; margin-bottom: 0; color: var(--muted); }
.page-kicker { margin: 0 0 8px; color: var(--teal); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.page-badge { flex: 0 0 auto; padding: 8px 11px; border-radius: 999px; color: var(--navy); background: #e9eef3; font-size: 11px; font-weight: 600; }

.section-card { margin-bottom: 18px; padding: 25px 27px 28px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--paper); box-shadow: var(--shadow); }
.section-card.soft { background: var(--paper); }
.section-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid #edf1f4; }
.section-heading p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.section-number { display: grid; flex: 0 0 auto; width: 31px; height: 31px; place-items: center; border: 1px solid #bfd0d2; border-radius: 50%; color: var(--brand-navy); background: white; font-size: 11px; font-weight: 700; }
.section-heading-main { display: flex; gap: 12px; align-items: start; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 18px; }
.field-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.field-grid.one { grid-template-columns: 1fr; }
.field { min-width: 0; }
.referral-follow-up { grid-column: 2 / -1; max-height: 0; margin-top: -17px; overflow: hidden; opacity: 0; transform: translateY(-5px); pointer-events: none; transition: max-height .26s ease, margin-top .26s ease, opacity .18s ease, transform .26s ease; }
.referral-follow-up.is-open { max-height: 150px; margin-top: 0; opacity: 1; transform: translateY(0); pointer-events: auto; }
.relationship-follow-up { grid-column: 1 / -1; max-height: 0; overflow: hidden; opacity: 0; transform: translateY(-5px); pointer-events: none; transition: max-height .26s ease, opacity .18s ease, transform .26s ease; }
.relationship-follow-up.is-open { max-height: 110px; opacity: 1; transform: translateY(0); pointer-events: auto; }
fieldset.field { margin: 0; padding: 0; border: 0; }
.field.span-2 { grid-column: span 2; }
.field.span-3 { grid-column: span 3; }
.field.span-4 { grid-column: span 4; }
.field label, .field legend { display: block; margin-bottom: 7px; color: var(--brand-navy); font-family: "Poppins", sans-serif; font-size: 12px; font-weight: 500; }
.field legend { padding: 0; }
.field label.choice { display: inline-flex; align-items: center; margin: 0; }
.field label.choice-card { display: flex; align-items: center; margin: 0; }
.required { color: var(--teal); }
.field-hint { margin: -2px 0 8px; color: var(--muted); font-size: 12px; }
input[type="text"], input[type="email"], input[type="tel"], input[type="date"], select, textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  outline: none;
  color: var(--ink);
  background: #fff;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
input[type="text"], input[type="email"], input[type="tel"], input[type="date"], select { height: 44px; padding: 0 13px; }
textarea { min-height: 95px; padding: 12px 13px; resize: vertical; }
.word-count { margin-top: 6px; color: var(--muted); font-size: 12px; text-align: right; }
.word-count.over { color: #b4313d; font-weight: 600; }
input::placeholder, textarea::placeholder { color: #a2afbb; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(57,92,128,.13); }
input[readonly] { color: #546b7d; background: #f5f7f9; }
.searchable-select { position: relative; }
.searchable-select-input { padding-right: 42px !important; }
.searchable-select-input:disabled { color: var(--muted); background: #f5f7f9; cursor: not-allowed; }
.searchable-select-toggle { position: absolute; top: 1px; right: 1px; display: grid; width: 40px; height: 42px; place-items: center; border: 0; border-radius: 0 9px 9px 0; color: var(--muted); background: transparent; font-size: 18px; line-height: 1; }
.searchable-select-toggle:disabled { opacity: .55; cursor: not-allowed; }
.searchable-select-toggle:hover { color: var(--navy); background: #f4f7f9; }
.searchable-options { position: absolute; z-index: 20; top: calc(100% + 6px); right: 0; left: 0; max-height: 245px; overflow-y: auto; padding: 5px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; box-shadow: 0 12px 25px rgba(0,28,56,.14); }
.searchable-option { display: block; width: 100%; padding: 9px 11px; border: 0; border-radius: 7px; color: #40566b; background: transparent; text-align: left; font-size: 13px; }
.searchable-option[hidden], .searchable-empty[hidden] { display: none !important; }
.searchable-option:hover, .searchable-option:focus { color: var(--navy); background: #eef3f8; outline: none; }
.searchable-empty { padding: 10px 11px; color: var(--muted); font-size: 12px; }
.input-with-icon { position: relative; }
.input-with-icon input { padding-left: 39px; }
.input-icon { position: absolute; top: 12px; left: 14px; color: #91a3b2; font-size: 16px; pointer-events: none; }

.radio-group { display: flex; flex-wrap: wrap; gap: 9px; }
.choice { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 43px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 9px; color: #526a7e; background: #fff; cursor: pointer; transition: .2s ease; }
.choice:hover { border-color: #9ab1c7; background: #f6f8fb; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice:has(input:checked) { border-color: var(--teal); color: var(--navy); background: #eef3f8; box-shadow: inset 0 0 0 1px var(--teal); }
.choice-mark { display: grid; width: 15px; height: 15px; place-items: center; border: 1px solid #b6c5ce; border-radius: 50%; font-size: 10px; }
.choice:has(input:checked) .choice-mark { border-color: var(--teal); color: white; background: var(--teal); }
.choice:has(input[type="checkbox"]) .choice-mark { border-radius: 4px; }
.choice:has(input:checked) .choice-mark::before { content: "✓"; }

.checkbox-row { display: flex; align-items: start; gap: 10px; color: #4f6578; font-size: 13px; }
.checkbox-row input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--teal); }
.checkbox-row label { margin: 0; font-weight: 500; cursor: pointer; }
.same-as-residence { margin-top: 9px; }

.notice { margin: 18px 0; padding: 16px 18px; border-left: 3px solid var(--gold); border-radius: 0 12px 12px 0; color: #586f82; background: #fffaf0; font-size: 13px; }
.notice strong { color: var(--navy); }
.ielts-score-field { margin-top: 24px; }
.ielts-fee-notice { margin-top: 24px; }
.note-line { display: flex; align-items: start; gap: 9px; margin: 0 0 9px; }
.note-line:last-child { margin-bottom: 0; }
.note-icon { color: var(--gold); font-size: 17px; line-height: 1.2; }
.privacy-note { display: flex; gap: 9px; align-items: start; margin-top: 17px; color: var(--muted); font-size: 12px; }
.privacy-note .lock { color: var(--teal); font-size: 15px; }

.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.choice-card { position: relative; display: flex; align-items: center; gap: 11px; min-height: 52px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 11px; color: #526a7e; cursor: pointer; }
.choice-card input { accent-color: var(--teal); }
.choice-card:has(input:checked) { border-color: #9bb1c6; background: #f0f4f8; color: var(--navy); }
.choice-card small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.program-track-details { max-height: 0; overflow: hidden; opacity: 0; transition: max-height .36s ease, opacity .2s ease; }
.program-track-details.is-open { max-height: 2200px; opacity: 1; }
.i20-question-stack { display: grid; gap: 19px; margin-bottom: 8px; }
.conditional-panel { max-height: 0; overflow: hidden; opacity: 0; transition: max-height .36s ease, opacity .2s ease; }
.i20-guidance.is-open { max-height: 180px; opacity: 1; }
.i20-details.is-open { max-height: 3200px; opacity: 1; }
.english-proficiency-details.is-open { max-height: 2600px; opacity: 1; }
.english-test-score-upload.is-open { max-height: 500px; opacity: 1; }
.english-test-plan-panel.is-open { max-height: 1000px; opacity: 1; }
.english-test-plan-yes.is-open { max-height: 240px; opacity: 1; }
.english-test-star.is-open { max-height: 260px; opacity: 1; }
.program-attendance-question { margin-top: 0; transition: max-height .36s ease, margin-top .26s ease, opacity .2s ease; }
.program-attendance-question.is-open { margin-top: 22px; }
.program-preference-content, .program-conditional-content { margin-top: 24px; }
.program-preference-content .field, .program-conditional-content .field { width: 100%; }
.program-residence-fields { margin-top: 28px; }
.family-subsection { margin-top: 28px; padding-top: 24px; border-top: 1px solid #edf1f4; }
.family-subsection > h4 { margin: 0 0 16px; color: var(--brand-navy); font-family: "Poppins", sans-serif; font-size: 14px; font-weight: 600; }
.family-subsection > .section-card.soft:last-child { margin-bottom: 0; }
.household-address-panel, .household2-follow-up { max-height: 0; overflow: hidden; opacity: 0; transition: max-height .36s ease, opacity .2s ease; }
.household-address-panel.is-open { max-height: 640px; opacity: 1; }
/* 展开动画结束后放开裁切，面板底部国家下拉的选项列表才能完整显示（is-settled 由 settlePanelOverflow 控制） */
.household-address-panel.is-open.is-settled, .household2-follow-up.is-open.is-settled { overflow: visible; }
.household2-follow-up.is-open { max-height: 900px; opacity: 1; }
.residence-notice { margin-top: 28px; color: #4f4f4f; font-size: 15px; line-height: 1.45; }
.residence-notice h4 { margin: 0 0 22px; color: var(--brand-navy); font-family: "Poppins", sans-serif; font-size: 18px; font-weight: 700; }
.residence-notice p { margin: 0 0 21px; }
.residence-notice ol, .residence-notice ul { margin: 0 0 22px; padding-left: 29px; }
.residence-notice ol > li { padding-left: 3px; margin-bottom: 22px; }
.residence-notice ol > li:last-child { margin-bottom: 0; }
.residence-notice ul { margin-top: 13px; margin-bottom: 0; }
.residence-notice ul li { margin-bottom: 3px; padding-left: 3px; }
.residence-notice-emphasis { font-weight: 700; }
.residence-link { color: var(--navy); font-weight: 700; text-decoration: underline; }
.residence-acknowledgement { display: flex; align-items: flex-start; gap: 7px; margin-top: 28px; color: #4f4f4f; font-size: 15px; }
.residence-acknowledgement > .required { color: #d00000; font-weight: 700; }
.residence-acknowledgement label { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; }
.residence-acknowledgement input { width: 17px; height: 17px; margin: 3px 0 0; accent-color: var(--teal); }

.mirror-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mirror-item { padding: 13px 14px; border: 1px solid #e1e7ed; border-radius: 11px; background: #f7f9fb; }
.mirror-label { display: block; margin-bottom: 3px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; }
.mirror-value { color: var(--navy); font-weight: 600; }
/* 只显示文字的镜像项（助学金表单里的签名日期）：没有方框，标签和输入框的标签一样 */
.mirror-item.plain { padding: 0; border: 0; background: none; }
.mirror-item.plain .mirror-label { margin-bottom: 7px; color: var(--brand-navy); font-family: "Poppins", sans-serif; font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.mirror-item.plain .mirror-value { font-weight: 400; }
.auto-fill-note { display: flex; align-items: center; gap: 8px; margin: -5px 0 17px; color: var(--teal-dark); font-size: 12px; }
.auto-fill-note::before { content: "↳"; display: grid; width: 20px; height: 20px; place-items: center; border-radius: 50%; color: white; background: var(--teal); font-weight: 700; }

.upload-zone { position: relative; display: flex; align-items: center; gap: 15px; min-height: 82px; padding: 15px 17px; border: 1px dashed #a9c4cc; border-radius: 11px; background: #fbfdfd; transition: .2s ease; }
.upload-zone:hover, .upload-zone.dragover { border-color: var(--teal); background: #f0f4f8; }
.upload-icon { display: grid; flex: 0 0 auto; width: 40px; height: 40px; place-items: center; border-radius: 11px; color: var(--navy); background: #e8eef4; font-size: 20px; }
.upload-copy { min-width: 0; }
.upload-copy strong { display: block; color: var(--navy); font-size: 13px; }
.upload-copy span { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.upload-button { flex: 0 0 auto; margin-left: auto; padding: 8px 11px; border: 1px solid #b6c6d6; border-radius: 8px; color: var(--navy); background: white; font-size: 12px; font-weight: 600; }
.upload-zone input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.upload-name { margin-top: 7px; color: var(--teal-dark); font-size: 12px; font-weight: 600; }
.upload-zone-multi input[type="file"] { display: none; }
.upload-zone-multi .upload-button { cursor: pointer; }
/* 正在上传或保存时文件框不可用：按钮变灰、指针显示不可点 */
.upload-button:disabled, .upload-zone-multi .upload-button:disabled { opacity: .5; cursor: not-allowed; }
.upload-zone input[type="file"]:disabled { cursor: not-allowed; }
.upload-files { display: grid; gap: 7px; margin: 8px 0 0; padding: 0; list-style: none; }
.upload-files li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 10px; border-radius: 7px; background: #f0f4f8; color: var(--navy); font-size: 12px; }
.upload-files li span { min-width: 0; overflow-wrap: anywhere; }
.upload-files button { flex: 0 0 auto; border: 0; color: var(--teal-dark); background: transparent; font: inherit; font-weight: 600; cursor: pointer; }
.upload-files button:hover { text-decoration: underline; }

.question-list { display: grid; gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; }
.question-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 16px 17px; background: white; }
.question-row:nth-child(even) { background: #fbfcfd; }
.question-text { color: var(--brand-navy); font-size: 13px; font-weight: 600; }
.question-subtext { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; font-weight: 400; }
.compact .choice { min-height: 34px; padding: 0 10px; font-size: 12px; }

.copy-block { color: #566e80; font-size: 13px; }
.copy-block p { margin-bottom: 11px; }
.copy-block p:last-child { margin-bottom: 0; }
.copy-block.dance-requirements p, .preview-copy.dance-requirements p { margin-bottom: 3px; }
.dance-requirements ol { margin: 0 0 0 2em; padding-left: 1.3em; }
.dance-requirements li { margin: 0; }
.dance-requirements h4 { margin: 0 0 3px; font-size: inherit; }
.dance-requirements ul { margin: 0 0 0 3.3em; padding-left: 1.3em; }
.financial-aid-links { margin: -2px 0 12px 20px; padding: 0; color: #566e80; font-size: 13px; }
.financial-aid-links li { margin-bottom: 7px; padding-left: 3px; }
.financial-aid-links a { color: var(--teal-dark); font-weight: 600; text-underline-offset: 2px; }
.school-transcript-copy { margin-top: 28px; }
.policy-copy { max-height: 245px; overflow: auto; padding: 17px 18px; border: 1px solid var(--line); border-radius: 12px; color: #566e80; background: #fbfcfd; font-size: 13px; }
.policy-copy.complete { max-height: none; overflow: visible; }
.policy-copy h4 { margin: 0 0 5px; color: var(--brand-navy); font-size: 14px; }
.policy-copy p { margin-bottom: 13px; }
.policy-copy ol { margin: 8px 0 15px 20px; padding: 0; }
.policy-copy li { margin-bottom: 10px; padding-left: 4px; }

.signature-reference { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 16px 0; padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px; color: var(--navy); background: #fbfcfd; font-size: 12px; }
.signature-reference span { color: var(--muted); font-size: 11px; }
.signature-reference-pad { margin: 16px 0; }
.recommendation-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.recommendation-card { padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfd; }
.recommendation-card h4 { margin: 0 0 15px; color: var(--brand-navy); font-size: 14px; }

.signature-layout { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 22px; }
.signature-pad-wrap { padding: 15px; border: 1px solid var(--line-strong); border-radius: 13px; background: #fbfcfd; }
.signature-label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; color: var(--brand-navy); font-size: 12px; font-weight: 700; }
.clear-signature { border: 0; color: var(--teal); background: none; font-size: 11px; font-weight: 700; }
#signaturePad, .signature-canvas { display: block; width: 100%; height: 145px; border: 1px solid #d9e5e9; border-radius: 9px; background: white; touch-action: none; cursor: crosshair; }
.signature-hint { margin: 8px 0 0; color: var(--muted); font-size: 11px; }
/* 签名板占满一列、打字签名放在它下面；一行里签名板在左（宽）、日期在右 */
.signature-layout.stacked { grid-template-columns: 1fr; gap: 0; }
.field-grid.signature-row { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; margin-top: 18px; }
.typed-signature { margin-top: 13px; font-family: "Cinzel", Georgia, serif; font-size: 21px; color: var(--navy); }
.review-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.summary-chip { padding: 11px 12px; border: 1px solid #e3eaee; border-radius: 10px; background: #fbfcfd; }
.summary-chip span { display: block; margin-bottom: 2px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .07em; }
.summary-chip strong { display: block; overflow: hidden; color: var(--navy); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }

.form-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 23px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line); }
.form-footer .button-secondary { margin-left: auto; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 0 17px; border: 1px solid transparent; border-radius: 10px; font-size: 13px; font-weight: 700; transition: transform .2s, box-shadow .2s, background .2s; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button-primary { color: #edf0f4; background: var(--navy); border-radius: 999px; }
.button-primary:hover { background: var(--navy-2); }
.button-secondary { border-color: #b9c6d2; color: var(--navy); background: #e9e9e9; border-radius: 999px; }
.button-secondary:hover { background: #f0f1f2; }
.button-ghost { border-color: transparent; color: #667b8b; background: transparent; }
.button-ghost:hover { color: var(--navy); background: #e9eff3; }
.button-icon { font-size: 17px; line-height: 1; }
.button:disabled { opacity: .42; cursor: not-allowed; transform: none; box-shadow: none; }

.site-footer { display: flex; justify-content: space-between; width: min(1180px, calc(100% - 44px)); margin: 0 auto; padding: 0 0 28px; color: #94a2ad; font-size: 11px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 20; max-width: 320px; padding: 12px 15px; border: 1px solid #b9c7d4; border-radius: 10px; color: var(--navy); background: white; box-shadow: 0 13px 30px rgba(0,28,56,.12); opacity: 0; pointer-events: none; transform: translateY(8px); transition: .25s ease; }
.toast.show { opacity: 1; transform: translateY(0); }

.modal-backdrop { position: fixed; inset: 0; z-index: 10; display: none; align-items: center; justify-content: center; padding: 22px; background: rgba(11, 29, 46, .58); backdrop-filter: blur(4px); }
.modal-backdrop.open { display: flex; }
.preview-modal { width: min(900px, 100%); max-height: min(850px, calc(100vh - 44px)); overflow: auto; padding: 28px; border: 1px solid #e1e9ed; border-radius: 16px; background: white; box-shadow: 0 18px 48px rgba(5, 21, 35, .18); animation: modalIn .25s ease both; }
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal-header { display: flex; align-items: start; justify-content: space-between; gap: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin-bottom: 0; }
.icon-button { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: white; font-size: 22px; line-height: 1; }
.icon-button:hover { color: var(--navy); background: #f3f7f9; }
.modal-intro { margin: 17px 0 20px; color: var(--muted); font-size: 13px; }
.preview-section { margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid #edf1f4; }
.preview-section:last-child { margin-bottom: 0; border-bottom: 0; }
.preview-section h3 { display: flex; align-items: baseline; gap: 12px; margin-bottom: 11px; }
.preview-section h3 span { color: var(--teal); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.preview-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 16px; }
.preview-item span { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.preview-item strong { display: block; color: var(--navy); font-size: 13px; font-weight: 600; }
.preview-item.wide { grid-column: 1 / -1; }
.preview-item.wide span { color: #566e80; font-size: 12px; text-transform: none; letter-spacing: 0; }
.preview-grid + .preview-grid, .preview-copy + .preview-grid, .preview-grid + .preview-copy, .preview-copy + .preview-copy, .preview-grid + .preview-group, .preview-copy + .preview-group { margin-top: 12px; }
.preview-group { margin-top: 16px; }
.preview-group > h4 { margin: 0 0 9px; color: var(--brand-navy); font-family: "Poppins", sans-serif; font-size: 13px; font-weight: 600; }
.preview-copy { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; color: #566e80; background: #fbfcfd; font-size: 12px; line-height: 1.6; }
.preview-copy p { margin: 0 0 8px; }
.preview-copy p:last-child { margin-bottom: 0; }
.preview-signature { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 18px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); background: #fbfcfd; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.preview-signature img { display: block; width: min(260px, 60%); height: 72px; object-fit: contain; object-position: center; border: 1px solid #dbe5e9; border-radius: 8px; background: white; }
.modal-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 23px; padding-top: 18px; border-top: 1px solid var(--line); }
.modal-actions.end { justify-content: flex-end; }

/* 导入家庭信息：按钮与相邻输入框同高对齐；弹窗比预览弹窗窄 */
.import-action .button { width: 100%; }
.preview-modal.import-modal { width: min(520px, 100%); }

.success-state { padding: 52px 20px 64px; text-align: center; }
.success-icon { display: grid; width: 64px; height: 64px; margin: 0 auto 20px; place-items: center; border-radius: 22px 22px 22px 5px; color: white; background: var(--teal); font-size: 28px; box-shadow: 0 11px 24px rgba(37,139,134,.22); }
.success-state h2 { margin-bottom: 12px; }
.success-state p { max-width: 530px; margin: 0 auto 8px; color: var(--muted); }
.confirmation-number { display: inline-block; margin-top: 18px; padding: 10px 14px; border-radius: 8px; color: var(--navy); background: #eef2f5; font-size: 13px; font-weight: 700; letter-spacing: .06em; }

@media (max-width: 800px) {
  .site-header { padding: 0 22px; }
  .header-tools { gap: 10px; }
  .secure-pill { display: none; }
  .main-content { width: min(100% - 28px, 650px); padding-top: 31px; }
  .welcome { align-items: start; flex-direction: column; gap: 17px; margin-bottom: 24px; }
  .application-meta { padding: 0 0 0 13px; }
  .step-nav { gap: 3px; }
  .step-item { justify-content: center; }
  .step-label { display: none; }
  .page-intro { flex-direction: column; margin-top: 24px; }
  .field-grid, .field-grid.three, .field-grid.four, .field-grid.signature-row, .signature-layout, .recommendation-grid { grid-template-columns: 1fr; }
  .referral-follow-up { grid-column: 1 / -1; }
  .field.span-2, .field.span-3, .field.span-4 { grid-column: auto; }
  .choice-grid, .mirror-grid, .review-summary, .preview-grid { grid-template-columns: 1fr; }
  .section-card { padding: 21px 19px 22px; border-radius: 17px; }
  .section-heading { gap: 10px; }
  .section-heading-main { gap: 10px; }
  .section-heading p { font-size: 12px; }
  .question-row { grid-template-columns: 1fr; gap: 10px; }
  .upload-zone { align-items: start; flex-wrap: wrap; }
  .upload-button { margin-left: 0; }
  .signature-reference { align-items: flex-start; flex-direction: column; }
  .preview-signature { align-items: flex-start; flex-direction: column; }
  .preview-signature img { width: 100%; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .referral-follow-up, .relationship-follow-up, .conditional-panel { transition: none; }
}

@media (max-width: 480px) {
  .site-header { min-height: 70px; }
  .brand-logo { width: 185px; }
  .brand-context { font-size: 9px; }
  .save-indicator { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  h1 { font-size: 36px; }
  h2 { font-size: 26px; }
  .main-content { width: calc(100% - 20px); padding-top: 22px; }
  .welcome-copy { font-size: 14px; }
  .progress-card { padding: 17px 15px 14px; border-radius: 17px; }
  .progress-percent { display: none; }
  .step-nav { margin-top: 14px; }
  .step-bullet { width: 21px; height: 21px; }
  .form-footer { display: grid; grid-template-areas: "previous next" "save save"; grid-template-columns: 1fr 1fr; gap: 8px; }
  .form-footer .button-ghost { grid-area: previous; }
  .form-footer .button-secondary { grid-area: save; width: 100%; margin-left: 0; }
  .form-footer .button-primary { grid-area: next; width: 100%; margin-left: 0; }
  /* 一页表单没有 Previous：两个按钮各占一整行，主按钮在上 */
  .form-footer.single-page { grid-template-areas: "next" "save"; grid-template-columns: 1fr; }
  .button { min-height: 47px; padding: 0 12px; }
  input[type="text"], input[type="email"], input[type="tel"], input[type="date"], select { height: 48px; }
  textarea { min-height: 115px; }
  .radio-group { gap: 8px; }
  .choice { min-height: 46px; }
  .modal-backdrop { padding: 10px; }
  .preview-modal { max-height: calc(100vh - 20px); padding: 20px 16px; border-radius: 14px; }
  .site-footer { width: calc(100% - 28px); gap: 15px; }
  .site-footer span:last-child { display: none; }
}

/* Portal 的 app.css 在所有页面加了字体平滑、按钮聚焦描边和 min-height，原页面没有；只在招生页面恢复浏览器默认 */
html, body { min-height: auto; -webkit-font-smoothing: auto; text-rendering: auto; }
button:focus-visible { outline: revert; outline-offset: revert; }

/* 提交成功页的"下载签名 PDF"按钮（Blazor 版新增，原页面没有） */
.success-actions { margin-top: 22px; }
