:root { color-scheme: dark; font-family: system-ui, sans-serif; background: #171323; color: #f9f6ff; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0 auto; max-width: 76rem; padding: 1rem; }
header, .chathead { display: flex; justify-content: space-between; gap: .75rem; align-items: center; }
header { min-height: 3rem; padding: .5rem 1rem; background: #251e3b; border-radius: .75rem; }
header small { color: #d3c4f0; margin-left: .5rem; }
#status { color: #e0ccff; min-height: 1.4rem; overflow-wrap: anywhere; }
#login { max-width: 26rem; margin: 2rem auto; }
form, label, nav { display: grid; gap: .55rem; }
button, input, textarea { font: inherit; border: 1px solid #6f5f8c; border-radius: .6rem; padding: .65rem; }
button { color: white; background: #46346a; min-height: 44px; cursor: pointer; }
button[aria-current="true"] { background: #645197; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid #e3cbff; outline-offset: 2px; }
input, textarea { width: 100%; color: #fff; background: #221c31; }
#workspace { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: 1rem; }
aside { min-width: 0; display: grid; gap: .65rem; align-content: start; }
nav { max-height: 60vh; overflow: auto; }
nav button { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.conversation { min-width: 0; background: #251e3b; border-radius: .75rem; padding: .85rem; }
h1 { margin: .3rem 0 .75rem; font-size: 1.2rem; overflow-wrap: anywhere; }
#messages { max-height: 55vh; overflow: auto; }
article { padding: .85rem; margin: .5rem 0; background: #2e2546; border-radius: .65rem; }
article div { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: .35rem; }
#composer { margin-top: .8rem; }
@media (max-width: 640px) {
  #workspace { grid-template-columns: 1fr; }
  nav { max-height: 8.5rem; }
  #messages { max-height: 45vh; }
  body { padding: .6rem; }
}
