:root {
  --bg: #0f1419;
  --panel: #1a2230;
  --fg: #e6edf3;
  --muted: #8b98a5;
  --accent: #2f81f7;
  --ok: #2ea043;
  --warn: #d29922;
  --err: #f85149;
  --radius: 14px;
}
* { box-sizing: border-box; }
body {
  margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg); color: var(--fg); min-height: 100vh;
}
header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px; border-bottom: 1px solid #232c3b;
}
header h1 { font-size: 18px; margin: 0; letter-spacing: 0.5px; }
header nav a { color: var(--muted); text-decoration: none; margin-left: 18px; font-size: 14px; }
header nav a:hover { color: var(--fg); }
main { max-width: 720px; margin: 0 auto; padding: 24px; }
.video-wrap {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: #000; aspect-ratio: 4 / 3;
}
video, canvas { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-wrap video { transform: scaleX(-1); } /* mirror like a selfie */
button {
  background: var(--accent); color: white; border: none; border-radius: 10px;
  padding: 14px 22px; font-size: 16px; font-weight: 600; cursor: pointer;
  width: 100%; margin-top: 16px;
}
button:hover { filter: brightness(1.08); }
button:disabled { opacity: 0.5; cursor: not-allowed; }
button.secondary { background: #2a3343; }
.result {
  margin-top: 18px; padding: 18px; border-radius: var(--radius);
  background: var(--panel); font-size: 17px; min-height: 24px;
  border-left: 4px solid var(--muted); transition: border-color 0.2s;
}
.result.ok { border-color: var(--ok); }
.result.warn { border-color: var(--warn); }
.result.err { border-color: var(--err); }
.result .big { font-size: 22px; font-weight: 700; }
.result .sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
label { display: block; margin: 14px 0 6px; font-size: 14px; color: var(--muted); }
input[type=text] {
  width: 100%; padding: 12px; border-radius: 10px; border: 1px solid #2a3343;
  background: #0d1117; color: var(--fg); font-size: 15px;
}
.consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px;
  font-size: 13px; color: var(--muted); }
.consent input { margin-top: 3px; }
.thumbs { display: flex; gap: 8px; margin-top: 12px; }
.thumbs img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px;
  border: 1px solid #2a3343; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid #232c3b; }
th { color: var(--muted); font-weight: 600; }
.tag { padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.tag.in { background: rgba(46,160,67,0.2); color: #4ac26b; }
.tag.out { background: rgba(248,81,73,0.2); color: #ff7b72; }
.note { font-size: 12px; color: var(--muted); margin-top: 10px; line-height: 1.5; }
