:root {
  --teal: #008069;
  --teal-dark: #005c4b;
  --panel: #ffffff;
  --panel-soft: #f0f2f5;
  --thread-bg: #efeae2;
  --bubble-in: #ffffff;
  --bubble-out: #d9fdd3;
  --text: #111b21;
  --text-soft: #667781;
  --line: #e9edef;
  --danger: #d33a3a;
  --radius: 12px;
  --bar-h: 56px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--panel-soft);
  -webkit-tap-highlight-color: transparent;
}

.sprite { display: none; }

.i {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.icon-btn {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
}

.icon-btn:hover { background: rgba(0, 0, 0, 0.06); }
.icon-btn.danger { color: var(--danger); }
.icon-btn.on { color: var(--teal-dark); }
.icon-btn--sm { width: 34px; height: 34px; }
.icon-btn--sm .i { width: 18px; height: 18px; }

.send {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  cursor: pointer;
  overflow: visible;
}

.send:disabled { opacity: 0.5; cursor: default; }

.send__ring {
  position: absolute;
  inset: -3px;
  width: 50px;
  height: 50px;
  transform: rotate(-90deg);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.send.cooling .send__ring { opacity: 1; }

.send__track,
.send__arc {
  fill: none;
  stroke-width: 3;
}

.send__track { stroke: rgba(255, 255, 255, 0.25); }

.send__arc {
  stroke: #fff;
  stroke-linecap: round;
  stroke-dasharray: 119.4;
  stroke-dashoffset: 0;
}

.composer.cooling {
  animation: composer-pulse 1s ease-in-out infinite;
}

.composer.cooling textarea {
  opacity: 0.72;
}

@keyframes composer-pulse {
  0%, 100% { filter: none; }
  50% { filter: drop-shadow(0 0 0 1px rgba(211, 58, 58, 0.35)); }
}

.composer.shake {
  animation: composer-shake 0.4s ease;
}

@keyframes composer-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

.flood {
  flex: none;
  height: 3px;
  background: rgba(211, 58, 58, 0.15);
  overflow: hidden;
}

.flood__fill {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: left center;
  background: linear-gradient(90deg, #e07a3a, var(--danger));
  transform: scaleX(1);
}

.layout {
  display: flex;
  height: 100dvh;
  overflow: hidden;
}

/* ---------- sidebar ---------- */

.sidebar {
  position: fixed;
  z-index: 40;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(84vw, 320px);
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border-right: 1px solid var(--line);
  transform: translateX(-100%);
  transition: transform 0.22s ease;
  padding-top: env(safe-area-inset-top);
}

.layout.drawer-open .sidebar { transform: none; }

.sidebar__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--bar-h);
  padding: 0 8px 0 16px;
  background: var(--panel-soft);
}

.sidebar__tools { display: flex; align-items: center; }

.search {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 6px 8px 12px;
  background: var(--panel-soft);
}

.search__icon {
  width: 16px;
  height: 16px;
  color: var(--text-soft);
  flex: none;
}

.search input {
  flex: 1;
  min-width: 0;
  height: 34px;
  border: 0;
  border-radius: 17px;
  padding: 0 12px;
  background: #fff;
  outline: none;
}

.search input::-webkit-search-cancel-button { display: none; }

.search__mark {
  display: flex;
  align-items: center;
  height: 28px;
  padding: 8px 16px 0;
  color: var(--text-soft);
  list-style: none;
}

.search__mark .i { width: 14px; height: 14px; }

.search__empty {
  display: grid;
  place-items: center;
  padding: 36px 16px;
  color: var(--text-soft);
  list-style: none;
}

.brand {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--teal-dark);
}

.me {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.me:hover { background: var(--panel-soft); }

.me strong {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.me__edit { margin-left: auto; color: var(--text-soft); }

.avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-weight: 600;
  text-transform: uppercase;
  overflow: hidden;
}

.avatar--lg { width: 72px; height: 72px; font-size: 28px; }
.avatar--sm { width: 28px; height: 28px; font-size: 12px; }

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

.avatar--channel { background: var(--teal-dark); }

.channels {
  flex: 1;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  overflow-y: auto;
}

.channels li {
  position: relative;
  display: flex;
  align-items: stretch;
}

.channels li .channel { flex: 1; min-width: 0; }

.channel__edit {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  margin: 4px 8px 4px 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
}

.channel__edit:hover { background: rgba(0, 0, 0, 0.06); color: var(--teal-dark); }
.channel__edit .i { width: 16px; height: 16px; }

.sidebar__add {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--teal-dark);
  cursor: pointer;
}

.sidebar__add:hover { background: var(--panel-soft); }

.channel {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 16px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.channel:hover { background: var(--panel-soft); }
.channel.active { background: #e9f3ef; }

.channel__body { flex: 1; min-width: 0; }

.channel__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.channel__name {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  font-weight: 600;
}

.channel__pin {
  flex: none;
  width: 13px;
  height: 13px;
  color: var(--teal);
}

.channel__time,
.channel__preview {
  color: var(--text-soft);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel__time { font-size: 12px; flex: none; }
.search__where { max-width: 46%; }

.channel__dot {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--teal);
}

.scrim {
  position: fixed;
  inset: 0;
  z-index: 35;
  background: rgba(0, 0, 0, 0.4);
}

/* ---------- chat ---------- */

.chat {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  background: var(--thread-bg);
}

.chat__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  height: calc(var(--bar-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 12px 0 6px;
  background: var(--panel-soft);
  border-bottom: 1px solid var(--line);
}

.chat__meta { flex: 1; min-width: 0; }

.chat__meta h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.online {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-soft);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.sidebar__top .online { margin-right: auto; margin-left: 10px; }

.online__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #25d366;
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.2);
}

.pins {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.pins::-webkit-scrollbar { display: none; }

.pin {
  flex: 0 1 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: min(240px, 70%);
  height: 22px;
  padding: 0 8px 0 6px;
  border: 0;
  border-radius: 11px;
  background: #e7f6f2;
  color: var(--teal-dark);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.pin .i { width: 12px; height: 12px; flex: none; }

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

.thread {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  background-image: radial-gradient(rgba(0, 0, 0, 0.045) 1px, transparent 1px);
  background-size: 22px 22px;
}

.thread__inner {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 100%;
  justify-content: flex-end;
  padding: 12px 8px 16px;
}

.thread-item {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.sub-replies {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: calc(100% - 30px);
  margin: 3px 0 6px 30px;
  padding-left: 8px;
  border-left: 2px solid rgba(0, 128, 105, 0.22);
}

.replies-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
  margin: 2px 0 2px 30px;
  padding: 2px 4px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-soft);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.replies-toggle:hover,
.replies-toggle:focus-visible {
  color: var(--teal-dark);
  outline: none;
}

.replies-toggle__icon {
  width: 16px;
  height: 16px;
  transition: transform 0.15s ease;
}

.replies-toggle.is-open .replies-toggle__icon {
  transform: rotate(180deg);
}

.sub-replies .msg {
  max-width: min(88%, 500px);
  padding: 5px 7px 4px;
  border-radius: 9px;
  font-size: 12.5px;
  box-shadow: 0 1px 0 rgba(11, 20, 26, 0.1);
}

.sub-replies .msg.start { margin-top: 2px; }

.day {
  align-self: center;
  margin: 12px 0 6px;
  padding: 5px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-soft);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.msg {
  position: relative;
  align-self: flex-start;
  max-width: min(78%, 560px);
  padding: 6px 9px 7px;
  border-radius: var(--radius);
  background: var(--bubble-in);
  box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13);
  word-wrap: break-word;
}

.msg.mine { align-self: flex-end; background: var(--bubble-out); }
.msg.start { margin-top: 8px; border-top-left-radius: 2px; }
.msg.mine.start { border-top-left-radius: var(--radius); border-top-right-radius: 2px; }
.msg.pending { opacity: 0.65; }
.msg.failed { background: #ffe0e0; }
.msg--hit { animation: msg-hit 1.6s ease; }

@keyframes msg-hit {
  0%, 40% { box-shadow: 0 0 0 3px rgba(0, 128, 105, 0.45); }
  100% { box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13); }
}

.msg__author {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--author, var(--teal));
}

.msg__author .avatar { box-shadow: 0 0 0 2px var(--thread-bg); }

.msg__author--sub {
  display: block;
  margin-bottom: 1px;
  font-size: 11px;
  line-height: 1.2;
}

.msg__reply-to {
  display: block;
  margin-bottom: 2px;
  color: var(--text-soft);
  font-size: 10px;
  line-height: 1.2;
}

.msg__text {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.35;
}

.msg__text a { color: #027eb5; }

.msg.flash {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.msg__quote {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  margin: 0 0 6px;
  padding: 6px 8px;
  border: 0;
  border-left: 3px solid var(--teal);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.06);
  text-align: left;
  cursor: pointer;
  color: inherit;
}

.msg.mine .msg__quote { background: rgba(0, 0, 0, 0.08); }

.msg__quote strong {
  font-size: 12px;
  color: var(--teal-dark);
}

.msg__quote span {
  font-size: 12.5px;
  color: var(--text-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msg__actions {
  display: flex;
  align-items: center;
  gap: 1px;
  margin-top: 2px;
  justify-content: flex-end;
}

.msg:not(.mine) .msg__actions { justify-content: flex-start; }

.msg__action {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
}

.msg__action:hover { background: rgba(0, 0, 0, 0.06); color: var(--teal-dark); }
.msg__action.danger:hover { color: var(--danger); }
.msg__action .i { width: 13px; height: 13px; }

.msg__reaction {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 24px;
  height: 24px;
  padding: 0 4px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
}

.msg__reaction:disabled { opacity: 0.5; }
.msg__reaction:hover { background: rgba(0, 0, 0, 0.06); }
.msg__reaction.on[data-reaction="like"] { background: rgba(0, 128, 105, 0.12); color: var(--teal-dark); }
.msg__reaction.on[data-reaction="dislike"] { background: rgba(211, 58, 58, 0.1); color: var(--danger); }
.msg__reaction .i { width: 12px; height: 12px; }
.msg__reaction span { min-width: 5px; font-size: 10px; font-weight: 650; line-height: 1; }

.sub-replies .msg__actions { margin-top: 0; }
.sub-replies .msg__action,
.sub-replies .msg__reaction { height: 21px; min-width: 21px; }
.sub-replies .msg__action { width: 21px; }

.reply-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  padding: 8px 10px 0;
  background: var(--panel-soft);
  border-top: 1px solid var(--line);
}

.reply-bar__body {
  flex: 1;
  min-width: 0;
  padding: 6px 10px;
  border-left: 3px solid var(--teal);
  border-radius: 6px;
  background: var(--panel);
}

.reply-bar__body strong {
  display: block;
  font-size: 12.5px;
  color: var(--teal-dark);
}

.reply-bar__body span {
  display: block;
  font-size: 13px;
  color: var(--text-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cookie {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(11, 20, 26, 0.55);
}

.cookie__card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 28px;
  background: var(--panel);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.cookie__mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #f3e0b8;
  color: #8a5a12;
}

.cookie__mark .i { width: 24px; height: 24px; }

.msg__file {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  font-variant-numeric: tabular-nums;
}

.msg__time .i { width: 14px; height: 14px; }

.msg__time {
  float: right;
  margin: 8px 0 -2px 8px;
  font-size: 11px;
  color: var(--text-soft);
}

.msg__media { margin: -2px -3px 2px; }

.msg__media img,
.msg__media video {
  display: block;
  width: 100%;
  max-width: 320px;
  max-height: 60vh;
  border-radius: 8px;
  background: #d9d9d9;
  object-fit: cover;
  cursor: pointer;
}

.msg__media audio {
  display: block;
  width: min(260px, 62vw);
  height: 40px;
  margin: 2px 0;
}

.msg__caption { margin: 4px 0 0; white-space: pre-wrap; }

.jump {
  position: absolute;
  right: 14px;
  bottom: 84px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border: 0;
  border-radius: 20px;
  background: var(--panel);
  color: var(--teal-dark);
  box-shadow: 0 2px 8px rgba(11, 20, 26, 0.2);
  cursor: pointer;
}

/* ---------- composer ---------- */

.emoji-picker {
  flex: none;
  margin: 0 8px 4px;
  padding: 6px 8px 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 -2px 14px rgba(11, 20, 26, 0.1);
}

.emoji-picker__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  padding-left: 6px;
  color: var(--text-soft);
  font-size: 13px;
}

.emoji-picker__grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(34px, 1fr));
  gap: 2px;
  max-height: 196px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.emoji-picker__item {
  display: grid;
  place-items: center;
  min-width: 0;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.emoji-picker__item:hover,
.emoji-picker__item:focus-visible {
  background: var(--panel-soft);
  outline: none;
}

.composer,
.recorder {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  flex: none;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  background: var(--panel-soft);
}

.composer textarea {
  flex: 1;
  max-height: 120px;
  min-height: 44px;
  padding: 11px 14px;
  border: 0;
  border-radius: 22px;
  background: var(--panel);
  resize: none;
  outline: none;
  line-height: 1.3;
}

@media (max-width: 420px) {
  .emoji-picker__grid { grid-template-columns: repeat(7, minmax(34px, 1fr)); }
  .composer { gap: 2px; }
  .composer > .icon-btn { width: 36px; }
}

.recorder { align-items: center; }

.recorder__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--danger);
  animation: pulse 1.2s infinite;
}

@keyframes pulse { 50% { opacity: 0.25; } }

.recorder__time { font-variant-numeric: tabular-nums; font-weight: 600; }
.recorder__spacer { flex: 1; }

.sheet {
  flex: none;
  padding: 10px 10px 0;
  background: var(--panel);
  border-top: 1px solid var(--line);
}

.sheet__preview {
  display: grid;
  place-items: center;
  max-height: 34vh;
  overflow: hidden;
  border-radius: 8px;
  background: var(--panel-soft);
}

.sheet__preview img,
.sheet__preview video {
  max-width: 100%;
  max-height: 34vh;
  border-radius: 8px;
}

.sheet__preview .file-chip {
  padding: 22px 16px;
  color: var(--text-soft);
  text-align: center;
}

.sheet__row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
}

.sheet__row input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  border: 0;
  border-radius: 22px;
  background: var(--panel-soft);
  outline: none;
}

.sheet__progress {
  height: 3px;
  margin: 0 0 8px;
  border-radius: 2px;
  background: var(--line);
  overflow: hidden;
}

.sheet__progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--teal);
  transition: width 0.15s linear;
}

/* ---------- overlays ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(11, 20, 26, 0.55);
}

.modal__card {
  display: flex;
  flex-direction: column;
  width: min(380px, 100%);
  padding: 24px;
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.modal__mark {
  align-self: center;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
}

.modal__mark .i { width: 28px; height: 28px; }

.modal__avatar {
  position: relative;
  align-self: center;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.modal__avatar-badge {
  position: absolute;
  right: -2px;
  bottom: -2px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  box-shadow: 0 0 0 3px var(--panel);
}

.modal__avatar-badge .i { width: 14px; height: 14px; }

.modal__card input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
  outline: none;
}

.modal__card input:focus { border-color: var(--teal); }
.modal__card input.is-invalid { border-color: var(--danger); }

.modal__second { margin-top: 10px !important; }

.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.92);
}

.lightbox img,
.lightbox video {
  max-width: 100%;
  max-height: 100%;
  border-radius: 6px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(90px + env(safe-area-inset-bottom));
  z-index: 80;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(17, 27, 33, 0.94);
  color: #fff;
  transform: translateX(-50%);
}

.empty {
  align-self: center;
  margin: auto 0;
  padding: 24px;
  color: var(--text-soft);
}

.empty .i { width: 36px; height: 36px; }

/* ---------- desktop ---------- */

@media (min-width: 900px) {
  .sidebar {
    position: static;
    transform: none;
    width: 340px;
  }

  .sidebar__close,
  .chat__menu,
  .scrim {
    display: none !important;
  }

  .thread__inner { padding: 16px 5% 20px; }
}
