/* The web client's look, Veyumo's: the middle light and warm, the left dark navy, teal where something is on
   or to be done, red for leaving. A phone first, then a wide screen. */

/* Inter (SIL Open Font License, fonts/OFL.txt): the files of Google Fonts, kept with the client — a page asks
   nothing of another server. One variable file an alphabet, weights 400 to 700; a browser takes only those
   whose letters the page has. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/inter-cyrillic-ext.woff2) format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/inter-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/inter-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/inter-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* The brand. */
  --brand: #00b8ac;
  --brand-hi: #00a89d;
  --brand-text: #078a80;
  --brand-soft: #e2f5f3;
  --danger: #f05a48;
  --danger-hi: #e04836;
  --danger-text: #c8372a;
  --danger-soft: #fde6e2;
  --warn: #e6a019;

  /* The light middle. */
  --bg: #fcfcf9;
  --surface: #ffffff;
  --panel: #f2f4f3;
  --soft: #eceff0;
  --soft-hi: #e2e7e9;
  --line: #e6e9e8;
  --line-strong: #d7dfe1;
  --text: #17252e;
  --text-2: #3a4750;
  --muted: #6b7880;
  --row: #f3f5f4;
  --code: #eef1f2;
  --link: #0a76a0;
  --mention-bg: #fff6dd;
  --mention-line: #e3a008;
  --shadow: 0 1px 2px rgba(23, 37, 46, 0.06), 0 4px 16px rgba(23, 37, 46, 0.06);
  --shadow-pop: 0 12px 32px rgba(23, 37, 46, 0.16), 0 2px 6px rgba(23, 37, 46, 0.08);

  /* The dark left. */
  --side: #17252e;
  --side-raise: #1d2e38;
  --side-hover: #213440;
  --side-line: #24343e;
  --side-text: #c9d3d8;
  --side-muted: #8a9da7;
  --side-ink: #0d1d28;

  --radius: 12px;
  --head: 76px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

#app {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

/* A button: soft grey, teal where it is the thing to do, red where it cannot be undone. */
button {
  border: 0;
  border-radius: var(--radius);
  padding: 0 18px;
  min-height: 44px;
  background: var(--soft);
  color: var(--text);
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.12s, color 0.12s, box-shadow 0.12s;
}

button:hover {
  background: var(--soft-hi);
}

button.primary {
  background: var(--brand);
  color: #fff;
  font-weight: 600;
}

button.primary:hover {
  background: var(--brand-hi);
}

button.danger {
  background: var(--danger);
  color: #fff;
  font-weight: 600;
}

button.danger:hover {
  background: var(--danger-hi);
}

button:disabled {
  opacity: 0.5;
  cursor: default;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

input {
  min-height: 46px;
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0 14px;
  background: var(--surface);
  outline: none;
  transition: border-color 0.12s, box-shadow 0.12s;
}

input::placeholder,
textarea::placeholder {
  color: #98a3a9;
}

input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 184, 172, 0.16);
}

.status {
  min-height: 1.4em;
  color: var(--muted);
  font-size: 14px;
}

.status.error {
  color: var(--danger-text);
}

.muted {
  color: var(--muted);
}

/* ------------------------------------------------------------ start */

/* The logo, and under it the card: the name, a new meeting, one by its link, the account's meetings and
   its access code. In the middle while it fits, scrolled when it does not. */
.start {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px;
}

.start > :first-child {
  margin-top: auto;
}

.start > :last-child {
  margin-bottom: auto;
}

.start-logo {
  display: block;
  width: auto;
  height: 48px;
}

.tagline {
  margin: 12px 0 24px;
  color: var(--muted);
  text-align: center;
}

.card {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.card h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
}

.card label {
  font-size: 14px;
  color: var(--muted);
}

.start-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

button.start-avatar {
  min-height: 0;
  padding: 0;
  border-radius: 50%;
  background: none;
}

button.start-avatar:hover {
  background: none;
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.row {
  display: flex;
  gap: 8px;
}

.or {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* The account's meetings: a row each, its title and when. */
.mine {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mine:empty {
  display: none;
}

.section {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 8px;
}

button.meeting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  text-align: left;
  background: var(--panel);
}

button.meeting-row:hover {
  background: var(--soft-hi);
}

.meeting-row .title {
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}

.meeting-row .meta {
  font-size: 13px;
  color: var(--muted);
}

/* The access code: folded until asked for. */
.access {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.access summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
}

.access[open] {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.access .hint {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.access-code {
  flex: 1;
  min-width: 0;
  align-self: center;
  font: 15px/1.4 ui-monospace, "Cascadia Mono", Consolas, monospace;
  overflow-wrap: anywhere;
}

.qr:empty {
  display: none;
}

.qr svg {
  shape-rendering: crispEdges;
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* ------------------------------------------------------------ meeting */

/* The left, dark: the channels, the participants and the user; the middle, light: the channel shown; on
   the right a voice channel's transcripts. */
.meeting {
  flex: 1;
  min-height: 0;
  display: flex;
}

.icon {
  flex: none;
  display: block;
}

/* A button that is an icon: quiet until the pointer is on it. */
button.icon-button {
  min-height: 40px;
  min-width: 40px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
}

button.icon-button:hover {
  background: var(--soft);
  color: var(--text);
}

button.icon-button.danger,
button.icon-button.off {
  background: var(--danger-soft);
  color: var(--danger-text);
}

button.icon-button.danger:hover,
button.icon-button.off:hover {
  background: var(--danger);
  color: #fff;
}

button.icon-button.lit {
  background: var(--brand-soft);
  color: var(--brand-text);
}

button.small {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 14px;
}

.only-phone {
  display: none !important;
}

.avatar {
  flex: none;
  width: var(--avatar, 64px);
  height: var(--avatar, 64px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: calc(var(--avatar, 64px) * 0.4);
  font-weight: 700;
  color: #fff;
  user-select: none;
}

img.avatar {
  object-fit: cover;
  background: var(--soft);
}

/* Where something is: a dot — teal on, amber while the connection is gone, grey off. */
.state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.state.on {
  color: var(--brand-text);
}

.state.on .dot {
  background: var(--brand);
}

.state.warn {
  color: var(--warn);
}

.state.idle {
  color: var(--muted);
}

/* ---- the left */

.side {
  --text: #fff;
  --muted: var(--side-muted);
  --soft: var(--side-hover);
  width: 300px;
  flex: none;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--side);
  color: var(--side-text);
}

.side button.icon-button {
  color: var(--side-muted);
}

.side button.icon-button:hover {
  background: var(--side-hover);
  color: #fff;
}

.side-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 16px 12px 8px 24px;
}

.side-brand .logo {
  display: block;
  width: auto;
  height: 32px;
}

/* The meeting's name, and its menu under it. */
.meeting-menu {
  position: relative;
  margin: 8px 16px 6px;
}

button.meeting-pick {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 52px;
  padding: 0 14px 0 18px;
  border: 1px solid var(--side-line);
  border-radius: 14px;
  background: var(--side-raise);
  color: #fff;
  font-weight: 600;
  text-align: left;
}

button.meeting-pick:hover,
button.meeting-pick.open {
  background: var(--side-hover);
}

button.meeting-pick span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

button.meeting-pick .icon {
  color: var(--side-text);
  transition: transform 0.15s;
}

button.meeting-pick.open .icon {
  transform: rotate(180deg);
}

/* The menu is light, on the dark left: the page's own colours again. */
.menu {
  --text: #17252e;
  --muted: #6b7880;
  --soft: #eceff0;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  /* As wide as its longest item: over the middle, if the left is narrower. */
  width: max-content;
  min-width: 100%;
  max-width: calc(100vw - 32px);
  padding: 6px;
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-pop);
}

button.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

button.menu-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

button.menu-item .icon {
  color: #6b7880;
}

button.menu-item:hover {
  background: #eef2f2;
}

button.menu-item.danger,
button.menu-item.danger .icon {
  color: var(--danger-text);
}

button.menu-item.danger:hover {
  background: var(--danger-soft);
}

.menu-head {
  padding: 8px 10px 4px;
  color: #6b7880;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.menu-line {
  height: 1px;
  margin: 6px 4px;
  background: #e6e9e8;
}

.side-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  scrollbar-width: thin;
  scrollbar-color: var(--side-line) transparent;
}

/* A list's head: for the host, the button that makes a channel. */
.side-section {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  padding: 14px 0 2px 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--side-muted);
}

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

.side .side-section button.icon-button {
  min-width: 30px;
  min-height: 30px;
  padding: 0 5px;
  color: var(--side-text);
}

/* A channel: its name — a click shows it — and the host's buttons, under the pointer. The one shown is
   teal. */
.channel {
  display: flex;
  align-items: center;
  border-radius: 12px;
  color: var(--side-text);
}

.channel:hover {
  background: var(--side-hover);
  color: #fff;
}

.channel.active {
  background: var(--brand);
  color: var(--side-ink);
}

.channel.active .channel-name {
  font-weight: 700;
}

button.channel-open {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 10px 0 12px;
  background: transparent;
  color: inherit;
  text-align: left;
}

button.channel-open:hover {
  background: transparent;
}

.channel-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel .acts {
  display: none;
  gap: 2px;
  padding-right: 4px;
}

.channel:hover .acts,
.channel:focus-within .acts {
  display: flex;
}

.side .channel .acts button.icon-button {
  min-width: 30px;
  min-height: 30px;
  padding: 0 5px;
  color: inherit;
}

.side .channel.active .acts button.icon-button:hover {
  background: rgba(13, 29, 40, 0.14);
  color: var(--side-ink);
}

/* How many are in a voice channel: a round mark — navy on the teal of the channel shown. */
.count {
  flex: none;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--side-line);
  color: var(--side-text);
  font-size: 12px;
  font-weight: 700;
}

.channel.active .count {
  background: var(--side);
  color: var(--brand);
}

.member {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 6px 0 8px;
  border-radius: 12px;
}

.member:hover {
  background: var(--side-hover);
}

.member .name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #e6ecef;
}

/* Who speaks: a teal ring round the avatar. */
.member.speaking .avatar {
  box-shadow: 0 0 0 2px var(--side), 0 0 0 4px var(--brand);
}

.member .mark {
  display: flex;
  color: var(--side-text);
}

/* The host's buttons: under the pointer. */
.member .acts {
  display: none;
  gap: 2px;
}

.member:hover .acts,
.member:focus-within .acts {
  display: flex;
}

.member .acts button.icon-button,
.user-panel button.icon-button {
  min-width: 34px;
  min-height: 34px;
  padding: 0 6px;
}

.side .member .acts button.icon-button.lit {
  background: transparent;
  color: var(--brand);
}

.side .acts button.icon-button.danger {
  background: transparent;
  color: #ff8b7c;
}

.side .acts button.icon-button.danger:hover {
  background: var(--danger);
  color: #fff;
}

/* The call while the user reads another channel: a click back to it, its microphone, leaving it. On a wide
   screen above the user, on a phone above the middle. */
.call-strip {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
}

.side .call-strip {
  margin: 0 12px 8px;
  border-radius: 12px;
  background: var(--side-raise);
}

button.call-back {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 6px;
  background: transparent;
  color: var(--brand);
  text-align: left;
}

button.call-back:hover {
  background: transparent;
}

.call-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.call-text b {
  font-size: 14px;
}

.call-text small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
}

.side .call-strip button.icon-button.off,
.side .call-strip button.icon-button.danger {
  background: rgba(240, 90, 72, 0.16);
  color: #ff8b7c;
}

.side .call-strip button.icon-button.off:hover,
.side .call-strip button.icon-button.danger:hover {
  background: var(--danger);
  color: #fff;
}

.main .call-strip {
  display: none;
}

.user-panel {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 14px 8px 14px 14px;
  border-top: 1px solid var(--side-line);
}

/* The user: a click shows the name, the picture and the access code. */
button.me {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 2px 6px 2px 2px;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  text-align: left;
}

button.me:hover {
  background: var(--side-hover);
}

.me-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.me-text b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff;
}

.me-text small {
  font-size: 13px;
}

.side .state.on {
  color: var(--side-muted);
}

.side .state.on .dot {
  background: #00c9bb;
}

.side .user-panel button.icon-button {
  color: var(--side-text);
}

.side .user-panel button.icon-button.off {
  background: rgba(240, 90, 72, 0.16);
  color: #ff8b7c;
}

/* ---- the middle */

.main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.main-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: var(--head);
  padding: 8px 24px;
  border-bottom: 1px solid #efefec;
}

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

.head-title b {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  line-height: 1.3;
}

.head-title b span,
.crumb {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 2px 0 0 34px;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.crumbs .state {
  min-width: 0;
}

button.invite {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px 0 14px;
  font-weight: 600;
}

button.rec-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 18px;
  background: var(--danger-soft);
  color: var(--danger-text);
  font-size: 13px;
  font-weight: 600;
}

button.rec-badge:hover {
  background: #fbd7d1;
}

.main > .status {
  padding: 8px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--brand-soft);
  color: var(--text-2);
}

.main > .status.error {
  background: var(--danger-soft);
  color: var(--danger-text);
}

.main > .status:empty {
  display: none;
}

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

.empty {
  color: var(--muted);
  text-align: center;
  margin: auto;
  padding: 16px;
  font-size: 14px;
}

/* ---- a voice channel: how many are in it, who they are and joining it, or in the call its tiles and its
   bar. */

.voice {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.voice-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 24px 0;
  color: var(--text-2);
}

.voice-head .muted {
  font-size: 15px;
}

.lobby {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  text-align: center;
}

.lobby-faces {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.lobby-faces .avatar {
  box-shadow: 0 0 0 4px var(--bg);
}

.lobby-faces .avatar + .avatar {
  margin-left: -14px;
}

.lobby-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-text);
}

.lobby-more {
  margin-left: 10px;
  color: var(--muted);
  font-weight: 600;
}

.lobby-title {
  font-size: 22px;
}

.lobby-who {
  max-width: 520px;
  color: var(--muted);
}

button.join {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  margin-top: 10px;
  padding: 0 26px 0 22px;
}

/* ---- the tiles */

.people {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: 16px 24px 24px;
  display: flex;
}

/* More tiles than fit: rows that scroll, the scrollbar always there (its coming and going would change
   the width the tiles are laid out in). */
.people.scrolls {
  overflow-y: scroll;
}

/* The tiles fill their pane: as many to a row and as large as layout.ts finds for how many there are, the
   last row in the middle. A crowd's grid, taller than the pane, starts at its top and scrolls (`margin:
   auto` centres only what fits). */
.grid {
  margin: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

/* A tile: a soft card — the avatar in its middle, the name below — or, alone in the call, the avatar on
   the page itself. */
.tile {
  --gap: var(--panel);
  position: relative;
  flex: none;
  width: var(--tile-w, 220px);
  height: var(--tile-h, 160px);
  overflow: hidden;
  background: var(--panel);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 10px;
  text-align: center;
}

.grid.one .tile {
  --gap: var(--bg);
  background: transparent;
}

.ring {
  display: flex;
  border-radius: 50%;
  transition: box-shadow 0.15s;
}

/* Who speaks: a teal ring round the avatar, a gap of the tile's colour between. */
.tile.speaking .ring {
  box-shadow: 0 0 0 4px var(--gap), 0 0 0 8px var(--brand);
}

.tile .name {
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 600;
}

.tile .name span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.grid.compact .tile .name {
  font-size: 14px;
}

.talking {
  display: flex;
  color: var(--brand);
}

.talking path {
  transform-box: fill-box;
  transform-origin: center;
  animation: talk 0.9s ease-in-out infinite;
}

.talking path:nth-child(2) {
  animation-delay: 0.15s;
}

.talking path:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes talk {
  50% {
    transform: scaleY(0.55);
  }
}

.muted-mic {
  display: flex;
  color: var(--danger-text);
}

/* The host's buttons over the tile's corner; on small tiles only under the pointer, or once the tile is
   touched. */
.tile-acts {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
}

.tile-acts button.icon-button {
  min-width: 34px;
  min-height: 34px;
  padding: 0 7px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

.tile-acts button.icon-button.danger {
  color: var(--danger-text);
}

.tile-acts button.icon-button:hover {
  background: var(--soft);
}

.tile-acts button.icon-button.danger:hover {
  background: var(--danger);
  color: #fff;
}

.grid.compact .tile .tile-acts {
  display: none;
}

.grid.compact .tile:hover .tile-acts,
.grid.compact .tile.menu .tile-acts {
  display: flex;
}

/* A tile with a picture: the video fills it, the name over it; who speaks framed in teal. */
.tile.video {
  padding: 0;
  justify-content: flex-end;
  background: #0f1c24;
}

.tile.video.speaking {
  outline: 3px solid var(--brand);
  outline-offset: -3px;
}

.tile.video .video-box {
  position: absolute;
  inset: 0;
}

.tile.video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tile.video .name {
  position: relative;
  align-self: flex-start;
  margin: 10px;
  padding: 4px 10px;
  border-radius: 10px;
  background: rgba(15, 28, 36, 0.72);
  color: #fff;
  font-size: 14px;
}

.tile.video .talking {
  color: #3ee0d3;
}

video.mirror {
  transform: scaleX(-1);
}

/* A screen shown: the stage, each screen whole (letterboxed, never cropped), the tiles in a row below. */
.people.with-screen {
  flex-direction: column;
  gap: 12px;
}

.stage {
  flex: 1;
  min-height: 0;
  display: flex;
  gap: 12px;
}

.screen-tile {
  position: relative;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  background: #0f1c24;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.screen-tile .video-box {
  position: absolute;
  inset: 0;
}

.screen-tile video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.screen-tile .name {
  position: absolute;
  top: 10px;
  left: 10px;
  max-width: calc(100% - 20px);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 10px;
  background: rgba(15, 28, 36, 0.72);
  color: #fff;
  font-size: 14px;
}

.screen-tile .name span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screen-tile .empty {
  color: #c9d3d8;
}

.strip {
  flex: none;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  --tile-w: 176px;
  --tile-h: 116px;
  --avatar: 44px;
}

.strip .tile {
  gap: 8px;
}

.strip .tile .name {
  font-size: 14px;
}

.strip .tile-acts {
  display: none;
}

.strip .tile:hover .tile-acts,
.strip .tile.menu .tile-acts {
  display: flex;
}

/* The call's bar: round buttons over their names — grey, teal what is on, red the microphone off and
   leaving. */
.control-bar {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 28px;
  padding: 16px 16px 14px;
  border-top: 1px solid #e9ecec;
  background: #f4f6f6;
}

button.control {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 64px;
  min-height: 0;
  padding: 0;
  background: transparent;
  color: var(--text-2);
  font-size: 14px;
}

button.control:hover {
  background: transparent;
}

.control-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #e3e8e9;
  color: var(--text);
  transition: background-color 0.12s, color 0.12s;
}

button.control:hover .control-icon {
  background: #d8dfe1;
}

button.control.on .control-icon {
  background: var(--brand);
  color: #fff;
}

button.control.on:hover .control-icon {
  background: var(--brand-hi);
}

button.control.off .control-icon {
  background: var(--danger-soft);
  color: var(--danger-text);
}

button.control.off:hover .control-icon {
  background: #fbd1ca;
}

button.control.leave .control-icon {
  background: var(--danger);
  color: #fff;
}

button.control.leave:hover .control-icon {
  background: var(--danger-hi);
}

.control-icon .rec {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 12px;
  height: 12px;
  border: 2px solid #f4f6f6;
}

/* ---- the right: a voice channel's transcripts — how many, the button of a new one, each a card — or one
   of them, its lines as messages, a speaker's next ones under its first, those under way paler. */

.panel {
  width: 360px;
  flex: none;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border-left: 1px solid var(--line);
}

.transcript {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.transcript-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--head);
  padding: 8px 16px 8px 20px;
  border-bottom: 1px solid #e8ecea;
}

.transcript-head b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 20px;
}

.transcript-head b.grow {
  flex: 1;
}

.transcript-head b small {
  margin-left: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

/* One transcript: its number, and the buttons to download it and to stop or go on with it — a narrow
   panel's worth. */
.session-head {
  gap: 6px;
  padding-left: 10px;
}

.session-head b {
  font-size: 18px;
}

.session-head button.stop {
  background: var(--danger-soft);
  color: var(--danger-text);
}

.session-head button.stop:hover {
  background: #fbd1ca;
}

.pill {
  flex: none;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e2e9e9;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
}

button.new {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 0 18px 0 14px;
}

.writing {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 12px 0;
  padding: 10px 10px 10px 14px;
  border-radius: 14px;
  background: var(--danger-soft);
  color: var(--danger-text);
  font-size: 14px;
  font-weight: 600;
}

.writing span:nth-child(2) {
  flex: 1;
}

.writing button.small {
  background: var(--surface);
  color: var(--danger-text);
}

.sessions {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.session {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(23, 37, 46, 0.05);
  transition: box-shadow 0.12s;
}

.session:hover {
  box-shadow: var(--shadow);
}

button.session-open {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 10px 12px;
  background: transparent;
  text-align: left;
  white-space: normal;
}

button.session-open:hover {
  background: transparent;
}

.session-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
}

.session .meta {
  font-size: 14px;
  color: var(--muted);
}

.session button.small {
  background: #eef2f3;
}

.session button.small:hover {
  background: var(--soft-hi);
}

/* A transcript's lines: who and when, then the words. */
.messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.msg .who {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}

.msg.mine .who {
  color: var(--brand-text);
}

.msg .text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.line.same {
  margin-top: -6px;
}

/* Where another day of a transcript begins. */
.line-day {
  align-self: center;
  margin: 6px 0;
  padding: 2px 12px;
  border-radius: 10px;
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
}

.line .who time {
  margin-left: 4px;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}

.line.live .text {
  color: var(--muted);
  font-style: italic;
}

/* A transcript is written: a red dot that breathes — by the channel, over the middle, in the list, on the
   button of the transcript and at the transcript's head. */
.rec {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--muted);
}

.rec.on {
  background: var(--danger);
  animation: rec 1.6s ease-in-out infinite;
}

@keyframes rec {
  50% {
    opacity: 0.35;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rec.on,
  .talking path {
    animation: none;
  }
}

/* ---- the chat, as Discord's: a writer's messages under its picture and name, the next ones under the
   first; what one answers above it; its text, images and reactions; its acts under the pointer. */

.chat {
  position: relative;
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.chat > .messages {
  padding: 0 0 10px;
  gap: 0;
}

.channel-start {
  padding: 32px 24px 12px;
}

.channel-start-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-text);
}

.channel-start h2 {
  margin: 14px 0 4px;
  font-size: 24px;
}

.channel-start p {
  margin: 0;
  color: var(--muted);
}

.loading {
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.day-line {
  display: flex;
  align-items: center;
  margin: 20px 24px 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.day-line::before,
.day-line::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.day-line span {
  padding: 0 10px;
}

.msg-row {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  padding: 3px 64px 3px 24px;
}

.msg-row.head {
  margin-top: 14px;
}

.msg-row:hover,
.msg-row.selected,
.msg-row.picking {
  background: var(--row);
}

.msg-row.mentioned {
  background: var(--mention-bg);
  box-shadow: inset 3px 0 0 var(--mention-line);
}

.msg-row.flash {
  animation: flash 1.6s ease-out;
}

@keyframes flash {
  0%,
  35% {
    background: rgba(0, 184, 172, 0.18);
  }
}

.msg-row.pending {
  opacity: 0.6;
}

.msg-gutter {
  padding-top: 2px;
}

.msg-hour {
  display: block;
  visibility: hidden;
  padding-top: 3px;
  font-size: 11px;
  color: var(--muted);
}

.msg-row:hover .msg-hour,
.msg-row.selected .msg-hour {
  visibility: visible;
}

.msg-main {
  min-width: 0;
}

.msg-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 8px;
  line-height: 1.375;
}

.author {
  font-weight: 700;
  color: var(--text);
}

.author.host {
  color: #a8650c;
}

.author.moderator {
  color: #2f6fca;
}

.role-mark {
  align-self: center;
  display: flex;
  color: var(--muted);
}

.msg-head time {
  font-size: 12px;
  color: var(--muted);
}

.msg-text {
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.msg-text .rich {
  display: inline;
}

.msg-text .rich > p:last-child {
  display: inline;
}

.edited {
  margin-left: 4px;
  font-size: 11px;
  color: var(--muted);
}

/* The chat's Markdown. */
.rich p {
  margin: 0;
  white-space: pre-wrap;
}

.rich p + p {
  margin-top: 2px;
}

.rich code {
  padding: 0.1em 0.35em;
  border-radius: 5px;
  background: var(--code);
  color: #24333d;
  font: 0.875em/1.4 ui-monospace, "Cascadia Mono", Consolas, monospace;
}

.rich pre.code-block {
  margin: 6px 0;
  padding: 10px 12px;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f5f7f7;
}

.rich pre code {
  padding: 0;
  background: none;
  white-space: pre;
}

.rich blockquote {
  margin: 4px 0;
  padding: 0 0 0 12px;
  border-left: 4px solid #cfd8db;
  color: var(--text-2);
}

.rich h3,
.rich h4,
.rich h5 {
  margin: 8px 0 2px;
  line-height: 1.25;
}

.rich h3 {
  font-size: 1.5em;
}

.rich h4 {
  font-size: 1.25em;
}

.rich h5 {
  font-size: 1em;
}

.rich ul,
.rich ol {
  margin: 4px 0;
  padding-left: 24px;
}

.rich a,
.rich-line a {
  color: var(--link);
  text-decoration: none;
}

.rich a:hover {
  text-decoration: underline;
}

.spoiler {
  border-radius: 4px;
  background: #d7dee0;
  color: transparent;
  cursor: pointer;
}

.spoiler * {
  color: transparent !important;
  background: transparent !important;
}

.spoiler.open {
  background: var(--code);
  color: inherit;
  cursor: auto;
}

.spoiler.open * {
  color: inherit !important;
}

.mention {
  padding: 0 3px;
  border-radius: 4px;
  background: rgba(0, 184, 172, 0.14);
  color: #076d65;
  font-weight: 600;
}

.mention.me {
  background: #fde7a6;
  color: #7a4f00;
}

.rich.jumbo {
  display: block;
  font-size: 44px;
  line-height: 1.2;
}

/* Images: one as large as it fits, several in a grid. */
.gallery {
  margin-top: 6px;
  max-width: 100%;
}

.gallery .image {
  position: relative;
  display: block;
  min-height: 0;
  padding: 0;
  max-width: 100%;
  overflow: hidden;
  border-radius: 10px;
  background: var(--code);
  cursor: zoom-in;
}

.gallery.one .image img {
  display: block;
  width: 100%;
  height: auto;
}

.gallery.many {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  max-width: 400px;
}

.gallery.many.n3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gallery.many .image {
  aspect-ratio: 1;
}

.gallery.many img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gif {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(15, 28, 36, 0.7);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

/* Reactions. */
.reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

button.reaction {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
}

button.reaction:hover {
  border-color: var(--line-strong);
  background: var(--surface);
}

button.reaction.own {
  border-color: #7dd6cf;
  background: var(--brand-soft);
  color: #076d65;
}

.reaction-emoji {
  font-size: 16px;
  line-height: 1;
}

button.reaction.add {
  opacity: 0;
  color: var(--muted);
}

.msg-row:hover button.reaction.add,
.msg-row.selected button.reaction.add {
  opacity: 1;
}

/* A message's acts, over its corner. */
.msg-acts {
  position: absolute;
  top: -16px;
  right: 24px;
  z-index: 2;
  display: none;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.msg-row:hover .msg-acts,
.msg-row.selected .msg-acts,
.msg-row.picking .msg-acts {
  display: flex;
}

.msg-acts button.icon-button,
.msg-acts button.quick {
  min-width: 34px;
  min-height: 34px;
  padding: 0 6px;
  border-radius: 9px;
}

.msg-acts button.quick {
  background: transparent;
  font-size: 17px;
}

.msg-acts button.quick:hover {
  background: var(--soft);
}

.msg-acts button.icon-button.danger {
  background: transparent;
  color: var(--danger-text);
}

.msg-acts button.icon-button.danger:hover {
  background: var(--danger);
  color: #fff;
}

.msg-picker {
  position: absolute;
  top: 22px;
  right: 24px;
  z-index: 20;
}

/* What a message answers, above it. */
button.quoted {
  position: relative;
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 0;
  padding: 0 0 4px 72px;
  overflow: hidden;
  background: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  text-align: left;
}

button.quoted:hover {
  background: none;
  color: var(--text);
}

.quoted-spine {
  position: absolute;
  top: 8px;
  left: 44px;
  width: 26px;
  height: 12px;
  border-top: 2px solid #cdd6d9;
  border-left: 2px solid #cdd6d9;
  border-top-left-radius: 6px;
}

.quoted .avatar {
  font-size: 8px;
}

.quoted .author {
  flex: none;
}

.quoted-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quoted-text i {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.edit-box textarea {
  width: 100%;
  margin-top: 2px;
  padding: 9px 12px;
  resize: none;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  outline: none;
  background: var(--surface);
  color: inherit;
  font: inherit;
  line-height: 1.45;
}

.edit-box textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 184, 172, 0.16);
}

.edit-box small {
  color: var(--muted);
  font-size: 12px;
}

.edit-box small button {
  min-height: 0;
  padding: 0;
  background: none;
  color: var(--link);
  font-weight: 500;
}

button.to-newest {
  position: absolute;
  left: 50%;
  bottom: 112px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 18px;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  transform: translateX(-50%);
  box-shadow: var(--shadow-pop);
}

button.to-newest:hover {
  background: var(--brand-hi);
}

.typing {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 22px;
  padding: 0 24px;
  color: var(--muted);
  font-size: 12px;
}

.dots {
  display: inline-flex;
  gap: 3px;
}

.dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted);
  animation: dot 1.2s infinite ease-in-out;
}

.dots i:nth-child(2) {
  animation-delay: 0.15s;
}

.dots i:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes dot {
  0%,
  60%,
  100% {
    opacity: 0.3;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

/* Where the user writes: a white box on the page. */
.composer-wrap {
  position: relative;
  padding: 0 24px 20px;
}

.composer {
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(23, 37, 46, 0.04);
  transition: border-color 0.12s, box-shadow 0.12s;
}

.composer:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 184, 172, 0.14);
}

.composer-reply {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px 4px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

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

.composer-reply b {
  color: var(--text);
}

.composer-reply button.icon-button {
  min-width: 30px;
  min-height: 30px;
  padding: 0 5px;
}

.attachments {
  display: flex;
  gap: 8px;
  padding: 10px 10px 4px;
  overflow-x: auto;
}

.attachment {
  position: relative;
  flex: none;
  width: 112px;
  height: 112px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--code);
}

.attachment img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.attachment-wait {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--muted);
}

.attachment-name {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 10px 6px 3px;
  overflow: hidden;
  background: linear-gradient(transparent, rgba(15, 28, 36, 0.75));
  color: #fff;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-progress {
  position: absolute;
  right: 8px;
  bottom: 24px;
  left: 8px;
  height: 4px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(15, 28, 36, 0.45);
}

.attachment-progress span {
  display: block;
  height: 100%;
  background: var(--brand);
  transition: width 0.2s;
}

.gallery .attachment-progress {
  bottom: 8px;
}

.attachment.failed {
  outline: 2px solid var(--danger);
  outline-offset: -2px;
}

.attachment-error {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  background: rgba(253, 230, 226, 0.92);
  color: var(--danger-text);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

button.attachment-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
  padding: 0;
  border-radius: 12px;
  background: rgba(15, 28, 36, 0.65);
  color: #fff;
}

button.attachment-remove:hover {
  background: var(--danger);
}

.composer-row {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  padding: 3px 6px;
}

.composer-row textarea {
  flex: 1;
  min-width: 0;
  min-height: 46px;
  padding: 12px 6px;
  resize: none;
  border: 0;
  outline: none;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: 1.375;
}

.composer-row button.icon-button {
  min-width: 40px;
  min-height: 46px;
}

.composer-row button.send {
  color: var(--brand);
}

.composer-row button.send:hover {
  background: var(--brand-soft);
  color: var(--brand-text);
}

.composer-row button.send.off {
  opacity: 0.45;
}

.composer-emoji {
  position: relative;
}

/* The emoji picker. */
.emoji-picker {
  z-index: 20;
  display: flex;
  flex-direction: column;
  width: 352px;
  height: 400px;
  max-width: calc(100vw - 24px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-pop);
}

.emoji-picker.above {
  position: absolute;
  right: -44px;
  bottom: 52px;
}

.emoji-search {
  width: auto;
  min-height: 38px;
  margin: 8px;
}

.emoji-tabs {
  display: flex;
  gap: 2px;
  padding: 0 6px 6px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}

.emoji-tabs button {
  flex: none;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 8px;
  background: transparent;
  font-size: 18px;
}

.emoji-tabs button:hover {
  background: var(--soft);
}

.emoji-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0 8px 8px;
}

.emoji-group {
  position: sticky;
  top: 0;
  padding: 8px 2px 4px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(36px, 1fr));
}

button.emoji-cell {
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 8px;
  background: transparent;
  font-size: 22px;
}

button.emoji-cell:hover {
  background: var(--soft);
}

.emoji-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 4px 12px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.emoji-big {
  font-size: 24px;
}

.emoji-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.emoji-foot code {
  color: var(--muted);
}

/* What the box offers: users to name, emoji. */
.offer {
  position: absolute;
  right: 24px;
  bottom: calc(100% - 12px);
  left: 24px;
  z-index: 15;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-pop);
}

.offer-head {
  padding: 2px 8px 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

button.offer-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 36px;
  padding: 0 8px;
  border-radius: 9px;
  background: transparent;
  text-align: left;
}

button.offer-item.on,
button.offer-item:hover {
  background: var(--brand-soft);
}

.drop-hint {
  position: absolute;
  inset: 8px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 2px dashed var(--brand);
  border-radius: 16px;
  background: rgba(252, 252, 249, 0.94);
  color: var(--brand-text);
  pointer-events: none;
}

.drop-hint span {
  color: var(--muted);
  font-size: 13px;
}

/* ------------------------------------------------------------ over the page */

/* An image whole, over the page — dark, as images look best. */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 19, 25, 0.9);
}

.lightbox img {
  max-width: 92vw;
  max-height: calc(100dvh - 120px);
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.lightbox-bar {
  position: fixed;
  bottom: 16px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100vw - 24px);
  padding: 4px 6px 4px 14px;
  border-radius: 14px;
  background: var(--side);
  color: #fff;
  transform: translateX(-50%);
}

.lightbox-name {
  max-width: 40vw;
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lightbox-bar .muted {
  color: var(--side-muted);
  font-size: 13px;
  white-space: nowrap;
}

.lightbox-bar button.icon-button,
.lightbox-bar a.icon-button {
  color: var(--side-text);
}

.lightbox-bar button.icon-button:hover,
.lightbox-bar a.icon-button:hover {
  background: var(--side-hover);
  color: #fff;
}

a.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  border-radius: 10px;
  color: var(--muted);
}

a.icon-button:hover {
  background: var(--soft);
  color: var(--text);
}

button.lightbox-go {
  position: fixed;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 48px;
  padding: 0;
  border-radius: 24px;
  background: rgba(23, 37, 46, 0.85);
  color: #fff;
  transform: translateY(-50%);
}

button.lightbox-go:hover {
  background: var(--side-hover);
}

button.lightbox-go.prev {
  left: 16px;
}

button.lightbox-go.next {
  right: 16px;
}

/* Dialogs. */
.dialog-back {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 28, 36, 0.45);
}

.dialog {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 460px;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 24px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-pop);
}

.dialog h2 {
  margin: 0;
  font-size: 20px;
}

.dialog p {
  margin: 0;
  color: var(--muted);
}

.dialog label {
  color: var(--muted);
  font-size: 14px;
}

.dialog-quote {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--panel);
}

.dialog-quote b {
  flex: none;
  white-space: nowrap;
}

.dialog-quote span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dialog-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

.profile {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile-picture.busy {
  opacity: 0.5;
}

.profile-acts {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.profile-acts small {
  font-size: 12px;
}

.invite-qr {
  padding: 8px;
  border-radius: 14px;
  background: var(--panel);
}

.invite-qr svg {
  width: 200px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

/* ------------------------------------------------------------ the documents */

/* The first visit: the documents accepted — two marks — before anything else. */
.welcome p {
  margin: 0;
  color: var(--text-2);
}

.welcome p.note {
  color: var(--muted);
  font-size: 13px;
}

label.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.4;
  cursor: pointer;
}

label.check input {
  flex: none;
  width: 20px;
  min-height: 0;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--brand);
}

.welcome a,
.legal-links a,
.profile-legal a {
  color: var(--link);
  text-decoration: none;
}

.welcome a:hover,
.legal-links a:hover,
.profile-legal a:hover {
  text-decoration: underline;
}

/* The documents' links, under the start card and in the profile. */
.legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 16px;
  max-width: 440px;
  margin: 16px 0 0;
  font-size: 13px;
  text-align: center;
}

.profile-legal {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

/* A document's own page (web/legal): the logo, the text, the other documents. */
body.doc-page {
  height: auto;
  min-height: 100%;
}

.doc-head {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px 20px 0;
}

.doc-head img {
  display: block;
  width: auto;
  height: 32px;
}

.doc {
  max-width: 800px;
  margin: 0 auto;
  padding: 16px 20px 48px;
  line-height: 1.6;
}

.doc h1 {
  margin: 16px 0 4px;
  font-size: 30px;
  line-height: 1.25;
}

.doc h2 {
  margin: 32px 0 8px;
  font-size: 20px;
}

.doc p,
.doc li {
  color: var(--text-2);
}

.doc ol,
.doc ul {
  padding-left: 24px;
}

.doc li + li {
  margin-top: 4px;
}

.doc a {
  color: var(--link);
}

.doc-meta {
  margin: 0 0 24px;
  color: var(--muted);
}

.doc-foot {
  max-width: 800px;
  margin: 0 auto;
  padding: 16px 20px 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.doc-foot a {
  color: var(--link);
}

/* ------------------------------------------------------------ a narrow window, a tablet: the left takes
   less, and there is no panel on the right — a voice channel's transcripts take the middle, below whom it
   has, or in the call the tiles' place when asked for. */
@media (max-width: 1100px) {
  .side {
    width: 256px;
  }

  /* The user's name keeps its room: the profile opens by the name and the settings. */
  .user-panel .more {
    display: none;
  }

  .main-head {
    padding: 8px 16px;
  }

  .people {
    padding: 12px 16px 16px;
  }

  .control-bar {
    gap: 14px;
  }

  .lobby {
    flex: none;
    padding: 20px 16px 16px;
  }

  .view-voice .transcript {
    flex: 1;
    min-height: 0;
    margin: 0 16px 16px;
    border-radius: 16px;
    background: var(--panel);
  }

  .in-call .voice > .transcript {
    flex: 1;
    min-height: 0;
    background: var(--panel);
  }
}

/* ------------------------------------------------------------ a phone: one pane at a time; the channels
   and participants over the page. */
@media (max-width: 720px) {
  :root {
    --head: 60px;
  }

  .only-phone {
    display: inline-flex !important;
  }

  .side {
    position: fixed;
    inset: 0;
    z-index: 10;
    width: auto;
    display: none;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  }

  .meeting.pane-members .side {
    display: flex;
  }

  .side-brand {
    padding-left: 20px;
  }

  /* The account's spaces: the title over when — both whole. */
  button.meeting-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .main-head {
    gap: 4px;
    padding: 6px 8px 6px 4px;
  }

  .head-title b {
    gap: 8px;
    font-size: 17px;
  }

  .head-title b .icon {
    width: 20px;
    height: 20px;
  }

  .crumbs {
    margin-left: 28px;
    font-size: 12px;
  }

  .crumb,
  .crumbs > .icon,
  .rec-badge .label,
  .invite .label {
    display: none;
  }

  button.invite {
    min-width: 44px;
    padding: 0 10px;
  }

  .main .call-strip {
    display: flex;
    border-bottom: 1px solid var(--line);
    background: var(--brand-soft);
  }

  .main .call-strip button.call-back {
    color: var(--brand-text);
  }

  .voice-head {
    padding: 14px 16px 0;
  }

  .lobby-faces .avatar {
    --avatar: 56px !important;
  }

  .view-voice .transcript {
    margin: 0 8px 8px;
  }

  .transcript-head {
    min-height: 56px;
    padding: 6px 8px 6px 16px;
  }

  .transcript-head b {
    font-size: 17px;
  }

  .people {
    padding: 8px 12px 12px;
  }

  .control-bar {
    gap: 6px;
    padding: 10px 6px 8px;
  }

  button.control {
    min-width: 58px;
    font-size: 11px;
    gap: 6px;
  }

  .control-icon {
    width: 50px;
    height: 50px;
  }

  .messages {
    padding: 12px;
  }

  .chat > .messages {
    padding: 0 0 8px;
  }

  .day-line {
    margin: 18px 12px 4px;
  }

  .channel-start {
    padding: 24px 12px 12px;
  }

  .msg-row {
    grid-template-columns: 48px minmax(0, 1fr);
    padding: 3px 10px 3px 12px;
  }

  .msg-acts {
    right: 10px;
  }

  button.quoted {
    padding-left: 60px;
  }

  .quoted-spine {
    left: 32px;
    width: 24px;
  }

  .typing {
    padding: 0 12px;
  }

  .composer-wrap {
    padding: 0 8px 8px;
  }

  .offer {
    right: 8px;
    left: 8px;
  }

  .emoji-picker.above,
  .msg-picker .emoji-picker {
    position: fixed;
    right: 8px;
    bottom: 76px;
    left: 8px;
    width: auto;
    max-width: none;
    height: min(400px, 60dvh);
  }

  .msg-picker {
    position: static;
  }

  button.to-newest {
    bottom: 92px;
  }

  /* No pointer to hover with: no emoji's name under it. */
  .emoji-foot {
    display: none;
  }

  /* No pointer to hover with: the host's buttons always there. */
  .member .acts,
  .channel .acts {
    display: flex;
  }

  .dialog {
    padding: 20px;
  }
}
