:root {
  color-scheme: light;
  font:
    14px/1.48 Inter,
    -apple-system,
    BlinkMacSystemFont,
    "PingFang SC",
    "Microsoft YaHei UI",
    "Microsoft YaHei",
    system-ui,
    sans-serif;
  color: #182944;
  background: #eef4fb;
  --ink: #182944;
  --muted: #566b84;
  --line: #dae4f1;
  --blue: #286ad9;
  --deep: #174995;
  --paper: #fff;
  --soft: #edf4ff;
  --brand: linear-gradient(130deg, #1279de, #4357d2);
  --head: 78px;
}
* {
  box-sizing: border-box;
}
[hidden],
.defs {
  display: none !important;
}
body,
h1,
h2,
h3,
p {
  margin: 0;
}
button,
input,
textarea {
  font: inherit;
  color: inherit;
}
button,
a,
input,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  border: 0;
  background: none;
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.52;
}
:focus-visible {
  outline: 3px solid #76a7ff;
  outline-offset: 2px;
}
a {
  color: var(--blue);
}
svg {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.primary,
.outlined,
.icon,
.rail-button,
.rail-profile {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
}
.primary,
.outlined {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  font-weight: 650;
}
.primary {
  color: white;
  background: var(--brand);
  box-shadow: 0 3px 9px #366fcb24;
}
.primary:hover:not(:disabled) {
  filter: brightness(1.06);
}
.primary:disabled {
  background: #dce7f8;
  color: #607698;
  box-shadow: none;
  opacity: 1;
}
.outlined {
  border: 1px solid var(--line);
  background: white;
  color: var(--deep);
}
.outlined:hover,
.icon:hover {
  background: #edf4ff;
}
.icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 11px;
  color: #506988;
  flex: none;
}
button.soft {
  background: #e2edff;
  color: #285cbb;
}
.full {
  width: 100%;
}
.workspace {
  height: 100vh;
  height: 100dvh;
  min-height: 340px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 70px clamp(238px, 23vw, 322px) minmax(0, 1fr);
}
.rail {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 11px;
  padding: 22px 7px 16px;
  background: linear-gradient(169deg, #1679d5 0%, #285fc2 46%, #384995 100%);
  border-right: 1px solid #2455aa;
}
.rail-brand {
  width: 40px;
  height: 40px;
  margin-bottom: 22px;
  border-radius: 13px;
  box-shadow: 0 3px 11px #13367d33;
}
.rail-button,
.rail-profile {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 15px;
  padding: 0;
  color: #e6f1ff;
}
.rail-button.active {
  background: #fff;
  color: #2768c5;
  box-shadow: 0 6px 16px #153e8636;
}
.rail-button:not(.active):hover,
.rail-profile:hover {
  background: #ffffff29;
}
.rail-profile {
  margin-top: auto;
}
.rail-profile svg,
.rail-button svg {
  width: 23px;
  height: 23px;
}
.sidebar {
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: linear-gradient(155deg, #f1f7ff 0%, #fcfdff 58%, #f4f7fd 100%);
  border-right: 1px solid #d5e1f0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 23px;
  font-weight: 760;
  letter-spacing: -0.04em;
}
.brand img {
  width: 36px;
  height: 36px;
}
.side-brand {
  align-items: baseline;
  padding: 24px 21px 22px;
}
.side-brand img {
  display: none;
}
.side-brand small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.sidebar-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 17px 11px 22px;
}
.sidebar-title h2 {
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.04em;
}
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 16px 12px;
  padding: 0 12px;
  min-height: 39px;
  border: 1px solid #d2dff0;
  border-radius: 13px;
  background: #ffffffdf;
  color: #69809a;
}
.search svg {
  width: 17px;
  height: 17px;
}
.search input {
  flex: 1;
  width: 100%;
  min-width: 0;
  padding: 6px 0;
  border: 0;
  outline: 0;
  background: none;
}
.search:focus-within {
  border-color: #72a2e7;
  box-shadow: 0 0 0 3px #3386ef18;
}
.filters {
  display: flex;
  gap: 3px;
  margin: 0 16px 15px;
  padding: 3px;
  border-radius: 12px;
  background: #e7eef9;
}
.filters button {
  flex: 1;
  min-height: 29px;
  padding: 2px 6px;
  border-radius: 9px;
  color: #4e6581;
  font-size: 12px;
  font-weight: 600;
}
.filters button[aria-pressed="true"] {
  color: #235bb8;
  background: white;
  box-shadow: 0 1px 4px #294d8424;
}
#room-list {
  overflow: auto;
  flex: 1;
  min-height: 0;
  padding: 0 9px 10px;
  overscroll-behavior: contain;
}
.room-row {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 12px 10px;
  margin: 0 0 4px;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 15px;
}
.room-row:hover {
  background: #edf3fd;
}
.room-row.selected {
  border-color: #c1d8fc;
  background: linear-gradient(110deg, #dcecff, #e8eeff);
}
.row-text,
.row-top,
.room-heading,
.identity-text,
.file-name {
  min-width: 0;
}
.row-text,
.room-heading,
.identity-text,
.file-name {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.row-text,
.room-heading,
.identity-text {
  flex: 1;
}
.row-top {
  display: flex;
  align-items: center;
  gap: 6px;
}
.row-top strong {
  flex: 1;
  color: #1d314d;
  font-size: 14px;
}
.row-top time,
.meta time {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: #667890;
}
.row-text small,
.identity-text small,
.room-heading p {
  font-size: 12px;
}
.row-text small,
.identity-text small {
  color: var(--muted);
}
.row-top strong,
.row-text small,
.identity-text strong,
.room-heading h1,
.file-name strong,
.profile-name,
.person-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.empty-list {
  padding: 17px 10px;
  color: var(--muted);
  text-align: center;
}
.identity {
  display: flex;
  align-items: center;
  gap: 3px;
  min-height: 66px;
  padding: 10px 10px 10px 15px;
  border-top: 1px solid var(--line);
  background: #f0f5fc;
}
.profile-button {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 9px;
  padding: 2px 0;
  min-width: 0;
  min-height: 42px;
  text-align: left;
  border-radius: 12px;
}
.identity-text {
  gap: 1px;
}
.identity-text strong {
  font-size: 13px;
}
#my-avatar {
  display: flex;
}
.avatar,
.room-avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
}
.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  font-size: 16px;
  font-weight: 700;
  color: #234e8f;
  background: linear-gradient(145deg, #d6eeff, #c0d6ff);
}
.avatar.c1 {
  color: #8d451e;
  background: linear-gradient(145deg, #ffecd2, #ffd6c2);
}
.avatar.c2 {
  color: #594296;
  background: linear-gradient(145deg, #eee4ff, #d9ccff);
}
.avatar.c3 {
  color: #186261;
  background: linear-gradient(145deg, #d9f7ef, #bce9e1);
}
.avatar.c4 {
  color: #8a3d68;
  background: linear-gradient(145deg, #ffe5ef, #f8cfdf);
}
.avatar.group {
  width: 43px;
  height: 43px;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(145deg, #59b5ff, #4575e3);
  box-shadow: inset 0 1px 1px #ffffff6b;
}
.room-row[data-room="1"] .avatar.group {
  background: linear-gradient(145deg, #52c8e1, #287ec9);
}
.avatar.group svg {
  width: 22px;
  height: 22px;
}
.avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.identity .avatar {
  width: 37px;
  height: 37px;
  font-size: 14px;
}
.conversation {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  background:
    radial-gradient(ellipse at 96% 2%, #e7edff 0%, transparent 48%),
    radial-gradient(ellipse at 12% 100%, #e6f5fc 0%, transparent 48%), #f6f8fd;
}
.topbar {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--head);
  padding: 0 clamp(18px, 3vw, 42px);
  color: white;
  background: linear-gradient(105deg, #1368ad 0%, #2c67c5 48%, #7565c6 100%);
}
.topbar::before,
.topbar::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  right: 2%;
  width: 270px;
  height: 130px;
  border: 1px solid #ffffff38;
  border-radius: 50%;
  transform: rotate(-25deg);
}
.topbar::after {
  right: 10%;
  transform: rotate(-25deg) scale(0.83);
}
.room-avatar .avatar {
  width: 44px;
  height: 44px;
}
.room-avatar .group {
  background: #ffffff24;
  box-shadow: inset 0 0 0 1px #ffffff52;
}
.room-heading {
  gap: 2px;
}
.room-heading h1 {
  font-size: 21px;
  line-height: 1.25;
  letter-spacing: -0.025em;
}
.room-heading p {
  color: #e0ecff;
}
.connection {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  white-space: nowrap;
  border: 1px solid #ffffff46;
  background: #15264e2c;
  border-radius: 20px;
  color: white;
  font-size: 11px;
}
.connection::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #75f4bd;
}
.connection.pending::before {
  background: #ffce6c;
}
.topbar .outlined,
.topbar .icon {
  color: white;
  border: 1px solid #ffffff48;
  background: #14265b28;
}
.topbar button:hover {
  background: #15265a4d;
}
.mobile-only {
  display: none;
}
.timeline {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.message-list {
  max-width: 1110px;
  min-height: 100%;
  margin: auto;
  padding: 20px clamp(18px, 3vw, 42px) 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.blank {
  margin: auto;
  padding: 25px 14px;
  display: grid;
  justify-items: center;
  gap: 7px;
  color: var(--muted);
}
.blank-mark {
  width: 65px;
  height: 65px;
  margin-bottom: 5px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: linear-gradient(145deg, #d7ecff, #e3e3ff);
  border: 1px solid #ccddf5;
  color: #3a68bc;
  transform: rotate(-6deg);
}
.blank-mark svg {
  width: 31px;
  height: 31px;
  transform: rotate(6deg);
}
.blank strong {
  font-size: 17px;
  color: #344d72;
}
.blank p {
  font-size: 13px;
}
.blank button {
  margin-top: 8px;
}
.day,
.older {
  align-self: center;
  color: #61758d;
  border-radius: 16px;
  padding: 3px 12px;
  font-size: 11px;
}
.day {
  border: 1px solid #d9e3f2;
  background: #ffffffcf;
  margin: 1px 0 4px;
}
.older {
  color: var(--blue);
  font-size: 13px;
}
.msg {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}
.msg.mine {
  flex-direction: row-reverse;
}
.msg > .avatar {
  width: 35px;
  height: 35px;
  font-size: 14px;
  box-shadow: 0 1px 4px #24476b12;
}
.msg-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  min-width: 0;
  max-width: min(79%, 680px);
}
.mine .msg-content {
  align-items: flex-end;
}
.meta {
  display: flex;
  gap: 8px;
  align-items: center;
  max-width: 100%;
  min-width: 0;
  color: #506680;
  font-size: 11px;
  line-height: 1.3;
}
.sender-name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.meta time {
  flex: none;
  font-size: 10px;
}
.bubble {
  max-width: 100%;
  padding: 9px 14px;
  line-height: 1.6;
  border: 1px solid #d8e3f2;
  border-radius: 4px 16px 16px;
  background: white;
  box-shadow: 0 2px 5px #27436908;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.mine .bubble {
  border-color: #3670d7;
  border-radius: 16px 4px 16px 16px;
  color: #fff;
  background: linear-gradient(115deg, #2175d5, #4e61ce);
  box-shadow: 0 3px 8px #3263ba18;
}
.msg-content > div:has(.file-card),
.msg-content > div:has(.picture) {
  max-width: 100%;
}
.file-card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px;
  width: min(288px, 100%);
  min-width: min(216px, 100%);
  max-width: 100%;
  color: var(--ink);
  text-decoration: none;
  background: white;
  border: 1px solid #cfddf0;
  border-radius: 15px;
}
.file-symbol {
  width: 39px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 11px;
  color: #3866b2;
  background: #e6efff;
}
.file-symbol.archive {
  background: #fff0d9;
  color: #936124;
}
.file-symbol.sheet {
  background: #daf3e8;
  color: #23775c;
}
.file-symbol.pdf {
  background: #ffe5e8;
  color: #ad4662;
}
.file-name {
  flex: 1;
  gap: 3px;
}
.file-name strong {
  font-size: 13px;
}
.file-name small,
.picture-label {
  font-size: 11px;
  color: var(--muted);
}
.file-card > svg {
  width: 17px;
  color: #50719d;
}
.picture {
  display: block;
  max-width: 100%;
}
.picture img {
  display: block;
  max-width: min(260px, 100%);
  max-height: 230px;
  border-radius: 13px;
  object-fit: contain;
}
.picture-label {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  text-decoration: none;
}
.compose-area {
  position: relative;
  flex: none;
  width: 100%;
  max-width: 1110px;
  align-self: center;
  padding: 6px clamp(16px, 3vw, 40px) 19px;
}
.composer {
  padding: 10px 13px 9px;
  background: #ffffffed;
  border: 1px solid #c8d8f0;
  border-radius: 19px;
  box-shadow: 0 5px 23px #224a8411;
}
.composer:focus-within,
.composer.drag {
  border-color: #75a5ed;
  box-shadow: 0 0 0 3px #428aff13;
}
#message {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 39px;
  padding: 2px 3px;
  resize: none;
  outline: 0;
  border: 0;
  background: transparent;
  line-height: 1.5;
}
::placeholder {
  color: #75869c;
}
.compose-tools,
.left-tools,
.send-tools {
  display: flex;
  align-items: center;
  gap: 4px;
}
.compose-tools {
  justify-content: space-between;
  margin-top: 5px;
}
.send-tools {
  gap: 12px;
}
.send-tools > span {
  font-size: 11px;
  color: #627287;
}
.send {
  min-width: 76px;
}
.send svg {
  width: 16px;
  height: 16px;
}
.upload-status {
  padding: 5px 8px;
  color: var(--deep);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.emoji-picker {
  position: absolute;
  z-index: 3;
  left: clamp(14px, 3vw, 40px);
  bottom: calc(100% + 1px);
  display: flex;
  flex-direction: column;
  width: min(399px, calc(100% - 30px));
  max-height: min(350px, 52vh);
  background: #fff;
  border: 1px solid #ccd9eb;
  border-radius: 19px;
  box-shadow: 0 12px 34px #183d7029;
  overflow: hidden;
}
.emoji-bar,
.emoji-tabs {
  display: flex;
  align-items: center;
}
.emoji-bar {
  gap: 8px;
  padding: 10px 10px 4px 14px;
}
.emoji-bar h2 {
  font-size: 16px;
  flex: 1;
}
.emoji-search {
  width: 46%;
  min-width: 0;
  border: 1px solid var(--line);
  background: #f5f8ff;
  border-radius: 9px;
  padding: 6px 9px;
  font-size: 13px;
}
.emoji-tabs {
  gap: 2px;
  padding: 4px 8px 6px;
  overflow-x: auto;
  flex: none;
  scrollbar-width: thin;
}
.emoji-tabs button {
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
  padding: 5px 7px;
  border-radius: 9px;
}
.emoji-tabs button[aria-pressed="true"] {
  background: #e5efff;
  color: #1c56a8;
  font-weight: 700;
}
.emoji-results {
  padding: 4px 9px 10px;
  overflow: auto;
  min-height: 0;
  overscroll-behavior: contain;
  border-top: 1px solid #e8eef7;
}
.emoji-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(38px, 1fr));
}
.glyph {
  display: grid;
  place-items: center;
  padding: 0;
  min-height: 40px;
  border-radius: 10px;
  font:
    25px/1 "Apple Color Emoji",
    "Segoe UI Emoji",
    "Noto Color Emoji",
    sans-serif;
}
.glyph:hover,
.glyph:focus-visible {
  background: #edf4ff;
}
.emoji-caption {
  padding: 6px 4px 2px;
  font-size: 11px;
  color: var(--muted);
}
dialog {
  width: min(410px, calc(100% - 32px));
  max-height: min(84vh, 720px);
  max-height: min(84dvh, 720px);
  overscroll-behavior: contain;
  overflow: auto;
  color: var(--ink);
  background: #fff;
  padding: 0 20px 20px;
  border: 1px solid #d2dff0;
  border-radius: 21px;
  box-shadow: 0 22px 80px #14396d42;
}
dialog::backdrop {
  background: #15274659;
}
.dialog-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 15px 0 10px;
  background: white;
}
.dialog-head h2 {
  font-size: 20px;
  letter-spacing: -0.025em;
}
.option-tabs {
  display: flex;
  gap: 4px;
  background: #edf2fa;
  border-radius: 12px;
  padding: 4px;
}
.option-tabs button {
  flex: 1;
  min-height: 35px;
  border-radius: 9px;
}
.option-tabs .chosen {
  color: var(--deep);
  background: white;
  font-weight: 650;
  box-shadow: 0 1px 4px #2039631c;
}
.person {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 8px 5px;
  min-height: 46px;
  border-radius: 10px;
}
button.person:hover {
  background: #eff5ff;
}
.person .avatar {
  width: 34px;
  height: 34px;
  font-size: 13px;
}
.person-name {
  flex: 1;
}
.person small {
  color: var(--muted);
  font-size: 11px;
}
.person input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}
.section-label {
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
  margin: 15px 0 5px;
}
.danger {
  color: #a13d56;
  padding: 8px;
}
.dialog-actions {
  margin-top: 15px;
  display: flex;
  justify-content: flex-end;
}
.invite-box {
  display: grid;
  gap: 8px;
  background: #f0f5ff;
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 10px;
}
.invite-box small {
  color: var(--muted);
}
.invite-box input,
.auth input,
.field input,
.nickname-inputs input {
  width: 100%;
  min-width: 0;
  border: 1px solid #cbdaed;
  padding: 10px 12px;
  background: #fff;
  border-radius: 11px;
}
.field,
.auth label {
  display: grid;
  gap: 6px;
  margin: 13px 0;
  font-size: 13px;
  font-weight: 650;
}
.field-feedback,
.error {
  line-height: 1.5;
  font-size: 12px;
  color: #a1324f;
}
.field-feedback:not(:empty) {
  margin-top: 6px;
}
.muted {
  color: var(--muted);
  line-height: 1.65;
}
.toast {
  position: fixed;
  z-index: 15;
  bottom: max(20px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 28px);
  width: max-content;
  border-radius: 14px;
  padding: 11px 17px;
  background: #18365a;
  color: white;
  font-size: 13px;
  box-shadow: 0 6px 24px #2135512e;
}
.avatar-editor {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  grid-template-areas: "avatar name" "avatar pick" "help help";
  align-items: center;
  gap: 5px 15px;
  padding: 12px;
  border-radius: 15px;
  background: linear-gradient(120deg, #eff6ff, #f6f2ff);
}
.crop-stage {
  grid-area: avatar;
  display: grid;
  place-items: center;
  overflow: hidden;
  width: 72px;
  height: 72px;
  outline: 2px solid #fff;
  border-radius: 50%;
}
.crop-stage > .avatar,
.crop-canvas {
  width: 100%;
  height: 100%;
}
.crop-stage > .avatar {
  font-size: 28px;
}
.crop-canvas {
  display: block;
  border-radius: 50%;
  touch-action: none;
  cursor: grab;
}
.crop-canvas:active {
  cursor: grabbing;
}
.profile-name {
  grid-area: name;
  align-self: end;
  font-size: 16px;
  font-weight: 700;
}
.avatar-editor > .outlined {
  grid-area: pick;
  justify-self: start;
  align-self: start;
  min-height: 31px;
  font-size: 12px;
}
.crop-help {
  grid-area: help;
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
}
.crop-scale {
  grid-area: scale;
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}
.crop-scale input {
  flex: 1;
  min-width: 0;
  accent-color: var(--blue);
}
.avatar-editor.cropping {
  grid-template-columns: 108px minmax(0, 1fr);
  grid-template-areas: "avatar name" "avatar pick" "avatar scale" "help help";
}
.cropping .crop-stage {
  width: 104px;
  height: 104px;
}
.nickname-form {
  margin: 17px 0 10px;
}
.nickname-form .field {
  margin: 0 0 6px;
}
.nickname-inputs {
  display: flex;
  align-items: center;
  gap: 7px;
}
.nickname-inputs button {
  flex: none;
}
.profile-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 14px;
}
.profile-actions:has(button:disabled + button:disabled) {
  display: none;
}
.link-button {
  color: var(--blue);
  font-size: 13px;
  padding: 8px 0;
}
.auth {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(ellipse at 8% 5%, #d1eaff 0%, transparent 53%),
    radial-gradient(ellipse at 95% 94%, #e4ddff 0%, transparent 50%), #f3f7fd;
}
.auth-shell {
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
  width: min(820px, 100%);
  border: 1px solid #cedcf0;
  border-radius: 26px;
  overflow: hidden;
  background: white;
  box-shadow: 0 22px 70px #183f721a;
}
.auth-art {
  isolation: isolate;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 435px;
  padding: 34px;
  color: #fff;
  background: linear-gradient(146deg, #117bc4, #3757b9 65%, #8368bd);
}
.auth-art::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background-image: radial-gradient(#b2dcff5c 1px, transparent 1px);
  background-size: 19px 19px;
}
.auth-brand-title {
  font-size: 21px;
  font-weight: 650;
}
.art-orbits {
  position: absolute;
  inset: 23% -9% 24% 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.art-orbits i {
  position: absolute;
  width: 78%;
  height: 38%;
  border: 1px solid #b7e2ff8f;
  border-radius: 50%;
  transform: rotate(-27deg);
}
.art-orbits i:nth-child(2) {
  transform: rotate(35deg);
}
.art-orbits i:nth-child(3) {
  transform: rotate(95deg);
}
.art-orbits b {
  width: 23px;
  height: 23px;
  border-radius: 50%;
  border: 6px solid #d2f1ff;
  box-shadow: 0 0 0 8px #dff7ff24;
}
.auth-card {
  align-self: center;
  min-width: 0;
  padding: 36px 40px;
}
.auth-card .brand {
  display: none;
}
.auth h1 {
  font-size: 26px;
  letter-spacing: -0.035em;
}
#auth-help {
  margin: 8px 0 22px;
  font-size: 13px;
}
.auth .error {
  margin: 9px 0;
}
.auth .primary {
  min-height: 44px;
  margin-top: 8px;
}
@media (max-width: 950px) and (min-width: 721px) {
  .workspace {
    grid-template-columns: 56px 224px minmax(0, 1fr);
  }
  .rail {
    padding-inline: 4px;
  }
  .rail-brand {
    width: 35px;
    height: 35px;
  }
  .send-tools > span {
    display: none;
  }
}
@media (max-width: 720px),
  (pointer: coarse) and (max-height: 500px) and (max-width: 1000px) {
  :root {
    --head: 61px;
  }
  .workspace {
    position: fixed;
    inset-inline: 0;
    top: var(--visible-top, 0px);
    height: 100dvh;
    height: min(100dvh, var(--visible-height, 100dvh));
    min-height: 0;
    display: block;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
  .rail,
  .workspace .sidebar,
  .workspace.list-mode .conversation {
    display: none;
  }
  .workspace.list-mode .sidebar,
  .workspace .conversation {
    display: flex;
    height: 100%;
    min-width: 0;
  }
  .mobile-only {
    display: inline-flex;
  }
  .side-brand {
    padding: calc(13px + env(safe-area-inset-top)) 17px 10px;
    align-items: center;
  }
  .side-brand img {
    display: block;
    width: 33px;
    height: 33px;
  }
  .sidebar-title {
    padding: 1px 14px 8px 18px;
  }
  .sidebar-title h2 {
    font-size: 23px;
  }
  .search,
  .filters {
    margin-inline: 13px;
  }
  .search {
    min-height: 43px;
    margin-bottom: 9px;
  }
  .filters {
    margin-bottom: 8px;
  }
  .filters button {
    min-height: 36px;
  }
  .room-row {
    min-height: 65px;
    padding: 9px 10px;
  }
  .room-row .avatar {
    width: 43px;
    height: 43px;
  }
  .identity {
    padding: 7px 12px max(7px, env(safe-area-inset-bottom));
    min-height: 58px;
  }
  .profile-button,
  .identity .icon,
  .sidebar-title .icon,
  .topbar button,
  .left-tools .icon,
  .emoji-close {
    min-width: 44px;
    min-height: 44px;
  }
  .topbar {
    height: calc(var(--head) + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 9px 0 4px;
    gap: 6px;
  }
  .topbar::before,
  .topbar::after {
    width: 150px;
    height: 80px;
    right: -7%;
  }
  .topbar #show-rooms {
    border: 0;
    background: transparent;
  }
  .room-avatar .avatar {
    width: 35px;
    height: 35px;
    font-size: 14px;
  }
  .room-heading h1 {
    font-size: 17px;
  }
  .room-heading p {
    font-size: 11px;
  }
  .connection {
    font-size: 0;
    border: 0;
    background: none;
    padding: 5px;
    gap: 0;
  }
  #members {
    padding: 0;
    font-size: 0;
    gap: 0;
    border: 0;
    background: transparent;
  }
  .timeline {
    scrollbar-gutter: auto;
  }
  .message-list {
    gap: 13px;
    padding: 14px 11px;
  }
  .msg {
    gap: 6px;
  }
  .msg > .avatar {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }
  .msg-content {
    max-width: calc(100% - 49px);
  }
  .bubble {
    font-size: 15px;
    padding: 7px 12px;
  }
  .file-card {
    min-width: min(190px, 100%);
  }
  .compose-area {
    padding: 6px 7px max(7px, env(safe-area-inset-bottom));
    background: #f2f6fd;
    border-top: 1px solid #dce5f3;
  }
  .keyboard-up .compose-area {
    padding-bottom: 5px;
  }
  .composer {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: end;
    padding: 2px;
    border-radius: 16px;
    min-height: 48px;
    box-shadow: 0 2px 7px #2545730c;
  }
  #message {
    grid-column: 2;
    grid-row: 1;
    min-height: 40px;
    max-height: 96px;
    padding: 9px 2px;
    line-height: 22px;
  }
  .compose-tools,
  .send-tools {
    display: contents;
  }
  .send-tools > span {
    display: none;
  }
  .left-tools {
    grid-column: 1;
    grid-row: 1;
    gap: 0;
  }
  .left-tools .icon {
    width: 44px;
    height: 44px;
  }
  .send {
    grid-column: 3;
    grid-row: 1;
    align-self: end;
    min-height: 44px;
    min-width: 51px;
    margin-left: 3px;
    padding: 0 9px;
  }
  .send svg {
    display: none;
  }
  .emoji-picker {
    position: static;
    width: 100%;
    max-height: min(36vh, 291px);
    max-height: min(38dvh, 291px);
    border-radius: 15px;
    box-shadow: none;
    margin-bottom: 5px;
  }
  .emoji-bar {
    padding: 2px 5px 0 12px;
  }
  .emoji-tabs {
    padding: 0 5px 4px;
  }
  .emoji-tabs button {
    min-height: 36px;
    padding: 4px 8px;
  }
  .emoji-search {
    width: 52%;
    padding: 5px 8px;
  }
  .emoji-grid {
    grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
  }
  .glyph {
    min-height: 44px;
  }
  input:not([type="range"]):not([type="checkbox"]),
  textarea,
  #message,
  .emoji-search {
    font-size: 16px;
  }
  .picture img {
    max-width: min(205px, 100%);
    max-height: 180px;
  }
  dialog {
    width: min(
      430px,
      calc(100% - 20px - env(safe-area-inset-left) - env(safe-area-inset-right))
    );
    max-height: calc(
      var(--visible-height, 100dvh) - 18px - env(safe-area-inset-top) -
        env(safe-area-inset-bottom)
    );
    padding: 0 16px 16px;
  }
  dialog[open] {
    position: fixed;
    top: calc(var(--visible-top, 0px) + env(safe-area-inset-top) + 8px);
    bottom: auto;
    margin: 0 auto;
  }
  .dialog-head {
    padding-top: 9px;
  }
  #close-dialog,
  .option-tabs button,
  .person button,
  .dialog-actions button,
  .nickname-inputs button,
  .profile-actions button,
  .avatar-editor > .outlined,
  .invite-box button {
    min-height: 44px;
  }
  .auth {
    padding: calc(18px + env(safe-area-inset-top))
      max(16px, env(safe-area-inset-right))
      calc(18px + env(safe-area-inset-bottom))
      max(16px, env(safe-area-inset-left));
  }
  .auth-shell {
    display: block;
    max-width: 420px;
  }
  .auth-art {
    display: none;
  }
  .auth-card {
    padding: 25px;
  }
  .auth-card .brand {
    display: flex;
    margin-bottom: 23px;
  }
  .toast {
    bottom: max(60px, calc(env(safe-area-inset-bottom) + 50px));
  }
}
@media (pointer: coarse) and (max-height: 500px) {
  :root {
    --head: 46px;
  }
  .emoji-picker {
    max-height: 43dvh;
  }
  .side-brand {
    padding-block: 5px;
  }
  .sidebar-title {
    padding-bottom: 3px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .room-row,
  .icon,
  .outlined,
  .rail-button,
  .filters button {
    transition:
      background-color 0.15s,
      color 0.15s,
      box-shadow 0.15s;
  }
}
@media (forced-colors: active) {
  .room-row.selected,
  .filters button[aria-pressed="true"],
  .emoji-tabs button[aria-pressed="true"] {
    outline: 2px solid Highlight;
  }
  .connection::before {
    background: CanvasText;
  }
}
