/* =========================================================================
   Mity — AI assistant page

   Ported from the Eko/Amity `ekoagentic` module: a 240px sub-nav beside either
   the new-chat hero or one of three panel views, an 800px thread column, and a
   44px composer that grows to two rows once a source is attached.

   Colours are Eko's, verbatim — #F5F5F5 module, #FAFAFA panes, white active
   pill, #73998E/#699286 send button — so this page matches the live app rather
   than the cream dashboard. Values below are literals on purpose: they are the
   Eko palette, not this demo's tokens, and shouldn't drift with them.
   ========================================================================= */

/* Eko palette, scoped to this page */
:root {
  --eko-green: #06C692;
  --eko-white: #FFFFFF;
  --eko-border: #ECECEC;
  --eko-ink: #212121;
  --eko-ink-85: rgba(0, 0, 0, .85);
  --eko-ink-65: rgba(0, 0, 0, .65);
  --eko-ink-25: rgba(0, 0, 0, .25);
  --eko-muted-3: #9E9E9E;
  --eko-empty: #BDBDBD;
  --eko-placeholder: #9197A3;
  --eko-module: #F5F5F5;
  --eko-pane: #FAFAFA;
}

/* ===== Page shell =====
   The dashboard scrolls the page; this page must not — the thread scrolls
   inside itself so the composer stays pinned. Scoped to this page only. */
body[data-demo="mity"] {
  /* Eko sits on white, and the module covers the rest. Drops the dashboard's
     cream + radial gradients, which would otherwise show at the seams. */
  background: var(--eko-white);
  background-image: none;
}

body[data-demo="mity"] .app {
  height: 100vh;
  min-height: 0;
  overflow: hidden;
}

body[data-demo="mity"] .main {
  min-height: 0;
}

.body-row {
  flex: 1;
  min-height: 0;
  display: flex;
}

/* Sprite icons are fill-based (Font Awesome). The few hand-authored 24x24
   outline marks carry their own fill="none" stroke="currentColor" inline. */
.icon {
  width: 16px;
  height: 16px;
  display: block;
  fill: currentColor;
}

[hidden] {
  display: none !important;
}

/* ===== Module ===== */
.mity {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  background: var(--eko-module);
}

/* ===== Sub-nav ===== */
.mity-side {
  width: 240px;
  flex: 0 0 240px;
  padding: 0 12px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
}

.mity-collapse {
  width: 32px;
  height: 32px;
  /* 22/34/6 is what puts the first menu item at y=136, as in the live app */
  margin: 22px 0 34px 6px;
  color: var(--eko-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mity-collapse .icon {
  width: 20px;
  height: 20px;
}

.mity-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mity-item {
  height: 36px;
  padding: 8px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  color: var(--eko-ink);
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
}

/* live: transparent by default, .04 on hover, .08 while pressed, and plain
   white once active — no shadow, no bolding */
.mity-item:hover { background: rgba(0, 0, 0, .04); }
.mity-item:active { background: rgba(0, 0, 0, .08); }

.mity-item.is-active,
.mity-item.is-active:hover { background: var(--eko-white); }

.mity-item .icon {
  flex: 0 0 20px;
  width: 20px;
  height: 16px;
  color: #424242;
}

.mity-item span { line-height: 20px; }

.mity-recent {
  margin-top: 32px;
  padding: 0 8px;
  font-size: 10px;
  font-weight: 600;
  line-height: 12px;
  letter-spacing: .5px;
  color: var(--eko-muted-3);
  flex-shrink: 0;
}

.mity-no-topics {
  margin: 36px 0 0;
  text-align: center;
  font-size: 14px;
  color: var(--eko-empty);
}

/* Recent-chat rows, created by js/mity.js on the first send */
.mity-chats {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}

.mity-chat {
  height: 36px;
  padding: 8px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 20px;
  color: var(--eko-ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.mity-chat:hover { background: rgba(0, 0, 0, .04); }

.mity-chat.is-active,
.mity-chat.is-active:hover { background: #E5E5E5; }

.mity-chat span {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mity-chat .icon {
  flex: 0 0 14px;
  width: 14px;
  height: 4px;
  color: #616161;
}

/* ===== Main area ===== */
.mity-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* the new-chat pane is a rounded #FAFAFA panel inset 8px from the module */
.mity-main[data-view-panel="chat"] {
  position: relative;
  margin: 8px 8px 8px 0;
  background: var(--eko-pane);
  border-radius: 12px;
  /* live centres hero + composer together, parked slightly above centre */
  justify-content: center;
  gap: 15px;
  padding-bottom: 24px;
}

/* ===== New-chat hero ===== */
.mity-hero {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  /* and slightly left of centre */
  margin-right: 30px;
}

.mity-mascot {
  width: 250px;
  height: 250px;
  flex: 0 0 250px;
  object-fit: contain;
}

/* the greeting starts just inside the mascot's right edge in the live layout */
.mity-greet { margin-left: -9px; }

.mity-greet h1 {
  margin: 0;
  font-size: 36px;
  font-weight: 500;
  line-height: 48px;
  color: var(--eko-ink-85);
}

.mity-greet p {
  margin: 8px 0 0;
  font-size: 16px;
  line-height: 24px;
  color: var(--eko-ink);
}

.mity-hint {
  flex: 0 0 auto;
  margin: 0;
  text-align: center;
  font-size: 12.5px;
  color: var(--eko-empty);
}

/* ===== Skills / Workspace-files pills (chat state only) ===== */
.mity-toggles {
  display: none;
  position: absolute;
  top: 12px;
  right: 16px;
  gap: 8px;
  z-index: 2;
}

.mity-toggle {
  height: 34px;
  padding: 6px 12px;
  border: 1px solid #E5E7EB;
  border-radius: 9999px;
  background: var(--eko-white);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
  color: #0F172A;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.mity-toggle:hover { background: #F8FAFC; }
.mity-toggle .icon { width: 14px; height: 14px; }

/* ===== Chat state ===== */
.mity-thread { display: none; }

.mity-main[data-state="chat"] {
  justify-content: flex-start;
  gap: 0;
  padding: 24px 0;
}

.mity-main[data-state="chat"] .mity-hero,
.mity-main[data-state="chat"] .mity-hint { display: none; }
.mity-main[data-state="chat"] .mity-toggles { display: flex; }

.mity-main[data-state="chat"] .mity-thread {
  display: block;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 24px 20px 0;
}

.mity-main[data-state="chat"] .mity-composer {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 12px 20px 8px;
}

/* ===== Messages ===== */
.msg {
  margin-bottom: 24px;
  animation: msg-in .25s ease-out;
}

@keyframes msg-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* the question, right-aligned */
.msg--me {
  display: flex;
  justify-content: flex-end;
}

.msg--me .bubble {
  max-width: 560px;
  padding: 12px 16px;
  border-radius: 18px;
  background: var(--eko-module);
  font-size: 16px;
  line-height: 22px;
  color: var(--eko-ink);
  white-space: pre-wrap;
  word-wrap: break-word;
}

.msg-avatar {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--eko-module);
  display: block;
}

.msg-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* transient "Thinking…" row */
.msg--loading {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--eko-muted-3);
  font-size: 14px;
}

.load-dots {
  display: inline-block;
  margin-left: 2px;
  animation: dots-pulse 1.4s ease-in-out infinite;
}

@keyframes dots-pulse {
  0%, 100% { opacity: .35; }
  50%      { opacity: 1; }
}

/* the answer */
.msg--bot .msg-avatar { margin-bottom: 8px; }

/* ===== Markdown body =====
   Eko renders answers at 16px/28px. Element styling is carried over from the
   old copilot bubble so tables, code and quotes keep working. */
.md {
  font-size: 16px;
  line-height: 28px;
  color: var(--eko-ink);
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* Once markdown is rendered there is real HTML structure, so drop pre-wrap */
.md:not(.is-streaming) { white-space: normal; }

.md.is-error { color: #E94B4B; }

.md p { margin: 0 0 8px; }
.md p:last-child { margin-bottom: 0; }
.md > *:first-child { margin-top: 0; }

.md h1, .md h2, .md h3, .md h4 {
  font-weight: 700;
  margin: 16px 0 6px;
  line-height: 1.3;
}

.md h1 { font-size: 21px; }
.md h2 { font-size: 19px; }
.md h3 { font-size: 17px; }
.md h4 { font-size: 16px; }

.md strong { font-weight: 700; }
.md em { font-style: italic; }

/* tokens.css resets `ul, ol { list-style: none }` for the app chrome, so
   markdown lists have to opt their markers back in. */
.md ul, .md ol { margin: 6px 0 8px; padding-left: 24px; }
.md ul { list-style: disc; }
.md ol { list-style: decimal; }
.md ul ul { list-style: circle; }
.md li { margin: 4px 0; }
.md li::marker { color: #707070; }

.md a {
  color: var(--eko-green);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.md a:hover { color: #05B384; }

.md blockquote {
  margin: 10px 0;
  padding: 4px 14px;
  border-left: 3px solid var(--eko-green);
  color: #707070;
  background: rgba(6, 198, 146, .05);
  border-radius: 0 6px 6px 0;
}

.md code {
  background: var(--eko-module);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 14px;
}

.md pre {
  background: var(--eko-module);
  padding: 12px 14px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 10px 0;
  font-size: 13px;
  line-height: 1.5;
  border: 1px solid var(--eko-border);
}

.md pre code { background: transparent; padding: 0; font-size: inherit; }

.md hr {
  border: 0;
  border-top: 1px solid var(--eko-border);
  margin: 16px 0;
}

/* Horizontal scroller js/mity.js wraps every rendered table in — see
   renderMarkdown(). Keeps a wide table inside the bubble on a phone. */
.md-scroll {
  max-width: 100%;
  overflow-x: auto;
  margin: 10px 0;
}
.md-scroll > table { margin: 0; }

.md table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.5;
  margin: 10px 0;
  border: 1px solid var(--eko-border);
  border-radius: 8px;
  overflow: hidden;
  display: table;
}

.md thead { background: var(--eko-green); }

.md th, .md td {
  border-bottom: 1px solid var(--eko-border);
  padding: 9px 12px;
  text-align: left;
  vertical-align: top;
}

.md th {
  font-weight: 700;
  color: var(--eko-white);
  white-space: nowrap;
  border-bottom-color: var(--eko-green);
}

.md tbody tr:last-child td { border-bottom: 0; }
.md tbody tr:hover { background: rgba(6, 198, 146, .04); }

/* Blinking caret while text streams in */
.md.is-streaming::after {
  content: '';
  display: inline-block;
  width: 7px;
  height: 17px;
  margin-left: 3px;
  vertical-align: -3px;
  background: var(--eko-green);
  border-radius: 1px;
  animation: caret-blink .9s steps(2) infinite;
}

@keyframes caret-blink {
  50% { opacity: 0; }
}

/* ===== Composer ===== */
.mity-composer {
  flex: 0 0 auto;
  padding: 0 24px;
}

.composer {
  width: 760px;
  max-width: 100%;
  margin: 0 auto;
  min-height: 44px;
  background: var(--eko-module);
  border-radius: 24px;
  display: grid;
  grid-template-columns: 20px 1fr 32px;
  column-gap: 12px;
  align-items: center;
  padding: 6px 6px 6px 12px;
  position: relative;
}

.composer-plus-wrap {
  position: relative;
  display: inline-flex;
}

.composer-plus {
  width: 20px;
  height: 20px;
  color: var(--eko-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.composer-plus .icon { width: 14px; height: 18px; }

.mity-input {
  border: 0;
  outline: none;
  resize: none;
  background: none;
  font-family: inherit;
  font-size: 16px;
  line-height: 24px;
  color: var(--eko-ink);
  max-height: 160px;
  overflow-y: auto;
  padding: 0;
}

.mity-input::placeholder { color: var(--eko-placeholder); }
.mity-input:disabled { color: var(--eko-muted-3); cursor: not-allowed; }

/* live: #73998E while the composer is empty, #699286 once it has text */
.mity-send {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 50%;
  background: #73998E;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease, opacity .15s ease;
}

.mity-send.is-ready { background: #699286; }
.mity-send:hover { background: #628679; }
.mity-send .icon { width: 14px; height: 14px; }

.composer.is-pending .mity-send { opacity: .55; pointer-events: none; }

/* attached-source state: the composer gains a second row */
.composer-sources { display: none; }

.composer.is-sourced {
  grid-template-columns: 1fr 32px;
  grid-template-rows: 24px 36px;
  row-gap: 6px;
  padding: 12px 6px 12px 16px;
}

.composer.is-sourced .mity-input { grid-area: 1 / 1 / 2 / 3; }
.composer.is-sourced .composer-plus-wrap {
  grid-area: 2 / 1 / 3 / 2;
  justify-self: start;
  align-self: center;
}
.composer.is-sourced .composer-sources {
  grid-area: 2 / 1 / 3 / 2;
  display: flex;
  align-items: center;
  gap: 4px;
  /* sits after the + button: 20px button + 4px gap + 2px optical */
  margin-left: 26px;
}
.composer.is-sourced .mity-send { grid-area: 2 / 2 / 3 / 3; }

.src-chip {
  height: 36px;
  padding: 0 12px;
  border-radius: 20px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  color: #699286;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.src-chip .icon { width: 12px; height: 14px; }

/* An applied skill reads as a filled pill; a plain source is text + icon only.
   Needed because a skill persists past send, so it has to look deliberate
   rather than like a leftover attachment. */
.src-chip--skill {
  background: #EEF6F3;
  color: #4E7A6C;
}

/* ===== The + dropdown (antd3 placement topLeft) ===== */
.src-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  width: 264px;
  padding: 10px 0;
  background: var(--eko-white);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
  z-index: 20;
}

.src-menu ul { margin: 0; padding: 0; }

.src-menu-item {
  height: 32px;
  padding: 5px 12px;
  font-size: 14px;
  line-height: 22px;
  color: var(--eko-ink-65);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
}

.src-menu-item:hover { background: var(--eko-module); }
.src-menu-item .icon { flex: 0 0 14px; width: 14px; height: 14px; }

.src-menu-item.is-disabled {
  color: var(--eko-ink-25);
  cursor: default;
}
.src-menu-item.is-disabled:hover { background: none; }

.src-menu-sep {
  height: 2px;
  margin: 8px 0;
  border-top: 1px solid var(--eko-module);
}

.src-menu-head {
  height: 32px;
  padding: 5px 12px;
  font-size: 11px;
  line-height: 22px;
  text-transform: uppercase;
  color: var(--eko-ink-25);
  display: flex;
  align-items: center;
}

/* ===== Panel shell (Skills / Workspace files / Connectors) ===== */
.mity-shell {
  flex: 1;
  min-height: 0;
  margin: 20px 20px 20px 12px;
  background: var(--eko-pane);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.mity-shell-head {
  padding: 16px 24px;
  background: var(--eko-white);
  display: flex;
  /* live vertically centres the back button against the title block */
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.mity-back {
  flex: 0 0 auto;
  line-height: 20px;
  padding: 4px 10px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
  color: #475569;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mity-back:hover { background: #F1F5F9; }
.mity-back .icon { width: 14px; height: 14px; }

.mity-shell-title { flex: 1; min-width: 0; }

.mity-shell-title h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 27px;
  color: #0F172A;
}

.mity-shell-title p {
  margin: 2px 0 0;
  font-size: 13px;
  line-height: 20px;
  color: #6B7280;
}

.mity-shell-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 24px 24px;
}

.mity-shell-body--centre {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* puts the empty heading at y=198, as live */
  padding-top: 49px;
}

.mity-empty-h {
  margin: 0;
  font-size: 14px;
  line-height: 21px;
  color: #6B7280;
  text-align: center;
}

.mity-empty-p {
  margin: 8px 0 0;
  max-width: 420px;
  font-size: 12px;
  line-height: 18px;
  color: #6B7280;
  text-align: center;
}

.mity-empty-h--files { margin-top: 52px; }

/* ===== Skill rows (Skills panel) ===== */
/* Same row geometry as .connector — icon / text / status / action — but its own
   class set, since a skill's mark is a sprite glyph rather than a vendor logo. */
.skill {
  padding: 12px;
  background: var(--eko-white);
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.skill + .skill { margin-top: 12px; }

.skill-logo {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #EEF6F3;
  color: #4E7A6C;
  display: flex;
  align-items: center;
  justify-content: center;
}

.skill-logo .icon { width: 13px; height: 13px; }

.skill-text { flex: 1; min-width: 0; }

.skill-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.skill-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 21px;
  color: #111827;
}

.skill-tag {
  padding: 1px 6px;
  border-radius: 4px;
  background: #F1F5F9;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .3px;
  color: #64748B;
}

.skill-desc {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 18px;
  color: #6B7280;
}

.skill-status {
  flex: 0 0 auto;
  padding: 2px 8px;
  border-radius: 9999px;
  background: #EEF6F3;
  font-size: 11px;
  font-weight: 500;
  line-height: 17px;
  color: #4E7A6C;
}

.btn-dark {
  height: 38px;
  padding: 8px 14px;
  border-radius: 6px;
  background: #111827;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.btn-dark:hover { background: #1F2937; }
.btn-dark .icon { width: 12px; height: 14px; }
.mity-shell-body--centre .btn-dark { margin-top: 16px; }
/* .mity-shell-title takes flex:1, so a button in the head right-aligns itself */
.mity-shell-head .btn-dark { flex: 0 0 auto; }

/* ===== Workspace-files filters ===== */
.mity-filters {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mity-field {
  height: 34px;
  padding: 6px 10px;
  font-family: inherit;
  font-size: 13px;
  color: #111827;
  background: var(--eko-white);
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  outline: none;
}

.mity-field--grow { flex: 1; min-width: 0; }
.mity-field::placeholder { color: #9CA3AF; }

.mity-reset {
  padding: 6px 10px;
  font-family: inherit;
  font-size: 13px;
  color: #CBD5E1;
  cursor: not-allowed;
}

/* ===== Connector rows ===== */
.connector {
  padding: 12px;
  background: var(--eko-white);
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.connector + .connector { margin-top: 12px; }

/* boxed at 24px and letterboxed by object-fit so a non-square source can
   never stretch */
.connector-logo {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.connector-text { flex: 1; min-width: 0; }

.connector-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.connector-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 21px;
  color: #111827;
}

.connector-tag {
  padding: 1px 6px;
  border-radius: 4px;
  background: #F1F5F9;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .3px;
  color: #64748B;
}

.connector-desc {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 18px;
  color: #6B7280;
}

.connector-status {
  flex: 0 0 auto;
  padding: 2px 8px;
  border-radius: 9999px;
  background: #F1F5F9;
  font-size: 11px;
  font-weight: 500;
  line-height: 17px;
  color: #475569;
}

/* =========================================================================
   Mobile — the sub-nav collapses away and the pane fills the width.
   Breakpoint matches shell.css (768px), where the rail becomes a bottom bar.
   ========================================================================= */
@media (max-width: 768px) {
  .mity-side { display: none; }

  .mity-main[data-view-panel="chat"] {
    margin: 8px;
    padding-bottom: 12px;
  }

  .mity-hero {
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    margin-right: 0;
    text-align: center;
  }

  .mity-mascot { width: 160px; height: 160px; flex-basis: 160px; }
  .mity-greet { margin-left: 0; text-align: center; }
  .mity-greet h1 { font-size: 26px; line-height: 34px; }
  .mity-greet p { font-size: 14px; }

  /* the pills would collide with the first message on a narrow pane */
  .mity-toggles { position: static; justify-content: flex-end; padding: 8px 12px 0; }

  .mity-main[data-state="chat"] { padding: 8px 0; }
  .mity-main[data-state="chat"] .mity-thread { padding: 12px 12px 0; }
  .mity-main[data-state="chat"] .mity-composer { padding: 8px 12px; }

  .mity-composer { padding: 0 12px; }
  .msg--me .bubble { max-width: 88%; font-size: 15px; }
  .md { font-size: 15px; line-height: 26px; }

  .mity-shell { margin: 8px; }
  .mity-shell-head { padding: 12px 14px; }
  .mity-shell-body { padding: 14px; }
  .mity-filters { flex-wrap: wrap; }
  .connector { flex-wrap: wrap; gap: 12px; }

  /* the dropdown must not overflow a narrow composer */
  .src-menu { width: min(264px, calc(100vw - 48px)); }
}
