:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #111827;
  background: #f3f4f6;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
button { font: inherit; }
.app-shell { max-width: 760px; margin: 0 auto; padding: 24px 16px 48px; }
.card { background: white; border-radius: 18px; padding: 20px; box-shadow: 0 12px 30px rgba(0,0,0,.08); }
h1 { margin: 0 0 6px; font-size: 24px; }
.sub { margin: 0 0 18px; color: #6b7280; }
.camera-wrap { position: relative; overflow: hidden; border-radius: 16px; background: #111827; aspect-ratio: 3 / 4; max-height: 70vh; }
video, .camera-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.face-guide { position: absolute; inset: 17% 18% 18%; border: 3px solid rgba(255,255,255,.85); border-radius: 46% 46% 48% 48%; box-shadow: 0 0 0 999px rgba(0,0,0,.18); pointer-events: none; }
.actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 14px; }
button { border: 0; border-radius: 12px; padding: 12px 14px; background: #e5e7eb; color: #111827; font-weight: 700; }
button.primary { background: #2563eb; color: white; }
button.success { background: #059669; color: white; }
button:disabled { opacity: .45; }
.status { margin-top: 14px; padding: 11px 12px; border-radius: 10px; font-size: 14px; }
.status.info { background: #eff6ff; color: #1d4ed8; }
.status.ok { background: #ecfdf5; color: #047857; }
.status.warn { background: #fffbeb; color: #b45309; }
.status.error { background: #fef2f2; color: #b91c1c; }
.result-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 14px; }
.result-grid > div { background: #f9fafb; border-radius: 12px; padding: 12px; min-width: 0; }
.result-grid span { display: block; color: #6b7280; font-size: 12px; margin-bottom: 4px; }
.result-grid strong { display: block; font-size: 15px; word-break: break-all; }
details { margin-top: 14px; color: #4b5563; font-size: 14px; }
code { background: #f3f4f6; padding: 1px 4px; border-radius: 4px; }
@media (min-width: 640px) {
  .camera-wrap { aspect-ratio: 4 / 3; }
  .actions { grid-template-columns: repeat(4, 1fr); }
  .result-grid { grid-template-columns: repeat(4, 1fr); }
}
