:root {
  color-scheme: light;
  font: 16px/1.5 system-ui, sans-serif;
  color: #172b27;
  background: #eef4f1;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.header, main { max-width: 70rem; margin: auto; padding: 1.25rem clamp(1rem, 4vw, 3rem); }
.header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; border-bottom: 1px solid #baccc4; }
.header h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.045em; margin: 0; }
.header p, nav { margin: .2rem 0; }
nav { display: flex; gap: 1rem; flex-wrap: wrap; }
a { color: #095f4d; text-underline-offset: .18em; }
h2, h3 { line-height: 1.25; margin: 0 0 .8rem; }
h3 { margin-top: 1.35rem; }
p { margin: .55rem 0; }
section { background: #fff; border: 1px solid #c5d4cd; border-radius: .7rem; padding: 1rem 1.2rem; }
.workspace { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 1rem; margin-top: 1rem; align-items: start; }
.stack { display: grid; gap: .35rem; }
.form-grid, .control-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: end; }
.form-grid > *, .control-row input { flex: 1 1 8rem; }
input, select, textarea, button { font: inherit; border: 1px solid #8ca79c; border-radius: .35rem; padding: .35rem .55rem; }
input, select, textarea { background: #fff; color: inherit; width: 100%; min-width: 0; }
textarea { resize: vertical; }
button { background: #125847; color: #fff; cursor: pointer; justify-self: start; }
button:disabled { background: #e1e9e5; color: #465b52; cursor: default; }
:focus-visible { outline: 2px solid #075fc5; outline-offset: 2px; }
.room-list { list-style: none; margin: 0; padding: 0; max-height: 16rem; overflow: auto; }
.room-list li { display: grid; gap: .25rem; border-top: 1px solid #d7e2dc; padding: .45rem 0; }
.room-list button { text-align: left; overflow-wrap: anywhere; }
.room-list span { font-size: .9rem; }
.messages { border: 1px solid #c5d4cd; border-radius: .35rem; min-height: 8rem; max-height: 20rem; overflow: auto; list-style: none; padding: .65rem; }
.messages li { padding: .2rem .1rem; overflow-wrap: anywhere; white-space: pre-wrap; }
.messages strong { margin-right: .6rem; }
output { display: block; font-family: ui-monospace, monospace; overflow-wrap: anywhere; }
@media (max-width: 45rem) {
  .workspace { grid-template-columns: 1fr; }
}
