:root {
  color: #111827;
  font-synthesis: none;
  --primary: #5368ff;
  --accent: #934cff;
  --danger: #ed465d;
  --success: #31b67a;
  --surface: #f8f9fdc2;
  --surface-solid: #f5f6fa;
  --line: #30374b1f;
  --muted: #6f7583;
  --text: #10131a;
  --shadow: 0 18px 55px #1e25401f;
  --radius: 28px;
  --lightningcss-light: initial;
  --lightningcss-dark: ;
  color-scheme: light;
  background: #fff;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    Segoe UI,
    sans-serif;
}

/* Login refresh: scoped to the unauthenticated screen so messenger UI is unchanged. */
.login-page {
  min-height: 100dvh;
  height: auto;
  padding: clamp(28px, 5vh, 64px) clamp(24px, 6vw, 88px);
  overflow: auto;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(350px, 1.06fr) minmax(320px, 0.94fr);
  align-items: center;
  gap: clamp(48px, 7vw, 104px);
  width: min(100%, 1040px);
  margin: auto;
}

.login-primary {
  display: grid;
  gap: 20px;
  width: min(100%, 460px);
  justify-self: center;
}

.login-intro {
  display: grid;
  justify-items: center;
  text-align: center;
}

.login-logo {
  display: block;
  width: 104px;
  height: 104px;
  border-radius: 25px;
  box-shadow: 0 17px 44px rgba(60, 66, 218, 0.3);
}

.login-intro h1 {
  margin: 17px 0 0;
  font-size: clamp(39px, 4vw, 52px);
  line-height: 1;
  letter-spacing: -0.055em;
}

.login-intro p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 16px;
  font-weight: 650;
}

.login-card {
  width: 100%;
  padding: 25px;
  border-radius: 27px;
  text-align: left;
}

.login-card form {
  gap: 14px;
  margin: 0;
}

.login-card input {
  width: 100%;
  min-height: 52px;
  padding: 14px 15px;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.login-card input:focus {
  border-color: color-mix(in srgb, var(--primary) 72%, transparent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 14%, transparent);
}

.login-card input:disabled {
  opacity: 0.68;
}

.login-card .primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  margin-top: 2px;
}

.login-card .primary:disabled {
  cursor: wait;
  opacity: 0.76;
}

.login-spinner {
  width: 17px;
  height: 17px;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.beta-notice {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  padding: 15px 16px;
  border-radius: 20px;
  box-shadow: 0 12px 34px rgba(30, 37, 64, 0.1);
}

.beta-icon {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-weight: 900;
  font-family: ui-serif, Georgia, serif;
}

.beta-notice strong {
  display: block;
  font-size: 13px;
  line-height: 1.4;
}

.beta-notice p {
  margin: 4px 0 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.beta-notice a,
.testing-link {
  color: #7760f3;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.beta-notice a:hover,
.testing-link:hover {
  text-decoration: underline;
}

.android-card {
  display: grid;
  justify-items: center;
  align-content: center;
  width: min(100%, 400px);
  min-height: 510px;
  padding: 38px 36px;
  border-radius: 34px;
  justify-self: center;
  text-align: center;
  overflow: hidden;
  position: relative;
}

.android-card::before {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  top: -150px;
  right: -80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  filter: blur(12px);
  opacity: 0.22;
  pointer-events: none;
}

.android-kicker {
  color: #8871f8;
  letter-spacing: 0.16em;
  font-size: 11px;
  font-weight: 900;
}

.android-card h2 {
  margin: 9px 0 7px;
  font-size: 28px;
  letter-spacing: -0.035em;
}

.android-card > p {
  max-width: 285px;
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.5;
}

.android-qr {
  display: block;
  width: 218px;
  height: 218px;
  padding: 12px;
  border-radius: 22px;
  background: #fff;
  image-rendering: pixelated;
}

.play-cta {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 52px;
  margin-top: 20px;
  border-radius: 17px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-weight: 850;
  text-decoration: none;
  box-shadow: 0 12px 26px rgba(83, 104, 255, 0.24);
}

.testing-link {
  margin-top: 13px;
}

.android-card > small {
  max-width: 290px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

[data-theme="dark"] .beta-notice,
[data-theme="dark"] .android-card {
  background: rgba(28, 31, 41, 0.8);
}

@media (max-width: 800px) {
  .login-page {
    min-height: 100dvh;
    padding: calc(38px + env(safe-area-inset-top))
      max(20px, env(safe-area-inset-right))
      calc(30px + env(safe-area-inset-bottom))
      max(20px, env(safe-area-inset-left));
    background: radial-gradient(circle at 88% 0, #261b52 0, transparent 32%),
      radial-gradient(circle at 3% 52%, #102d3e 0, transparent 36%),
      var(--app-background) !important;
  }

  [data-theme="light"] .login-page {
    background: radial-gradient(circle at 88% 0, #ddd6ff 0, transparent 32%),
      radial-gradient(circle at 3% 52%, #d5efff 0, transparent 36%),
      var(--app-background) !important;
  }

  .login-shell {
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
    width: min(100%, 440px);
  }

  .login-primary {
    width: 100%;
    gap: 18px;
  }

  .login-intro {
    padding-top: 0;
    text-align: center;
  }

  .login-logo {
    width: 88px;
    height: 88px;
    margin: 0 auto;
    border-radius: 22px;
  }

  .login-intro h1 {
    margin-top: 14px;
    font-size: 43px;
  }

  .login-intro p {
    margin-top: 8px;
    font-size: 16px;
  }

  .login-card {
    margin: 0;
    padding: 19px;
    border: 1px solid var(--line);
    border-radius: 25px;
    background: var(--surface);
    box-shadow: var(--shadow);
    -webkit-backdrop-filter: blur(23px);
    backdrop-filter: blur(23px);
  }

  .login-card label,
  .login-card label:first-line {
    position: static;
    color: var(--muted);
    font-size: 12px;
  }

  .login-card label::before {
    content: none !important;
  }

  .login-card input {
    height: 54px;
    min-height: 54px;
    padding: 0 15px;
    border-radius: 17px;
    font-size: 16px;
  }

  .login-card button {
    height: 54px;
    min-height: 54px;
    border-radius: 17px;
    font-size: 16px;
  }

  .beta-notice {
    margin: 0;
  }

  .android-card {
    width: 100%;
    min-height: 0;
    padding: 27px 22px;
    border-radius: 27px;
  }

  .android-card h2 {
    font-size: 25px;
  }

  .android-card > p {
    margin-bottom: 4px;
  }

  .android-qr {
    display: none;
  }

  .play-cta {
    margin-top: 16px;
  }
}

@media (max-height: 820px) and (min-width: 801px) {
  .login-page {
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .login-logo {
    width: 86px;
    height: 86px;
  }

  .login-intro h1 {
    margin-top: 13px;
    font-size: 42px;
  }

  .android-card {
    min-height: 0;
    padding-top: 28px;
    padding-bottom: 28px;
  }

  .android-qr {
    width: 190px;
    height: 190px;
  }
}
* {
  box-sizing: border-box;
}
html,
body,
#root {
  min-width: 320px;
  height: 100%;
  min-height: 100%;
  margin: 0;
}
body {
  color: var(--text);
  overflow: hidden;
}
button,
input,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
.sova-background {
  background:
    radial-gradient(circle at 90% 0, #d8d1ff 0, #0000 32%),
    radial-gradient(circle at 5% 78%, #d3ecff 0, #0000 34%),
    linear-gradient(155deg, #fff, #f2f4f9);
}
.glass {
  background: var(--surface);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(23px);
  border: 1px solid #ffffffe6;
}
.app {
  grid-template-columns: 252px 1fr;
  gap: 18px;
  height: 100dvh;
  padding: 18px;
  display: grid;
}
.desktop-nav {
  border-radius: 30px;
  flex-direction: column;
  gap: 7px;
  min-height: 0;
  padding: 18px;
  display: flex;
}
.brand {
  align-items: center;
  gap: 11px;
  padding: 3px 4px 22px;
  font-size: 25px;
  display: flex;
}
.sova-logo {
  color: #fff;
  background: linear-gradient(140deg, #07bdf0, #2459ed 55%, #7f31ee);
  border-radius: 25px;
  place-items: center;
  width: 72px;
  height: 72px;
  font-size: 34px;
  font-weight: 950;
  display: grid;
  box-shadow: 0 12px 30px #4a4cec4d;
}
.sova-logo.small {
  border-radius: 15px;
  width: 43px;
  height: 43px;
  font-size: 20px;
}
.desktop-nav > button,
.mobile-nav button,
.page-header button,
.conversation-header button,
.composer button,
.row-action,
.message-delete {
  background: 0 0;
  border: 0;
}
.desktop-nav > button {
  height: 50px;
  color: var(--muted);
  border-radius: 17px;
  align-items: center;
  gap: 12px;
  padding: 0 15px;
  font-weight: 750;
  display: flex;
}
.desktop-nav > button.active {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
}
.desktop-nav svg {
  width: 21px;
}
.connection {
  border-top: 1px solid var(--line);
  color: var(--muted);
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding: 17px 5px 3px;
  font-size: 13px;
  display: flex;
}
.connection i,
.presence i {
  background: #aeb2bd;
  border-radius: 99px;
  width: 8px;
  height: 8px;
}
.connection i.online,
.presence.online i {
  background: #35c889;
}
.workspace {
  grid-template-columns: minmax(360px, 520px) minmax(470px, 1fr);
  gap: 18px;
  min-width: 0;
  min-height: 0;
  display: grid;
}
.workspace:not(.has-conversation) {
  grid-template-columns: minmax(380px, 820px);
  justify-content: center;
}
.list-pane {
  min-width: 0;
  padding: 8px 7px 100px;
  overflow: auto;
}
.page-header {
  justify-content: space-between;
  align-items: center;
  height: 75px;
  padding: 0 5px 12px;
  display: flex;
}
.page-header h1 {
  letter-spacing: -0.04em;
  margin: 0;
  font-size: 40px;
}
.page-header button {
  background: var(--surface);
  width: 46px;
  height: 46px;
  box-shadow: var(--shadow);
  border-radius: 16px;
}
.cards {
  gap: 12px;
  display: grid;
}
.conversation-card {
  isolation: isolate;
  cursor: pointer;
  border-radius: 27px;
  align-items: center;
  gap: 13px;
  min-height: 94px;
  padding: 15px 14px;
  display: flex;
  position: relative;
  overflow: visible;
}
.conversation-card:before {
  content: "";
  border-radius: inherit;
  pointer-events: none;
  z-index: 2;
  position: absolute;
  inset: 0;
}
.conversation-card:active:before {
  background: #5266ff17;
}
.conversation-card.has-unread:after {
  content: "";
  border: 2.5px solid var(--danger);
  border-radius: inherit;
  clip-path: polygon(
    0 0,
    100% 0,
    100% 100%,
    58% 100%,
    58% 97%,
    42% 97%,
    42% 100%,
    0 100%
  );
  pointer-events: none;
  position: absolute;
  inset: -1px;
}
.avatar {
  color: #fff;
  background: linear-gradient(145deg, #13bde9, #3955ed 57%, #8241e5);
  border: 3px solid #fff9;
  border-radius: 50%;
  flex: none;
  place-items: center;
  width: 57px;
  height: 57px;
  font-size: 22px;
  font-weight: 900;
  display: grid;
  overflow: hidden;
}
.avatar-large {
  width: 76px;
  height: 76px;
  font-size: 28px;
}
.avatar img {
  object-fit: cover;
  width: 100%;
  height: 100%;
}
.conversation-main {
  flex: 1;
  min-width: 0;
}
.conversation-title {
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 850;
  display: flex;
}
.conversation-title time {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}
.name {
  align-items: center;
  gap: 4px;
  min-width: 0;
  font-weight: 850;
  display: inline-flex;
}
.name > span {
  overflow-wrap: anywhere;
}
.verified {
  color: #139ee9;
  fill: #139ee9;
  stroke: #fff;
  flex: none;
  width: 18px;
  height: 18px;
}
.conversation-main p {
  color: var(--muted);
  white-space: nowrap;
  text-overflow: ellipsis;
  margin: 7px 0 0;
  overflow: hidden;
}
.row-action {
  width: 34px;
  height: 34px;
  color: var(--muted);
  opacity: 0;
  border-radius: 12px;
  place-items: center;
  transition: all 0.15s;
  display: grid;
}
.row-action svg {
  width: 17px;
}
.conversation-card:hover .row-action,
.contact-card:hover .row-action {
  opacity: 1;
}
.unread-counter {
  z-index: 4;
  color: var(--danger);
  background: 0 0;
  font-size: 12px;
  font-weight: 900;
  line-height: 14px;
  position: absolute;
  bottom: -7px;
  left: 50%;
  transform: translate(-50%);
}
.search {
  border-radius: 20px;
  align-items: center;
  gap: 9px;
  height: 58px;
  margin-bottom: 15px;
  padding: 0 14px;
  display: flex;
}
.search input,
.setting-card input {
  background: 0 0;
  border: 0;
  outline: 0;
  flex: 1;
  min-width: 0;
}
.search button {
  background: var(--primary);
  color: #fff;
  border: 0;
  border-radius: 14px;
  padding: 9px 13px;
  font-weight: 750;
}
.contact-grid {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  display: grid;
}
.contact-card {
  text-align: center;
  cursor: pointer;
  border-radius: 27px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 9px;
  min-height: 180px;
  padding: 22px;
  display: flex;
  position: relative;
}
.contact-card .row-action {
  position: absolute;
  top: 10px;
  right: 10px;
}
.presence {
  color: var(--muted);
  align-items: center;
  gap: 7px;
  font-size: 12px;
  display: flex;
}
.presence.online {
  color: #189963;
}
.empty {
  text-align: center;
  min-height: 220px;
  color: var(--muted);
  border-radius: 28px;
  grid-column: 1/-1;
  align-content: center;
  place-items: center;
  display: grid;
}
.empty svg {
  width: 38px;
  height: 38px;
  color: var(--primary);
}
.empty h2 {
  font-size: 16px;
}
.conversation-view {
  border: 1px solid var(--line);
  background: #ffffff40;
  border-radius: 31px;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
  height: calc(100dvh - 36px);
  display: grid;
  overflow: hidden;
}
.conversation-header {
  z-index: 2;
  border-radius: 30px 30px 0 0;
  align-items: center;
  gap: 10px;
  height: 88px;
  padding: 10px 14px;
  display: flex;
  box-shadow: 0 10px 25px #14192d12;
}
.conversation-header > button {
  border-radius: 15px;
  place-items: center;
  width: 42px;
  height: 42px;
  display: grid;
}
.conversation-header > button:hover {
  background: #5266ff1a;
}
.conversation-header .avatar {
  width: 49px;
  height: 49px;
}
.peer-block {
  flex-direction: column;
  flex: 1;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
  display: flex;
}
.peer-block .name {
  max-width: 100%;
  font-size: 16px;
}
.message-list {
  scrollbar-width: thin;
  min-height: 0;
  padding: 20px 18px 12px;
  overflow: auto;
}
.message-row {
  margin: 6px 0;
  display: flex;
}
.message-row.mine {
  justify-content: flex-end;
}
.message-bubble {
  background: var(--surface-solid);
  border-radius: 21px 21px 21px 7px;
  max-width: min(78%, 560px);
  padding: 11px 13px 7px;
  position: relative;
  box-shadow: 0 7px 22px #1e254014;
}
.message-row.mine .message-bubble {
  color: #fff;
  background: linear-gradient(135deg, #5368ff, #7948e9);
  border-radius: 21px 21px 7px;
}
.message-bubble p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0;
}
.message-bubble footer {
  opacity: 0.68;
  justify-content: flex-end;
  align-items: center;
  gap: 3px;
  margin-top: 5px;
  font-size: 10px;
  display: flex;
}
.message-bubble.sending {
  opacity: 0.66;
}
.image-bubble {
  min-width: 190px;
  padding: 4px;
}
.image-bubble img {
  object-fit: contain;
  pointer-events: none;
  border-radius: 18px;
  width: min(100%, 380px);
  max-height: 470px;
  display: block;
}
.image-bubble footer {
  padding: 0 7px 3px;
}
.image-error {
  height: 160px;
  color: var(--muted);
  align-content: center;
  place-items: center;
  gap: 8px;
  display: grid;
}
.message-delete {
  background: var(--surface-solid);
  width: 25px;
  height: 25px;
  color: var(--danger);
  box-shadow: var(--shadow);
  border-radius: 9px;
  place-items: center;
  display: none;
  position: absolute;
  top: -9px;
  left: -9px;
}
.message-bubble:hover .message-delete {
  display: grid;
}
.message-delete svg {
  width: 13px;
}
.composer-wrap {
  padding: 8px 12px 13px;
}
.composer {
  border-radius: 23px;
  align-items: flex-end;
  gap: 4px;
  min-height: 58px;
  padding: 8px;
  display: flex;
}
.composer button {
  width: 42px;
  height: 42px;
  color: var(--primary);
  border-radius: 15px;
  flex: none;
  place-items: center;
  display: grid;
}
.composer button.send {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
}
.composer textarea {
  resize: none;
  background: 0 0;
  border: 0;
  outline: 0;
  flex: 1;
  min-width: 0;
  max-height: 120px;
  padding: 10px 8px;
}
.image-preview {
  border-radius: 18px;
  width: 124px;
  height: 92px;
  margin: 0 0 7px 8px;
  padding: 4px;
  position: relative;
}
.image-preview img {
  object-fit: cover;
  border-radius: 14px;
  width: 100%;
  height: 100%;
}
.image-preview button {
  background: var(--danger);
  color: #fff;
  border: 0;
  border-radius: 50%;
  width: 25px;
  height: 25px;
  position: absolute;
  top: -6px;
  right: -6px;
}
.settings-list {
  gap: 12px;
  display: grid;
}
.profile-card,
.setting-card {
  border-radius: 27px;
  padding: 22px;
}
.profile-card {
  align-items: center;
  gap: 14px;
  display: flex;
}
.profile-card > span:last-child {
  color: var(--muted);
  margin-left: auto;
}
.setting-card {
  gap: 12px;
  display: grid;
}
.setting-card h2 {
  margin: 0;
}
.setting-card label {
  color: var(--muted);
  gap: 7px;
  font-size: 12px;
  display: grid;
}
.setting-card input {
  background: #7f869a17;
  border-radius: 15px;
  padding: 13px;
}
.primary,
.destructive,
.setting-card button,
.dialog-actions button {
  border: 0;
  border-radius: 16px;
  min-height: 46px;
  padding: 0 18px;
  font-weight: 800;
}
.primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
}
.destructive {
  color: #fff;
  background: var(--danger) !important;
}
.mobile-nav {
  display: none;
}
.notice-host {
  z-index: 90;
  left: 50%;
  bottom: max(25px, env(safe-area-inset-bottom));
  pointer-events: none;
  width: min(430px, 100% - 28px);
  position: fixed;
  transform: translate(-50%);
}
.notice {
  color: #fff;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  background: #1b1f2ae0;
  border-radius: 19px;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 12px 16px;
  animation: 0.25s ease-out notice-in;
  display: flex;
  box-shadow: 0 12px 40px #00000040;
}
.notice i {
  background: var(--primary);
  border-radius: 50%;
  width: 8px;
  height: 8px;
}
.notice.error i {
  background: var(--danger);
}
.notice.warning i {
  background: #eaa43c;
}
.notice.success i {
  background: var(--success);
}
@keyframes notice-in {
  0% {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.dialog-scrim {
  z-index: 80;
  background: #080a124d;
  place-items: center;
  padding: 20px;
  display: grid;
  position: fixed;
  inset: 0;
}
.sova-dialog {
  border-radius: 30px;
  width: min(90vw, 370px);
  padding: 23px;
}
.sova-dialog h2 {
  margin: 0 0 11px;
  font-size: 21px;
}
.sova-dialog p {
  color: var(--muted);
  line-height: 1.45;
}
.dialog-actions {
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 22px;
  display: grid;
}
.call-overlay {
  z-index: 100;
  place-items: center;
  display: grid;
  position: fixed;
  inset: 0;
}
.call-card {
  border-radius: 42px;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: min(92vw, 430px);
  min-height: 500px;
  padding: 52px 24px;
  display: flex;
}
.call-card .name {
  font-size: 25px;
}
.call-card p {
  color: var(--muted);
}
.call-actions {
  gap: 24px;
  margin-top: auto;
  display: flex;
}
.call-actions button {
  border: 0;
  border-radius: 50%;
  place-items: center;
  width: 64px;
  height: 64px;
  display: grid;
}
.call-actions .accept {
  background: var(--success);
  color: #fff;
}
.call-actions .hangup {
  background: var(--danger);
  color: #fff;
}
.login-page {
  place-items: center;
  height: 100dvh;
  padding: 18px;
  display: grid;
}
.login-card {
  text-align: center;
  border-radius: 34px;
  width: min(410px, 100%);
  padding: 35px 28px;
}
.login-card .sova-logo {
  margin: auto;
}
.login-card h1 {
  margin: 18px 0 0;
  font-size: 38px;
}
.login-card p {
  color: var(--muted);
}
.login-card form {
  text-align: left;
  gap: 15px;
  margin: 27px 0 18px;
  display: grid;
}
.login-card label {
  color: var(--muted);
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  display: grid;
}
.login-card input {
  border: 1px solid var(--line);
  background: var(--input-bg, var(--surface-solid));
  border-radius: 17px;
  outline: none;
  padding: 15px;
}
.login-card small {
  color: var(--muted);
}
.loading {
  place-items: center;
  height: 100dvh;
  display: grid;
}
.loading span {
  border: 4px solid #505a7826;
  border-top-color: var(--primary);
  border-radius: 50%;
  width: 45px;
  height: 45px;
  animation: 0.8s linear infinite spin;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
[data-theme="dark"] {
  --surface: #1c1f29c7;
  --surface-solid: #222631;
  --line: #ffffff1a;
  --muted: #a7adba;
  --text: #f6f7fb;
  --shadow: 0 20px 60px #00000059;
  --lightningcss-light: ;
  --lightningcss-dark: initial;
  color-scheme: dark;
}
[data-theme="dark"] .sova-background {
  background:
    radial-gradient(circle at 90% 0, #261b52 0, #0000 31%),
    radial-gradient(circle at 4% 80%, #102d3e 0, #0000 35%), #080a0f;
}
[data-theme="dark"] .glass {
  border-color: #ffffff17;
}
[data-theme="dark"] .conversation-view {
  background: #05070b45;
}
[data-theme="dark"] .login-card input {
  background: var(--input-bg, var(--surface-solid));
}
@media (width<=800px) {
  body {
    overflow: hidden;
  }
  .app {
    padding: 0 12px 94px;
    display: block;
  }
  .desktop-nav {
    display: none;
  }
  .workspace,
  .workspace:not(.has-conversation) {
    min-width: 0;
    height: 100%;
    display: block;
  }
  .list-pane {
    height: 100%;
    padding: 13px 1px 98px;
  }
  .page-header {
    height: 76px;
    padding: 4px 6px 10px;
  }
  .page-header h1 {
    font-size: 34px;
  }
  .conversation-card {
    border-radius: 25px;
    min-height: 88px;
    padding: 13px 12px;
  }
  .conversation-card .row-action {
    display: none;
  }
  .contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .contact-card {
    min-height: 168px;
    padding: 18px 10px;
  }
  .mobile-nav {
    z-index: 30;
    left: 12px;
    right: 12px;
    bottom: max(10px, env(safe-area-inset-bottom));
    border-radius: 28px;
    grid-template-columns: repeat(3, 1fr);
    height: 76px;
    padding: 7px;
    display: grid;
    position: fixed;
  }
  .mobile-nav button {
    color: var(--muted);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2px;
    font-size: 11px;
    display: flex;
  }
  .mobile-nav button.active {
    color: var(--primary);
  }
  .mobile-nav svg {
    width: 23px;
  }
  .workspace.has-conversation .list-pane,
  .workspace.has-conversation ~ .mobile-nav {
    display: none;
  }
  .conversation-view {
    z-index: 35;
    background: 0 0;
    border: 0;
    border-radius: 0;
    height: 100dvh;
    position: fixed;
    inset: 0;
  }
  .conversation-header {
    height: 82px;
    padding-top: max(8px, env(safe-area-inset-top));
    border-radius: 0;
  }
  .conversation-header > button {
    width: 37px;
  }
  .conversation-header .avatar {
    width: 45px;
    height: 45px;
  }
  .message-list {
    padding: 14px 10px 9px;
  }
  .message-bubble {
    max-width: 84%;
  }
  .composer-wrap {
    padding: 7px 7px max(8px, env(safe-area-inset-bottom));
  }
  .notice-host {
    bottom: calc(92px + env(safe-area-inset-bottom));
  }
  .workspace.has-conversation ~ .notice-host {
    bottom: calc(76px + env(safe-area-inset-bottom));
  }
  .row-action {
    opacity: 1;
  }
  .message-delete {
    display: none;
  }
  .login-card {
    padding: 28px 21px;
  }
  .page-header button {
    width: 43px;
    height: 43px;
  }
  .conversation-title {
    font-size: 16px;
  }
}
@media (width<=390px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }
  .contact-card {
    min-height: 154px;
  }
  .avatar {
    width: 52px;
    height: 52px;
  }
  .conversation-header {
    gap: 5px;
  }
  .conversation-header > button {
    width: 34px;
  }
  .peer-block .name {
    font-size: 14px;
  }
}
.app.has-main-wallpaper:before {
  content: "";
  background-image: var(--main-wallpaper);
  z-index: 0;
  background-position: 50%;
  background-size: cover;
  position: fixed;
  inset: -24px;
}
.app.has-main-wallpaper.wallpaper-blurred:before {
  filter: blur(18px);
  transform: scale(1.05);
}
.conversation-wallpaper {
  border-radius: 31px;
  min-width: 0;
  min-height: 0;
  position: relative;
  overflow: hidden;
}
.conversation-wallpaper > .conversation-view {
  z-index: 1;
  position: relative;
}
.conversation-wallpaper.has-chat-wallpaper:before {
  content: "";
  background-image: var(--chat-wallpaper);
  z-index: 0;
  background-position: 50%;
  background-size: cover;
  position: absolute;
  inset: -20px;
}
.conversation-wallpaper.has-chat-wallpaper.wallpaper-blurred:before {
  filter: blur(18px);
  transform: scale(1.06);
}
.segmented {
  background: #7f869a17;
  border-radius: 18px;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 5px;
  display: grid;
}
.segmented button {
  background: 0 0;
  min-height: 40px;
  padding: 0 7px;
}
.segmented button.selected {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}
.file-button {
  cursor: pointer;
  background: #7f869a17;
  border-radius: 16px;
  place-items: center;
  min-height: 46px;
  font-weight: 800;
  color: var(--text) !important;
  display: grid !important;
}
.file-button input {
  display: none;
}
.switch-row {
  align-items: center;
  color: var(--text) !important;
  grid-template-columns: 1fr auto !important;
  font-size: 14px !important;
}
.switch-row span {
  gap: 4px;
  display: grid;
}
.switch-row small,
.setting-card > small {
  color: var(--muted);
  font-size: 12px;
}
.switch-row input {
  width: 22px;
  height: 22px;
  accent-color: var(--primary);
  padding: 0;
}
@media (width<=800px) {
  .conversation-wallpaper {
    z-index: 35;
    border-radius: 0;
    position: fixed;
    inset: 0;
  }
  .conversation-wallpaper .conversation-view {
    z-index: 1;
    position: absolute;
  }
  .settings-list {
    padding-bottom: 24px;
  }
}
.mobile-brand,
.mobile-new-chat {
  display: none;
}
.contact-main {
  flex: 1;
  min-width: 0;
}
.contact-id {
  color: var(--muted);
  font-size: 12px;
}
.favorite {
  color: var(--muted);
  background: 0 0;
  border: 0;
  place-items: center;
  width: 34px;
  height: 34px;
  display: grid;
}
.favorite svg {
  width: 20px;
}
.favorite.active {
  color: #967dff;
  fill: #967dff;
}
.contact-section {
  color: #8f75ff;
  background: #78787817;
  border-radius: 17px;
  align-items: center;
  gap: 9px;
  margin: 14px 0 8px;
  padding: 12px 15px;
  font-size: 16px;
  display: flex;
}
.contact-section svg {
  width: 19px;
}
.contact-list {
  gap: 10px;
  display: grid;
}
.official-label {
  color: var(--muted);
}
.profile-chips {
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  display: flex;
}
.profile-chips span,
.profile-chips button {
  color: var(--muted);
  background: #7878781f;
  border: 0;
  border-radius: 18px;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  display: flex;
}
.profile-chips span svg,
.profile-chips button svg {
  width: 15px;
  height: 15px;
}
.identity-row .presence {
  color: #38c887;
  background: #1eb4692e;
  border-radius: 18px;
  padding: 8px 13px;
}
.profile-editor {
  width: 100%;
}
.profile-editor summary {
  color: #8f75ff;
  cursor: pointer;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 10px;
  font-weight: 800;
  list-style: none;
  display: flex;
}
.profile-editor summary svg {
  width: 18px;
  height: 18px;
}
.profile-editor summary::-webkit-details-marker {
  display: none;
}
.profile-editor:not([open]) .setting-card {
  display: none;
}
.profile-editor .setting-card {
  width: 100%;
}
.settings-heading {
  margin: 12px 4px 4px;
  font-size: 25px;
}
.avatar-selector-title {
  margin-top: 6px;
  font-weight: 800;
}
.gradient-ocean {
  background: linear-gradient(145deg, #00a8ff, #7048f5);
}
.gradient-violet {
  background: linear-gradient(145deg, #7957f4, #d14cff);
}
.gradient-sunset {
  background: linear-gradient(145deg, #ff7a45, #ef3f8f);
}
.gradient-mint {
  background: linear-gradient(145deg, #00c6a7, #37a7ff);
}
.gradient-rose {
  background: linear-gradient(145deg, #ff4d8d, #9b51e0);
}
.profile-avatar-picker {
  cursor: pointer;
  position: relative;
}
.profile-avatar-picker > span {
  background: #282b34;
  border-radius: 50%;
  place-items: center;
  width: 28px;
  height: 28px;
  display: grid;
  position: absolute;
  bottom: 0;
  right: -2px;
}
.profile-avatar-picker > span svg {
  width: 15px;
}
.profile-avatar-picker input,
.choose-avatar input {
  display: none;
}
.choose-avatar {
  color: #8f75ff;
  cursor: pointer;
  font-weight: 800;
}
.avatar-palette {
  justify-content: center;
  gap: 11px;
  display: flex;
}
.avatar-palette button {
  border: 3px solid #0000;
  border-radius: 50%;
  width: 27px;
  height: 27px;
  padding: 0;
}
.avatar-palette button.selected {
  outline-offset: 2px;
  outline: 2px solid #fff;
}
.setting-card .destructive {
  justify-content: center;
  align-items: center;
  gap: 10px;
  width: 100%;
  display: flex;
}
.peer-profile-link {
  text-align: left;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  flex: 1 !important;
  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
  display: flex !important;
}
.peer-profile-link:disabled {
  cursor: default;
}
.modal-screen {
  z-index: 70;
  padding: 18px max(18px, 50vw - 310px) 40px;
  position: fixed;
  inset: 0;
  overflow: auto;
}
.subpage-header {
  grid-template-columns: 46px 1fr 46px;
  align-items: center;
  height: 68px;
  display: grid;
}
.subpage-header button {
  background: 0 0;
  border: 0;
  width: 44px;
  height: 44px;
}
.subpage-header h1 {
  text-align: center;
  margin: 0;
  font-size: 26px;
}
.search-results {
  gap: 9px;
  display: grid;
}
.search-results > button {
  border: 1px solid var(--line);
  background: var(--surface-solid);
  text-align: left;
  border-radius: 21px;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  display: flex;
}
.search-results > button > span {
  gap: 2px;
  display: grid;
}
.search-results small {
  color: var(--muted);
}
.public-profile {
  flex-direction: column;
  align-items: center;
  gap: 10px;
  max-width: 560px;
  margin: 24px auto;
  display: flex;
}
.public-profile > .name {
  font-size: 25px;
}
.public-profile-actions {
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  margin-top: 16px;
  display: grid;
}
.public-profile-actions button {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 17px;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  font-weight: 800;
  display: flex;
}
.public-profile-actions .favorite-active {
  color: #f4b33b;
}
.public-profile-actions svg {
  width: 19px;
}
.search-clear {
  display: none;
}
.search-meta {
  align-items: center;
  gap: 8px;
  display: flex;
}
.search-results .presence {
  font-size: 12px;
}
.search-hint {
  text-align: center;
  max-width: 310px;
  color: var(--muted);
  margin: 170px auto 0;
  line-height: 1.45;
}
.user-profile-screen {
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
  background: #0000009e;
  place-items: center;
  padding: 22px;
  display: grid;
}
.public-profile-card {
  border-radius: 31px;
  width: min(100%, 650px);
  padding: 22px;
}
.public-profile-card > header {
  justify-content: space-between;
  align-items: center;
  display: flex;
}
.public-profile-card h1 {
  margin: 0;
  font-size: 25px;
}
.public-profile-card > header button {
  background: 0 0;
  border: 0;
  font-size: 38px;
  line-height: 1;
}
.public-profile {
  margin: 18px auto 0;
}
.public-profile .avatar-large {
  width: 96px;
  height: 96px;
}
.profile-favorite {
  color: #9b83ff;
  background: #765cee21;
  border: 0;
  border-radius: 18px;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 52px;
  font-weight: 800;
  display: flex;
}
.profile-favorite svg {
  fill: currentColor;
  width: 19px;
}
.public-profile-actions {
  grid-template-columns: repeat(3, 1fr);
}
.public-profile-actions button {
  background: #765cee21;
  border: 0;
  flex-direction: column;
  gap: 8px;
  min-height: 104px;
  font-size: 12px;
}
.public-profile-actions button svg {
  fill: #9b83ff;
  color: #9b83ff;
  width: 27px;
  height: 27px;
}
.public-profile-actions .primary {
  color: inherit;
  background: 0 0;
}
.call-video {
  background: #101116;
  border-radius: 28px;
  width: 100%;
  height: 270px;
  position: relative;
  overflow: hidden;
}
.call-video video {
  object-fit: cover;
  width: 100%;
  height: 100%;
}
.call-video .local-video {
  border: 1px solid #ffffff4d;
  border-radius: 17px;
  width: 92px;
  height: 125px;
  position: absolute;
  bottom: 10px;
  right: 10px;
}
@media (width>=801px) {
  .app {
    grid-template-columns: 210px 1fr;
    gap: 12px;
    padding: 12px;
  }
  .desktop-nav {
    border-radius: 24px;
    padding: 13px;
  }
  .brand {
    padding-bottom: 14px;
    font-size: 21px;
  }
  .workspace {
    grid-template-columns: minmax(330px, 440px) minmax(430px, 760px);
    justify-content: center;
    gap: 12px;
  }
  .workspace:not(.has-conversation) {
    grid-template-columns: minmax(360px, 620px);
  }
  .page-header {
    height: 62px;
  }
  .page-header h1 {
    font-size: 30px;
  }
  .conversation-card {
    border-radius: 22px;
    min-height: 78px;
    padding: 11px 12px;
  }
  .conversation-card .avatar {
    width: 50px;
    height: 50px;
  }
  .contact-card {
    text-align: left;
    border-radius: 21px;
    flex-direction: row;
    justify-content: flex-start;
    min-height: 74px;
    padding: 10px 12px;
  }
  .contact-card .avatar {
    width: 50px;
    height: 50px;
  }
  .contact-main {
    flex: 1;
  }
  .contact-card .row-action {
    position: static;
  }
  .settings-list {
    max-width: 620px;
    margin: auto;
  }
  .profile-card {
    text-align: center;
    flex-direction: column;
  }
  .profile-card > span:last-child {
    margin: 0;
  }
  .setting-card {
    border-radius: 22px;
    padding: 17px;
  }
  .conversation-view {
    border-radius: 25px;
    height: calc(100dvh - 24px);
  }
  .conversation-header {
    height: 76px;
  }
  .desktop-nav > button {
    height: 45px;
  }
}
@media (width<=800px) {
  :root {
    --radius: 22px;
  }
  .app {
    padding: 0 12px 91px;
    background: #000 !important;
  }
  .list-pane {
    padding: 8px 0 94px;
  }
  .page-header {
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    height: 92px;
    padding: 20px 8px 10px;
    display: grid;
    position: relative;
  }
  .page-header h1 {
    letter-spacing: -0.035em;
    text-shadow: 0 0 11px #ffffff4d;
    justify-self: center;
    font-size: 29px;
    font-weight: 900;
    line-height: 1;
  }
  .page-header .desktop-theme {
    display: none;
  }
  .mobile-brand {
    color: var(--text);
    justify-self: start;
    align-items: center;
    gap: 6px;
    font-size: 16px;
    display: flex;
  }
  .mobile-brand > span {
    color: #fff;
    background: linear-gradient(135deg, #268dff, #794bff);
    border-radius: 9px;
    padding: 4px 6px;
    font-size: 10px;
    box-shadow: 0 0 12px #5063ffb3;
  }
  .mobile-new-chat {
    color: #fff;
    justify-self: end;
    place-items: center;
    box-shadow: 0 0 18px #475dff73;
    background: linear-gradient(135deg, #288cff, #6b4cff) !important;
    border-radius: 50% !important;
    width: 46px !important;
    height: 46px !important;
    display: grid !important;
  }
  .mobile-new-chat svg {
    width: 27px;
  }
  .page-profile {
    grid-template-columns: 1fr;
  }
  .page-profile .mobile-brand {
    display: none;
  }
  .page-profile h1 {
    font-size: 30px;
  }
  .cards {
    gap: 10px;
  }
  .conversation-card {
    min-height: 72px;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: #1c1f27;
    border: 1px solid #3e424d;
    border-radius: 21px;
    gap: 11px;
    padding: 10px 12px;
  }
  .conversation-card .avatar {
    border-width: 2px;
    width: 50px;
    height: 50px;
  }
  .conversation-title {
    font-size: 15px;
  }
  .conversation-main p {
    margin-top: 2px;
    font-size: 14px;
  }
  .conversation-title time {
    display: none;
  }
  .conversation-card.has-unread:after {
    border-width: 2px;
  }
  .unread-counter {
    font-size: 11px;
    bottom: -6px;
  }
  .row-action {
    display: none !important;
  }
  .mobile-nav {
    height: 68px;
    left: 16px;
    right: 16px;
    bottom: max(8px, env(safe-area-inset-bottom));
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: #101116;
    border: 1px solid #363942;
    border-radius: 28px;
    padding: 5px 8px;
    box-shadow: 0 0 24px #0000008c;
  }
  .mobile-nav button {
    gap: 1px;
    font-size: 11px;
  }
  .mobile-nav svg {
    width: 23px;
    height: 23px;
  }
  .mobile-nav button.active {
    color: #9277ff;
  }
  .mobile-nav button.active svg {
    box-sizing: content-box;
    color: #fff;
    background: linear-gradient(135deg, #278cff, #7549ff);
    border-radius: 16px;
    padding: 5px 15px;
  }
  .search {
    height: 48px;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: #191a1f;
    border: 0;
    border-radius: 17px;
    margin: 0 0 10px;
  }
  .search button {
    padding: 7px 10px;
  }
  .contact-section {
    background: #191919;
    border-radius: 16px;
    height: 38px;
    margin: 10px 0 8px;
    padding: 0 13px;
    font-size: 14px;
  }
  .contact-list {
    gap: 9px;
  }
  .contact-card {
    text-align: left;
    min-height: 75px;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: #1c1f27;
    border: 1px solid #3e424d;
    border-radius: 20px;
    flex-direction: row;
    justify-content: flex-start;
    gap: 10px;
    padding: 10px 12px;
    display: flex;
  }
  .contact-card .avatar {
    width: 51px;
    height: 51px;
  }
  .contact-card .name {
    font-size: 16px;
  }
  .contact-card .presence {
    margin-top: 2px;
    font-size: 13px;
  }
  .contact-card .favorite {
    display: grid;
    position: static;
  }
  .contact-card .contact-id {
    font-size: 12px;
  }
  .profile-card {
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    text-align: center;
    background: 0 0;
    border: 0;
    flex-direction: column;
    gap: 7px;
    padding: 8px 16px 4px;
    display: flex;
  }
  .profile-card .avatar {
    width: 92px;
    height: 92px;
  }
  .profile-card .name {
    font-size: 24px;
  }
  .profile-card > span:last-child {
    margin: 0;
  }
  .profile-chips {
    font-size: 12px;
  }
  .settings-list {
    gap: 10px;
  }
  .profile-editor summary {
    font-size: 15px;
  }
  .settings-heading {
    margin-top: 12px;
    font-size: 25px;
  }
  .setting-card {
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: #1c1f27;
    border: 1px solid #3e424d;
    border-radius: 21px;
    padding: 16px;
  }
  .setting-card h2 {
    font-size: 17px;
  }
  .setting-card input {
    min-height: 43px;
  }
  .segmented button {
    font-size: 13px;
  }
  .conversation-header {
    height: 82px;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: #1c1f27;
    border: 1px solid #3e424d;
    border-radius: 24px;
    margin: 8px 10px 0;
  }
  .conversation-header .avatar {
    width: 43px;
    height: 43px;
  }
  .peer-block .name {
    font-size: 15px;
  }
  .message-list {
    padding: 10px 10px 8px;
  }
  .message-bubble {
    box-shadow: none;
    background: #202631;
    border-radius: 18px 18px 18px 6px;
    padding: 8px 11px 5px;
    font-size: 14px;
  }
  .message-row.mine .message-bubble {
    border-radius: 18px 18px 6px;
  }
  .composer-wrap {
    padding: 7px 9px max(9px, env(safe-area-inset-bottom));
  }
  .composer {
    min-height: 55px;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: #1c1f27;
    border: 1px solid #3e424d;
    border-radius: 22px;
    padding: 6px;
  }
  .composer button {
    width: 40px;
    height: 40px;
  }
  .sova-dialog {
    box-shadow: none;
    background: #1c1f27;
    border: 1px solid #3e424d;
    border-radius: 25px;
  }
  .notice {
    background: #1c1f27;
    border: 1px solid #3e424d;
    border-radius: 18px;
    box-shadow: 0 8px 25px #00000073;
  }
}
.diagnostics-panel {
  z-index: 250;
  left: 50%;
  bottom: calc(12px + env(safe-area-inset-bottom));
  color: #fff;
  background: #14161ef0;
  border-radius: 16px;
  gap: 7px;
  width: min(360px, 100% - 24px);
  padding: 10px;
  font-size: 12px;
  display: grid;
  position: fixed;
  transform: translate(-50%);
  box-shadow: 0 10px 32px #00000059;
}
.diagnostics-panel button {
  color: #fff;
  background: #5368ff;
  border: 0;
  border-radius: 13px;
  min-height: 42px;
  font-weight: 800;
}
.diagnostics-panel output {
  overflow-wrap: anywhere;
  text-align: center;
}
.has-main-wallpaper-root {
  background-color: var(--app-background);
  background-image: var(--main-wallpaper);
  background-position: 50%;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
}
.has-main-wallpaper-root body,
.has-main-wallpaper-root #root {
  background: 0 0;
}
@media (width<=800px) {
  .app {
    height: 100dvh;
    min-height: 100svh;
    padding-bottom: 0;
  }
  .list-pane {
    padding-bottom: 76px;
  }
  .mobile-nav {
    border-radius: 24px;
    height: 58px;
    padding: 3px 6px;
    bottom: 6px;
  }
  .mobile-nav button {
    gap: 0;
    font-size: 10px;
    line-height: 12px;
  }
  .mobile-nav svg {
    width: 21px;
    height: 21px;
  }
  .mobile-nav button.active svg {
    border-radius: 13px;
    padding: 3px 11px;
  }
  .notice-host {
    bottom: calc(72px + env(safe-area-inset-bottom));
  }
}
.workspace,
.list-pane,
.cards,
.conversation-card,
.conversation-main,
.conversation-title,
.conversation-title .name,
.chat-preview,
.chat-preview span {
  min-width: 0;
  max-width: 100%;
}
.workspace {
  width: 100%;
  overflow: hidden;
}
.list-pane {
  overflow-x: hidden;
}
.cards {
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
}
.conversation-card {
  width: 100%;
  overflow: visible;
}
.conversation-main {
  overflow: hidden;
}
.conversation-title .name {
  flex: 1;
  overflow: hidden;
}
.conversation-title .name > span {
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  overflow: hidden;
}
.conversation-title time {
  flex: none;
}
.chat-preview {
  white-space: nowrap;
  align-items: center;
  gap: 6px;
  margin: 7px 0 0;
  display: flex;
  overflow: hidden;
}
.chat-preview span {
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  overflow: hidden;
}
.chat-preview svg {
  width: 15px;
  height: 15px;
  color: var(--primary);
  flex: 0 0 15px;
}
.chat-preview.call-missed svg,
.chat-preview.call-cancelled svg {
  color: var(--danger);
}
.row-action,
.avatar,
.verified,
.unread-counter {
  flex-shrink: 0;
}
@media (width>=801px) {
  .workspace.has-conversation {
    grid-template-columns: minmax(330px, 440px) minmax(0, 760px);
  }
  .workspace:not(.has-conversation) {
    grid-template-columns: minmax(0, 620px);
  }
}
.app.has-main-wallpaper {
  isolation: isolate;
  position: relative;
  background: 0 0 !important;
}
.app.has-main-wallpaper > * {
  z-index: auto;
  position: relative;
}
.app.has-main-wallpaper:before {
  z-index: -1;
  filter: none;
  background-repeat: no-repeat;
  background-color: var(--app-background);
  inset: 0;
}
.app.has-main-wallpaper.wallpaper-blurred:before {
  filter: blur(18px);
  inset: -24px;
  transform: scale(1.05);
}
.app.has-main-wallpaper:after {
  content: none !important;
}
.conversation-wallpaper.has-chat-wallpaper {
  isolation: isolate;
  background: 0 0;
}
.conversation-wallpaper.has-chat-wallpaper > .conversation-view {
  background: #05070b2e;
}
.conversation-wallpaper.has-chat-wallpaper:before {
  z-index: -1;
  background-repeat: no-repeat;
  background-color: var(--app-background);
}
@media (width<=800px) {
  .app.has-main-wallpaper > * {
    position: relative;
  }
  .app.has-main-wallpaper .mobile-nav,
  .app.has-main-wallpaper .modal-screen,
  .app.has-main-wallpaper .call-overlay {
    position: fixed;
  }
}
:root {
  --scroll-thumb: #4b52694d;
  --scroll-thumb-hover: #4b526980;
}
[data-theme="dark"] {
  --scroll-thumb: #ccd1e23d;
  --scroll-thumb-hover: #ccd1e26b;
}
* {
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) transparent;
}
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: 0 0;
}
::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--scroll-thumb-hover);
}
@media (width<=800px), (hover: none) and (pointer: coarse) {
  .list-pane,
  .message-list,
  .modal-screen,
  .settings-list {
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .list-pane::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
  }
  .message-list::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
  }
  .modal-screen::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
  }
  .settings-list::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
  }
}
.presence {
  align-items: center;
  line-height: 1;
}
.presence i {
  flex: 0 0 8px;
  align-self: center;
  display: block;
}
@media (width<=800px) {
  [data-theme="light"] .app {
    background: linear-gradient(155deg, #fff, #f2f4f9) !important;
  }
  [data-theme="light"] .conversation-card,
  [data-theme="light"] .contact-card,
  [data-theme="light"] .setting-card,
  [data-theme="light"] .conversation-header,
  [data-theme="light"] .composer,
  [data-theme="light"] .sova-dialog,
  [data-theme="light"] .notice {
    background: #f1f2f6;
    border-color: #d6d8e0;
  }
  [data-theme="light"] .mobile-nav {
    background: #f5f6fa;
    border-color: #d7d9e1;
  }
  [data-theme="light"] .contact-section,
  [data-theme="light"] .search {
    background: #f0f1f5;
  }
}
[data-theme="light"] .profile-avatar-picker > span {
  color: #5f4cf2;
  background: #fff;
  border: 2px solid #ddd9ff;
  box-shadow: 0 4px 12px #3c32822e;
}
[data-theme="light"] .public-profile-card {
  background: #f8f9fdf0;
  border-color: #d6d8e0;
}
@media (width<=800px) {
  .list-pane:has(.page-contacts) > .search {
    display: none;
  }
  .conversation-title {
    font-size: 16px;
  }
  .conversation-main p {
    font-size: 15px;
  }
  .peer-block .name {
    font-size: 16px;
  }
  .message-bubble {
    padding: 10px 13px 6px;
    font-size: 16px;
    line-height: 1.25;
  }
  .image-bubble {
    padding: 4px;
  }
  .composer textarea {
    font-size: 16px;
  }
  .composer svg {
    width: 23px;
    height: 23px;
  }
  .login-intro .sova-logo {
    background-image: url(/web/sova-logo.png);
    background-repeat: no-repeat;
    background-size: contain;
  }
  .sova-dialog {
    border-radius: 25px;
    width: calc(100vw - 24px);
    padding: 22px;
  }
  .sova-dialog h2 {
    font-size: 22px;
  }
  .sova-dialog p {
    font-size: 16px;
    line-height: 1.45;
  }
  .dialog-actions button {
    height: 48px;
    font-size: 16px;
  }
  .dialog-actions {
    gap: 12px;
  }
}
.sova-logo {
  color: #0000;
  background-image: url(/web/sova-icon.png);
  background-position: 50%;
  background-size: cover;
}
.login-shell {
  width: min(430px, 100%);
}
.login-intro {
  text-align: center;
}
.access-note {
  text-align: center;
  color: var(--muted);
  margin-top: 20px;
  font-weight: 700;
  display: block;
}
@media (width<=800px) {
  .login-page {
    padding: 0 26px;
    display: block;
    overflow: auto;
    background: #000 !important;
  }
  .login-shell {
    margin: 0 auto;
  }
  .login-intro {
    text-align: left;
    padding-top: 145px;
  }
  .login-intro .sova-logo {
    width: 108px;
    height: 108px;
    box-shadow: none;
    border-radius: 0;
    margin: 0 0 24px;
  }
  .login-intro h1 {
    letter-spacing: -0.04em;
    margin: 0;
    font-size: 48px;
    font-weight: 950;
    line-height: 1;
  }
  .login-intro p {
    color: var(--muted);
    margin: 12px 0 0;
    font-size: 20px;
    font-weight: 750;
  }
  .login-card {
    width: 100%;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: #1c1f27;
    border: 1px solid #3e424d;
    border-radius: 28px;
    margin-top: 36px;
    padding: 20px;
  }
  .login-card form {
    gap: 14px;
    margin: 0;
  }
  .login-card label,
  .login-card label:first-line {
    font-size: 0;
  }
  .login-card input {
    background: var(--input-bg, var(--surface-solid));
    border: 1px solid var(--input-border, var(--line));
    border-radius: 21px;
    height: 72px;
    padding: 0 18px;
    font-size: 18px;
  }
  .login-card label:first-child input::placeholder {
    color: var(--muted);
  }
  .login-card button {
    border-radius: 21px;
    height: 64px;
    font-size: 18px;
  }
  .access-note {
    margin-top: 24px;
    font-size: 15px;
  }
  .login-card label {
    position: relative;
  }
  .login-card label:first-child:before {
    content: "Логин";
    z-index: 1;
    color: var(--muted);
    pointer-events: none;
    font-size: 18px;
    position: absolute;
    top: 25px;
    left: 18px;
  }
  .login-card label:nth-child(2):before {
    content: "Пароль";
    z-index: 1;
    color: var(--muted);
    pointer-events: none;
    font-size: 18px;
    position: absolute;
    top: 25px;
    left: 18px;
  }
  .login-card label:focus-within:before {
    display: none;
  }
  .login-card label:has(input:not(:placeholder-shown)):before {
    display: none;
  }
  .login-card input {
    z-index: 0;
    position: relative;
  }
  .login-card input:not(:focus):placeholder-shown {
    color: #0000;
  }
  .user-search-screen {
    padding: 22px 18px 40px;
  }
  .user-search-screen .subpage-header {
    grid-template-columns: 44px 1fr;
    height: 80px;
  }
  .user-search-screen .subpage-header h1 {
    text-align: left;
    font-size: 28px;
  }
  .user-search-screen .search {
    border: 2px solid #7770b9;
    border-radius: 27px;
    height: 58px;
    padding: 0 14px;
  }
  .user-search-screen .search-submit {
    display: none;
  }
  .user-search-screen .search-clear {
    color: var(--muted);
    background: 0 0;
    border: 0;
    padding: 0;
    font-size: 31px;
    display: grid;
  }
  .search-results > button {
    background: #1c1f27;
    border-color: #3e424d;
    min-height: 82px;
  }
  .search-results > button .avatar {
    width: 57px;
    height: 57px;
  }
  .search-results > button > span {
    gap: 1px;
  }
  .search-hint {
    margin-top: 170px;
  }
  .public-profile-card {
    background: #1c1f27;
    border-color: #454956;
    border-radius: 28px;
    max-width: 325px;
    padding: 17px;
  }
  .public-profile-card h1 {
    font-size: 23px;
  }
  .public-profile {
    gap: 7px;
    margin-top: 13px;
  }
  .public-profile .avatar-large {
    width: 92px;
    height: 92px;
  }
  .public-profile > .name {
    font-size: 23px;
  }
  .public-profile .profile-chips span {
    padding: 7px 10px;
  }
  .profile-favorite {
    margin-top: 4px;
  }
  .public-profile-actions {
    gap: 8px;
    margin-top: 4px;
  }
  .public-profile-actions button {
    min-height: 92px;
    padding: 7px 2px;
  }
  .image-preview {
    border-radius: 22px;
    align-items: center;
    width: 100%;
    height: 92px;
    margin: 0 0 7px;
    padding: 8px 52px 8px 8px;
    display: flex;
  }
  .image-preview img {
    object-fit: cover;
    width: 76px;
    height: 76px;
  }
  .image-preview:after {
    content: "Фото готово к отправке";
    margin-left: 12px;
    font-weight: 700;
  }
  .image-preview button {
    background: 0 0;
    font-size: 24px;
    top: 33px;
    right: 13px;
  }
  .profile-card {
    gap: 10px;
    padding-top: 18px;
  }
  .profile-card .name {
    font-size: 28px;
  }
  .profile-card .official-label {
    font-size: 17px;
  }
  .profile-card .avatar {
    width: 98px;
    height: 98px;
  }
  .profile-editor summary {
    padding: 14px;
  }
  .settings-heading {
    margin-top: 20px;
  }
  .app {
    padding-bottom: 0;
  }
  .list-pane {
    padding-bottom: 76px;
  }
  .conversation-header {
    height: 66px;
    margin: calc(6px + env(safe-area-inset-top)) 10px 0;
    border-radius: 23px;
    gap: 7px;
    padding: 7px 10px;
  }
  .conversation-header > button {
    border-radius: 13px;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
  }
  .conversation-header .avatar {
    width: 42px;
    height: 42px;
  }
  .peer-profile-link {
    gap: 8px;
  }
  .peer-block {
    gap: 2px;
  }
  .peer-block .name {
    font-size: 15px;
    line-height: 18px;
  }
  .peer-block .presence {
    font-size: 11px;
    line-height: 13px;
  }
  .mobile-nav {
    height: 58px;
    padding: 3px 6px;
    bottom: 6px;
  }
}
@media (width<=800px), (hover: none) and (pointer: coarse) {
  .list-pane,
  .message-list,
  .modal-screen,
  .settings-list,
  .login-page {
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
  }
  .list-pane::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
  }
  .message-list::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
  }
  .modal-screen::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
  }
  .settings-list::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
  }
  .login-page::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
  }
}
:root {
  --app-background: #f2f4f9;
  background: var(--app-background);
}
[data-theme="dark"] {
  --app-background: #080a0f;
  --bottom-nav-surface: #080a0f;
}
[data-theme="light"] {
  --bottom-nav-surface: #f5f6fa;
}
html,
body,
#root {
  background: var(--app-background);
  overscroll-behavior: none;
}
@media (width<=800px) {
  [data-theme="dark"] .app {
    background: var(--app-background) !important;
  }
  .app {
    height: 100dvh;
    padding-top: 0;
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
    padding-bottom: 0;
  }
  .page-header {
    padding-top: max(20px, env(safe-area-inset-top));
    height: calc(92px + env(safe-area-inset-top));
  }
  .mobile-nav {
    left: max(16px, env(safe-area-inset-left));
    right: max(16px, env(safe-area-inset-right));
    width: auto;
    bottom: 6px;
  }
  .conversation-view {
    height: 100dvh;
  }
  .conversation-header {
    height: calc(82px + env(safe-area-inset-top));
    padding-top: calc(8px + env(safe-area-inset-top));
    padding-left: max(10px, env(safe-area-inset-left));
    padding-right: max(10px, env(safe-area-inset-right));
  }
  .composer-wrap {
    padding-bottom: max(9px, env(safe-area-inset-bottom));
    padding-left: max(9px, env(safe-area-inset-left));
    padding-right: max(9px, env(safe-area-inset-right));
  }
  .modal-screen {
    padding-top: calc(22px + env(safe-area-inset-top));
    padding-bottom: calc(40px + env(safe-area-inset-bottom));
    padding-left: max(18px, env(safe-area-inset-left));
    padding-right: max(18px, env(safe-area-inset-right));
  }
  .call-overlay {
    padding: calc(12px + env(safe-area-inset-top))
      max(12px, env(safe-area-inset-right))
      calc(12px + env(safe-area-inset-bottom))
      max(12px, env(safe-area-inset-left));
  }
  .login-page {
    min-height: 100dvh;
    padding-left: max(26px, env(safe-area-inset-left));
    padding-right: max(26px, env(safe-area-inset-right));
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }
  .login-intro {
    text-align: center;
    padding-top: calc(92px + env(safe-area-inset-top));
  }
  .login-intro .sova-logo {
    margin: 0 auto 24px;
  }
  .app {
    padding-bottom: 0;
  }
  .list-pane {
    padding-bottom: 76px;
  }
  .conversation-header {
    height: 66px;
    margin: calc(6px + env(safe-area-inset-top)) 10px 0;
    border-radius: 23px;
    gap: 7px;
    padding: 7px 10px;
  }
  .conversation-header > button {
    border-radius: 13px;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
  }
  .conversation-header .avatar {
    width: 42px;
    height: 42px;
  }
  .peer-profile-link {
    gap: 8px;
  }
  .peer-block {
    gap: 2px;
  }
  .peer-block .name {
    font-size: 15px;
    line-height: 18px;
  }
  .peer-block .presence {
    font-size: 11px;
    line-height: 13px;
  }
  .mobile-nav {
    height: 58px;
    padding: 3px 6px;
    bottom: 6px;
  }
  .list-pane,
  .message-list,
  .modal-screen,
  .settings-list,
  .login-page {
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
  }
  .list-pane::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
  }
  .message-list::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
  }
  .modal-screen::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
  }
  .settings-list::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
  }
  .login-page::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
  }
  html[data-display-mode="standalone"] .app {
    width: 100%;
    height: auto;
    min-height: 0;
    position: fixed;
    inset: 0;
  }
  html[data-display-mode="standalone"]:not(.has-main-wallpaper-root) {
    background:
      radial-gradient(circle at 90% 0, #d8d1ff 0, #0000 32%),
      radial-gradient(circle at 5% 78%, #d3ecff 0, #0000 34%),
      linear-gradient(155deg, #fff, #f2f4f9);
  }
  html[data-display-mode="standalone"][data-theme="dark"]:not(
      .has-main-wallpaper-root
    ) {
    background:
      radial-gradient(circle at 90% 0, #261b52 0, #0000 31%),
      radial-gradient(circle at 4% 80%, #102d3e 0, #0000 35%), #080a0f;
  }
  html[data-display-mode="standalone"] body,
  html[data-display-mode="standalone"] #root {
    background: 0 0;
  }
  html[data-display-mode="standalone"] .mobile-nav {
    isolation: isolate;
    background: var(--bottom-nav-surface);
    border-bottom-color: #0000;
  }
  html[data-display-mode="standalone"] .mobile-nav:after {
    content: "";
    z-index: -1;
    top: 50%;
    left: -16px;
    right: -16px;
    bottom: calc(-6px - env(safe-area-inset-bottom));
    background: var(--bottom-nav-surface);
    pointer-events: none;
    position: absolute;
  }
}
