:root {
  color-scheme: dark;
  font: 16px/1.6 system-ui, 'Microsoft YaHei', sans-serif;
  color: #edf2ed;
  background: #101716;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
main { width: min(100% - 2rem, 46rem); margin: auto; }
header { display: flex; align-items: center; justify-content: space-between; min-height: 5rem; border-bottom: 1px solid #3c4a45; }
.wordmark { letter-spacing: .24em; font-weight: 700; color: #a8e0c6; }
#gate { max-width: 26rem; margin: clamp(3rem, 13vh, 8rem) auto 0; }
h1 { font-size: clamp(1.75rem, 5vw, 2.75rem); font-weight: 540; margin: 1.35rem 0; }
form { display: grid; gap: .65rem; }
label { color: #c0ccc5; }
input, textarea, button { font: inherit; border-radius: .65rem; padding: .6rem .85rem; }
input, textarea { color: inherit; background: #1d2925; border: 1px solid #4e6258; width: 100%; }
textarea { resize: vertical; }
button { justify-self: start; border: 1px solid transparent; background: #bce7d2; color: #10261b; cursor: pointer; min-height: 44px; }
button:disabled { opacity: .6; cursor: wait; }
.quiet { background: transparent; color: inherit; border-color: #4e6258; }
#messages { display: grid; gap: .85rem; margin-bottom: 1rem; }
#messages article { border: 1px solid #40524a; border-radius: .8rem; padding: .65rem .9rem; background: #192520; }
#messages article[data-role="user"] { margin-left: min(10vw, 4rem); background: #244236; }
#messages strong { font-size: .875rem; color: #a8e0c6; }
#messages p { margin: .3rem 0; white-space: pre-wrap; overflow-wrap: anywhere; }
#status { color: #e1cf9e; }
*:focus-visible { outline: 2px solid #bae7d2; outline-offset: 3px; }
