:root {
  color-scheme: light;
  --primary: #075985;
  --primary-light: #0ea5e9;
  --ink: #132238;
  --muted: #64748b;
  --line: #dbe4ee;
  --surface: #ffffff;
  --danger: #dc2626;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(135deg, #e0f2fe 0%, #f8fafc 48%, #ecfeff 100%);
}

button, input { font: inherit; }
.page-shell { width: min(1040px, calc(100% - 40px)); margin: 0 auto; padding: 64px 0; display: grid; grid-template-columns: .9fr 1.1fr; gap: 72px; align-items: center; }
.brand-mark { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 18px; color: white; font-size: 28px; font-weight: 800; background: linear-gradient(145deg, var(--primary-light), var(--primary)); box-shadow: 0 14px 30px rgba(7, 89, 133, .22); }
.eyebrow { margin: 28px 0 10px; color: var(--primary); font-size: 14px; font-weight: 700; letter-spacing: .08em; }
h1 { margin: 0; font-size: clamp(34px, 5vw, 52px); letter-spacing: -.04em; }
.intro-copy { max-width: 460px; margin: 22px 0; color: var(--muted); line-height: 1.8; }
.tips { margin: 28px 0 0; padding: 0; list-style: none; display: grid; gap: 13px; color: #334155; }
.tips li { display: flex; align-items: center; gap: 10px; }
.tips li::before { content: "✓"; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: var(--primary); font-size: 12px; font-weight: 800; background: #cffafe; }
.form-card { padding: 34px; border: 1px solid rgba(255,255,255,.8); border-radius: 24px; background: rgba(255,255,255,.92); box-shadow: 0 24px 70px rgba(15, 60, 85, .13); backdrop-filter: blur(12px); }
.form-heading { margin-bottom: 28px; display: flex; justify-content: space-between; align-items: center; font-size: 21px; font-weight: 700; }
.required-note { color: var(--muted); font-size: 12px; font-weight: 400; }
.field { margin-bottom: 22px; display: block; }
.field > span { margin-bottom: 9px; display: block; font-size: 14px; font-weight: 650; }
.field b { color: var(--danger); }
.field input[type="text"] { width: 100%; height: 48px; padding: 0 15px; border: 1px solid var(--line); border-radius: 11px; outline: none; color: var(--ink); background: #fbfdff; transition: .2s; }
.field input[type="text"]:focus { border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(14,165,233,.12); }
.photo-picker { position: relative; width: min(100%, 320px); aspect-ratio: 1; margin: 0 auto; display: grid; place-items: center; overflow: hidden; border: 1.5px dashed #94a3b8; border-radius: 14px; background: #f8fafc; }
.picker-empty { display: grid; justify-items: center; gap: 7px; color: var(--muted); }
.picker-empty strong { color: #334155; font-size: 15px; }
.picker-empty small { font-size: 12px; }
.camera-icon { width: 50px; height: 38px; position: relative; margin-bottom: 6px; border: 3px solid var(--primary); border-radius: 10px; }
.camera-icon::before { content: ""; position: absolute; width: 18px; height: 18px; left: 13px; top: 7px; border: 3px solid var(--primary); border-radius: 50%; }
.camera-icon::after { content: ""; position: absolute; width: 18px; height: 6px; left: 6px; top: -8px; border-radius: 5px 5px 0 0; background: var(--primary); }
#preview { display: none; width: 100%; height: 100%; object-fit: cover; }
.photo-picker.has-photo #preview { display: block; }
.photo-picker.has-photo .picker-empty { display: none; }
.photo-actions { width: min(100%, 320px); margin: 12px auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.photo-action { height: 42px; display: flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid #bae6fd; border-radius: 10px; color: var(--primary); font-size: 14px; font-weight: 650; cursor: pointer; background: #f0f9ff; }
.photo-action:hover { border-color: var(--primary-light); }
.photo-action.primary-action { color: white; border-color: var(--primary); background: var(--primary); }
.photo-action input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.photo-status { min-height: 18px; margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.consent { display: flex; align-items: flex-start; gap: 9px; color: var(--muted); font-size: 12px; line-height: 1.6; cursor: pointer; }
.consent input { width: 17px; height: 17px; margin: 1px 0 0; accent-color: var(--primary); flex: 0 0 auto; }
.submit-button { width: 100%; height: 50px; margin-top: 24px; border: 0; border-radius: 12px; color: white; font-weight: 700; cursor: pointer; background: linear-gradient(110deg, var(--primary), #0284c7); box-shadow: 0 10px 24px rgba(7,89,133,.2); }
.submit-button:disabled { opacity: .65; cursor: not-allowed; }
.spinner { width: 18px; height: 18px; display: none; margin: auto; border: 2px solid rgba(255,255,255,.45); border-top-color: white; border-radius: 50%; animation: spin .75s linear infinite; }
.submit-button.loading .button-text { display: none; }
.submit-button.loading .spinner { display: block; }
.form-message { min-height: 20px; margin: 12px 0 0; color: var(--danger); text-align: center; font-size: 13px; }
.success-dialog { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 20px; background: rgba(15,23,42,.52); backdrop-filter: blur(4px); }
.success-dialog[hidden] { display: none; }
.dialog-card { width: min(390px, 100%); padding: 34px; border-radius: 22px; text-align: center; background: white; box-shadow: 0 24px 80px rgba(0,0,0,.25); }
.success-icon { width: 62px; height: 62px; margin: 0 auto 18px; display: grid; place-items: center; border-radius: 50%; color: white; font-size: 30px; font-weight: 800; background: #10b981; }
.dialog-card h2 { margin: 0; }
.dialog-card p { color: var(--muted); }
.dialog-card button { width: 100%; height: 46px; margin-top: 14px; border: 0; border-radius: 10px; color: white; cursor: pointer; background: var(--primary); }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 760px) {
  .page-shell { width: 100%; min-height: 100vh; padding: 0; display: block; }
  .intro { padding: max(32px, env(safe-area-inset-top)) 22px 28px; color: white; background: linear-gradient(145deg, #0369a1, #075985); }
  .brand-mark { width: 45px; height: 45px; border-radius: 13px; font-size: 22px; background: rgba(255,255,255,.18); box-shadow: none; }
  .eyebrow { margin: 18px 0 6px; color: #bae6fd; }
  h1 { font-size: 31px; }
  .intro-copy { margin: 12px 0 0; color: #e0f2fe; font-size: 14px; line-height: 1.7; }
  .tips { display: none; }
  .form-card { margin: -10px 0 0; padding: 27px 20px calc(30px + env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0; box-shadow: none; backdrop-filter: none; }
  .form-heading { font-size: 19px; }
  .photo-picker { width: min(100%, 360px); }
  .photo-actions { width: min(100%, 360px); }
}
