:root {
  color-scheme: light;
  --navy: #17385f;
  --navy-deep: #102746;
  --navy-soft: #edf3fa;
  --gold: #d9b574;
  --gold-dark: #805b22;
  --gold-soft: #fbf4e7;
  --ink: #1d2d42;
  --muted: #5d697c;
  --line: #dce3eb;
  --canvas: #f3f5f9;
  --white: #fff;
  --error: #aa2929;
  --radius: 14px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-color: #9cabbe var(--canvas); }
body { margin: 0; color: var(--ink); background: #eaf0f6; font-size: 16px; line-height: 1.5; }
button, input, select { font: inherit; }
button, a, label, input, select { -webkit-tap-highlight-color: transparent; }
button, input, select { touch-action: manipulation; }
button { cursor: pointer; }
a { color: inherit; text-underline-offset: 4px; }
button { color: inherit; }
input, select { min-width: 0; caret-color: var(--navy); }
input::placeholder { color: var(--muted); opacity: 1; }
input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
button:disabled { cursor: default; opacity: .52; }
button, a, input, select { outline-offset: 4px; }
:focus-visible { outline: 3px solid var(--gold-dark); }
::selection { color: var(--navy-deep); background: #eddbb8; }
svg { display: inline-block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
fieldset { border: 0; margin: 0; min-width: 0; }
legend { padding: 0; }
p, h1, h2 { margin: 0; }
[hidden] { display: none !important; }
.sr-only, .amount-option input, .term-option input, .gender-options input, .asset-option input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -100px; left: 12px; z-index: 100; padding: 12px 18px; color: var(--white); background: var(--navy); border-radius: 8px; }
.skip-link:focus { top: 12px; }
.page-shell { max-width: 520px; margin: 0 auto; min-height: 100dvh; background: var(--white); }
.brand-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy-deep); font-weight: 700; font-size: 21px; white-space: nowrap; }
.brand img { display: block; width: 42px; height: auto; border-radius: 9px; }
.brand-points { display: flex; flex-direction: column; gap: 5px; color: var(--navy); font-size: 11px; letter-spacing: .02em; }
.brand-points span { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.brand-points svg { width: 15px; height: 15px; color: var(--gold-dark); }
.section { padding: 20px; }
.section legend { float: left; width: 100%; margin-bottom: 16px; font-weight: 600; font-size: 18px; }
.section legend + * { clear: both; }
.amount-section { padding-top: 12px; }
.amount-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.amount-option, .term-option, .asset-option, .gender-options label { position: relative; display: block; cursor: pointer; }
.amount-option > span { display: flex; justify-content: center; align-items: center; min-height: 56px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--white); font-size: 19px; font-weight: 650; transition: color .15s, background .15s, border-color .15s; }
.amount-option input:checked + span { background: var(--navy); color: var(--white); border-color: var(--navy); box-shadow: inset 0 -3px 0 var(--gold); }
.amount-option input:focus-visible + span, .term-option input:focus-visible + span, .asset-option input:focus-visible + span, .gender-options input:focus-visible + span { outline: 3px solid var(--gold-dark); outline-offset: 3px; }
.rate-note { display: flex; align-items: center; gap: 7px; margin-top: 18px; padding-top: 14px; border-top: 1px solid #edf0f4; color: var(--gold-dark); font-size: 12px; }
.rate-note svg { width: 16px; height: 16px; }
.term-section { padding-top: 20px; padding-bottom: 3px; border-top: 12px solid var(--canvas); border-bottom: 12px solid var(--canvas); }
.term-section legend { margin-bottom: 7px; }
.section-note { margin-bottom: 14px; font-size: 12px; color: var(--muted); }
.term-options { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 12px) / 2); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px 2px 6px; margin: 0 -2px; }
.term-options::-webkit-scrollbar { display: none; }
.term-option { scroll-snap-align: start; }
.term-content { display: flex; flex-direction: column; align-items: center; position: relative; min-height: 102px; justify-content: center; border: 1px solid var(--line); border-radius: 9px; padding: 18px 7px 15px; background: var(--white); transition: background .15s, border-color .15s; }
.term-content > strong { color: var(--navy-deep); font-size: 23px; font-weight: 700; line-height: 1.2; }
.term-content > strong > span { margin-left: 2px; font-size: 17px; font-weight: 600; }
.payment { margin-top: 8px; font-size: 12px; white-space: nowrap; }
.payment b { font-weight: 650; font-variant-numeric: tabular-nums; }
.term-content small { margin-top: 2px; font-size: 11px; color: var(--muted); }
.term-option input:checked + .term-content { border-color: #a67d3e; background: var(--gold-soft); }
.recommend { position: absolute; top: -1px; left: -1px; padding: 2px 7px; border-radius: 8px 0 7px 0; background: var(--gold); color: var(--navy-deep); font-size: 11px; line-height: 1.6; }
.selected-tick { display: none; position: absolute; bottom: 4px; right: 5px; width: 13px; height: 13px; color: var(--gold-dark); }
.term-option input:checked + .term-content .selected-tick { display: block; }
.term-navigation { display: flex; align-items: center; justify-content: center; gap: 10px; height: 44px; }
.term-navigation .icon-button { width: 44px; height: 44px; min-height: 44px; }
.term-navigation svg { width: 16px; height: 16px; }
.scroll-indicator { width: 52px; height: 4px; border-radius: 10px; background: var(--line); overflow: hidden; }
.scroll-indicator > span { display: block; width: 26px; height: 4px; background: var(--navy); border-radius: inherit; }
.contact-section { padding-top: 20px; padding-bottom: 8px; }
.phone-control { display: flex; align-items: center; gap: 15px; padding: 0 21px; min-height: 64px; border: 1px solid #d7e1ed; border-radius: 40px; background: var(--navy-soft); }
.phone-control label { flex: none; color: var(--navy-deep); font-size: 18px; font-weight: 550; }
.phone-control input { width: 100%; min-height: 56px; border: 0; background: transparent; font-size: 17px; color: var(--navy); }
.phone-control:focus-within { border-color: var(--navy); }
.phone-control.invalid { border-color: var(--error); }
.sms-control { display: flex; align-items: center; min-height: 60px; gap: 6px; margin-top: 12px; padding: 5px 6px 5px 21px; border: 1px solid #d7e1ed; border-radius: 32px; background: var(--white); }
.sms-control input { width: 100%; min-width: 0; min-height: 46px; border: 0; background: transparent; color: var(--navy); font-size: 16px; }
.sms-control:focus-within { border-color: var(--navy); }
.sms-control.invalid { border-color: var(--error); }
.sms-control button { flex: none; min-width: 105px; min-height: 46px; padding: 7px 12px; border: 0; border-radius: 26px; color: var(--navy-deep); background: var(--gold-soft); font-size: 13px; font-weight: 600; }
.sms-control button:hover:not(:disabled) { background: #f4e5c9; }
.sms-control button:disabled { color: var(--muted); background: var(--canvas); opacity: 1; cursor: default; }
.sms-status { min-height: 18px; margin: 8px 3px 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.primary-button { width: 100%; min-height: 63px; border: 0; border-radius: 40px; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--white); background: var(--navy); font-size: 23px; font-weight: 600; box-shadow: 0 6px 13px rgb(23 56 95 / 16%); transition: background .18s, transform .18s var(--ease); }
.primary-button > svg { color: var(--gold); width: 22px; height: 22px; }
.primary-button:hover:not(:disabled) { background: var(--navy-deep); }
.primary-button:active:not(:disabled) { transform: scale(.985); }
.contact-section .primary-button { margin-top: 18px; }
.agreement-row { display: flex; align-items: flex-start; gap: 5px; margin-top: 11px; color: var(--muted); font-size: 12px; line-height: 1.9; }
.agreement-row > input { appearance: none; flex: 0 0 28px; width: 28px; height: 28px; margin: 0 0 0 -5px; border: 0; border-radius: 0; cursor: pointer; background: radial-gradient(circle at center, var(--white) 6px, #8995a6 6.5px, #8995a6 7.5px, transparent 8px); }
.agreement-row > input:checked { background: radial-gradient(circle at center, var(--navy) 3px, var(--white) 3.5px, var(--white) 5px, var(--navy) 5.5px, var(--navy) 7.5px, transparent 8px); }
.agreement-row > div { padding-top: 2px; }
.agreement-row label { cursor: pointer; }
.text-button { color: var(--navy); background: none; border: 0; border-radius: 2px; padding: 0 1px; font-size: inherit; line-height: inherit; text-align: inherit; text-decoration: underline; text-decoration-color: #c1cddd; text-underline-offset: 3px; }
.text-button:hover { color: var(--gold-dark); }
.steps-section { padding: 18px 20px 26px; }
.steps-section h2 { display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 18px; font-weight: 600; color: var(--navy-deep); }
.steps-section h2 > span { width: 31px; height: 1px; background: var(--gold); }
.steps { display: flex; align-items: flex-start; justify-content: space-between; gap: 5px; list-style: none; margin: 22px 0 0; padding: 0; }
.steps li { display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.step-icon { display: flex; align-items: center; justify-content: center; width: 40px; height: 44px; }
.step-icon svg { width: 34px; height: 34px; color: var(--navy); stroke-width: 1.7; }
.steps .step-arrow { padding-top: 17px; color: #af8850; }
.step-arrow svg { width: 21px; height: 16px; stroke-width: 1.3; }
.page-footer { padding: 12px 26px 28px; color: var(--muted); text-align: center; font-size: 11px; line-height: 1.8; }
.page-footer p:first-child { margin-bottom: 6px; font-size: 12px; color: var(--gold-dark); }
.field-error { color: var(--error); font-size: 12px; line-height: 1.5; margin: 7px 0 0; }
.error-summary { padding: 14px 16px; margin: 0 0 16px; border: 1px solid #da9595; border-radius: 9px; color: var(--error); background: #fff5f5; font-size: 13px; }
.error-summary p { font-weight: 650; }
.error-summary ul { margin: 5px 0 0; padding-left: 20px; }
.error-summary a { display: inline-block; padding: 3px 0; }
.noscript-note { margin: 20px; padding: 16px; background: var(--gold-soft); color: var(--ink); border-radius: 10px; }

/* The second page keeps the reference's compact information card and 3-by-3 assets. */
.loan-shell { background: var(--canvas); }
.loan-header { display: flex; justify-content: space-between; align-items: center; min-height: 52px; padding: 3px 10px; background: var(--white); }
.loan-brand { display: flex; align-items: center; gap: 8px; color: var(--navy); font-size: 16px; font-weight: 650; text-decoration: none; }
.loan-brand img { display: block; width: 28px; height: auto; border-radius: 5px; }
.header-spacer { width: 44px; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; min-height: 44px; padding: 0; color: var(--navy); background: transparent; border: 0; border-radius: 8px; text-decoration: none; }
.icon-button:hover { background: var(--navy-soft); }
.privacy-banner { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 39px; padding: 8px 12px; background: #eaf1f8; color: var(--navy); font-size: 11px; }
.privacy-banner svg { width: 13px; height: 13px; }
.loan-main { padding: 16px 14px 0; background: linear-gradient(180deg, #17385f 0, #35567b 170px, var(--canvas) 350px); }
.profile-panel { background: var(--white); padding: 17px 16px 3px; border-radius: var(--radius); }
.loan-amount { width: 100%; padding: 1px 0 15px; text-align: left; border: 0; border-bottom: 1px solid #f0f2f6; background: transparent; }
.amount-heading { display: inline-block; position: relative; padding: 5px 13px; border-radius: 8px 8px 8px 0; color: var(--navy-deep); background: var(--gold); font-size: 12px; font-weight: 550; }
.amount-heading::after { content: ""; position: absolute; bottom: -5px; left: 0; border-top: 6px solid var(--gold); border-right: 7px solid transparent; }
.amount-line { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 7px; }
.amount-number { display: flex; align-items: baseline; gap: 4px; color: var(--navy); font-variant-numeric: tabular-nums; }
.amount-number small { font-size: 26px; }
.amount-number strong { font-size: clamp(35px, 10vw, 49px); font-weight: 700; letter-spacing: -.035em; line-height: 1.25; }
.amount-edit-hint { display: flex; align-items: center; flex: none; gap: 1px; color: var(--muted); font-size: 12px; }
.amount-edit-hint svg { width: 14px; height: 14px; }
.form-field { border-bottom: 1px solid #f3f4f7; padding: 0; }
.form-field:last-child { border-bottom: 0; }
.form-row { display: flex; align-items: center; gap: 12px; min-height: 50px; }
.form-row > label, .form-row > #city-label { flex: none; min-width: 64px; color: var(--ink); font-size: 15px; }
.form-row > input { width: 100%; flex: 1; border: 0; border-radius: 3px; text-align: right; min-height: 44px; color: var(--navy); background: transparent; padding: 8px 0; font-size: 16px; }
.form-field > .field-error { margin: -1px 0 8px; }
.gender-field { display: grid; grid-template-columns: 1fr 1fr; align-items: center; min-height: 52px; padding: 4px 0; }
.gender-field > legend { float: left; width: 100%; font-size: 15px; padding-top: 10px; }
.gender-options { display: flex; gap: 8px; justify-content: flex-end; }
.gender-options label { flex: 1; }
.gender-options label > span { display: flex; align-items: center; justify-content: center; min-width: 60px; min-height: 44px; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; font-size: 16px; }
.gender-options input:checked + span { color: var(--navy); background: var(--gold-soft); border-color: #a67d3e; font-weight: 650; }
.gender-field > .field-error { grid-column: 1 / -1; }
.field-picker { display: flex; flex: 1; min-width: 0; align-items: center; justify-content: flex-end; min-height: 44px; gap: 4px; background: transparent; border: 0; padding: 6px 0; color: var(--navy); text-align: right; font-size: 16px; }
.field-picker > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.field-picker svg { color: var(--muted); width: 17px; height: 17px; }
.placeholder { color: var(--muted); }
.select-wrap { position: relative; flex: 1; min-width: 0; }
.select-wrap select { appearance: none; -webkit-appearance: none; width: 100%; min-height: 44px; text-align: right; padding: 8px 24px 8px 2px; border: 0; border-radius: 3px; color: var(--navy); background: transparent; font-size: 16px; }
.select-wrap select:invalid { color: var(--muted); }
.select-wrap > svg { position: absolute; right: 0; top: calc(50% - 9px); width: 18px; height: 18px; pointer-events: none; color: var(--muted); }
.asset-panel { margin-top: 14px; padding: 16px; border-radius: var(--radius); background: var(--white); }
.asset-panel legend { float: left; width: 100%; font-size: 16px; font-weight: 600; margin-bottom: 3px; }
.asset-panel legend span { font-size: 13px; font-weight: 400; }
.asset-note { clear: both; color: var(--muted); font-size: 12px; margin-bottom: 14px; }
.asset-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.asset-option > span { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-height: 64px; padding: 9px 2px; background: var(--navy-soft); border: 1px solid transparent; border-radius: 7px; transition: background .15s, border-color .15s; }
.asset-option b { font-size: 13px; font-weight: 500; color: var(--navy-deep); text-align: center; overflow-wrap: anywhere; }
.asset-option small { font-size: 11px; color: var(--muted); }
.asset-option svg { display: none; position: absolute; right: 3px; top: 3px; width: 12px; height: 12px; color: var(--gold-dark); }
.asset-option input:checked + span { border-color: #a67d3e; background: var(--gold-soft); }
.asset-option input:checked + span svg { display: block; }
.asset-option input:checked + span small { color: var(--gold-dark); }
.loan-actions { padding: 2px 0 calc(18px + env(safe-area-inset-bottom, 0px)); }
.loan-actions .agreement-row { margin: 12px 2px 13px; }
.loan-actions > .field-error { margin: -5px 3px 10px; }
.destination-note { margin: 13px 0 0; text-align: center; color: var(--muted); font-size: 11px; }
.submit-status { text-align: center; color: var(--navy); font-size: 12px; }
.submit-status:not(:empty) { margin: 9px 0 0; }

/* Native dialogs provide focus containment, Escape, and focus return. */
body.modal-open { overflow: hidden; }
.sheet { position: fixed; top: auto; bottom: 0; left: 0; right: 0; width: min(100%, 520px); max-width: 520px; max-height: min(88dvh, 780px); margin: auto auto 0; padding: 0; border: 0; border-radius: 20px 20px 0 0; color: var(--ink); background: var(--white); overflow: auto; box-shadow: 0 -12px 45px rgb(16 39 70 / 13%); }
.sheet[open] { animation: sheet-enter .25s var(--ease); }
.sheet::backdrop { background: rgb(15 26 42 / 54%); }
.sheet-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 13px 10px 20px; background: var(--navy-soft); }
.sheet-header h2 { font-size: 19px; font-weight: 650; color: var(--navy-deep); }
.sheet-header .icon-button { color: var(--muted); }
.sheet-body { padding: 20px; }
.sheet-actions { padding: 14px 20px calc(18px + env(safe-area-inset-bottom, 0px)); }
.compact { min-height: 50px; font-size: 17px; }
.dialog-label { display: block; margin-bottom: 10px; font-size: 15px; font-weight: 550; }
.dialog-input { width: 100%; min-height: 52px; padding: 10px 13px; border: 1px solid #a9b7c8; border-radius: 8px; color: var(--navy); background: var(--white); font-size: 17px; }
.dialog-input[aria-invalid="true"] { border-color: var(--error); }
.helper-text { margin-top: 8px; font-size: 12px; color: var(--muted); }
.quick-amounts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
.quick-amounts button { min-height: 45px; border: 1px solid var(--line); border-radius: 7px; background: var(--white); color: var(--navy); font-variant-numeric: tabular-nums; }
.quick-amounts button:hover, .quick-amounts button[aria-pressed="true"] { border-color: #a67d3e; background: var(--gold-soft); }
.city-select-label { margin-top: 22px; }
.policy-sheet[open] { display: flex; flex-direction: column; }
.policy-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); padding: 0 20px; }
.policy-tabs button { position: relative; padding: 18px 2px 15px; border: 0; background: transparent; color: var(--muted); font-size: 15px; }
.policy-tabs button[aria-selected="true"] { color: var(--navy); font-weight: 650; }
.policy-tabs button[aria-selected="true"]::after { content: ""; position: absolute; bottom: -1px; left: calc(50% - 21px); width: 42px; height: 3px; background: var(--gold-dark); border-radius: 2px; }
.policy-copy { padding: 20px 22px 6px; overflow-y: auto; min-height: 190px; font-size: 14px; line-height: 1.85; }
.policy-copy h3 { margin: 5px 0 7px; font-size: 15px; color: var(--navy-deep); }
.policy-copy p { margin-bottom: 16px; }
.policy-sheet .sheet-header, .policy-tabs, .policy-sheet .sheet-actions { flex-shrink: 0; }
@keyframes sheet-enter { from { opacity: .8; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }
@media (min-width: 520px) {
  .page-shell { margin-top: 24px; margin-bottom: 24px; border-radius: 20px; min-height: calc(100dvh - 48px); box-shadow: 0 12px 45px rgb(23 56 95 / 7%); }
  .loan-header { border-radius: 20px 20px 0 0; }
  .brand-header { padding: 24px 25px; }
  .brand-points { flex-direction: row; gap: 10px; font-size: 12px; }
  .section { padding-left: 25px; padding-right: 25px; }
  .amount-option > span { min-height: 67px; font-size: 21px; }
  .term-content { min-height: 122px; }
  .payment { font-size: 14px; }
  .term-content small { font-size: 12px; }
  .loan-main { padding: 20px 19px 0; }
  .profile-panel { padding: 22px 22px 5px; }
  .form-row { min-height: 61px; }
  .asset-panel { padding: 20px; }
  .asset-option > span { min-height: 79px; }
  .asset-option b { font-size: 15px; }
  .sheet { top: 50%; bottom: auto; transform: translateY(-50%); border-radius: 18px; width: min(calc(100% - 32px), 500px); margin: 0 auto; }
  .sheet[open] { animation: none; }
}
@media (max-width: 359px) {
  .brand-header { padding: 18px 15px; gap: 10px; }
  .brand { gap: 7px; font-size: 19px; }
  .brand img { width: 41px; }
  .section { padding-left: 15px; padding-right: 15px; }
  .amount-option > span { font-size: 17px; min-height: 56px; }
  .phone-control { gap: 10px; padding: 0 17px; }
  .phone-control input { font-size: 16px; }
  .sms-control { padding-left: 15px; }
  .sms-control input { font-size: 14px; }
  .sms-control button { min-width: 96px; padding-inline: 9px; font-size: 12px; }
  .steps-section { padding-left: 15px; padding-right: 15px; }
  .steps li { font-size: 11px; }
  .loan-main { padding-left: 10px; padding-right: 10px; }
  .profile-panel, .asset-panel { padding-left: 13px; padding-right: 13px; }
  .form-row { gap: 8px; }
  .form-row > label, .form-row > #city-label { min-width: 60px; }
  .amount-number strong { font-size: 34px; }
  .amount-edit-hint { font-size: 11px; }
  .asset-options { gap: 7px; }
  .asset-option b { font-size: 11px; }
  .privacy-banner { font-size: 11px; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
