* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", Arial, sans-serif; background: #f4f7fb; color: #1f2937; -webkit-text-size-adjust: 100%; }
a { color: #2563eb; text-decoration: none; }
.page { max-width: 820px; margin: 0 auto; padding: 22px 14px 48px; }
.form-shell { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; overflow: hidden; box-shadow: 0 12px 36px rgba(15, 23, 42, .07); }
.hero { padding: 28px 26px 20px; border-bottom: 1px solid #e5e7eb; background: linear-gradient(180deg, #eef6ff, #fff); }
.hero img { width: 100%; max-height: 260px; object-fit: cover; border-radius: 8px; margin-bottom: 18px; }
.hero h1 { margin: 0 0 10px; font-size: clamp(24px, 5vw, 34px); line-height: 1.22; }
.hero p { margin: 0; color: #64748b; line-height: 1.75; }
.form-body { padding: 22px 26px 28px; }
.field { padding: 18px 0; border-bottom: 1px solid #eef2f7; }
.field:last-child { border-bottom: 0; }
.label { display: block; margin-bottom: 9px; font-weight: 700; line-height: 1.45; }
.required { color: #dc2626; margin-left: 4px; }
.help { color: #64748b; font-size: 14px; margin: -3px 0 10px; line-height: 1.6; }
input[type=text], input[type=date], input[type=password], textarea, select { width: 100%; min-height: 44px; border: 1px solid #cbd5e1; border-radius: 8px; padding: 10px 12px; font: inherit; background: #fff; }
input[type=text]:focus, input[type=date]:focus, input[type=password]:focus, textarea:focus, select:focus, input[type=file]:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
textarea { min-height: 120px; resize: vertical; }
input[type=file] { width: 100%; min-height: 44px; border: 1px dashed #94a3b8; border-radius: 8px; padding: 10px 12px; background: #f8fafc; font: inherit; }
.file-upload-hint { display: grid; gap: 4px; margin-top: 8px; color: #475569; font-size: 13px; line-height: 1.55; }
.file-upload-hint strong { color: #334155; font-weight: 700; }
.choice { display: grid; gap: 10px; }
.choice label { display: flex; gap: 10px; align-items: center; padding: 11px 12px; border: 1px solid #dbe3ef; border-radius: 8px; background: #fbfdff; transition: border-color .15s, background .15s, box-shadow .15s; }
.choice label:has(input:checked) { border-color: #2563eb; background: #eff6ff; box-shadow: 0 0 0 2px rgba(37, 99, 235, .08); }
.choice input[type=radio], .choice input[type=checkbox] { width: 18px; height: 18px; flex: 0 0 auto; accent-color: #2563eb; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 24px; }
.btn { border: 0; border-radius: 8px; padding: 12px 18px; min-height: 44px; font-weight: 700; cursor: pointer; background: #2563eb; color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.btn[disabled], .btn.is-loading { opacity: .72; cursor: not-allowed; }
.btn.secondary { background: #e2e8f0; color: #0f172a; }
.btn.danger { background: #dc2626; }
.draft-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; color: #475569; font-size: 13px; padding: 10px 12px; margin-bottom: 14px; }
.draft-bar.is-restored { background: #ecfeff; border-color: #a5f3fc; color: #155e75; }
.draft-bar button { border: 0; background: transparent; color: #2563eb; font-weight: 700; cursor: pointer; padding: 4px 0; }
.file-preview { display: grid; gap: 8px; margin-top: 10px; }
.file-preview-item { display: flex; align-items: center; gap: 10px; border: 1px solid #e2e8f0; background: #fff; border-radius: 8px; padding: 8px 10px; }
.file-preview-thumb { width: 44px; height: 44px; border-radius: 6px; background: #e2e8f0; object-fit: cover; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; color: #64748b; font-size: 12px; font-weight: 800; }
.file-preview-meta { min-width: 0; flex: 1; }
.file-preview-name { font-weight: 700; color: #1f2937; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-preview-size { color: #64748b; font-size: 12px; margin-top: 2px; }
.file-warning { margin-top: 8px; color: #be123c; background: #fff1f2; border: 1px solid #fecdd3; border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.error { background: #fff1f2; color: #be123c; border: 1px solid #fecdd3; padding: 12px 14px; border-radius: 8px; margin-bottom: 16px; }
.success-card { text-align: center; padding: 34px 24px; }
.order-no { display: inline-block; margin: 18px 0 8px; padding: 14px 20px; background: #0f172a; color: #fff; border-radius: 8px; font-size: clamp(28px, 9vw, 46px); font-weight: 800; letter-spacing: 1px; user-select: all; }
.copy-tip { min-height: 22px; margin: 8px 0 0; color: #16a34a; font-size: 14px; font-weight: 700; }
.score-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0; }
.score-grid div { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 13px; }
.score-grid strong { display: block; font-size: 22px; margin-top: 6px; }
.answer-list { display: grid; gap: 12px; margin-top: 18px; }
.answer-item { border: 1px solid #e2e8f0; border-radius: 8px; padding: 13px; background: #fff; }
.muted { color: #64748b; }
.captcha-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; }
.captcha-row img { height: 44px; border-radius: 8px; border: 1px solid #cbd5e1; cursor: pointer; }
.submit-status { display: none; width: 100%; color: #475569; font-size: 13px; margin-top: -8px; }
.submit-status.is-visible { display: block; }
@media (max-width: 640px) {
  body { background: #fff; }
  .page { padding: 0 0 calc(88px + env(safe-area-inset-bottom)); max-width: none; }
  .form-shell { border-radius: 0; border-left: 0; border-right: 0; box-shadow: none; }
  .hero { padding: 22px 16px 16px; }
  .hero img { max-height: 190px; margin-bottom: 14px; }
  .hero h1 { font-size: 24px; }
  .form-body { padding: 12px 16px 20px; }
  .field { padding: 16px 0; }
  input[type=text], input[type=date], input[type=password], textarea, select, input[type=file] { font-size: 16px; min-height: 48px; }
  .choice { gap: 8px; }
  .choice label { min-height: 48px; padding: 12px; align-items: flex-start; line-height: 1.45; }
  .draft-bar { align-items: flex-start; font-size: 12px; }
  .file-preview-thumb { width: 40px; height: 40px; }
  .score-grid { grid-template-columns: 1fr; }
  form .actions { position: sticky; bottom: 0; z-index: 20; margin-left: -16px; margin-right: -16px; margin-bottom: -20px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .96); border-top: 1px solid #e5e7eb; box-shadow: 0 -10px 24px rgba(15, 23, 42, .08); backdrop-filter: blur(10px); }
  .actions .btn { width: 100%; min-height: 48px; }
  .success-card .actions { position: static; margin: 24px 0 0; padding: 0; background: transparent; border-top: 0; box-shadow: none; }
}
