:root{--bg: #ffffff;--fg: #1c1b19;--muted: #6b6861;--line: #e6e3dd;--soft: #f4f2ee;--accent: #6d28d9;--error: #c0392b;color-scheme:light dark}@media(prefers-color-scheme:dark){:root{--bg: #1a1918;--fg: #f1efeb;--muted: #a39f97;--line: #2e2c29;--soft: #242220;--accent: #b197fc;--error: #ff8a7a}}*{box-sizing:border-box}html,body{height:100%;margin:0}body{background:var(--bg);color:var(--fg);font:15px/1.45 system-ui,-apple-system,Segoe UI,sans-serif}a{color:var(--accent)}button{font:inherit;color:inherit;cursor:pointer}#about{max-width:560px;margin:15vh auto 0;padding:0 16px}#about h1{font-size:28px;letter-spacing:-.02em}#app{display:grid;grid-template-rows:auto 1fr auto auto;height:100%}#app[hidden]{display:none}#top{display:flex;align-items:center;gap:12px;padding:10px 16px;border-bottom:1px solid var(--line)}.title{font-weight:700;font-size:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hash{color:var(--muted);margin-right:4px}#here{display:flex;margin-left:auto}#here .avatar{width:26px;height:26px;font-size:11px;margin-left:-6px;border:2px solid var(--bg)}#state{color:var(--muted);font-size:13px}#scroller{overflow-y:auto;padding:8px 0 12px}#older,#empty{text-align:center;padding:12px;color:var(--muted)}#older button{border:1px solid var(--line);background:var(--soft);border-radius:999px;padding:4px 14px;font-size:13px}#list,.msgs{list-style:none;margin:0;padding:0}.day{display:flex;align-items:center;gap:12px;margin:14px 16px 6px;color:var(--muted);font-size:12px;font-weight:600}.day:before,.day:after{content:"";flex:1;height:1px;background:var(--line)}.group{display:flex;gap:10px;padding:6px 16px}.avatar{flex:none;display:inline-grid;place-items:center;width:34px;height:34px;border-radius:50%;background:hsl(var(--hue, 260) 55% 52%);color:#fff;font-size:13px;font-weight:700}.main{min-width:0;flex:1}.head{display:flex;align-items:baseline;gap:8px}.who{font-weight:700}.when{color:var(--muted);font-size:12px}.msg{position:relative;padding:1px 0;border-radius:6px}.msg:hover{background:var(--soft)}.text{white-space:pre-wrap;overflow-wrap:anywhere}.text.deleted,.edited{color:var(--muted);font-style:italic}.edited{font-size:12px}.msg.pending{opacity:.55}.msg.failed .text{color:var(--error)}.hint{color:var(--muted);font-size:12px}.hint.error{color:var(--error)}.tools{position:absolute;top:-12px;right:4px;display:none;gap:2px;padding:2px;border:1px solid var(--line);border-radius:8px;background:var(--bg)}.msg:hover .tools,.msg:focus-within .tools{display:flex}.tools button{border:0;background:none;padding:2px 8px;border-radius:6px;font-size:12px}.tools button:hover{background:var(--soft)}.edit-box{width:100%;font:inherit;color:inherit;background:var(--bg);border:1px solid var(--accent);border-radius:8px;padding:6px 8px;resize:vertical}#typing{min-height:20px;padding:0 16px;color:var(--muted);font-size:12px}#composer{display:flex;gap:8px;align-items:flex-end;padding:4px 16px 14px}#input{flex:1;min-height:40px;max-height:200px;padding:9px 12px;border:1px solid var(--line);border-radius:10px;background:var(--soft);color:inherit;font:inherit;resize:none}#input:focus{outline:2px solid var(--accent);outline-offset:-1px}#send{height:40px;padding:0 16px;border:0;border-radius:10px;background:var(--accent);color:#fff;font-weight:600}body.offline #send{opacity:.7}
