[hidden]{display:none!important}
*{box-sizing:border-box}
body{margin:0;font-family:system-ui,sans-serif;background:#111;color:#eee}
input,button{font:inherit;padding:10px;border-radius:8px;border:1px solid #444;background:#1c1c1c;color:#eee}
button{background:#2563eb;border-color:#2563eb;cursor:pointer}
#login{max-width:320px;margin:15vh auto;display:flex;flex-direction:column;gap:10px;padding:0 16px}
#err{color:#f87171}
#chat{display:flex;flex-direction:column;height:100dvh}
header{padding:10px 14px;background:#1c1c1c}
#list{flex:1;overflow-y:auto;padding:12px;display:flex;flex-direction:column;gap:8px}
.msg{align-self:flex-start;max-width:80%;background:#262626;padding:8px 10px;border-radius:10px;white-space:pre-wrap;overflow-wrap:anywhere}
.meta{font-size:12px;color:#999}
.reply{font-size:13px;color:#aaa;border-left:3px solid #555;padding-left:6px;margin:4px 0}
.msg img{display:block;max-width:100%;max-height:260px;border-radius:6px;margin-top:4px;cursor:pointer}
#composer{display:flex;gap:8px;padding:10px}
#text{flex:1;min-width:0}
#viewer{position:fixed;inset:0;background:#000e;display:flex;align-items:center;justify-content:center}
#big{max-width:100%;max-height:100%}
#go:disabled{opacity:.7;cursor:wait}
#go.busy::before{content:"";display:inline-block;width:14px;height:14px;margin-right:8px;vertical-align:-2px;border:2px solid #fff6;border-top-color:#fff;border-radius:50%;animation:spin .8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
