:root {
  --brand: #0088b0; --on-brand: #fff; --bg: #f4f6f7; --surface: #fff; --ink: #1b1f22; --dim: #5f6b73;
  --line: #dde3e7; --soft: #eceff1; --hover: #f1f4f6; --pick: #dff1f7; --out: #ebf5fe; --on-out: #000; --in: #fff;
  --danger: #c62828; --alert: #d84315; --info: #0088b0; --silent: #90a4ae; --chat-bg: #eef1f3;
  --bar: #f6f6f6; /* the top bars: the conversation list's and a conversation's */
  --list-bar: #f6f6f6; /* behind the list's bar (Threads, Mentions, Search) */
  --row-on: #e3f0f4; /* the list's row that is open */
  --disc-bg: #becdd4; /* behind a discussion beside the conversation */
  --react-mine: #e0f0f5; --on-react-mine: #1a789b; /* a reaction chip of mine inside a bubble, and its count */
  --veil: rgba(0, 0, 0, .06); --veil-on: rgba(0, 0, 0, .11); /* a file's chip, a picture's empty frame: a shade over the bubble, whichever its colour */
  --pill: rgba(0, 136, 176, .15); --pill-out: rgba(0, 136, 176, .22); /* behind a person named in a message: in a bubble of somebody else, in one of mine */
  --pill-field: #d9edf3; /* the same on the field being written in: opaque, its sides are shadows that must not show through each other */
  --new: #d93025; --fresh: #f2f9fc; /* something waits: a dot, a count of replies not read; behind a row that has such */
  --frame: #eee; /* around the panes: the page shows between them */
}
@media (prefers-color-scheme: dark) {
  :root { --brand: #4fc3e3; --on-brand: #00232e; --bg: #101315; --surface: #171b1e; --ink: #e4e8ea; --dim: #96a2a9;
    --line: #2b3236; --soft: #242a2e; --hover: #1e2428; --pick: #123846; --out: #0b4a5e; --on-out: #ddf3fa; --in: #20262a;
    --danger: #ef9a9a; --alert: #ff8a65; --info: #4fc3e3; --silent: #78909c; --chat-bg: #0d1012;
    --bar: #171b1e; --list-bar: #1e2428; --row-on: #123846; --disc-bg: #1a2328; --react-mine: #123846; --on-react-mine: #8fd8ee; --veil: rgba(255, 255, 255, .09); --veil-on: rgba(255, 255, 255, .15);
    --pill: rgba(79, 195, 227, .2); --pill-out: rgba(79, 195, 227, .26); --pill-field: #223d45;
    --new: #f28b82; --fresh: #15272e; --frame: #0b0e10; }
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; overflow: hidden; }
#app { height: 100%; }
[hidden] { display: none !important; }
.dim { color: var(--dim); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
button { font: inherit; color: inherit; cursor: pointer; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 7px 14px; }
button:hover { background: var(--hover); }
button.primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); font-weight: 600; }
button.primary:hover { filter: brightness(1.08); background: var(--brand); }
button.danger { color: var(--danger); }
button.icon { border: 0; background: none; width: 38px; height: 38px; padding: 0; border-radius: 50%; font-size: 20px; line-height: 1; color: var(--dim); flex: none; }
button.icon:hover { background: var(--hover); color: var(--ink); }
button.icon { position: relative; }
/* The number on the Contacts button: group requests waiting. */
.badge.dot { position: absolute; top: 1px; right: -1px; min-width: 17px; height: 17px; padding: 0 4px; font-size: 11px; pointer-events: none; }
button.icon svg { display: block; width: 22px; height: 22px; margin: auto; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
button:disabled { opacity: .5; cursor: default; }
input[type=text], textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; width: 100%; }
input[type=text]:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: -1px; }
label { display: block; margin: 12px 0 4px; font-size: 13px; color: var(--dim); }
label.check { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: 15px; margin: 0; padding: 7px 0; }

/* ---------------------------------------------------------------- the door */
.door { height: 100%; overflow: auto; }
.door > div { max-width: 860px; margin: 0 auto; padding: 36px 20px; text-align: center; }
.ways { display: flex; gap: 20px; align-items: stretch; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.way { flex: 1 1 340px; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px 22px 18px; }
.way h2 { font-size: 17px; margin: 0 0 4px; }
.keybox { height: 100%; border-radius: 12px; }
.keybox.drop { outline: 2px dashed var(--brand); outline-offset: 6px; }
.keybox form { display: flex; flex-direction: column; gap: 8px; }
.keybox input[type=text] { text-align: center; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .06em; }
.keybox .or { margin: 16px 0 8px; }
/* "No key? Get one by e-mail": an address is no key, it is written as text is. */
.keybox input.plain { text-align: left; font-family: inherit; letter-spacing: 0; }
.keybox .bymail p { margin: 8px 0 0; }
.keybox .bymail p.or { margin: 22px 0 8px; }
.keybox p.bad { color: var(--danger); }
button.wide { width: 100%; padding: 11px 14px; margin-top: 14px; }
.door h1 { font-size: 24px; margin: 0 0 6px; }
.qr-frame { display: inline-block; background: #fff; border-radius: 14px; padding: 6px; margin: 18px 0 8px; border: 1px solid var(--line); }
.qr-frame canvas { display: block; width: 264px; height: 264px; image-rendering: pixelated; }
.qr-frame.stale canvas { opacity: .08; }
.check-number { font-size: 32px; font-weight: 700; letter-spacing: .18em; margin: 2px 0; }
.steps { text-align: left; margin: 16px auto; padding-left: 22px; color: var(--dim); }
.steps li { margin: 4px 0; }
details { text-align: left; margin-top: 16px; color: var(--dim); font-size: 13px; }
.code-text { word-break: break-all; user-select: all; color: var(--ink); background: var(--soft); padding: 8px; border-radius: 8px; }
.door form { text-align: left; }
.banner { background: var(--soft); border-radius: 10px; padding: 10px 14px; margin: 10px 0; color: var(--danger); }

/* ---------------------------------------------------------------- two panes */
.shell { height: 100%; display: flex; padding: 15px; overflow: hidden; background: var(--frame);}
.side { width: 340px; flex: none; display: flex; flex-direction: column; background: var(--surface); min-width: 0; padding: 10px; border-radius: 10px; overflow: hidden;}
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; margin: 0 0 0 15px; width: 90%;}
.bar { display: flex; align-items: center; gap: 6px; padding: 8px; min-height: 50px; background: var(--surface); flex: none; border-radius: 10px;}
.utm-main .utm-chat-bar {margin-bottom: 5px;}

.utm-sheet .bar {border-radius: 10px 10px 0 0; margin-bottom: 5px; border-bottom: 2px solid var(--line);}
.utm-sheet .utm-composer {margin: 6px auto; width: calc(100% - 12px); border-radius: 8px; }

.utm-sheet.utm-screen--discussion .bar {border: 0;}

.bar .title { flex: 1; min-width: 0; }
.bar .title b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 16px; }
.bar .title span { display: block; font-size: 12.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* A group's name is a button (its overview): it looks like the name it is, until the mouse is on it. */
.bar button.title { border: 0; background: none; text-align: left; padding: 3px 8px; border-radius: 8px; }
.bar button.title:hover { background: var(--hover); }
/* A word in the bar that acts (Add people, Done (2)): the way the phone apps write it. */
.bar .action { flex: none; border: 0; background: none; padding: 8px 10px; border-radius: 8px; font-size: 13.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.bar .action:hover:not(:disabled) { background: var(--hover); }
/* The left pane shows one screen at a time: the conversations, Contacts, or a picker of people. */
.screen { flex: 1; display: flex; flex-direction: column; min-height: 0;}
.search { padding: 8px 12px; flex: none; }
.search input { border-radius: 18px; padding: 7px 14px; background: var(--soft); border-color: transparent; }
.list { flex: 1; overflow-y: auto; }
.row { display: flex; gap: 12px; align-items: center; padding: 8px 5px; margin: 2px 0; cursor: pointer; border-radius: 10px;}
.row:hover { background: var(--hover); }
.row.on { background: var(--row-on); }
/* A hairline between conversations, from where the text starts (past the avatar). */
/* 
.list > .row { position: relative; }
.list > .row + .row::before { content: ""; position: absolute; top: 0; left: 45px; right: 0; border-top: 1px solid var(--line); }
*/
/* Rows of the other screens (Contacts, a picker, a group's overview): a name, a line under it, a box to tick. */
.row .text > b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .text > span { display: block; font-size: 13.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list > label.row { margin: 0; font-size: inherit; color: inherit; }
.row input[type=checkbox] { flex: none; width: 20px; height: 20px; margin: 0 6px 0 0; accent-color: var(--brand); cursor: pointer; }
.list.selecting .row:not([role=checkbox]) { opacity: .45; cursor: default; }
.list.selecting .row:not([role=checkbox]):hover { background: none; }
.section { padding: 14px 16px 5px; font-size: 13px; font-weight: 700; color: var(--dim); }
.list > .row + .section { border-top: 1px solid var(--line); }
/* What can be done with the contacts ticked: comes up at the bottom of the screen. */
.toolbar { display: flex; justify-content: space-around; gap: 4px; padding: 5px 8px; background: var(--bar); border-top: 1px solid var(--line); flex: none; }
.toolbar button { display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 84px; padding: 6px 10px 5px; border: 0; background: none; border-radius: 10px; font-size: 12.5px; }
.toolbar button:hover:not(:disabled) { background: var(--hover); }
.toolbar .ico { font-size: 21px; line-height: 1.2; }
.avatar { width: 45px; height: 45px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 17px; }
/* A picture lies over the letter and fills the circle (the middle of it, whatever its shape). Its own
   ground hides the letter where the picture is see-through. Gone when it does not load: the letter stays. */
.avatar { position: relative; overflow: hidden; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--surface); }
.row .text { flex: 1; min-width: 0; }
.row .name { display: flex; gap: 8px; align-items: baseline; }
.row .name b { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.row .name time { font-size: 12px; color: var(--dim); flex: none; }
.row .last { display: flex; gap: 8px; align-items: center; }
.row .last span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--dim); font-size: 14px; }
.row.unread .last span { color: var(--ink); font-weight: 600; }
.row .last .utm-conv-row__draft { color: var(--dim); font-weight: 400; } /* what I was writing (§8z14) */
.row .last .utm-conv-row__draft-mark { color: var(--danger); font-weight: 600; }
.badge { background: var(--brand); color: var(--on-brand); border-radius: 10px; min-width: 20px; height: 20px; padding: 0 6px; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.badge.muted { background: var(--silent); }
.empty { padding: 40px 24px; text-align: center; color: var(--dim); }
.status { font-size: 12.5px; color: var(--dim); padding: 6px 16px; border-top: 1px solid var(--line); flex: none; }
.status.bad { color: var(--danger); }

/* ---------------------------------------------------------------- a conversation */
.thread { flex: 1; overflow-y: auto; padding: 10px 0 6px; overflow-anchor: none; }
.thread .inner { max-width: 820px; margin: 0 auto; padding: 0 14px; }
.day { text-align: center; margin: 12px 0 8px; }
.day span { background: var(--soft); color: var(--dim); font-size: 12px; border-radius: 10px; padding: 2px 10px; }
.sys { text-align: center; color: var(--dim); font-size: 13px; margin: 8px 0; }
.msg { display: flex; margin: 8px 0; }
.msg.me { justify-content: flex-end; }
.bubble { background: var(--in); border-radius: 14px; overflow: hidden; box-shadow: 0 1px 0 rgba(0, 0, 0, .06); }
.msg.me .bubble { background: var(--out); color: var(--on-out); }
.bubble .who { font-size: 13px; font-weight: 600; color: var(--brand); margin: 8px 10px; }
.bubble .body { white-space: pre-wrap; overflow-wrap: break-word; margin: 8px 10px; }
.bubble .body a, .card .body a { color: var(--brand); }
.bubble .meta { font-size: 11px; opacity: .65; text-align: right; margin-top: 1px; }
.bubble.failed .meta { color: var(--danger); opacity: 1; cursor: pointer; }
.card { background: var(--in); border: 1px solid var(--line); border-left: 5px solid var(--info); border-radius: 12px; padding: 9px 12px 7px; margin: 6px 0; }
.card.alert { border-left-color: var(--alert); }
.card.silent { border-left-color: var(--silent); }
.card .who { font-size: 12px; color: var(--dim); }
.card .head { font-weight: 700; margin-top: 1px; }
.card .body { white-space: pre-wrap; overflow-wrap: break-word; margin-top: 3px; }
.card .foot { display: flex; align-items: center; margin-top: 4px; }
.card .foot time { flex: 1; font-size: 11px; color: var(--dim); }
.card .foot a { color: var(--brand); font-weight: 600; text-decoration: none; padding: 2px 6px; }
.more { text-align: center; padding: 6px; }
.more button { font-size: 13px; padding: 4px 12px; }
.composer { display: flex; gap: 8px; align-items: flex-end; padding: 8px 12px; background: var(--surface); flex: none; margin: 6px 0 0 0; border-radius: 10px;}
.composer textarea { resize: none; border-radius: 18px; padding: 9px 14px; max-height: 140px; min-height: 40px; line-height: 1.35; border: 0; outline: 0;}
/* The field on its backdrop (app.js: pillField). The backdrop has the field's shape and colour and holds
   the field's text again, unseen, line for line; the field over it is see-through. A name picked with
   "@" is a span there with a background. That span adds no width, its sides are shadows: the lines of
   the backdrop must break exactly where the field's do. */
.composer .field { position: relative; flex: 1; min-width: 0; }
.composer .field textarea { display: block; position: relative; background: transparent; }
.composer .backdrop { position: absolute; inset: 0; overflow: hidden; border-radius: 18px; background: var(--surface); pointer-events: none; }
.composer .ink { color: transparent; white-space: pre-wrap; overflow-wrap: break-word; }
.composer .ink .pill { background: var(--pill-field); border-radius: 999px; padding: 1px 0; box-shadow: -3px 0 0 var(--pill-field), 3px 0 0 var(--pill-field);
  -webkit-box-decoration-break: clone; box-decoration-break: clone; }
/* What measures how much room a textarea keeps beside its text (app.js: roomInTextarea): never seen. */
.probe { position: fixed; left: -2000px; top: 0; visibility: hidden; box-sizing: content-box; height: 20px; margin: 0; padding: 0; border: 0; overflow: hidden; resize: none;
  font: 16px/20px monospace; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-all; }
textarea.probe { padding: 0; border: 0; border-radius: 0; font: 16px/20px monospace; }
.probe.scrolls { width: 100px; height: 50px; overflow-y: scroll; }
.composer button { width: 40px; height: 40px; border-radius: 50%; padding: 0; flex: none; font-size: 22px; border: 0;}
.composer .plus { font-size: 34px; line-height: 1; color: var(--dim); }
.composer .plus[aria-expanded=true] { background: var(--pick); color: var(--ink); }
.notice { text-align: center; color: var(--dim); padding: 14px; background: var(--surface); border-top: 1px solid var(--line); }
.blank { flex: 1; display: flex; align-items: center; justify-content: center; color: var(--dim); padding: 24px; text-align: center; }
.blank p { margin: 4px 0; }
/* A group request: Join and Decline where the composer would be. */
.answer { display: flex; justify-content: center; gap: 10px; padding: 10px 12px; background: var(--surface); border-top: 1px solid var(--line); flex: none; }
.answer button { flex: 1; max-width: 240px; padding: 11px 14px; }
.toast { position: fixed; z-index: 60; left: 50%; bottom: 76px; transform: translateX(-50%); max-width: calc(100vw - 32px); padding: 9px 16px; border-radius: 20px; background: var(--ink); color: var(--bg); font-size: 14px; text-align: center; box-shadow: 0 4px 16px rgba(0, 0, 0, .25); }

.msg { align-items: flex-end; gap: 2px; }
.stack { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; max-width: min(78%, 560px); }
.msg.me .stack { align-items: flex-end; }
.stack .bubble, .stack .card { max-width: 100%; }
/* The ⋮ of a message is always there (a touch screen has no hover), only quieter until it is wanted. */
.msg .act { width: 28px; height: 28px; font-size: 17px; opacity: .5; align-self: center; }
.msg:has(> .stack:hover) .act, .msg:has(> .act:hover) .act, .msg .act:focus-visible { opacity: 1; }
.msg.flash .bubble, .msg.flash .card { outline: 2px solid var(--brand); outline-offset: 2px; }
.quote { border-left: 3px solid var(--brand); background: var(--veil); border-radius: 6px; padding: 5px 8px; margin: 8px; font-size: 13px; cursor: pointer; overflow: hidden; }
.quote b { display: block; color: var(--brand); font-weight: 600; }
.quote span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; opacity: .8; }
.replies { display: flex; gap: 8px; align-items: baseline; border: 0; background: none; padding: 2px 6px; margin: 1px 0 4px; color: var(--brand); font-size: 13px; border-radius: 8px; }
.replies:hover { background: var(--hover); }
.replies span { color: var(--dim); font-size: 12px; }
.replying { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 14px; background: var(--surface); border-top: 1px solid var(--line); flex: none; border-radius: 5px; margin-top: 5px; }
.replying .text { flex: 1; min-width: 0; border-left: 3px solid var(--brand); padding-left: 8px; font-size: 13px; }
.replying .text b { display: block; color: var(--brand); }
.replying .text span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--dim); }
.replying .icon { width: 30px; height: 30px; font-size: 15px; }
/* The file attached to the message being written: the same bar, a picture with a small copy of it in front. */
.staged .thumb { width: 44px; height: 44px; flex: none; border-radius: 8px; overflow: hidden; background: var(--veil); }
.staged .thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.staged .thumb.small img { object-fit: none; }
.staged .text b { color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.staged .text span.bad { color: var(--danger); }
/* Its files: one is a line as wide as the strip; several are tiles side by side, two rows at most (then
   the strip scrolls), under a line with how many there are and "✕ all". */
.staged { flex-direction: column; align-items: stretch; gap: 4px; }
.staged .tiles { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.staged .tile { display: flex; align-items: center; gap: 8px; flex: 1 1 100%; min-width: 0; }
.staged.many .tiles { max-height: 118px; overflow-y: auto; padding-bottom: 2px; }
.staged.many .tile { flex: 1 1 168px; max-width: 280px; padding: 3px 0 3px 4px; border: 1px solid var(--line); border-radius: 10px; }
.staged.many .tile .text { border-left: 0; padding-left: 0; }
.staged.many .tile .icon { width: 26px; height: 26px; font-size: 13px; }
.staged .head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--dim); }
.staged .head button { border: 0; background: none; padding: 2px 8px; border-radius: 8px; font-size: 12.5px; color: var(--dim); }
.staged .head button:hover { background: var(--hover); color: var(--ink); }

/* ---------------------------------------------------------------- files and pictures in a message */
.file { display: flex; align-items: center; gap: 6px; max-width: 100%; margin: 5px; padding: 7px 10px; border-radius: 10px; background: var(--veil); border-color: transparent; color: inherit; text-align: left; }
.file:hover:not(:disabled) { background: var(--veil-on); }
.file .ico { flex: none; }
.file .name { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.file .size { flex: none; font-size: 13px; opacity: .7; }
/* One fixed frame whatever the picture's own size: nothing in the thread moves when it arrives. */
.pic { display: flex; justify-content: center; align-items: center; padding: 4px; margin: 10px auto; border: 0; border-radius: 5px; background: var(--veil-on); color: inherit; max-width: calc(100% - 20px);}
/* One picture alone: the bubble fits the picture (its width is set before it loads, sizePic); with a wider caption the band fills the bubble. */
.bubble > .pic:not(.tile) { }
.pic:hover { background: var(--veil); }
/* Whole, at most 350 × 280; its size is set from the server's before the bytes come (sizePic), so nothing moves. */
.pic img { display: block; width: 100%; height: 100%; object-fit: contain; max-width: min(350px, 100%); max-height: 280px; border-radius: 5px; }
.pic.small img { object-fit: none; }
.pic.wait { cursor: default; }
.pic.wait img { visibility: hidden; }
.pic.broken { padding: 10px; font-size: 13px; white-space: pre-line; overflow-wrap: anywhere; opacity: .8; }
/* Several files in one message: its pictures as a grid, then the other files as a list of names. */
.files { display: flex; flex-direction: column; max-width: calc(100% - 20px); padding: 4px; margin: 10px auto; background: var(--veil-on); border-radius: 5px;}
/* Pictures: a band at least 336px wide (a message of pictures only keeps that width while they load), the whole bubble when it is wider. */
.files:has(.pics) { width: 336px; }
.pics { display: grid; gap: 4px; width: 100%; max-width: 100%; }
.pics .pic { position: relative; width: 100%; height: 100%; min-width: 0; min-height: 0; margin: 0; border-radius: 0; background: unset; padding: 0; max-width: unset; }
.pics .pic img {object-fit: cover;}
.pics.n2 { grid-template-columns: 1fr 1fr; grid-auto-rows: 160px; }                 /* side by side */
.pics.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 105px 105px; }       /* one large, two small beside it */
.pics.n3 .pic:first-child { grid-row: span 2; }
.pics.n4 { grid-template-columns: 1fr 1fr; grid-auto-rows: 120px; }                 /* a square of four */
.pics.n5 { grid-template-columns: 1fr 1fr 1fr; grid-auto-rows: 104px; }             /* five and more: rows of three */
/* The sixth tile of more than six: how many more there are (the viewer steps through all of them). */
.pic[data-more]::after { content: attr(data-more); position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .52); color: #fff; font-size: 24px; font-weight: 600; }
/* While the message waits: how far each file's upload is, on its tile or after its name. */
.pic .up { position: absolute; left: 4px; bottom: 4px; padding: 1px 6px; border-radius: 8px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 11px; }
.file .up { flex: none; font-size: 12px; opacity: .7; }
.up:empty { display: none; }
/* A file that was not uploaded, of several: what happened, and the two ways on. */
.upfail { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 2px; font-size: 13px; color: var(--danger); }
.upfail span { flex: 1 1 100%; overflow-wrap: anywhere; }
.upfail button { padding: 3px 10px; font-size: 13px; color: var(--ink); }
/* The viewer's ‹ ›. */
dialog.viewer .buttons button[title^="The"] { width: 34px; padding: 5px 0; font-size: 18px; line-height: 1; }
.main.drop, .disc.drop { outline: 3px dashed var(--brand); outline-offset: -8px; }
dialog.viewer { width: auto; max-width: calc(100vw - 24px); padding: 12px; }
dialog.viewer img { display: block; margin: 0 auto; max-width: 100%; max-height: calc(100vh - 130px); min-width: 120px; min-height: 80px; object-fit: contain; border-radius: 8px; }
dialog.viewer .buttons { align-items: center; margin-top: 10px; }
dialog.viewer .buttons span { flex: 1; min-width: 0; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- the + beside Send: a toolbar, the emoji */
.pop { position: fixed; z-index: 40; display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 6px 24px rgba(0, 0, 0, .18); }
/* The tail that ties the bubble to its button; app.js says where the button's middle is. */
.pop::after { content: ""; position: absolute; bottom: -7px; right: var(--tail, 14px); width: 12px; height: 12px; background: var(--surface); border: solid var(--line); border-width: 0 1px 1px 0; transform: rotate(45deg); }
.tools { gap: 2px; padding: 6px; }
.tools button { display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 66px; padding: 7px 10px 6px; border: 0; background: none; border-radius: 10px; font-size: 12.5px; }
.tools button:hover { background: var(--hover); }
.tools .ico { font-size: 24px; line-height: 1.2; }
.emoji { flex-direction: column; width: min(338px, calc(100vw - 16px)); max-height: 320px; padding: 6px 4px 6px 8px; }
.emoji .scroll { overflow-y: auto; min-height: 0; padding-right: 4px; }
.emoji .group { font-size: 12px; color: var(--dim); padding: 6px 4px 2px; }
.emoji .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); }
.emoji .grid button { height: 38px; padding: 0; border: 0; background: none; border-radius: 8px; font-size: 23px; line-height: 1; }
.emoji .grid button:hover { background: var(--hover); }
/* Schedule send (DESIGN §8z12): the times to pick from, above the +; the time picked as a tile above the composer. */
.sched-pick { flex-direction: column; width: min(300px, calc(100vw - 16px)); padding: 6px; }
.sched-pick .title { font-size: 12px; color: var(--dim); padding: 4px 8px 4px; }
.sched-pick .preset { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 8px; border: 0; background: none; border-radius: 10px; font-size: 14px; text-align: left; }
.sched-pick .preset:hover, .sched-pick .preset:focus-visible { background: var(--hover); }
.sched-pick .preset .dim { font-size: 12.5px; white-space: nowrap; }
.sched-pick .own { display: flex; gap: 6px; padding: 6px 2px 2px; margin-top: 4px; border-top: 1px solid var(--line); }
.sched-pick .own input { flex: 1; min-width: 0; font: inherit; font-size: 14px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); }
.utm-schedule .text { border: 0; border-left: 3px solid var(--brand); background: none; padding: 0 0 0 8px; text-align: left; font: inherit; font-size: 13px; color: inherit; cursor: pointer; }
.utm-day--scheduled .utm-day__label { color: var(--dim); }
.utm-msg--scheduled .utm-bubble { opacity: .72; }

/* ---------------------------------------------------------------- a discussion beside the conversation */
.disc { width: 400px; flex: none; display: flex; flex-direction: column; min-width: 0; background: var(--in); margin-left: 15px; border-radius: 10px; overflow: hidden; }
.disc .stack { max-width: 86%; }
/* A group's overview has the same pane: a plain list, not a thread. */
.disc.utm-screen--discussion {background: var(--disc-bg)}
.disc > .list { background: var(--surface); }
.about { text-align: center; padding: 22px 16px 14px; border-bottom: 1px solid var(--line); }
.about .avatar { width: 72px; height: 72px; font-size: 30px; margin: 0 auto 10px; }
.about h2 { font-size: 20px; margin: 0 0 2px; overflow-wrap: anywhere; }
.about p { margin: 0; }
.when-over { display: none; }
@media (max-width: 1180px) {
  .shell.discussing .main { display: none; }
  .disc { flex: 1; width: auto; border-left: 0; }
  .when-beside { display: none; }
  .when-over { display: inline; }
}

/* ---------------------------------------------------------------- menus and dialogs */
.menu { position: fixed; z-index: 50; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 6px 24px rgba(0, 0, 0, .18); padding: 4px; min-width: 190px; }
.menu button { display: block; width: 100%; text-align: left; border: 0; background: none; border-radius: 6px; padding: 8px 12px; }
.menu button:hover { background: var(--hover); }
dialog { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); padding: 20px 22px; width: min(430px, calc(100vw - 24px)); max-height: calc(100vh - 24px); }
dialog::backdrop { background: rgba(0, 0, 0, .45); }
dialog h2 { font-size: 18px; margin: 0 0 6px; }
dialog p { white-space: pre-line; overflow-wrap: anywhere; } /* a list of file names: one a line, long ones wrap */
dialog .buttons { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- one pane: a phone, or the popup inside the CRM */
@media (max-width: 720px) {
  .side { width: 100%; border-right: 0; }
  .shell.chatting .side { display: none; }
  .shell:not(.chatting) .main { display: none; }
  .shell {padding: 10px !important; border-radius: 0}
  .disc, .main {margin: 0;}
  .back { display: inline-flex !important; }
  .stack { max-width: 84%; }
  .shell.discussing .side { display: none; }
  /* A picker of people comes in front of the conversation or the overview it was called from. */
  .shell.picking .side { display: flex; }
  .shell.picking .main, .shell.picking .disc { display: none; }
  /* The bar as the phone apps have it: a way back, the screen's name, its actions. */
  .bar { padding-left: 8px; }
  .side .screen:first-child .bar { padding-left: 16px; }
  .bar .title b { font-size: 19px; font-weight: 500; }
  .main .bar .avatar { display: none; }
}
.back { display: none; align-items: center; justify-content: center; }
body.embed .door > div { padding: 14px 12px; }
body.embed .way { padding: 16px; }
body.embed .qr-frame canvas { width: 220px; height: 220px; }

/* ---------------------------------------------------------------- naming people: "@Anna" */
/* A name in a message; stronger when it is mine. */
/* A pill, so that a name reads apart from the text. Its padding is to the sides only and it stays in
   the line: the lines keep their height. A name broken at the end of a line is a pill on each line. */
.mention { color: var(--brand); font-weight: 600; cursor: pointer; background: var(--pill); border-radius: 999px; padding: 1px 6px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.msg.me .mention { background: var(--pill-out); color: inherit; }
/* It is me who is named: filled. */
.mention.me { background: var(--brand); color: var(--on-brand); cursor: inherit; }
/* The people to name, above the field being written in: a menu whose rows carry an avatar. */
.suggest { overflow-y: auto; min-width: 220px; max-width: min(320px, calc(100vw - 16px)); }
.suggest button { display: flex; align-items: center; gap: 10px; padding: 6px 10px; }
.suggest button.on { background: var(--hover); }
.suggest .avatar { width: 28px; height: 28px; font-size: 12px; }
.suggest span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* The "@username" beside the name: where the row is narrow the name gives way, the username stays (it tells two people of one name apart). */
.suggest .handle { flex: none; max-width: 60%; margin-left: -2px; }

/* ---------------------------------------------------------------- Settings; people found in Contacts */
.settings { padding-bottom: 16px; }
.setting { padding: 2px 16px 6px; }
.setting .pair { display: flex; gap: 8px; }
.setting .pair input { flex: 1; min-width: 0; }
.setting p { margin: 6px 0 0; }
.setting p.bad { color: var(--danger); }
.setting .value { margin: 0; padding: 8px 0; overflow-wrap: anywhere; }
/* Somebody found who cannot be added yet (invited, not signed in): a row that does nothing. */
.list > .row.idle { cursor: default; opacity: .6; }
.list > .row.idle:hover { background: none; }

/* ---------------------------------------------------------------- pictures: mine in Settings, a group's in its overview, a sender's beside messages */
.setting.face { display: flex; align-items: center; gap: 16px; padding-top: 6px; padding-bottom: 10px; }
.setting.face .avatar { width: 72px; height: 72px; font-size: 30px; }
.face-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.face-actions button { padding: 5px 12px; font-size: 14px; }
.about .face-actions { justify-content: center; margin-top: 12px; }
/* The picked picture before it is sent: round, the middle of it, as the server will cut it. */
.face-preview { width: 200px; height: 200px; margin: 14px auto 10px; border-radius: 50%; overflow: hidden; background: var(--soft); }
.face-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.face-preview.blind img { display: none; }
dialog p.bad { color: var(--danger); }
/* In a group, beside the first message of a run by somebody else (where their name stands); the rest of the run keeps the same margin. */
.msg > .avatar { width: 28px; height: 28px; font-size: 12px; align-self: flex-start; margin-right: 4px; cursor: pointer; }
.msg > .avatar-gap { width: 28px; margin-right: 4px; flex: none; }

/* ---------------------------------------------------------------- reactions under a bubble; the bar over a message */
/* The ⋮ of a message stands before its bubble in the page (the keyboard reaches it first); it shows after
   somebody else's bubble, before mine. */
.msg:not(.me) > .act { order: 2; }
.stack { position: relative; }
.reacts { display: flex; flex-wrap: wrap; gap: 4px; margin: 3px 0 4px; max-width: 100%; }
.msg.me .reacts { justify-content: flex-end; }
.react { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 8px; border-radius: 13px; background: var(--surface); font-size: 14px; line-height: 1; border: 0;}
.react b { font-size: 12px; font-weight: 600; color: var(--dim); }
/* Mine: outlined and tinted. */
.react.mine { border-color: var(--brand); background: var(--pick); }
.react.mine b { color: var(--brand); }
.react:disabled { opacity: 1; cursor: default; }
.react.add { padding: 0 6px; color: var(--dim); }
.react svg, .hoverbar svg, .quick svg { display: block; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
/* The bar: two small pills at the bubble's top edge, over the edge rather than over the text. It is inside the
   message's row, so the mouse goes from the bubble onto it without leaving the message. Made by app.js when
   the message is first pointed at; shown only where there is a mouse (below). */
.hoverbar { display: none; position: absolute; z-index: 5; top: -28px; right: 6px; gap: 6px; white-space: nowrap; }
.hoverbar.fromleft { right: auto; left: 6px; }   /* a bubble shorter than the bar: from the bubble's left end, not off the pane */
.hoverbar.low { top: 2px; }                      /* the first message in sight: inside its top, where nothing hides it */
.hoverbar .group { display: flex; padding: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 1px 5px rgba(0, 0, 0, .16); }
.hoverbar button { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--dim); font-size: 17px; line-height: 1; }
.hoverbar button:hover { background: var(--hover); color: var(--ink); }
.hoverbar button.mine, .menu .quick button.mine { background: var(--pick); }
@media (hover: hover) and (pointer: fine) {
  /* Only the message itself (its bubble with what hangs on it, and its ⋮) wakes the bar, not the empty
     width of its row: a pointer passing down the side of the pane leaves the messages alone. */
  .msg:has(> .stack:hover) .hoverbar, .msg:has(> .act:hover) .hoverbar, .msg:focus-within .hoverbar, .msg.pinned .hoverbar { display: flex; }
  /* With a mouse the ⋮ beside a message shows with the bar: under the mouse, with the keyboard on the message, or while its menu is open. */
  .msg .act { opacity: 0; }
  .msg:has(> .stack:hover) .act, .msg:has(> .act:hover) .act, .msg:focus-within .act, .msg.pinned .act { opacity: 1; }
}
/* The top of a message's menu where there is no bar (a touch screen): the three emoji used last, and the way to the others. */
.menu .quick { display: flex; gap: 2px; padding: 2px 4px 6px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.menu .quick button { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border-radius: 50%; font-size: 22px; line-height: 1; }
/* The emoji panel under its button (a message near the top of the window): the tail points up. */
.pop.under::after { bottom: auto; top: -7px; border-width: 1px 0 0 1px; }

/* ---------------------------------------------------------------- my devices; Link a new device (in Settings) */
/* A device of mine: no avatar and nothing to open. A long name wraps, so "Sign out" keeps its place. */
.devices .row { position: relative; cursor: default; padding: 8px 16px; }
.devices .row:hover { background: none; }
.devices .row + .row::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: 1px solid var(--line); }
.devices .row .text > b { white-space: normal; overflow-wrap: anywhere; }
.devices .row button { flex: none; padding: 5px 12px; font-size: 14px; }
.setting button.wide { margin-top: 10px; }
/* The Link screen: a word of caution, then three ways, each a row that opens what it shows under itself. */
.link p.caution { margin: 12px 16px; padding: 10px 12px; border-radius: 10px; background: var(--soft); }
.link p.note { margin: 10px 16px 0; }
.link p.until { margin: 0; padding: 12px 16px 0; border-top: 1px solid var(--line); }
.link p.bad { color: var(--danger); }
.way-row { display: block; width: 100%; text-align: left; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; padding: 11px 16px; }
.way-row b, .way-row span { display: block; }
.way-row span { font-size: 13.5px; color: var(--dim); }
.way-row.on, .way-row.on:hover { background: var(--pick); }
.way-body { padding: 4px 16px 14px; }
.way-body .center { text-align: center; }
.way-body p { margin: 8px 0 0; }
.way-body .qr-frame { margin: 10px 0 0; }
.way-body .steps { display: inline-block; margin: 10px auto 0; }
.way-body .buttons { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
/* The key, large enough to read out; one tap selects all of it. */
.keytext { padding: 12px 0 4px; font-size: 24px; font-weight: 700; letter-spacing: .06em; user-select: all; overflow-wrap: anywhere; }
/* Where the clipboard is kept from the page, the text is copied out of a field nobody sees. */
textarea.offscreen { position: fixed; left: -1000px; top: 0; width: 10px; height: 10px; opacity: 0; }

/* ---------------------------------------------------------------- an iPhone: its zoom, its keyboard, its notch */
/* Safari on iOS zooms the whole page in when a field whose text is under 16px gets the keyboard, and
   stays zoomed afterwards. Only there are the fields 16px (the rule below is true on iOS alone); the
   page can still be pinched larger. Not in the CRM's bubble, which stays as it is. */
@supports (-webkit-touch-callout: none) {
  body:not(.embed) input[type=text], body:not(.embed) textarea, body:not(.embed) select { font-size: 16px; }
}
/* A phone's keyboard covers the lower part of the page instead of making it smaller. While it does,
   app.js says how tall the part in sight is (--vvh) and marks the page (html.keyboard): the app is that
   tall, so the bar stays at the top and the composer sits right above the keys. Never set in a desktop
   browser, nor in the CRM's bubble. */
body:not(.embed) #app { height: var(--vvh, 100%); }
html.keyboard .toast { bottom: auto; top: calc(var(--vvh) - 116px); }
/* A dialog with a field in it (a group's name): at the top of what is in sight, not in the middle of the whole page. */
html.keyboard dialog { margin-top: 12px; max-height: calc(var(--vvh) - 24px); }
/* The page reaches under the status bar, the notch and the home indicator (viewport-fit=cover: a
   home-screen app, Safari turned on its side). The screens keep clear of them; the strip under the
   status bar has the page's frame colour around the panes. The frame's 15px is kept on top of them. Zero everywhere else. */
body:not(.embed) .shell { padding: calc(15px + env(safe-area-inset-top)) calc(15px + env(safe-area-inset-right)) calc(15px + env(safe-area-inset-bottom)) calc(15px + env(safe-area-inset-left)); }
/* (the sign-in page scrolls: it is the scrolling box itself that keeps clear, or its text would pass under the clock) */
body:not(.embed) .door { margin: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left); height: calc(100% - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
/* (the keyboard hides the home indicator: no room is kept for it then) */
html.keyboard body:not(.embed) .shell { padding-bottom: 0; }
html.keyboard body:not(.embed) .door { height: calc(100% - env(safe-area-inset-top)); }

/* ---------------------------------------------------------------- the status line ("Connecting…", "Offline: …") */
/* It lies over the foot of the conversation list instead of taking a row of its own: coming and going, it
   no longer moves the list. The list always keeps that much room at its foot, so its last row can scroll
   clear of the line, and room for its scrollbar, so the rows do not narrow when one appears. */
.below { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }
/* (only while the line shows: otherwise the list goes down to the frame) */
.below:has(> .status:not([hidden])) > .list { padding-bottom: 34px; }
.below > .status { position: absolute; left: 0; right: 0; bottom: 0; background: var(--surface); }

/* ---------------------------------------------------------------- discussions and mentions read one by one (DESIGN §8u) */
/* The dot on the bar's Discussions button, and on a conversation whose main line is read and a discussion is not. */
button.icon .mark { position: absolute; top: 7px; right: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--new); border: 2px solid var(--bar); box-sizing: content-box; pointer-events: none; }
.badge.thread-dot { min-width: 9px; width: 9px; height: 9px; padding: 0; background: var(--new); }
.badge.thread-dot.muted { background: var(--silent); }
/* Under a message with a discussion: "@ you" where I am named in it, a dot where replies wait. */
.replies { align-items: center; }
.replies .you, .talk .you { font-size: 12px; font-weight: 700; color: var(--on-brand); background: var(--brand); border-radius: 10px; padding: 1px 7px; }
.replies .dot, .tabs .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--new); flex: none; }
/* "@ 2 mentions" floating over the end of the thread, above the composer. */
.pill-anchor { position: relative; height: 0; z-index: 6; }
.mention-pill { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 8px; border: 0; border-radius: 19px; background: var(--brand); color: var(--on-brand); font-size: 14px; font-weight: 600; white-space: nowrap; box-shadow: 0 4px 14px rgba(0, 0, 0, .22); }
.mention-pill:hover { background: var(--brand); filter: brightness(1.08); }
.mention-pill .at, .mentions .head .at { width: 24px; height: 24px; border-radius: 50%; background: var(--on-brand); color: var(--brand); display: flex; align-items: center; justify-content: center; font-weight: 800; flex: none; }
/* The list of the places I am named in. A dialog; on a phone it comes up from the bottom. */
dialog.mentions { padding: 0; width: min(460px, calc(100vw - 24px)); overflow: hidden; }
dialog.mentions[open] { display: flex; flex-direction: column; }
.mentions .head { display: flex; align-items: center; gap: 10px; padding: 8px 6px 8px 16px; border-bottom: 1px solid var(--line); }
.mentions .head .at { background: var(--brand); color: var(--on-brand); width: 28px; height: 28px; }
.mentions .head h2 { flex: 1; min-width: 0; margin: 0; font-size: 17px; }
.mentions .head .all { border: 0; background: none; color: var(--brand); font-size: 14px; font-weight: 600; padding: 8px 6px; }
.mentions .list { overflow-y: auto; padding-bottom: 8px; }
.mention-row { display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left; border: 0; border-radius: 0; background: none; padding: 10px 16px; }
.mention-row:hover { background: var(--hover); }
.mention-row.new, .talk.new { background: var(--fresh); }
.mention-row .avatar { width: 40px; height: 40px; font-size: 15px; }
.mention-row .text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mention-row .top { display: flex; align-items: baseline; gap: 6px; }
.mention-row .top b { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mention-row .top span { flex: none; }
.mention-row time { margin-left: auto; flex: none; }
.mention-row .root { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mention-row .body { overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mention-row:not(.new) .body { color: var(--dim); }
.mention-row:not(.new) .mention.me { background: var(--pill); color: var(--brand); }
@media (max-width: 720px) {
  dialog.mentions { margin: auto 0 0; width: 100%; max-width: 100%; max-height: min(80vh, calc(var(--vvh, 100vh) - 40px)); border-width: 1px 0 0; border-radius: 18px 18px 0 0; padding-bottom: env(safe-area-inset-bottom); }
}
/* "New": above the first message not read when the conversation was opened. Quiet: a word between two thin lines. */
.day.new { display: flex; align-items: center; gap: 10px; }
.day.new::before, .day.new::after { content: ""; flex: 1; height: 1px; background: var(--brand); opacity: .3; }
.day.new span { background: none; color: var(--brand); font-weight: 600; padding: 0; }
/* Somebody named in a message who is no longer in the group. */
.mention.gone, .msg.me .mention.gone { background: var(--veil); color: var(--dim); font-weight: 400; }
.replies { flex-wrap: wrap; }
/* The two parts of a group's page, and a discussion as a row of the first. */
.tabs { display: flex; border-bottom: 1px solid var(--line); }
.tabs .tab { flex: 1; height: 44px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; padding: 0 6px; font-size: 14px; font-weight: 600; color: var(--dim); display: flex; align-items: center; justify-content: center; gap: 6px; }
.tabs .tab.on { color: var(--brand); border-bottom-color: var(--brand); }
.talk { display: flex; flex-direction: column; gap: 3px; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; padding: 11px 16px; }
.talk:hover { background: var(--hover); }
.talk .top { display: flex; align-items: center; gap: 8px; }
.talk b { flex: 1; min-width: 0; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.talk.new b { font-weight: 600; }
.talk .count { font-size: 12px; font-weight: 700; color: #fff; background: var(--new); border-radius: 10px; padding: 1px 7px; }
.talk .sub { font-size: 13px; color: var(--dim); }

/* ---------------------------------------------------------------- counts on round badges, the way back to the newest message */
/* A count as a shop's cart shows it: a small filled circle at the top right of what it counts. Red: not read. Blue: places I am named. */
.badge.cart { position: absolute; top: -4px; right: -4px; min-width: 17px; height: 17px; padding: 0 4px; font-size: 11px; background: var(--new); color: var(--surface); pointer-events: none; }
.badge.cart.at { background: var(--brand); color: var(--on-brand); }
button.icon .badge.cart { top: 1px; right: -2px; box-shadow: 0 0 0 2px var(--bar); }
/* "↓" over the composer, at the right (the mention pill is in the middle). */
.down { position: absolute; right: 14px; bottom: 10px; width: 40px; height: 40px; padding: 0; border-radius: 50%; background: var(--surface); color: var(--dim); font-size: 20px; line-height: 1; display: flex; align-items: center; justify-content: center; box-shadow: 0 3px 10px rgba(0, 0, 0, .18); }
.down:hover { color: var(--ink); }

/* ---------------------------------------------------------------- the bubble as a frame (DESIGN §8w) */
/* Evenly rounded, no tail. Inside, top to bottom: who, the quote, the files, the text; one last row with
   the reactions at the left and the time at its right end; then, under a thin line, its discussion. */
.bubble { border-radius: 8px; box-shadow: 0 1px 2px rgba(0, 0, 0, .1); }
.bubble .foot { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 2px 10px; margin: 5px 10px; }
.bubble .foot .reacts, .msg.me .bubble .foot .reacts { flex: 1 1 auto; justify-content: flex-start; margin: 0; max-width: none; min-width: 0; }
.bubble .foot .meta { margin: 0 0 0 auto; white-space: nowrap; }
/* The chips, inside the frame: a shade of it; mine filled. */
.bubble .react { background: var(--veil); border-color: transparent; }
.bubble .react:hover:not(:disabled) { background: var(--veil-on); }
.bubble .react.mine { background: var(--react-mine); }
.bubble .react.mine b { color: var(--on-react-mine); }
.bubble .react.add { background: none; }
/* The discussion: one row that is a button, from edge to edge of the frame under a thin line. */
.bubble .replies { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; padding: 5px 10px; margin: 0; border: 0; border-top: 1px solid var(--veil-on); background: none; color: var(--brand); font-size: 14px; border-radius: 0; width: 100%;  }
.bubble .replies:hover { background: var(--veil);}
.replies b { font-weight: 600; white-space: nowrap; }
.replies .faces { display: flex; flex: none; padding-left: 2px; }
.replies .faces .avatar { width: 24px; height: 24px; font-size: 11px; box-sizing: content-box; border: 2px solid var(--in); margin-left: -9px; cursor: inherit; }
.replies .faces .avatar:first-child { margin-left: -2px; z-index: 3; }
.replies .faces .avatar:nth-child(2) { z-index: 2; }
.msg.me .replies .faces .avatar { border-color: var(--out); }
.replies .chev { margin-left: auto; padding-left: 8px; font-size: 22px; line-height: 20px; color: var(--brand); opacity: .75; }
/* Under a card, which has no such frame, the same row stands by itself. */
.stack > .replies { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; margin: 3px 0 4px; padding: 6px 8px 6px 10px; background: var(--in); border-radius: 12px; box-shadow: 0 1px 2px rgba(0, 0, 0, .1); font-size: 14px; }

/* ---------------------------------------------------------------- the list's bar: my face, Search; a conversation's discussions as a sheet (DESIGN §8x) */
/* The back arrow: long wings, a little larger and bolder than the other icons. */
button.icon svg.utm-icon--back { width: 24px; height: 24px; stroke-width: 2.2; }
.utm-sheet-close__over svg.utm-icon--back { display: block; }
.utm-list-bar__me { flex: none; border: 0; background: none; padding: 0; border-radius: 50%; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; }
.utm-list-bar__me:hover { background: none; filter: brightness(.95); }
.utm-list-bar__me .avatar { width: 36px; height: 36px; font-size: 15px; }
.utm-list-bar .utm-list-bar__field { flex: 1; min-width: 0; border-radius: 18px; padding: 7px 14px; background: var(--soft); border-color: transparent; }
/* Not searching: the field and its way back are not there. Searching: they take the place of my face, Search and Contacts. */
.utm-list-bar:not(.searching) > .utm-list-bar__field, .utm-list-bar:not(.searching) > .utm-list-bar__close-search { display: none; }
.utm-list-bar.searching > .utm-list-bar__me, .utm-list-bar.searching > .utm-list-bar__mode, .utm-list-bar.searching > .utm-list-bar__title,
.utm-list-bar.searching > .utm-list-bar__search, .utm-list-bar.searching > .utm-list-bar__contacts { display: none; }
.utm-list-bar.searching { padding-left: 6px; }
/* The Discussions sheet: the Mentions sheet's frame, a speech bubble where that one has "@". */
.talks .head .at svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------------------------------------------------------- the list as Threads or as Mentions (DESIGN §8y) */
/* The two toggles at the start of the list's bar: off, an outline and their icon; on, filled, with a tick. */
.utm-list-bar { padding: 0; border: 0; background: var(--list-bar); padding: 8px; margin: 5px 0; }
.utm-list-bar__mode { flex: none; display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 8px; border: 0; border-radius: 5px; background: none; color: var(--ink); font-size: 11px; font-weight: 600; white-space: nowrap; }
.utm-list-bar__mode:hover { background: var(--hover); }
.utm-list-bar__mode svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.utm-list-bar__mode.on { background: var(--pick); border-color: transparent; color: var(--brand); }
.utm-list-bar__mode.on:hover { background: var(--pick); filter: brightness(.97); }
.utm-list-bar__check { font-size: 14px; line-height: 1; width: 16px; text-align: center; }
.utm-list-bar__mode .badge { margin-left: 1px; }
.utm-list-bar__mode-count { min-width: 18px; height: 18px; padding: 0 5px; font-size: 11px; }
/* A row of Threads or Mentions: the conversation's face and name, then what was said; a reply under a hook. */
.feed-row { align-items: flex-start; padding-top: 10px; padding-bottom: 10px; }
.feed-row .text { display: flex; flex-direction: column; gap: 2px; }
.feed-row .name b { font-weight: 500; }
.feed-row.unread .name b { font-weight: 700; }
.feed-row .name .badge { align-self: center; }
.feed-row.unread .name time { color: var(--brand); font-weight: 600; }
.feed-row .last span, .feed-row .reply span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; color: var(--dim); }
.feed-row .reply { position: relative; margin-top: 2px; padding-left: 22px; }
.feed-row .reply::before { content: ''; position: absolute; left: 6px; top: -3px; width: 10px; height: 12px; border-left: 1.5px solid var(--line); border-bottom: 1.5px solid var(--line); border-bottom-left-radius: 8px; }
.feed-row.unread .reply span { color: var(--ink); font-weight: 600; }
.feed-row .said { font-size: 14px; line-height: 1.4; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.feed-row .said .utm-feed-row__sender { color: var(--dim); }
.feed-row.unread .said .utm-feed-row__sender { color: var(--ink); font-weight: 600; }
.feed-row .where { font-size: 12.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-row.utm-feed-row--mention.unread { background: var(--fresh); }
.feed-row.utm-feed-row--mention.unread:hover { background: var(--hover); }
.utm-feed__more { padding: 14px 16px; }
.feed-row.unread .last span { color: var(--dim); font-weight: 400; }

/* ---------------------------------------------------------------- runs, Details, a message edited or deleted (DESIGN §8z) */
/* In a run the time is on the last bubble only: a bubble with nothing in its last row has no last row. */
.bubble .foot:empty { display: none; }
/* Deleted: the frame stays, the words say so, quietly. */
.bubble.deleted { background: transparent; box-shadow: inset 0 0 0 1px var(--line); color: var(--dim); }
.msg.me .bubble.deleted { background: transparent; color: var(--dim); }
.bubble .gone { font-style: italic; font-size: 14px; }
/* Editing: the strip above the composer says so in the brand's colour. */
.replying.editing .utm-replying__who { color: var(--brand); }
/* Details of a message: label and value on a line each. */
dialog.details { padding: 0; width: min(420px, calc(100vw - 24px)); }
.details .head { display: flex; align-items: center; gap: 10px; padding: 8px 6px 8px 16px; border-bottom: 1px solid var(--line); }
.details .head h2 { flex: 1; margin: 0; font-size: 17px; }
.details .list { padding: 6px 0 12px; }
.details .detail { display: flex; gap: 12px; padding: 8px 16px; font-size: 14.5px; }
.details .detail .utm-details__label { width: 64px; flex: none; }
.details .detail .utm-details__value { flex: 1; min-width: 0; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- scroll bars, everywhere: only the handle, only while the area is pointed at */
/* Where there is a mouse (app.js ownScrollBars puts html.own-bars), the browser's own bars are hidden and one
   handle of ours lies over the right edge of the area under the pointer: no track, no arrows, no lane kept for
   it. It shows while the pointer is in that area, darker under the pointer, and can be dragged. A touch screen
   keeps the system's own thin bar, which already lies over the content while scrolling. */
:root { --scroll-thumb: rgba(0, 0, 0, .26); --scroll-thumb-on: rgba(0, 0, 0, .44); }
@media (prefers-color-scheme: dark) { :root { --scroll-thumb: rgba(255, 255, 255, .24); --scroll-thumb-on: rgba(255, 255, 255, .42); } }
html.own-bars, html.own-bars * { scrollbar-width: none; }
html.own-bars ::-webkit-scrollbar { display: none; width: 0; height: 0; }
.scroll-thumb { position: fixed; top: 0; left: 0; z-index: 2147483000; width: 6px; height: 0; margin-left: 1px; border-radius: 3px; background: var(--scroll-thumb);
  opacity: 0; pointer-events: none; transition: opacity .15s, width .1s, margin .1s; touch-action: none; }
.scroll-thumb.on { opacity: 1; pointer-events: auto; }
.scroll-thumb:hover, .scroll-thumb.drag { background: var(--scroll-thumb-on); width: 8px; margin-left: 0; }

/* ---------------------------------------------------------------- avatars on pastel, Send as an icon, a discussion's row on one line (DESIGN §8z+) */
/* A letter with no picture: a pastel ground of one of eight hues (app.js tintOf: the same name, the same hue), the letter in a deep shade of it. */
.avatar.tint-0 { background: #d6eef6; color: #00617e; } .avatar.tint-1 { background: #eadcf3; color: #5a1785; }
.avatar.tint-2 { background: #dcefdc; color: #24642a; } .avatar.tint-3 { background: #fde3d2; color: #a83b00; }
.avatar.tint-4 { background: #d9e7f8; color: #12529c; } .avatar.tint-5 { background: #f7dbe7; color: #8e1047; }
.avatar.tint-6 { background: #d3eef0; color: #006670; } .avatar.tint-7 { background: #eadfdb; color: #4e342e; }
@media (prefers-color-scheme: dark) {
  .avatar.tint-0 { background: #163a46; color: #9fd9ec; } .avatar.tint-1 { background: #33213f; color: #d6b7ea; }
  .avatar.tint-2 { background: #1f3a22; color: #a9d8ab; } .avatar.tint-3 { background: #4a2a14; color: #f6bd96; }
  .avatar.tint-4 { background: #1a3150; color: #a9c8f0; } .avatar.tint-5 { background: #45192d; color: #f0a9c6; }
  .avatar.tint-6 { background: #123c40; color: #93d8de; } .avatar.tint-7 { background: #362a26; color: #d3c0b8; }
}
/* Send: the icon alone, grey while there is nothing to send, the brand's colour once there is; a tick while a message is being changed. */
.composer button.primary.utm-composer__send, .composer button.primary.utm-composer__send:hover { background: none; border: 0; color: var(--dim); filter: none; display: flex; align-items: center; justify-content: center; }
.composer button.primary.utm-composer__send.ready { color: var(--brand); }
.composer button.primary.utm-composer__send.ready:hover { background: var(--hover); }
.composer .utm-composer__send svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* The way into a discussion under a short message stays on one line: the bubble widens to it. */
.bubble .replies { min-width: max-content; }
.bubble .replies, .bubble .replies * { white-space: nowrap; }

/* ---------------------------------------------------------------- search: the list's box with two tabs, and one conversation's (DESIGN §8z+) */
.list-search { flex: none; padding: 8px 4px 0; }
.list-search[hidden], .conv-find[hidden] { display: none; }
.list-search .box { display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 4px 0 12px; border-radius: 20px; background: var(--soft); }
.list-search .box > span { display: flex; color: var(--dim); }
.list-search .box svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.list-search input { flex: 1; min-width: 0; border: 0; background: none; padding: 0; font-size: 15px; outline: 0; }
.list-search input::-webkit-search-cancel-button { display: none; }
.list-search .box button { width: 32px; height: 32px; border-radius: 50%; font-size: 14px; color: var(--dim); }
.list-search .tabs { margin: 0 0 10px 0; }
mark.hit { background: var(--pill); color: inherit; border-radius: 3px; padding: 0 1px; font-weight: 600; }
/* One conversation: the field in its bar, what is found in a panel over the thread. */
.main { position: relative; }
.bar.finding .utm-chat-bar__find { flex: 1; min-width: 0; height: 38px; border: 0; border-radius: 19px; padding: 0 14px; background: var(--soft); font-size: 15px; outline: 0; }
.conv-find { position: absolute; left: 0; right: 0; z-index: 30; max-height: min(60%, 520px); overflow-y: auto; background: var(--surface); border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); padding: 4px 0; }
.conv-find .mention-row { border-radius: 0; }
.conv-find .utm-conv-find__body { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; }
.conv-find .utm-conv-find__root { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.utm-conv-find__more { padding: 10px 16px; }

/* ------------------------------------------------ discussions as rows of the conversation list; archived (DESIGN §8z8) */
.utm-feed-row__archived { flex: none; align-self: center; font-size: 11.5px; padding: 0 6px; border: 1px solid var(--line); border-radius: 8px; }

/* ------------------------------------------------ pinned messages: the bar under the conversation's bar (DESIGN §8z3) */
.utm-pinned { display: flex; align-items: stretch; gap: 4px; flex: none; margin: 0 0 5px 0; padding: 4px; background: var(--surface); border-radius: 10px; overflow: hidden; }
.utm-pinned[hidden] { display: none; }
.utm-pinned__body { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 6px 10px; border-radius: 8px; text-align: left; cursor: pointer; color: var(--ink); }
.utm-pinned__body:hover { background: var(--hover); }
.utm-pinned__icon { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--brand); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.utm-pinned__text { flex: 1; min-width: 0; display: flex; flex-direction: column; border-left: 2px solid var(--brand); padding-left: 10px; }
.utm-pinned__label { font-size: 12.5px; font-weight: 600; color: var(--brand); }
.utm-pinned__said { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.utm-pinned__text--slide { animation: utm-pin-slide .22s ease-out; }
@keyframes utm-pin-slide { from { transform: translateX(28px); opacity: 0; } to { transform: none; opacity: 1; } }
.utm-pinned__next { flex: none; display: flex; align-items: center; gap: 2px; border: 0; background: none; padding: 0 6px 0 10px; border-radius: 8px; color: var(--dim); font-size: 13px; font-variant-numeric: tabular-nums; cursor: pointer; }
.utm-pinned__next:hover { background: var(--hover); color: var(--ink); }
.utm-pinned__arrow { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.utm-bubble__pin { display: inline-flex; align-self: flex-end; margin-left: auto; color: var(--dim); }
.utm-bubble__pin .utm-icon { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bubble .foot .utm-bubble__pin + .meta { margin-left: -6px; }
@media (prefers-reduced-motion: reduce) { .utm-pinned__text--slide { animation: none; } }

/* ------------------------------------------------ a conversation pinned to the top of my list; "@all" (DESIGN §8z4) */
.utm-conv-row__pin { flex: none; display: inline-flex; align-self: center; color: var(--dim); }
.utm-conv-row__pin .utm-icon { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transform: rotate(35deg); }
.utm-suggest__avatar--all { display: inline-flex; align-items: center; justify-content: center; background: var(--pill); color: var(--brand); font-weight: 700; }
.mention.all:not(.me) { cursor: default; }

/* ------------------------------------------------ the top bar above the list's bar: my face; Contacts and the menu (DESIGN §8z5) */
.utm-top-bar { padding: 0; border: 0; }
.utm-top-bar__me { flex: none; border: 0; background: none; padding: 0; border-radius: 50%; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; }
.utm-top-bar__me:hover { background: none; filter: brightness(.95); }
.utm-top-bar__me .avatar { width: 36px; height: 36px; font-size: 15px; }
.utm-top-bar__title { flex: 1; }

/* ------------------------------------------------ searching: the field in the list's bar, Search an ✕ at its right; the tabs under the bar (DESIGN §8z6) */
.utm-list-bar:not(.searching) > .utm-list-search__box { display: none; }
.utm-list-bar.searching > .utm-list-bar__mode, .utm-list-bar.searching > .utm-list-bar__title { display: none; }
.utm-list-bar.searching > .utm-list-bar__search { display: inline-block; }
.utm-list-bar .utm-list-search__box { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 12px; border-radius: 18px;}
.utm-list-search__icon { display: flex; color: var(--dim); }
.utm-list-search__icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.utm-list-search__input { flex: 1; min-width: 0; border: 0; background: none; padding: 0; font-size: 15px; outline: 0; color: var(--ink); }
.utm-list-search__input::-webkit-search-cancel-button { display: none; }
.list-search { padding-top: 0; }

/* ------------------------------------------------ status: Active, Away, Do not disturb (DESIGN §8z7) */
:root { --on-line: #1e8e3e; --dnd: #d93025; }
@media (prefers-color-scheme: dark) { :root { --on-line: #5bb974; --dnd: #f28b82; } }
/* A face with its dot: the frame holds both (the avatar hides what sticks out of it). */
.utm-presence { position: relative; display: inline-flex; flex: none; }
.utm-presence__dot { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; box-sizing: border-box; border: 2px solid var(--surface); background: var(--surface); }
.utm-presence__dot[hidden] { display: none; }
.utm-presence__dot--active { background: var(--on-line); }
.utm-presence__dot--away { background: var(--surface); box-shadow: inset 0 0 0 2px var(--dim); }
.utm-presence__dot--dnd { background: var(--dnd); }
.utm-presence__dot--dnd::after { content: ''; position: absolute; left: 2px; right: 2px; top: 50%; height: 2px; margin-top: -1px; border-radius: 1px; background: #fff; }
.utm-profile__head .utm-presence__dot { width: 22px; height: 22px; right: 4px; bottom: 4px; border-width: 3px; }
.utm-profile__head .utm-presence { align-self: center; }
/* My chip beside my face: the dot, the word, a caret. */
.utm-top-bar__status { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 10px 0 12px; border: 0; border-radius: 17px; background: var(--pick); color: var(--ink); font-size: 14px; font-weight: 600; white-space: nowrap; }
.utm-top-bar__status:hover { filter: brightness(.97); }
.utm-top-bar__status .utm-presence__dot { position: relative; right: auto; bottom: auto; width: 10px; height: 10px; border: 0; }
.utm-top-bar__status .utm-presence__dot--away { box-shadow: inset 0 0 0 2px var(--dim); }
.utm-top-bar__status .utm-presence__dot--dnd::after { left: 2px; right: 2px; }
.utm-top-bar__status-caret { font-size: 11px; color: var(--dim); }
/* The status menu: a dot, the word with a line under it, a tick on the one chosen. */
.menu .utm-menu__item--rich { display: flex; align-items: center; gap: 14px; padding: 9px 14px; min-width: 260px; }
.utm-menu__mark { position: relative; right: auto; bottom: auto; flex: none; width: 12px; height: 12px; border: 0; }
.utm-menu__words { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.utm-menu__label { font-size: 15px; }
.utm-menu__sub { font-size: 12.5px; color: var(--dim); }
.utm-menu__check { flex: none; color: var(--ink); }
.utm-menu__head { padding: 8px 14px 6px; font-size: 12.5px; color: var(--dim); border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.feed-row .name .badge { flex: none; } /* a mark keeps its size; the name takes the room */

/* ------------------------------------------------ a row's marks, as Zalo has them: muted beside the time, what waits under it */
.utm-conv-row__muted { flex: none; display: inline-flex; align-self: center; color: var(--dim); }
.utm-conv-row__muted .utm-icon { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.feed-row .utm-feed-row__root { display: flex; align-items: center; gap: 6px; }
.feed-row .utm-feed-row__root > span { flex: 1; min-width: 0; }
.feed-row .utm-feed-row__root > .badge { flex: none; }

/* A conversation's page of its discussions or of my mentions (in its screen, over the messages, under its bar) */
.conv-page { position: absolute; left: 0; right: 0; bottom: 0; z-index: 25; display: flex; flex-direction: column; background: var(--surface); border-radius: 10px; overflow: hidden; }
.conv-page .head { display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; border-bottom: 1px solid var(--line); flex: none; }
.conv-page .head h2 { flex: 1; min-width: 0; margin: 0; font-size: 17px; }
.conv-page .head .at { width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: var(--on-brand); display: flex; align-items: center; justify-content: center; font-weight: 800; flex: none; }
.conv-page .head .at svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.conv-page .head .all { border: 0; background: none; color: var(--brand); font-size: 14px; font-weight: 600; padding: 8px 6px; }
.conv-page .head .all:disabled { color: var(--dim); }
.conv-page .list { flex: 1; overflow-y: auto; padding-bottom: 8px; }
@media (max-width: 720px) { .conv-page .utm-conv-page__close { display: none; } }
button.icon.utm-chat-bar__discussions--on, button.icon.utm-chat-bar__mentions--on { background: var(--pick); color: var(--brand); }

/* the page's row of what is open beside: the discussion, or the mention chosen in it */
.talk.on, .talk.on:hover, .mention-row.on, .mention-row.on:hover { background: var(--row-on); }

/* A word about an action on the whole list (Archive all threads, Clear all mentions), at its foot (§8z9). */
.side-pill { position: absolute; z-index: 5; left: 50%; bottom: 16px; transform: translateX(-50%); max-width: calc(100% - 24px); padding: 8px 16px; border-radius: 20px; background: var(--ink); color: var(--bg); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 4px 16px rgba(0, 0, 0, .25); pointer-events: none; }
.side-pill[hidden] { display: none; }

/* Text format (§8z11): the bar above the field, the A beside +, and what the marks show as. */
.composer:has(> .fmt-bar:not([hidden])) { flex-wrap: wrap; }
.composer .fmt-bar { flex: 0 0 100%; display: flex; align-items: center; gap: 2px; padding: 0 0 6px; border-bottom: 1px solid var(--line); margin-bottom: 2px; }
.composer .fmt-bar[hidden] { display: none; }
.composer .fmt-bar button { width: 34px; height: 34px; border-radius: 8px; color: var(--dim); display: inline-flex; align-items: center; justify-content: center; }
.composer .fmt-bar button:hover { background: var(--hover); color: var(--ink); }
.composer .fmt-sep { width: 1px; height: 20px; background: var(--line); margin: 0 6px; }
.composer .fmt-toggle { color: var(--dim); display: inline-flex; align-items: center; justify-content: center; }
.composer .fmt-toggle[aria-pressed=true] { background: var(--pick); color: var(--ink); }
button.icon svg.utm-icon--fmt { width: 22px; height: 22px; fill: currentColor; stroke: none; }
.composer .fmt-bar button.icon svg.utm-icon--fmt { width: 20px; height: 20px; }
.fmt-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; background: var(--veil); border-radius: 4px; padding: 1px 4px; }
.fmt-line { min-height: 1.35em; }
.fmt-line.fmt-ul, .fmt-line.fmt-ol { display: flex; gap: 6px; padding-left: 4px; }
.fmt-line .fmt-mark { flex: none; min-width: 12px; color: var(--dim); }
.fmt-line.fmt-ol .fmt-mark { min-width: 16px; text-align: right; }
.fmt-line.fmt-quote { border-left: 3px solid currentColor; padding-left: 8px; opacity: .72; }
.fmt-line .fmt-text { flex: 1; min-width: 0; }

/* A picture attached to a message being written opens in the viewer, as a sent one does. */
.staged button.thumb { padding: 0; border: 0; cursor: zoom-in; }
.staged button.thumb:hover { background: var(--veil); filter: brightness(.94); }

/* Drive (DESIGN §8z13): a link into Drive is a card with Open; under files, where a copy came
   from, Save to Drive on somebody else's, and the line that says I saved it (mine only). */
.drive-card { display: flex; align-items: center; gap: 10px; min-width: min(240px, 100%); max-width: 100%; margin: 5px; padding: 8px 10px; border-radius: 10px; background: var(--veil); }
.utm-drive-card__icon { flex: none; font-size: 26px; line-height: 1; }
.utm-drive-card__text { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.utm-drive-card__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.utm-drive-card__where { font-size: 12.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.utm-drive-card__open { flex: none; padding: 3px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: inherit; font-size: 13px; text-decoration: none; }
.utm-drive-card__open:hover { background: var(--hover); }
.drive-under { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin: 0 10px 6px; font-size: 12.5px; }
.utm-drive-under__from { color: var(--dim); }
.utm-drive-under__save { padding: 3px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: inherit; font-size: 13px; }
.utm-drive-under__save:hover { background: var(--hover); }
.utm-drive-under__saved { color: var(--dim); }
.utm-drive-under__folder { color: var(--brand); }
/* "Attach file" on a link pill (§8z13): the link becomes a copy of the file. */
.utm-staged-tile__attach { flex: none; align-self: center; padding: 3px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: inherit; font-size: 12.5px; white-space: nowrap; }
.utm-staged-tile__attach:hover { background: var(--hover); }
