.admin-page {
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: 20px;
  background: var(--canvas) url("/assets/contours.png") center / 940px;
}
.admin-card {
  width: min(100%, 395px);
  padding: clamp(24px, 5vw, 36px);
  background: var(--side);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 650;
}
.admin-card h1 {
  margin: 30px 0 16px;
  font-size: 22px;
}
#admin-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.admin-back {
  display: inline-flex;
  margin-top: 22px;
  color: var(--mint);
  font-size: 13px;
}
:root {
  color-scheme: dark;
  --rail: #111516;
  --side: #191d1f;
  --canvas: #141819;
  --surface: #222729;
  --raised: #292f31;
  --line: #303537;
  --text: #f0f2ef;
  --muted: #9ba4a5;
  --quiet: #828d8f;
  --mint: #86e9b8;
  --active: #263b32;
  --green-text: #b2f0cf;
  --font:
    Inter, "DM Sans", "Segoe UI", "Microsoft YaHei UI", "PingFang SC",
    sans-serif;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
body {
  font-family: var(--font);
  background: var(--canvas);
  color: var(--text);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
button,
input,
textarea {
  font: inherit;
  color: inherit;
}
button {
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
}
button {
  transition:
    background-color 0.16s,
    color 0.16s,
    border-color 0.16s;
}
input,
textarea {
  min-width: 0;
}
::selection {
  background: #476b58;
  color: white;
}
* {
  scrollbar-width: thin;
  scrollbar-color: #3b4243 transparent;
}
button:active:not(:disabled) {
  filter: brightness(0.93);
}
#app {
  display: grid;
  grid-template-columns: 72px clamp(288px, 24vw, 360px) minmax(0, 1fr);
  width: 100%;
  height: 100%;
  height: 100dvh;
  isolation: isolate;
}
.ico {
  width: 21px;
  height: 21px;
  display: block;
  flex: none;
}
.icon-button,
.nav-item,
.send,
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.icon-button {
  width: 38px;
  height: 38px;
  color: var(--muted);
  border-radius: 10px;
}
.icon-button:hover,
.nav-item:hover {
  color: var(--text);
  background: var(--raised);
}
.rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--rail);
  border-right: 1px solid var(--line);
  padding: 22px 0 17px;
}
.brand-mark,
.brand-mark img {
  width: 38px;
  height: 38px;
  display: block;
}
.brand-mark {
  border-radius: 12px;
}
.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding-top: 40px;
}
.nav-item {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  color: #929d9d;
}
.nav-item .ico {
  width: 22px;
  height: 22px;
}
.nav-item.active {
  background: #24392f;
  color: var(--mint);
}
.nav-item.active:before {
  content: "";
  position: absolute;
  left: -14px;
  height: 21px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--mint);
}
.rail-foot {
  margin-top: auto;
}
.sidebar {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--side);
  border-right: 1px solid var(--line);
}
.side-head {
  height: 84px;
  flex: none;
  padding: 0 21px 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.side-head h1 {
  margin: 0;
  letter-spacing: -1.45px;
  font-size: 29px;
  line-height: 1;
  font-weight: 690;
}
.brand-dot {
  color: var(--mint);
}
.compose-new {
  background: #252a2c;
  border: 1px solid #353a3b;
  width: 32px;
  height: 32px;
  border-radius: 9px;
}
.compose-new .ico {
  width: 17px;
  height: 17px;
}
.side-controls {
  padding: 0 18px;
}
.search-box {
  height: 39px;
  border: 1px solid #343a3b;
  background: #212628;
  border-radius: 10px;
  display: flex;
  align-items: center;
  padding: 0 11px;
  gap: 9px;
  color: #8e999a;
}
.search-box:focus-within {
  border-color: #658e78;
}
.search-box .ico {
  width: 17px;
  height: 17px;
}
.search-box input,
.search-strip input {
  background: transparent;
  border: 0;
  outline: 0;
  flex: 1;
  width: 100%;
  font-size: 13px;
}
.search-box input:focus-visible,
.search-strip input:focus-visible {
  outline: none;
}
input::placeholder,
textarea::placeholder {
  color: #8c9799;
}
.search-box kbd {
  font: 11px var(--font);
  white-space: nowrap;
  border: 1px solid #3a4243;
  border-radius: 4px;
  line-height: 17px;
  padding: 0 4px;
  color: #869193;
}
.filters {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 16px 0 16px;
}
.filter {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid transparent;
  background: #252a2c;
  border-radius: 8px;
  color: #a4adae;
  font-size: 12px;
  height: 29px;
  padding: 0 13px;
}
.filter:hover {
  background: #2f3637;
}
.filter.selected {
  background: #304237;
  border-color: #435c49;
  color: #b1f0c9;
}
.filter-num {
  font-size: 10px;
  color: #b6bebf;
  background: #363e3f;
  padding: 0px 4px;
  border-radius: 4px;
  line-height: 15px;
}
.side-list {
  min-height: 0;
  overflow-y: auto;
  padding: 0 10px 20px;
  flex: 1;
}
.list-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  letter-spacing: 1.2px;
  color: #8d9799;
  font-weight: 550;
  margin: 17px 12px 7px;
}
.list-label .ico {
  width: 12px;
  height: 12px;
  transform: rotate(30deg);
}
.list-label:first-child {
  margin-top: 7px;
}
.chat-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 11px;
  border-radius: 11px;
  text-align: left;
  position: relative;
  min-height: 68px;
  border: 1px solid transparent;
}
.chat-row:hover {
  background: #242b2b;
}
.chat-row.selected {
  background: var(--active);
  border-color: #355044;
}
.avatar {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 50%;
  flex: none;
  vertical-align: middle;
  background: #344b40;
}
.avatar > img,
.avatar.art > svg:not(.ico) {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar > img {
  object-position: center 40%;
}
.avatar.saved,
.avatar.newgroup {
  background: #345545;
  color: var(--mint);
}
.row-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.row-top,
.row-bottom {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.row-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  font-size: 14px;
  line-height: 19px;
  letter-spacing: 0.1px;
}
.row-top > time {
  margin-left: auto;
  font-size: 10.5px;
  white-space: nowrap;
  color: #96a0a0;
  font-variant-numeric: tabular-nums;
}
.row-bottom .preview {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1;
  gap: 4px;
  font-size: 12px;
  line-height: 16px;
  color: #a0aaa9;
}
.preview > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.preview > .ico {
  width: 14px;
  height: 14px;
  color: #8caa9d;
}
.row-bottom > .ico {
  width: 13px;
  height: 13px;
  color: #859f8c;
  transform: rotate(35deg);
}
.unread {
  min-width: 17px;
  height: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #88e8b6;
  color: #123a28;
  padding: 0 4px;
  font: 650 10px var(--font);
}
.profile {
  width: 100%;
  height: 72px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  text-align: left;
  padding: 0 22px;
  gap: 11px;
  background: var(--side);
}
.profile:hover {
  background: var(--surface);
}
.profile .avatar {
  width: 35px;
  height: 35px;
}
.profile-text {
  display: grid;
  gap: 3px;
  flex: 1;
}
.profile-text strong {
  font-size: 13px;
}
.profile-text small {
  font-size: 10.5px;
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
}
.status-dot {
  background: var(--mint);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}
.offline .status-dot {
  background: #ad9664;
}
.profile > .ico {
  width: 17px;
  color: var(--quiet);
}
.conversation {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--canvas) url("/assets/contours.png") center center/940px;
}
.room-head {
  height: 83px;
  min-height: 83px;
  padding: 0 clamp(18px, 2.4vw, 42px);
  background: #191d1f;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
}
.room-identity {
  display: flex;
  align-items: center;
  text-align: left;
  gap: 13px;
  min-width: 0;
}
.room-identity .avatar {
  width: 43px;
  height: 43px;
}
.room-hgroup {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.room-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 650;
  line-height: 23px;
  letter-spacing: 0.4px;
}
.room-title > span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.room-title .ico {
  width: 12px;
  height: 12px;
  color: #8c9993;
}
.room-meta {
  font-size: 11.5px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
}
.room-meta .status-dot {
  width: 5px;
  height: 5px;
}
.room-meta .online {
  color: #99c9af;
}
.head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.head-actions .ico {
  width: 20px;
  height: 20px;
}
.head-rule {
  height: 19px;
  width: 1px;
  background: var(--line);
  margin: 0 2px;
}
.mobile-back {
  display: none;
}
.pinned {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: #1c2522;
  border-bottom: 1px solid #2e3a34;
  text-align: left;
  padding: 10px clamp(18px, 2.4vw, 42px);
  min-height: 56px;
}
.pin-sigil {
  width: 31px;
  height: 31px;
  border-radius: 9px;
  background: #2a3d32;
  display: grid;
  place-items: center;
  color: #a3dabb;
}
.pin-sigil .ico {
  width: 15px;
  height: 15px;
  transform: rotate(35deg);
}
.pin-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
  border-left: 2px solid #83ce9e;
  padding-left: 10px;
}
.pin-copy b {
  font-size: 11px;
  font-weight: 600;
  color: #99d6af;
  letter-spacing: 0.55px;
}
.pin-copy span {
  color: #c2cac4;
  font-size: 12px;
  max-width: 100%;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
.pinned > .ico {
  margin-left: auto;
  width: 15px;
  height: 15px;
  color: #819387;
}
.timeline {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: auto;
}
.timeline:focus {
  outline: none;
}
.thread {
  width: 100%;
  max-width: 1180px;
  min-height: 100%;
  margin: 0 auto;
  padding: 22px clamp(20px, 3vw, 54px) 10px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 18px;
}
.day {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #262c2c;
  color: #b1bbba;
  border: 1px solid #363d3c;
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 11px;
  line-height: 15px;
  letter-spacing: 0.3px;
}
.day .ico {
  width: 11px;
  height: 11px;
}
.message-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  max-width: 100%;
}
.message-row > .avatar {
  width: 33px;
  height: 33px;
  margin-top: 1px;
}
.message-stack {
  min-width: 0;
  max-width: min(82%, 650px);
}
.sender-name {
  color: var(--mint);
  font-size: 12px;
  line-height: 17px;
  letter-spacing: 0.2px;
  font-weight: 600;
  margin: 0 0 5px 2px;
}
.bubble-flex {
  display: flex;
  align-items: center;
  gap: 5px;
}
.bubble {
  position: relative;
  background: #272d2e;
  border: 1px solid #343b3b;
  border-radius: 3px 14px 14px 14px;
  min-width: 60px;
  max-width: 100%;
  padding: 9px 12px;
  color: #e8ece9;
  font-size: 14px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  box-shadow: 0 1px 2px #0001;
}
.bubble-text {
  white-space: pre-wrap;
}
.stamp {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  font-size: 10px;
  line-height: 15px;
  letter-spacing: 0.1px;
  color: #a2adab;
  margin-left: 11px;
  vertical-align: baseline;
  float: right;
  padding-top: 7px;
}
.stamp .ico {
  width: 14px;
  height: 13px;
}
.bubble:after,
.media-caption:after {
  content: "";
  display: table;
  clear: both;
}
.msg-tools {
  opacity: 0;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #97a29e;
  background: #252c2a;
  border-radius: 7px;
  width: 25px;
  height: 26px;
}
.msg-tools .ico {
  width: 15px;
  height: 15px;
}
.message-row:hover .msg-tools,
.msg-tools:focus-visible {
  opacity: 1;
}
.own {
  justify-content: flex-end;
  margin-left: auto;
  width: 100%;
}
.own .message-stack {
  max-width: 82%;
}
.own .bubble {
  background: #2c503e;
  border-color: #3e624d;
  border-radius: 14px 3px 14px 14px;
  color: #e5f5e9;
}
.own .stamp {
  color: #abd8bb;
}
.own .bubble-flex {
  flex-direction: row-reverse;
}
.own .stamp .ico {
  color: #94e4b0;
}
.media-bubble {
  width: clamp(388px, 38vw, 555px);
  padding: 4px;
  border-radius: 4px 14px 14px 14px;
}
.media-bubble .media-caption {
  padding: 7px 8px 4px;
  font-size: 13px;
}
.gallery {
  display: grid;
  grid-template-columns: minmax(0, 1.78fr) minmax(0, 1fr);
  gap: 4px;
  overflow: hidden;
  border-radius: 3px 10px 5px 5px;
}
.gallery.single {
  grid-template-columns: 1fr;
}
.media-tile {
  min-width: 0;
  position: relative;
  overflow: hidden;
  background: #20352d;
  height: clamp(158px, 21.6vh, 235px);
  display: block;
}
.media-tile img,
.media-tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter 0.18s;
}
.media-tile:hover img {
  filter: brightness(1.08);
}
.play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 41px;
  height: 41px;
  border: 1px solid #ffffff79;
  border-radius: 50%;
  background: #17211d70;
  color: white;
  backdrop-filter: blur(4px);
}
.play .ico {
  width: 17px;
  height: 17px;
  margin-left: 2px;
}
.duration {
  position: absolute;
  right: 7px;
  bottom: 7px;
  background: #101712b8;
  padding: 2px 6px;
  border-radius: 5px;
  color: white;
  font-size: 10px;
  line-height: 15px;
  font-weight: 550;
}
.reactions {
  display: flex;
  gap: 5px;
  margin-top: 6px;
}
.reaction {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px;
  border: 1px solid #38423d;
  background: #252d29;
  border-radius: 16px;
  color: #ccd6d0;
  line-height: 20px;
  font-size: 12px;
}
.reaction span {
  font-size: 13px;
}
.reaction.mine {
  border-color: #629675;
  background: #304d3c;
  color: var(--mint);
}
.reply-quote {
  padding: 4px 8px;
  margin: 1px 0 6px;
  border-left: 2px solid var(--mint);
  border-radius: 3px;
  background: #15211945;
  font-size: 12px;
  color: #c2d3c9;
}
.reply-quote b {
  display: block;
  color: var(--green-text);
}
.reply-quote div {
  max-width: 400px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.composer-wrap {
  padding: 14px clamp(20px, 3vw, 54px) 22px;
  width: 100%;
  max-width: 1180px;
  align-self: center;
  flex: none;
}
.composer {
  background: #23292b;
  border: 1px solid #3b4243;
  border-radius: 15px;
  box-shadow: 0 4px 16px #0002;
}
.composer:focus-within {
  border-color: #60796a;
}
.input-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 7px 8px 7px 10px;
}
.input-line textarea {
  resize: none;
  flex: 1;
  line-height: 22px;
  padding: 5px 1px;
  background: none;
  border: 0;
  outline: 0;
  max-height: 120px;
  font-size: 14px;
}
.input-line textarea:focus-visible {
  outline: none;
}
.send {
  width: 39px;
  height: 39px;
  border-radius: 12px;
  background: var(--mint);
  color: #1d4630;
}
.send:hover {
  background: #a1f2c9;
}
.send .ico {
  width: 23px;
  height: 23px;
}
.attach .ico {
  transform: rotate(-6deg);
  width: 21px;
  height: 21px;
}
.emoji-trigger .ico {
  width: 22px;
  height: 22px;
}
.search-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--side);
  padding: 6px 20px;
  border-bottom: 1px solid var(--line);
  height: 43px;
  color: var(--muted);
}
.search-strip small {
  white-space: nowrap;
}
.search-strip .icon-button {
  width: 28px;
  height: 28px;
}
.empty {
  padding: 30px 14px;
  text-align: center;
  color: var(--muted);
  line-height: 1.8;
  font-size: 13px;
}
.empty-chat {
  margin: auto;
  align-self: center;
  text-align: center;
  display: grid;
  gap: 12px;
  justify-items: center;
  color: var(--muted);
}
.empty-chat > .ico {
  width: 36px;
  height: 36px;
  color: #88af97;
}
.highlight .bubble {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
}
.flash {
  animation: flash 1.4s ease-out;
}
@keyframes flash {
  20% {
    filter: brightness(1.5);
  }
}
.menu {
  position: fixed;
  z-index: 12;
  min-width: 165px;
  background: #272d2e;
  border: 1px solid #3b4542;
  border-radius: 12px;
  padding: 5px;
  box-shadow: 0 14px 48px #0006;
}
.menu-item {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 10px;
  text-align: left;
  padding: 9px 11px;
  border-radius: 7px;
  font-size: 13px;
  line-height: 20px;
}
.menu-item:hover,
.emoji-choice:hover,
.person-button:hover,
.media-line:hover {
  background: #35413b;
}
.menu-item .ico {
  width: 17px;
  height: 17px;
  color: #abbaaf;
}
.emoji-grid {
  display: grid;
  grid-template-columns: repeat(6, 34px);
  padding: 6px;
  gap: 2px;
}
.emoji-choice {
  border-radius: 7px;
  font-size: 20px;
  height: 34px;
}
.react-choices {
  display: flex;
  border-bottom: 1px solid var(--line);
  padding: 3px 0 5px;
}
.react-choices button {
  width: 30px;
  font-size: 18px;
}
.overlay {
  position: fixed;
  inset: 0;
  background: #050808ad;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  padding: 18px;
  backdrop-filter: blur(3px);
}
.dialog {
  width: min(410px, 100%);
  max-height: 86dvh;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  background: #202627;
  border: 1px solid #3e4743;
  box-shadow: 0 20px 90px #0006;
  overflow: hidden;
}
.dialog-head {
  display: flex;
  align-items: center;
  padding: 16px 18px 12px 23px;
  border-bottom: 1px solid var(--line);
  gap: 14px;
}
.dialog-head h2 {
  margin: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 620;
}
.dialog-body {
  padding: 20px 22px;
  overflow: auto;
}
.dialog-body p {
  color: #abb6b1;
  line-height: 1.7;
  margin: 0 0 16px;
}
.dialog-body h3 {
  font-size: 12px;
  font-weight: 550;
  color: #a7b3ac;
  margin: 17px 0 8px;
}
.dialog .icon-button {
  width: 30px;
  height: 30px;
}
.primary,
.secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  font-weight: 600;
  border-radius: 9px;
  padding: 8px 14px;
}
.primary {
  background: var(--mint);
  color: #183b28;
}
.secondary {
  background: #2c3531;
  color: #c7e6d2;
}
.block {
  width: 100%;
}
.primary .ico,
.secondary .ico {
  width: 17px;
  height: 17px;
}
.field {
  display: grid;
  gap: 8px;
  margin: 12px 0 17px;
  font-size: 12px;
  color: #beccc3;
}
.field input,
.invite-link {
  height: 41px;
  width: 100%;
  background: #171d1c;
  border: 1px solid #3b4741;
  border-radius: 8px;
  padding: 8px 10px;
  outline: none;
  color: var(--text);
}
.field input:focus {
  border-color: var(--mint);
}
.person-button,
.media-line {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 10px;
  min-height: 49px;
  border-radius: 8px;
  text-align: left;
  padding: 6px 4px;
}
.person-button .avatar {
  width: 34px;
  height: 34px;
}
.person-button .ico {
  width: 15px;
  margin-left: auto;
  color: var(--muted);
}
.person-button small {
  font-size: 11px;
  color: var(--muted);
  margin-left: auto;
}
.contact-title {
  font-size: 12px;
  color: #9faaa4;
}
.room-card {
  text-align: center;
  display: grid;
  gap: 8px;
  justify-items: center;
  margin: 2px 0 16px;
}
.room-card .avatar {
  width: 60px;
  height: 60px;
}
.room-card b {
  font-size: 18px;
}
.room-card small {
  color: #a4b0a9;
}
.check-setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin: 14px 0 20px;
}
.check-setting input {
  accent-color: var(--mint);
  width: 17px;
  height: 17px;
}
.invite-link {
  font-size: 13px;
  margin-bottom: 12px;
}
.attachment-strip {
  display: flex;
  gap: 8px;
  overflow: auto;
  margin: 9px 12px 0;
  padding: 3px 0;
}
.draft-tile {
  position: relative;
  flex: none;
}
.draft-tile img,
.draft-tile video {
  display: block;
  width: 65px;
  height: 54px;
  object-fit: cover;
  border-radius: 7px;
}
.remove-file {
  position: absolute;
  right: 2px;
  top: 2px;
  width: 18px;
  height: 18px;
  background: #14221dd9;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.remove-file .ico {
  width: 12px;
  height: 12px;
}
.reply-draft {
  display: flex;
  align-items: center;
  margin: 10px 12px 0;
  padding: 3px 8px;
  border-left: 2px solid var(--mint);
  gap: 8px;
  min-width: 0;
}
.reply-draft div {
  flex: 1;
  min-width: 0;
}
.reply-draft b,
.reply-draft span {
  display: block;
  font-size: 12px;
}
.reply-draft span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  margin-top: 3px;
}
.drag .composer {
  outline: 2px dashed var(--mint);
  background: #2c4034;
}
.lightbox {
  background: #090d0ef5;
  color: white;
}
.viewer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 96vw;
  max-height: 96dvh;
}
.viewer-top {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 9px;
  color: #d7dfdc;
}
.viewer-top strong {
  flex: 1;
  font-size: 14px;
}
.viewer img,
.viewer video {
  display: block;
  max-width: 92vw;
  max-height: 78dvh;
  object-fit: contain;
  border-radius: 5px;
}
.viewer-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
  font-size: 12px;
  color: #ced6d0;
}
.viewer a {
  color: inherit;
}
.form-error {
  font-size: 12px;
  color: #ffb5aa;
}
.media-line img {
  width: 51px;
  height: 40px;
  object-fit: cover;
  border-radius: 5px;
}
.media-line > span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.media-line .ico {
  width: 17px;
  color: var(--muted);
}
#toast {
  position: fixed;
  z-index: 50;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90vw;
  background: #324438;
  color: #e2f6e8;
  border: 1px solid #536c5b;
  border-radius: 10px;
  padding: 10px 18px;
  box-shadow: 0 5px 20px #0003;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s;
}
#toast.show {
  opacity: 1;
}
@media (min-height: 870px) {
  .thread {
    gap: 23px;
    padding-top: 26px;
  }
  .chat-row {
    min-height: 74px;
  }
  .composer-wrap {
    padding-bottom: 27px;
  }
  .media-tile {
    height: clamp(196px, 24vh, 265px);
  }
}
@media (max-height: 740px) and (min-width: 741px) {
  .room-head {
    height: 69px;
    min-height: 69px;
  }
  .side-head {
    height: 69px;
  }
  .rail {
    padding-top: 15px;
  }
  .rail-nav {
    padding-top: 27px;
  }
  .pinned {
    min-height: 49px;
    padding-top: 6px;
    padding-bottom: 6px;
  }
  .thread {
    gap: 12px;
    padding-top: 13px;
  }
  .media-tile {
    height: clamp(120px, 21vh, 155px);
  }
  .composer-wrap {
    padding-top: 9px;
    padding-bottom: 13px;
  }
  .chat-row {
    padding-top: 9px;
    padding-bottom: 9px;
    min-height: 60px;
  }
}
@media (max-width: 1050px) {
  #app {
    grid-template-columns: 60px 270px minmax(0, 1fr);
  }
  .rail-nav {
    gap: 8px;
  }
  .nav-item.active:before {
    left: -8px;
  }
  .side-controls {
    padding: 0 14px;
  }
  .side-head {
    padding-left: 17px;
  }
  .side-list {
    padding-left: 6px;
    padding-right: 6px;
  }
  .chat-row {
    gap: 9px;
  }
  .thread {
    padding-left: 21px;
    padding-right: 21px;
  }
  .composer-wrap {
    padding-left: 20px;
    padding-right: 20px;
  }
  .media-bubble {
    width: 400px;
  }
  .message-stack {
    max-width: calc(100% - 49px);
  }
  .head-actions {
    gap: 2px;
  }
  .bubble-flex {
    position: relative;
  }
  .msg-tools {
    position: absolute;
    right: -24px;
  }
  .own .msg-tools {
    right: auto;
    left: -27px;
  }
}
@media (max-width: 740px) {
  #app {
    display: block;
  }
  .rail,
  .sidebar {
    display: none;
  }
  .conversation {
    width: 100%;
    height: 100%;
  }
  .room-head {
    min-height: 65px;
    height: 65px;
    padding: 0 11px;
    gap: 4px;
  }
  .mobile-back {
    display: flex;
    width: 30px;
  }
  .room-identity {
    gap: 9px;
  }
  .room-identity .avatar {
    width: 37px;
    height: 37px;
  }
  .room-title {
    font-size: 16px;
  }
  .room-hgroup {
    gap: 3px;
  }
  .room-meta {
    font-size: 10.5px;
  }
  .head-actions {
    gap: 0;
  }
  .head-actions .icon-button {
    width: 33px;
  }
  .head-rule,
  .head-info {
    display: none;
  }
  .pinned {
    min-height: 51px;
    padding: 7px 15px;
    gap: 9px;
  }
  .pin-copy span {
    font-size: 11px;
  }
  .pin-sigil {
    width: 26px;
    height: 26px;
  }
  .thread {
    padding: 18px 14px 8px;
    gap: 18px;
  }
  .message-stack {
    max-width: calc(100% - 40px);
  }
  .message-row {
    gap: 7px;
  }
  .message-row > .avatar {
    width: 29px;
    height: 29px;
  }
  .bubble {
    font-size: 13px;
  }
  .media-bubble {
    width: min(470px, 100%);
  }
  .media-tile {
    height: clamp(140px, 26vw, 195px);
  }
  .media-bubble .media-caption {
    font-size: 12px;
  }
  .msg-tools {
    width: 20px;
    right: -16px;
  }
  .bubble-flex {
    gap: 0;
  }
  .own .message-stack {
    max-width: 88%;
  }
  .composer-wrap {
    padding: 9px 11px max(12px, env(safe-area-inset-bottom));
  }
  .input-line {
    min-height: 52px;
    gap: 4px;
  }
  .send {
    width: 36px;
    height: 36px;
  }
  .composer {
    border-radius: 13px;
  }
  .list-mode#app {
    display: grid;
    grid-template-columns: 55px minmax(0, 1fr);
  }
  .list-mode .rail {
    display: flex;
  }
  .list-mode .sidebar {
    display: flex;
    border: 0;
  }
  .list-mode .conversation {
    display: none;
  }
  .side-head {
    height: 76px;
  }
  .nav-item.active:before {
    left: -6px;
  }
  .side-list {
    padding-left: 9px;
    padding-right: 9px;
  }
  .chat-row {
    min-height: 68px;
  }
  .nav-item {
    width: 42px;
    height: 42px;
  }
  .rail {
    padding-top: 19px;
  }
  .brand-mark,
  .brand-mark img {
    width: 34px;
    height: 34px;
  }
  .list-mode .profile {
    height: 64px;
  }
  .head-actions .ico {
    width: 18px;
    height: 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
