:root {
  font-family:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    sans-serif;
  color: #242424;
  background: #fff;
  font-synthesis: none;
  font-size: 14px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
textarea,
a {
  font: inherit;
}
button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 9px 10px;
  border-radius: 8px;
}
button:hover {
  background: #eaeaea;
}
button:disabled {
  opacity: 0.4;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
textarea:focus-visible {
  outline: 2px solid #777;
  outline-offset: 2px;
}
[hidden] {
  display: none !important;
}
#workspace {
  display: flex;
  height: 100dvh;
}
#sidebar {
  width: 300px;
  flex-shrink: 0;
  background: #f7f7f7;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #eee;
  padding: 16px 12px;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
#sidebar header {
  padding: 0 6px 16px;
}
#sidebar header button {
  font-size: 12px;
  color: #737373;
}
nav {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}
nav button {
  font-size: 13px;
  color: #777;
}
nav button[aria-pressed="true"] {
  background: #e9e9e9;
  color: #222;
}
nav span {
  margin-left: 4px;
  font-size: 11px;
}
#list {
  overflow: auto;
  flex: 1;
  min-height: 0;
}
.task {
  display: block;
  width: 100%;
  text-align: left;
  padding: 13px 12px;
  margin-bottom: 4px;
}
.task.selected {
  background: #e9e9e9;
}
.row-title {
  font-size: 14px;
  font-weight: 500;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.row-meta {
  display: flex;
  justify-content: space-between;
  color: #858585;
  font-size: 11px;
  margin-top: 6px;
}
.row-brief {
  font-size: 12px;
  color: #858585;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 7px;
}
.running {
  color: #278451;
}
.waiting,
.paused {
  color: #946c26;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #888;
  font-size: 11px;
  padding-top: 12px;
}
#list-status,
#receipt {
  font-size: 12px;
  color: #747474;
  line-height: 1.6;
  min-height: 18px;
  margin: 8px 4px;
}
#conversation {
  flex: 1;
  min-width: 0;
  position: relative;
}
#empty {
  height: 100%;
  display: grid;
  place-items: center;
  color: #999;
}
#thread {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.thread-header {
  padding: 18px 28px;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
}
.thread-heading {
  min-width: 0;
  flex: 1;
}
h1 {
  font-size: 16px;
  font-weight: 550;
  margin: 0 0 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#task-state {
  font-size: 12px;
  color: #777;
}
.quiet {
  color: #8e5454;
  font-size: 12px;
  flex-shrink: 0;
}
#back {
  display: none;
}
#scroll {
  overflow: auto;
  flex: 1;
  min-height: 0;
  scrollbar-gutter: stable;
}
.transcript {
  max-width: 760px;
  margin: 0 auto;
  padding: 20px 32px 32px;
}
.history-nav {
  text-align: center;
}
.history-nav button {
  font-size: 12px;
  color: #888;
}
.message {
  margin: 18px 0 28px;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.message.user {
  margin-left: auto;
  width: fit-content;
  max-width: 88%;
  background: #f2f2f2;
  border-radius: 18px;
  padding: 12px 18px;
}
.message.assistant {
  padding: 5px 0;
}
.message-meta {
  font-size: 11px;
  color: #999;
  margin-bottom: 9px;
}
.message-text {
  white-space: pre-wrap;
  line-height: 1.85;
  font-size: 15px;
}
.message.user .message-text {
  font-size: 14px;
}
.empty {
  color: #999;
  padding: 24px 12px;
  text-align: center;
}
#composer {
  padding: 12px 32px 16px;
  margin: 0 auto;
  width: 100%;
  max-width: 824px;
  flex-shrink: 0;
  background: #fff;
}
.input-wrap {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  border: 1px solid #dedede;
  border-radius: 20px;
  padding: 12px 12px 12px 16px;
}
textarea {
  border: 0;
  outline: none;
  background: transparent;
  resize: vertical;
  min-height: 48px;
  max-height: 180px;
  flex: 1;
  min-width: 0;
  line-height: 1.65;
}
textarea:focus-visible {
  outline: none;
}
#send {
  background: #292929;
  color: #fff;
  font-size: 13px;
  padding: 9px 15px;
  border-radius: 12px;
}
#login {
  padding: 32px;
  text-align: center;
  margin-top: 20vh;
}
#login a {
  display: inline-block;
  padding: 13px 22px;
  border-radius: 12px;
  background: #252525;
  color: white;
  text-decoration: none;
}
#boot-status {
  text-align: center;
  color: #999;
  padding: 32px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 700px) {
  #sidebar {
    width: 100%;
    border: 0;
    padding: 16px;
  }
  #conversation {
    display: none;
  }
  #workspace.in-task #sidebar {
    display: none;
  }
  #workspace.in-task #conversation {
    display: block;
  }
  #back {
    display: block;
    padding: 6px;
    font-size: 22px;
  }
  .thread-header {
    padding: 14px 16px;
    gap: 10px;
  }
  h1 {
    font-size: 14px;
  }
  .quiet {
    padding: 8px 0 8px 8px;
  }
  .transcript {
    padding: 12px 20px 24px;
  }
  .message-text {
    font-size: 14px;
  }
  #composer {
    padding: 10px 16px max(12px, env(safe-area-inset-bottom));
  }
  .message.user {
    max-width: 92%;
  }
}
