#composer #draft {
  max-height: none;
  padding: 0;
  resize: none;
}

#draft .cm-editor { font: inherit; color: inherit; }
#draft .cm-editor.cm-focused { outline: none; }
#draft .cm-scroller {
  max-height: 24vh;
  overflow: auto;
  overscroll-behavior: contain;
  font: inherit;
  line-height: 1.45;
}
#draft .cm-content {
  min-width: 0;
  min-height: 44px;
  padding: 8px 10px;
  caret-color: currentColor;
}
#draft .cm-line { padding: 0; }
#draft .cm-cursor { border-left-color: currentColor; }
#draft .cm-placeholder { color: var(--muted, #65675f); }
#draft .composer-native {
  display: block;
  width: 100%;
  max-height: 24vh;
  border: 0;
  padding: 8px 10px;
  background: transparent;
  font: inherit;
  resize: vertical;
}
#draft .composer-native:focus { outline: 0; }

#quickQuestions { min-width: 0; }
.quick-question-list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  max-width: 28rem;
}
.quick-question-list button {
  position: relative;
  min-width: 0;
  min-height: 44px;
  padding: 4px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #494b48;
  font-size: .9rem;
  font-weight: 500;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.quick-question-list button + button::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  inset-block: 0;
  margin-block: auto;
  height: 14px;
  border-inline-start: 1px solid var(--line);
}
.quick-question-list button:active { background: var(--canvas); }
.quick-question-list button:focus-visible { outline: 2px solid var(--muted); outline-offset: -2px; }

#draft .composer-md-heading,
#draft .composer-md-strong { font-weight: 700; }
#draft .composer-md-h1 { font-size: 1.35em; }
#draft .composer-md-h2 { font-size: 1.2em; }
#draft .composer-md-h3 { font-size: 1.1em; }
#draft .composer-md-em { font-style: italic; }
#draft .composer-md-strike { text-decoration: line-through; }
#draft .composer-md-code,
#draft .composer-md-code-block {
  background: var(--canvas, #f4f4f1);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
#draft .composer-md-code { border-radius: 3px; }
#draft .composer-md-syntax { color: var(--muted, #65675f); }
#draft .composer-md-link { text-decoration: underline; text-underline-offset: 3px; }
#draft .composer-md-quote {
  border-inline-start: 2px solid var(--line, #dedfda);
  padding-inline-start: 10px;
  color: var(--muted, #65675f);
}
#draft .composer-live-table { max-width: 100%; overflow-x: auto; margin: 4px 0; }
#draft .composer-live-table table { width: 100%; table-layout: fixed; border-collapse: collapse; }
#draft .composer-live-table :is(th, td) {
  border: 1px solid var(--line, #dedfda);
  padding: 4px 8px;
  vertical-align: top;
  text-align: start;
}
#draft .composer-live-table th { background: var(--canvas, #f4f4f1); }
#draft .composer-live-table :is(th, td):focus-within { outline: 1px solid currentColor; outline-offset: -1px; }
#draft .composer-table-cell {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  overflow: hidden;
  resize: none;
  background: transparent;
  font: inherit;
}
@media (max-width: 700px) {
  #draft .cm-content { min-height: 40px; }
}

@media (max-width: 700px), (pointer: coarse) and (max-height: 500px) {
  body.user #composer {
    --composer-gutter: 16px;
    border: 0;
    background: #fff;
    padding: 8px max(12px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  }
  body.user .composer-surface {
    border: .5px solid rgb(0 0 0 / 5%);
    border-radius: 30px;
    background: rgb(244 244 244 / 91%);
    box-shadow: inset 0 1px 1px rgb(255 255 255 / 8%), 0 5px 22px rgb(0 0 0 / 13%);
  }
  body.user #composer .writing {
    display: grid;
    grid-template: "add draft send" auto / 44px minmax(0, 1fr) 44px;
    align-items: center;
    min-height: 48px;
    padding: 2px 5px;
    border: 0;
    border-radius: inherit;
    background: transparent;
    color: #171717;
  }
  body.user #composer .composer-toolbar,
  body.user #composer .composer-tools { display: contents; }
  body.user #composer #draft {
    grid-area: draft;
    min-width: 0;
    min-height: 40px;
    font: 17px/24px -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  }
  body.user #draft .cm-content,
  body.user #draft .composer-native {
    min-height: 40px;
    padding: 8px 0;
  }
  body.user #draft .cm-scroller,
  body.user #draft .composer-native {
    max-height: 40px;
    line-height: 24px;
  }
  body.user #draft .cm-placeholder {
    color: #707070;
    white-space: nowrap;
  }
  body.user #composer #add,
  body.user #composer #send {
    width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
  }
  body.user #composer #add { grid-area: add; color: #171717; }
  body.user #add .chat-icon { width: 23px; height: 23px; stroke-width: 1.9; }
  body.user #composer #send {
    grid-area: send;
    position: relative;
    justify-self: end;
    color: #fff;
  }
  body.user #send::before {
    content: "";
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    background: #171717;
  }
  body.user #send > span { display: none; }
  body.user #send .chat-icon { position: relative; width: 20px; height: 20px; stroke-width: 2; }
  body.user #composer #send:disabled { color: #949494; opacity: 1; }
  body.user #send:disabled::before { background: #e5e5e5; }

  body.user #composer:is([data-has-draft], [data-editing]) .composer-surface { border-radius: 28px; }
  body.user #composer:is([data-has-draft], [data-editing]) .writing {
    grid-template-areas: "draft draft draft" "add . send";
    padding: 8px var(--composer-gutter) 5px;
  }
  /* Align the visible plus and send circle with the text, allowing their
     larger touch targets to extend into the padding. */
  body.user #composer:is([data-has-draft], [data-editing]) #add {
    justify-self: start;
    margin-inline-start: -14px;
  }
  body.user #composer:is([data-has-draft], [data-editing]) #send {
    margin-inline-end: -5px;
  }
  body.user #composer:is([data-has-draft], [data-editing]) .cm-scroller,
  body.user #composer:is([data-has-draft], [data-editing]) .composer-native {
    min-height: 42px;
    max-height: 30vh;
    max-height: 30dvh;
  }
  body.user #attachment:not(:empty) { padding: 8px var(--composer-gutter) 0; min-width: 0; }
  body.user #attachment.card-reference { padding-block-start: 2px; }
  body.user #composer #attachment.card-reference + .writing { padding-block-start: 0; }
  body.user #attachment strong { min-width: 0; }
  body.user #attachment button { min-height: 44px; flex: none; }
}
