:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Yu Gothic", Meiryo, sans-serif;
  color: #24332f;
  background: #f3f5f2;
  line-height: 1.65;
}
* { box-sizing: border-box; }
body { margin: 0; }
main { width: min(780px, calc(100% - 32px)); margin: 48px auto; }
.eyebrow { margin: 0 0 4px; color: #366a59; font-weight: 700; }
h1 { margin: 0; font-size: 32px; letter-spacing: .04em; }
.description { margin: 12px 0 28px; color: #58655e; }
.panel { padding: 28px; border: 1px solid #dce3dc; border-radius: 16px; background: white; }
.connection { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.status { padding: 5px 12px; border-radius: 8px; background: #f2eedc; color: #655619; font-weight: 700; }
.status[data-state="connected"] { background: #e4f3e9; color: #215b3b; }
.status[data-state="error"] { background: #fcebea; color: #91382f; }
label { display: block; margin-bottom: 6px; font-weight: 700; }
.compose { display: flex; gap: 10px; }
input, button { font: inherit; border-radius: 8px; min-height: 48px; }
input { min-width: 0; flex: 1; border: 1px solid #9daea4; padding: 10px 12px; }
button { border: 0; background: #24694f; color: white; padding: 10px 24px; font-weight: 700; cursor: pointer; }
button:hover:enabled { background: #194e3b; }
button:disabled { background: #d8e0db; color: #53665b; cursor: default; }
input:focus-visible, button:focus-visible { outline: 3px solid #a9cbb8; outline-offset: 2px; }
.feedback { min-height: 1.65em; margin: 8px 0 18px; font-size: 14px; color: #56665c; }
#messages { list-style: none; margin: 0; padding: 12px; min-height: 240px; max-height: 420px; overflow-y: auto; background: #f5f7f4; border-radius: 10px; }
.empty { padding: 75px 12px; color: #67776c; text-align: center; }
.message { margin-bottom: 10px; padding: 12px 14px; border: 1px solid #dfe5df; border-radius: 9px; background: white; }
.message:last-child { margin-bottom: 0; }
.message.own { border-color: #bcd8c9; background: #edf7f0; }
.message-meta { display: flex; justify-content: space-between; gap: 16px; font-size: 13px; color: #56665c; }
.message p { margin: 5px 0 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.note { margin: 14px 0 0; font-size: 13px; color: #647269; }
@media (max-width: 520px) {
  main { margin: 24px auto; }
  h1 { font-size: 28px; }
  .panel { padding: 18px; }
  .description br { display: none; }
  button { padding-inline: 16px; }
  .connection { align-items: flex-start; flex-direction: column; gap: 8px; }
}
