:root { --bg:#111; --fg:#f4f4f4; --muted:#9aa; --in:#1b7f3a; --out:#a33; --card:#1c1c1c; --accent:#3a7; }
* { box-sizing: border-box; }
html, body { margin:0; background:var(--bg); color:var(--fg); font-family: system-ui, sans-serif; }
#app { max-width: 480px; margin: 0 auto; padding: 12px; padding-bottom: 24px; }
.card { background: var(--card); border-radius: 16px; padding: 16px; }
h1 { font-size: 1.3rem; margin: 0 0 8px; }
.hint { color: var(--muted); font-size: .9rem; }
.words { display:grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
input { width:100%; padding:12px; border-radius:10px; border:1px solid #333; background:#0c0c0c; color:var(--fg); font-size:16px; }
button { min-height:48px; border:0; border-radius:12px; font-size:1rem; }
button.primary { background: var(--accent); color:#042; font-weight:700; width:100%; }
.err { color:#f88; }
header { display:flex; justify-content:space-between; gap:8px; align-items:center; margin-bottom:12px; }
.event-name { font-weight:700; }
.conn { font-size:.75rem; color:var(--muted); }
.modes { display:flex; gap:6px; }
.mode { min-width:72px; font-weight:800; opacity:.55; }
.mode.active { opacity:1; }
.mode.in.active { background:var(--in); color:#fff; }
.mode.out.active { background:var(--out); color:#fff; }
.seg { display:flex; background:#000; border-radius:12px; overflow:hidden; margin-bottom:12px; }
.seg-btn { flex:1; background:transparent; color:var(--muted); }
.seg-btn.active { background:#222; color:var(--fg); font-weight:700; }
#hits { list-style:none; padding:0; margin:8px 0 0; }
#hits li { padding:12px; background:#1a1a1a; border-radius:10px; margin-bottom:6px; }
#sheet { position:fixed; inset:0; background:rgba(0,0,0,.55); display:flex; align-items:flex-end; justify-content:center; }
#sheet[hidden] { display:none !important; }
.sheet-card { background:var(--card); width:100%; max-width:480px; border-radius:20px 20px 0 0; padding:16px 16px 28px; outline:none; }
.sheet-card .x { position:absolute; right:12px; top:8px; background:transparent; color:var(--fg); min-height:40px; }
.label { font-size:1.4rem; font-weight:700; margin:8px 0; }
.snap { color:var(--muted); font-size:.95rem; margin-bottom:12px; }
.banner { background:#a33; color:#fff; padding:10px; border-radius:10px; margin-bottom:10px; font-weight:600; }
.actions { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
#photo { max-width:120px; border-radius:12px; display:block; }
#toast { position:fixed; bottom:16px; left:50%; transform:translateX(-50%); background:#222; padding:8px 14px; border-radius:20px; }
#register-panel label { display:block; margin:10px 0 4px; font-size:.85rem; color:var(--muted); }
#register-panel input, #register-panel select { margin-bottom:4px; }
#reg-submit { margin-top:12px; }
.iti { width:100%; }
