:root { color-scheme: light dark; font-family: system-ui, sans-serif; --line: light-dark(#d4d4d8, #3f3f46); --own: light-dark(#e0edff, #1e3350); }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
main { max-width: 40rem; margin: 0 auto; padding: 1rem; }
input, button { font: inherit; padding: .55rem .75rem; border: 1px solid var(--line); border-radius: .4rem; }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: wait; }
#auth, #pending { max-width: 22rem; }
#auth form { display: grid; gap: .75rem; }
#auth label { display: grid; gap: .25rem; }
.error { color: light-dark(#b91c1c, #fca5a5); }
.error:empty { display: none; }
#chat { display: flex; flex-direction: column; height: 100dvh; }
#chat header { display: flex; align-items: center; gap: 1rem; }
#chat header h1 { margin: 0 auto 0 0; font-size: 1.4rem; }
#messages { flex: 1; overflow-y: auto; list-style: none; margin: 1rem 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
#messages li { align-self: flex-start; max-width: 85%; padding: .5rem .75rem; border: 1px solid var(--line); border-radius: .6rem; }
#messages li.own { align-self: flex-end; background: var(--own); }
#messages time { margin-left: .5rem; font-size: .75rem; opacity: .7; }
#messages p { margin: .25rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
#send { display: flex; gap: .5rem; }
#send input { flex: 1; min-width: 0; }
