:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #25302d;
  background: #f6f6f3;
  font-size: 16px;
  color-scheme: light dark;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
main {
  height: 100dvh;
  max-width: 1000px;
  margin: auto;
  padding: env(safe-area-inset-top) max(20px, env(safe-area-inset-right))
    max(8px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
  gap: 12px;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 76px;
  border-bottom: 1px solid #ddd;
}
header strong {
  font-size: 24px;
  letter-spacing: -1px;
}
header span {
  margin-left: 16px;
  color: #727e77;
}
button {
  font: inherit;
  border: 1px solid #cbd3cc;
  background: transparent;
  color: inherit;
  padding: 10px 16px;
  border-radius: 12px;
  cursor: pointer;
  min-height: 44px;
}
button:hover {
  background: #e9eee9;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
#send,
#login button,
#preferences button:first-of-type {
  background: #244d3b;
  color: white;
  border: 0;
}
label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
}
input,
select,
textarea {
  font: inherit;
  color: inherit;
  background: #fff;
  border: 1px solid #d6dcd5;
  border-radius: 10px;
  padding: 12px;
  min-width: 0;
}
#connection {
  padding: 18px;
  background: #eaf0e8;
  border-radius: 14px;
}
#connection form {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
}
h2 {
  font-size: 17px;
  flex-basis: 100%;
  margin: 0 0 8px;
}
#notice {
  font-size: 14px;
  color: #8c4d27;
  min-height: 18px;
}
#messages {
  flex: 1;
  min-height: 100px;
  overflow: auto;
  padding: 12px 0;
  scroll-behavior: smooth;
}
article {
  max-width: 85%;
  margin: 0 0 22px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
article.user {
  margin-left: auto;
  background: #e7ede3;
  padding: 14px 20px;
  border-radius: 18px;
}
article.assistant {
  padding: 8px 10px;
}
small {
  font-size: 12px;
  color: #748078;
}
p {
  white-space: pre-wrap;
  margin: 5px 0;
}
#composer {
  display: flex;
  gap: 12px;
  align-items: end;
  background: #fff;
  border: 1px solid #d7ded5;
  border-radius: 18px;
  padding: 10px;
}
textarea {
  flex: 1;
  resize: none;
  border: 0;
  max-height: 160px;
  outline: none;
}
footer {
  text-align: center;
  font-size: 11px;
  color: #79847e;
  padding-bottom: 4px;
}
details {
  max-height: 25dvh;
  overflow: auto;
  font-size: 14px;
}
summary {
  cursor: pointer;
  padding: 8px;
}
.job,
.node {
  border-top: 1px solid #ddd;
  padding: 10px 0;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.job span {
  flex: 1;
  min-width: 180px;
}
.job a,
.node a {
  color: #285e42;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
[hidden] {
  display: none !important;
}
@media (max-width: 600px) {
  main {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }
  header span {
    display: none;
  }
  article {
    max-width: 95%;
  }
  #connection {
    max-height: 45dvh;
    overflow: auto;
  }
  header strong {
    font-size: 21px;
  }
}
@media (prefers-color-scheme: dark) {
  :root {
    background: #171d19;
    color: #e3e9e0;
  }
  input,
  select,
  textarea,
  #composer {
    background: #222b24;
    color: #e3e9e0;
  }
  #connection,
  article.user {
    background: #28382c;
  }
  button:hover {
    background: #334636;
  }
  header,
  .job,
  .node {
    border-color: #3b483d;
  }
}
