/* Mobile-first responsive styles for barcode weight checker. */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: #0f172a; color: #e2e8f0; font: 16px/1.4 system-ui, -apple-system, Segoe UI, Roboto, sans-serif; }
body { min-height: 100dvh; display: flex; flex-direction: column; }
header { padding: .8rem 1rem; background: #1e293b; box-shadow: 0 1px 0 #334155; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
header h1 { margin: 0; font-size: 1.1rem; font-weight: 600; }
#userbox { font-size: .85rem; color: #94a3b8; }
#userbox button { padding: .3rem .6rem; font-size: .8rem; background: #334155; flex: 0 0 auto; }
main { flex: 1; display: flex; flex-direction: column; gap: 1rem; padding: 1rem; max-width: 640px; width: 100%; margin: 0 auto; }
#video-wrap { position: relative; width: 100%; aspect-ratio: 4/3; background: #000; border-radius: 12px; overflow: hidden; }
#video { width: 100%; height: 100%; object-fit: cover; }
#reticle { position: absolute; inset: 20% 10%; border: 2px solid #22d3ee; border-radius: 8px; pointer-events: none; box-shadow: 0 0 0 9999px rgba(0,0,0,.25); }
.row { display: flex; gap: .5rem; flex-wrap: wrap; }
button, input { font: inherit; padding: .7rem 1rem; border-radius: 8px; border: 1px solid #334155; }
button { background: #2563eb; color: #fff; cursor: pointer; flex: 1; }
button:disabled { background: #475569; cursor: not-allowed; }
button[type=submit] { flex: 0 0 auto; }
input { flex: 1; background: #1e293b; color: #e2e8f0; min-width: 0; }
#result { background: #1e293b; border-radius: 12px; padding: 1rem; min-height: 4rem; }
#result.ok { border-left: 4px solid #22c55e; }
#result.miss { border-left: 4px solid #f59e0b; }
#result.err { border-left: 4px solid #ef4444; }
#result h2 { margin: 0 0 .4rem; font-size: 1.05rem; }
#result .meta { color: #94a3b8; font-size: .9rem; }
#result .weight { font-size: 1.6rem; font-weight: 700; color: #22d3ee; margin-top: .3rem; }
#result img { max-width: 96px; float: right; margin-left: .8rem; border-radius: 6px; }
footer { text-align: center; color: #64748b; font-size: .85rem; padding: 1rem 0; }
footer a { color: #94a3b8; }
#contribute, #auth { background: #1e293b; border-radius: 12px; padding: 1rem; }
#contribute h2 { margin: 0 0 .6rem; font-size: 1rem; }
#community { margin-top: .8rem; font-size: .9rem; color: #cbd5e1; }
#community .agg { background: #0f172a; padding: .6rem .8rem; border-radius: 8px; margin-bottom: .5rem; }
#community .agg strong { color: #22d3ee; }
#community ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .3rem; }
#community li { background: #0f172a; padding: .4rem .6rem; border-radius: 6px; font-size: .85rem; }
#community li .w { color: #22d3ee; font-weight: 600; }
#community li .auth { color: #a7f3d0; font-size: .75rem; }
details summary { cursor: pointer; color: #94a3b8; }
.meta { color: #94a3b8; font-size: .85rem; }
.toast { position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%); background: #1e293b; border: 1px solid #334155; padding: .6rem 1rem; border-radius: 8px; max-width: 90%; }
