:root {
    --bg: #f3f5f9;
    --card: #fff;
    --text: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --ok: #059669;
    --err: #dc2626;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}
.wrap { max-width: 480px; margin: 0 auto; padding: 20px 16px 32px; }
.card {
    background: var(--card);
    border-radius: 16px;
    padding: 24px 20px;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
}
.badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    background: #eff6ff;
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 12px;
}
h1 { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.sub { font-size: 13px; color: var(--muted); margin-bottom: 16px; line-height: 1.5; }
.meta { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.meta strong { color: var(--text); }
.btn {
    display: block;
    width: 100%;
    border: none;
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 10px;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-ghost { background: #f9fafb; color: var(--text); border: 1px solid var(--line); }
.upload-box {
    border: 2px dashed var(--line);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    font-size: 13px;
    color: var(--muted);
    cursor: pointer;
    margin-bottom: 10px;
}
.upload-box input { display: none; }
.status {
    font-size: 13px;
    text-align: center;
    min-height: 20px;
    margin-top: 8px;
}
.status.ok { color: var(--ok); }
.status.err { color: var(--err); }
.status.busy { color: var(--muted); }
.boot-loading { text-align: center; padding: 48px 16px; color: var(--muted); }
.cam-wrap { display: none; margin-bottom: 12px; }
.cam-wrap.active { display: block; }
video { width: 100%; border-radius: 12px; background: #000; }
.toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    background: rgba(17, 24, 39, 0.92);
    color: #fff;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 13px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 99;
}
.toast.show { opacity: 1; }
