:root { --bg:#f8f7f6; --card:#fff; --fg:#292524; --muted:#78716c; --line:#e7e5e4; --brand:#c2410c; --brand-d:#9d320b; --ok:#047857; --okbg:#ecfdf5; --warn:#b45309; --warnbg:#fffbeb; --err:#be123c; --errbg:#fff1f2; }
@media (prefers-color-scheme: dark) { :root { --bg:#161515; --card:#201e1e; --fg:#e7e5e4; --muted:#a8a29e; --line:#3a3736; --brand:#f48c3e; --brand-d:#fbb679; --okbg:#052e22; --ok:#6ee7b7; --warnbg:#2a1f05; --warn:#fcd34d; --errbg:#2d0a14; --err:#fda4af; } }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font: 16px/1.45 Inter, system-ui, "Segoe UI", Roboto, sans-serif; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
main { max-width: 480px; margin: 0 auto; padding: 16px; }
h1 { font-size: 1.15rem; margin: 0 0 4px; color: var(--brand); }
p.sub { margin: 0 0 16px; color: var(--muted); font-size: .85rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 14px; }
label { display: block; font-size: .8rem; color: var(--muted); margin: 10px 0 4px; }
input { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: inherit; font: inherit; }
input:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
button { font: inherit; border: 0; border-radius: 10px; padding: 11px 16px; cursor: pointer; background: var(--brand); color: #fff; font-weight: 600; }
button.ghost { background: transparent; color: var(--fg); border: 1px solid var(--line); }
button:disabled { opacity: .55; cursor: default; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row > input { flex: 1; min-width: 0; }
.bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.who { font-size: .8rem; color: var(--muted); }
.vwrap { position: relative; background: #000; border-radius: 12px; overflow: hidden; aspect-ratio: 1 / 1; }
video { width: 100%; height: 100%; object-fit: cover; display: block; }
.frame { position: absolute; inset: 18%; border: 3px solid rgba(255,255,255,.85); border-radius: 14px; pointer-events: none; }
.res { border-radius: 12px; padding: 12px 14px; margin-top: 12px; border: 1px solid; }
.res.ok { background: var(--okbg); color: var(--ok); border-color: var(--ok); }
.res.warn { background: var(--warnbg); color: var(--warn); border-color: var(--warn); }
.res.err { background: var(--errbg); color: var(--err); border-color: var(--err); }
.res b { display: block; }
.res small { opacity: .85; }
ul.log { list-style: none; margin: 8px 0 0; padding: 0; font-size: .82rem; }
ul.log li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); }
ul.log li span:last-child { color: var(--muted); white-space: nowrap; }
.err-text { color: var(--err); font-size: .85rem; margin-top: 8px; min-height: 1.2em; }
