body { padding-bottom: env(safe-area-inset-bottom); }
#bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: calc(8px + env(safe-area-inset-top)) 12px 8px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
#bar .left { display: flex; flex-direction: column; min-width: 0; }
#bar .left strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#bar .right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.small { font-size: .8rem; }
button.sm { padding: 6px 10px; min-height: 36px; font-size: .9rem; }
.net { font-size: .8rem; font-weight: 700; padding: 3px 8px; border-radius: 99px; border: 1px solid var(--ok); color: var(--ok); }
.net.off { border-color: var(--bad); color: var(--bad); }
#authBanner, #toast { margin: 8px 12px; }
main { padding: 12px; }
.evbtn { display: block; width: 100%; text-align: left; background: var(--bg); color: var(--fg); border: 1px solid var(--line); margin-top: 8px; }
.evbtn small { display: block; color: var(--muted); font-weight: 400; }
#camWrap { position: relative; background: #000; border-radius: 12px; overflow: hidden; aspect-ratio: 3 / 4; max-height: 55vh; width: 100%; }
#video { width: 100%; height: 100%; object-fit: cover; display: block; }
.reticle { position: absolute; inset: 18% 14%; border: 3px solid rgba(255,255,255,.8); border-radius: 16px; pointer-events: none; box-shadow: 0 0 0 9999px rgba(0,0,0,.25); }
.camMsg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; color: #fff; padding: 24px; background: rgba(0,0,0,.6); }
.counters { display: flex; gap: 8px; margin: 12px 0; }
.counters div { flex: 1; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 4px; }
.counters b { display: block; font-size: 1.5rem; }
.counters span { font-size: .75rem; color: var(--muted); }
.actions { display: flex; gap: 8px; }
.actions button { flex: 1; }
#conflictList { padding-left: 18px; margin: 8px 0 0; font-size: .9rem; }
#result { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; color: #fff; }
#result.ok { background: #0a7d33; }
#result.bad { background: #c62828; }
#result.warn { background: #b26a00; }
#result .big { font-size: clamp(2.6rem, 14vw, 5rem); font-weight: 900; letter-spacing: .02em; line-height: 1.05; }
#result .sub { font-size: 1.6rem; margin-top: 14px; font-weight: 600; }
#result .sub2 { font-size: 1.1rem; margin-top: 8px; opacity: .9; }
