:root {
  color-scheme: dark;
  --bg: #0b0f19;
  --card: #131a2a;
  --border: rgba(255, 255, 255, 0.1);
  --text: #f1f5f9;
  --muted: #94a3b8;
  --accent: #f59e0b;
  --ok: #22c55e;
  --bad: #ef4444;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overscroll-behavior: none;
}

.wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 16px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 100vh;
}

.head h1 {
  font-size: 1.15rem;
  margin: 0 0 4px;
  font-weight: 700;
}
.head p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.camera-box {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}

.camera-box video,
.camera-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.overlay-msg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  font-size: 0.85rem;
  color: var(--muted);
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn {
  flex: 1;
  min-width: 120px;
  padding: 11px 14px;
  border-radius: 999px;
  border: none;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.btn:active { opacity: 0.75; }

.btn-primary { background: #0ea5e9; color: #04121c; }
.btn-accent { background: var(--accent); color: #1a1103; }
.btn-ghost { background: rgba(255, 255, 255, 0.08); color: var(--text); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.result-box {
  border-radius: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  font-size: 0.9rem;
}
.result-box.ok { border-color: rgba(34, 197, 94, 0.4); background: rgba(34, 197, 94, 0.12); }
.result-box.bad { border-color: rgba(239, 68, 68, 0.4); background: rgba(239, 68, 68, 0.12); }
.result-box.pending { color: var(--muted); }
.result-box.error { border-color: rgba(239, 68, 68, 0.4); background: rgba(239, 68, 68, 0.12); color: var(--bad); }

.result-title {
  font-weight: 700;
  font-size: 1rem;
  margin: 0 0 4px;
}
.result-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.foot {
  margin-top: auto;
  text-align: center;
  font-size: 0.7rem;
  color: var(--muted);
  line-height: 1.5;
}
