:root { color-scheme: light dark; font: 17px/1.55 system-ui, sans-serif; color: #172337; background: #f1f5f9; }
* { box-sizing: border-box; }
body { margin: 0; padding: 2rem 1rem; }
main { max-width: 40rem; margin: 0 auto; padding: 2rem; background: #fff; border: 1px solid #d1dae5; border-radius: 1rem; }
.brand { font-weight: 700; text-decoration: none; }
h1 { font-size: 1.65rem; line-height: 1.2; margin: 1.5rem 0; }
h2 { font-size: 1.2rem; margin-top: 1.75rem; }
p { margin: 1rem 0; }
a { color: #1756ac; overflow-wrap: anywhere; }
button, input, textarea, .button { font: inherit; border-radius: .45rem; }
input, textarea { display: block; width: 100%; margin: .5rem 0 1rem; padding: .7rem; border: 1px solid #64748b; color: inherit; background: inherit; }
textarea { resize: vertical; min-height: 7rem; }
button, .button { display: inline-block; border: 1px solid #1756ac; color: #fff; background: #1756ac; padding: .65rem 1rem; cursor: pointer; text-decoration: none; margin: .35rem .35rem .35rem 0; }
button:disabled { opacity: .65; cursor: wait; }
:focus-visible { outline: 3px solid #b15300; outline-offset: 3px; }
.secret { display: block; padding: 1rem; margin: .75rem 0; background: #edf2f9; border-radius: .45rem; font: 1.15rem/1.5 ui-monospace, monospace; overflow-wrap: anywhere; user-select: all; }
#status { min-height: 1.5em; }
form { margin: 1rem 0; }
.messages { display: flex; flex-direction: column; gap: .75rem; list-style: none; padding: 0; margin: 1.5rem 0; }
.message { max-width: 90%; padding: .7rem 1rem; border-radius: .75rem; background: #edf2f9; overflow-wrap: anywhere; }
.message-owner { align-self: flex-start; }
.message-client { align-self: flex-end; background: #dcecff; }
.message p { margin: .3rem 0; white-space: pre-wrap; }
.message-author { font-weight: 600; }
.message time { display: block; font-size: .8rem; color: #475569; }
@media (max-width: 480px) { body { padding: .75rem; } main { padding: 1.2rem; } button, .button { width: 100%; text-align: center; } }
@media (prefers-color-scheme: dark) {
  :root { color: #e5edf9; background: #111827; }
  main { background: #192436; border-color: #475569; }
  a { color: #9cc8ff; }
  button, .button { background: #285da6; border-color: #8ab9fa; color: #fff; }
  .secret { background: #26344b; }
  .message { background: #26344b; }
  .message-client { background: #23466e; }
  .message time { color: #c1cedf; }
}
