:root {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #1e3131;
  background: #f4f6f3;
  font-synthesis: none;
  --ink: #1e3131;
  --muted: #60716b;
  --line: #dce4de;
  --green: #25644f;
  --paper: #fff;
  --soft: #eef4ee;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea {
  font: inherit;
}
button,
.button {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 11px 16px;
  background: var(--green);
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
button:hover,
.button:hover {
  filter: brightness(0.94);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button:focus-visible,
a:focus-visible,
textarea:focus-visible {
  outline: 3px solid #8bc5aa;
  outline-offset: 3px;
}
.secondary {
  background: white;
  border-color: var(--line);
  color: var(--ink);
}
.danger {
  background: #fff1ee;
  color: #964132;
  border-color: #efd8d2;
}
.text-button {
  background: none;
  color: var(--muted);
  padding: 8px 0;
  text-align: left;
  font-weight: 500;
}
.brand {
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.8px;
}
.gate {
  max-width: 600px;
  margin: 14vh auto;
  padding: 32px;
}
.gate h1 {
  font-size: 46px;
  line-height: 1.12;
  letter-spacing: -1.8px;
}
.gate p {
  color: var(--muted);
  line-height: 1.7;
}
.gate form {
  display: flex;
  gap: 10px;
}
.workspace {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  height: 100dvh;
}
aside {
  padding: 32px 22px;
  background: #edf2ec;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: auto;
}
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.7px;
  color: var(--muted);
  margin: 0 0 10px;
}
aside .eyebrow {
  margin-top: 32px;
}
nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
nav button {
  text-align: left;
  background: transparent;
  color: var(--muted);
  font-weight: 500;
  overflow-wrap: anywhere;
}
nav button.selected {
  background: white;
  color: var(--ink);
  box-shadow: 0 1px 4px #203b2810;
}
.sidebar-bottom {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  font-size: 13px;
  color: var(--muted);
}
.chat {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fcfdfb;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 30px 40px 20px;
  border-bottom: 1px solid var(--line);
  gap: 16px;
}
header h1 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.7px;
  margin: 0;
}
.participants {
  font-size: 13px;
  color: var(--muted);
  margin: 12px 0 0;
}
.participants span,
.human-badge {
  font-size: 10px;
  color: var(--green);
  border: 1px solid #b4cebd;
  border-radius: 4px;
  padding: 2px 5px;
  margin-left: 3px;
}
#connection {
  font-size: 12px;
  color: var(--green);
  white-space: nowrap;
}
.controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 40px;
  background: white;
  border-bottom: 1px solid var(--line);
}
.controls button {
  padding: 7px 12px;
  font-size: 12px;
}
.pill {
  border-radius: 20px;
  padding: 5px 10px;
  background: var(--soft);
  color: var(--green);
  font-size: 12px;
  margin-right: auto;
}
.control-note {
  font-size: 11px;
  color: var(--muted);
  flex-basis: 100%;
  padding-top: 4px;
}
#notice {
  font-size: 13px;
  color: #874425;
  padding: 0 40px;
}
#notice:not(:empty) {
  padding-top: 12px;
}
.messages {
  flex: 1;
  overflow: auto;
  padding: 28px 40px;
  scroll-behavior: smooth;
}
.empty {
  padding: 12vh 10px;
  text-align: center;
  color: var(--muted);
}
.empty h2 {
  font-size: 24px;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: -0.6px;
}
.empty p {
  font-size: 14px;
  line-height: 1.8;
}
.message {
  max-width: 780px;
  margin: 0 auto 24px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
}
.avatar {
  height: 34px;
  width: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #e9e7f3;
  color: #675e8a;
  font-size: 13px;
  font-weight: 600;
}
.message.human .avatar {
  background: #dbeade;
  color: var(--green);
}
.message.garry .avatar {
  background: #f3e8da;
  color: #896234;
}
.message-meta {
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 13px;
}
.message-meta strong {
  font-weight: 650;
}
.message-meta time {
  font-size: 11px;
  color: var(--muted);
}
.message-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.65;
  padding: 12px 16px;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 0 12px 12px;
  background: white;
}
.human .message-body {
  background: #eff5ef;
  border-color: #dbe7dc;
}
.receipts {
  font-size: 10px;
  color: var(--muted);
  padding-top: 6px;
  line-height: 1.5;
}
#compose {
  margin: 0 40px 28px;
  border: 1px solid #ccd9ce;
  background: white;
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 4px 20px #19362505;
}
#compose label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
  margin-bottom: 10px;
}
textarea {
  resize: vertical;
  width: 100%;
  max-height: 180px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  padding: 0;
  outline-offset: 4px;
}
.compose-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 10px;
}
.compose-footer span {
  font-size: 11px;
  color: var(--muted);
  margin-right: auto;
}
.compose-footer button {
  font-size: 12px;
  padding: 9px 12px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  max-width: 600px;
  width: calc(100% - 32px);
  max-height: 85vh;
  color: var(--ink);
}
dialog::backdrop {
  background: #15312766;
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
dialog h2 {
  font-weight: 600;
  font-size: 20px;
}
dialog p {
  font-size: 13px;
  line-height: 1.65;
}
.connection-row {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}
.connection-row span {
  overflow-wrap: anywhere;
  font-size: 13px;
}
.muted {
  color: var(--muted);
}
[hidden] {
  display: none !important;
}
@media (max-width: 760px) {
  .workspace {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }
  aside {
    padding: 14px 18px;
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
  }
  aside .brand {
    font-size: 18px;
    margin-right: auto;
  }
  aside .eyebrow,
  aside .sidebar-bottom p {
    display: none;
  }
  aside > button {
    font-size: 11px;
    padding: 8px;
  }
  aside nav {
    flex-direction: row;
    overflow: auto;
    order: 4;
    width: 100%;
    max-height: 43px;
  }
  nav button {
    font-size: 12px;
    white-space: nowrap;
    max-width: 210px;
    text-overflow: ellipsis;
    overflow: hidden;
    padding: 8px 12px;
  }
  .sidebar-bottom {
    margin: 0;
    flex-direction: row;
    gap: 10px;
  }
  .text-button {
    font-size: 11px;
  }
  header {
    padding: 20px 18px 16px;
  }
  header h1 {
    font-size: 20px;
  }
  .controls {
    padding: 12px 18px;
  }
  .messages {
    padding: 22px 18px;
  }
  .message {
    gap: 9px;
    grid-template-columns: 29px minmax(0, 1fr);
  }
  .avatar {
    width: 28px;
    height: 28px;
    font-size: 11px;
  }
  .message-meta {
    gap: 6px;
    flex-wrap: wrap;
  }
  .message-body {
    font-size: 14px;
    padding: 10px 12px;
  }
  #compose {
    margin: 0 12px 12px;
    padding: 12px;
  }
  .compose-footer {
    flex-wrap: wrap;
  }
  .compose-footer span {
    flex-basis: 100%;
    margin-bottom: 4px;
  }
  .compose-footer #send {
    margin-left: auto;
  }
  #notice {
    padding-left: 18px;
    padding-right: 18px;
  }
  #connection {
    font-size: 11px;
  }
  .gate {
    margin: 8vh auto;
    padding: 24px;
  }
  .gate h1 {
    font-size: 38px;
  }
}

form label {
  display: block;
  font-size: 13px;
  margin: 14px 0;
}
input:not([type="checkbox"]),
select {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 8px 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  color: var(--ink);
  background: white;
}
input[type="checkbox"] {
  margin-right: 8px;
}
#manage-content form {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
#manage-content > button {
  margin: 8px 8px 0 0;
}
#manage-content textarea {
  border: 1px solid var(--line);
  padding: 10px;
}
#manage-content h3 {
  font-size: 16px;
  font-weight: 600;
}
#manage-notice {
  overflow-wrap: anywhere;
  color: var(--green);
}
