:root {
  --page-bg: #edeef0;
  --line: #d3d9de;
  --line-dark: #b8c2cc;
  --top-a: #4e729a;
  --top-b: #45688e;
  --nav-text: #2b587a;
  --panel-bg: #ffffff;
  --soft-bg: #f5f7fa;
  --hover-bg: #e9edf1;
  --active-bg: #dce6ef;
  --text: #222222;
  --muted: #777f88;
  --accent: #4e729a;
  --accent-dark: #3f6388;
  --success: #4f7f3a;
  --warn: #9b4d3a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  font: 13px/1.32 Tahoma, Arial, sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a,
button,
input,
textarea {
  border-radius: 0;
}

.hidden {
  display: none !important;
}

.top-line {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 42px;
  background: linear-gradient(#527aa5, var(--top-b));
  border-bottom: 0;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.12), 0 1px #34516f;
  color: #fff;
}

.top-inner {
  width: min(1010px, calc(100vw - 24px));
  height: 42px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 148px minmax(180px, 330px) 1fr;
  align-items: center;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.brand-mark {
  width: 38px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: #fff;
  font-weight: 700;
  font-size: 19px;
  line-height: 1;
  text-transform: lowercase;
}

.brand-text,
.mini-logo {
  font-weight: 700;
  letter-spacing: 0;
}

.top-search input {
  width: 100%;
  height: 25px;
  padding: 3px 9px;
  border: 1px solid #335a80;
  background: #395f86;
  color: #fff;
  outline: none;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.18);
}

.top-search {
  position: relative;
}

.search-results {
  position: absolute;
  top: 31px;
  left: 0;
  z-index: 50;
  width: min(360px, 86vw);
  border: 1px solid var(--line-dark);
  background: #fff;
  box-shadow: 0 4px 18px rgba(31, 41, 51, 0.18);
}

.search-result {
  width: 100%;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  border: 0;
  border-bottom: 1px solid #edf1f5;
  background: #fff;
  color: var(--text);
  padding: 8px;
  text-align: left;
}

.search-result:hover {
  background: #f2f6fa;
}

.search-result small {
  display: block;
  color: var(--muted);
}

.top-search input::placeholder {
  color: #ccd9e6;
}

.top-user {
  justify-self: end;
  max-width: 100%;
  overflow: hidden;
  color: #dfe9f2;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.auth-page {
  width: min(392px, calc(100vw - 24px));
  margin: 68px auto 0;
}

.auth-box,
.dialogs-panel,
.chat-panel,
.people-panel {
  background: var(--panel-bg);
  border: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.75);
}

.auth-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(#f8fafc, #eef2f6);
}

.mini-logo {
  color: var(--nav-text);
  font-size: 15px;
}

.auth-tabs {
  display: flex;
  border: 1px solid var(--line-dark);
  background: #fff;
}

.tab {
  min-width: 96px;
  height: 28px;
  border: 0;
  border-right: 1px solid var(--line-dark);
  background: #f2f4f7;
  color: var(--nav-text);
}

.tab:last-child {
  border-right: 0;
}

.tab.active {
  background: var(--active-bg);
  color: #193b59;
  font-weight: 700;
}

.auth-form {
  padding: 14px 16px 16px;
}

.auth-form label {
  display: block;
  margin: 0 0 12px;
  color: #485a6c;
}

.auth-form input,
.composer textarea {
  width: 100%;
  border: 1px solid var(--line-dark);
  background: #fff;
  color: var(--text);
  outline-color: var(--top-a);
}

.auth-form input {
  height: 31px;
  margin-top: 4px;
  padding: 5px 7px;
}

.primary-button,
.send-button,
.tool-button {
  min-height: 30px;
  border: 1px solid #3b6389;
  background: linear-gradient(#6f8fb1, var(--accent));
  color: #fff;
  padding: 5px 12px;
  text-shadow: 0 -1px rgba(0, 0, 0, 0.15);
}

.primary-button {
  width: 100%;
}

.form-error {
  min-height: 18px;
  margin: 0 16px 16px;
  color: #8b2d20;
}

.layout {
  width: min(1010px, calc(100vw - 24px));
  margin: 12px auto 28px;
  display: grid;
  grid-template-columns: 148px 240px minmax(0, 1fr) 212px;
  gap: 11px;
  align-items: stretch;
}

.left-nav {
  padding-top: 2px;
}

.nav-item {
  display: block;
  width: 100%;
  min-height: 29px;
  padding: 6px 9px 6px 11px;
  border: 0;
  background: transparent;
  color: var(--nav-text);
  text-align: left;
}

.nav-item:hover,
.nav-item.active {
  background: var(--hover-bg);
  color: #244765;
}

.nav-item.active {
  box-shadow: inset 3px 0 #6b8fb3;
  font-weight: 700;
}

.nav-item.logout {
  margin-top: 14px;
  color: var(--warn);
}

.panel-title {
  height: 32px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(#f8fafc, #eef2f6);
  color: #33495e;
  font-weight: 700;
}

.dialogs-list,
.users-list {
  max-height: calc(100vh - 92px);
  overflow: auto;
}

.dialog-item,
.user-item {
  width: 100%;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
  border: 0;
  border-bottom: 1px solid #edf1f5;
  background: #fff;
  color: var(--text);
  text-align: left;
  padding: 7px 8px;
}

.dialog-item:hover,
.user-item:hover {
  background: #f2f6fa;
}

.dialog-item.active {
  background: #e7eef6;
  box-shadow: inset 3px 0 #6b8fb3;
}

.avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: var(--top-a);
  color: #fff;
  font-weight: 700;
  border: 1px solid #c8d3df;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.22);
}

.item-name {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #2b587a;
  font-weight: 700;
}

.item-line {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--muted);
  font-size: 12px;
}

.chat-panel {
  height: calc(100vh - 82px);
  min-height: 520px;
  display: grid;
  grid-template-rows: 48px minmax(0, 1fr) auto;
}

.chat-header {
  display: flex;
  align-items: center;
  padding: 7px 12px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(#f8fafc, #eef2f6);
}

.chat-title {
  font-size: 15px;
  font-weight: 700;
  color: #263f57;
}

.chat-subtitle {
  color: var(--muted);
  font-size: 12px;
}

.messages-list {
  padding: 8px 12px;
  overflow: auto;
  background: #ffffff;
  min-height: 0;
}

.empty-state {
  padding: 34px 12px;
  color: var(--muted);
  text-align: center;
}

.message {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid #edf1f5;
}

.message.own .message-body {
  background: #f5f8fb;
  border-left-color: #9bb7d4;
}

.message-body {
  min-width: 0;
  border: 0;
  border-left: 3px solid transparent;
  background: transparent;
  padding: 2px 0 2px 7px;
}

.message-highlight .message-body {
  background: #fff8d9;
}

.message-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  margin-bottom: 3px;
}

.message-name {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #2b587a;
  font-weight: 700;
}

.message-time {
  flex: 0 0 auto;
  color: #8493a3;
  font-size: 11px;
}

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

.message-text.muted {
  color: #8a929a;
  font-style: italic;
}

.link-button,
.message-action {
  border: 0;
  background: transparent;
  color: var(--nav-text);
  padding: 0;
  text-align: left;
}

.link-button:hover,
.message-action:hover {
  text-decoration: underline;
}

.message-actions {
  display: flex;
  gap: 8px;
  margin-top: 5px;
  font-size: 12px;
}

.message-action.danger {
  color: var(--warn);
}

.reply-quote,
.reply-preview {
  border-left: 3px solid #9bb7d4;
  background: #f3f6fa;
  color: #2b587a;
}

.reply-quote {
  display: block;
  width: 100%;
  margin: 4px 0 6px;
  padding: 5px 7px;
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  text-align: left;
}

.reply-quote span,
.reply-quote small {
  display: block;
}

.reply-quote small {
  color: var(--muted);
}

.message-video {
  display: block;
  width: min(100%, 480px);
  max-height: 320px;
  margin-top: 8px;
  background: #111;
  border: 1px solid #d3d9de;
}

.audio-attachment {
  display: grid;
  grid-template-columns: 28px minmax(0, 260px);
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.audio-attachment audio {
  width: 100%;
}

.audio-mark,
.file-mark {
  width: 28px;
  height: 28px;
  display: inline-block;
  border: 1px solid #b8c2cc;
  background: linear-gradient(#fff, #e4e9ef);
}

.audio-mark {
  border-radius: 50%;
}

.file-attachment {
  display: inline-grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  max-width: min(100%, 360px);
  margin-top: 8px;
  border: 1px solid #d3d9de;
  background: #f7f9fb;
  color: var(--nav-text);
  padding: 7px;
  text-decoration: none;
}

.file-name,
.file-size {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-size {
  color: var(--muted);
  font-size: 12px;
}

.circle-video {
  display: block;
  width: 176px;
  height: 176px;
  margin-top: 8px;
  object-fit: cover;
  border-radius: 50%;
  background: #111;
  border: 4px solid #e1e8ef;
}

.composer {
  border-top: 1px solid var(--line);
  background: #f5f7fa;
  padding: 8px 9px;
}

.reply-preview {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
  padding: 6px 8px;
}

.reply-preview button {
  border: 0;
  background: transparent;
  color: var(--warn);
}

.composer textarea {
  display: block;
  min-height: 50px;
  max-height: 160px;
  resize: vertical;
  padding: 6px 7px;
  line-height: 1.35;
}

.composer-actions {
  display: flex;
  gap: 7px;
  justify-content: flex-end;
  align-items: center;
  margin-top: 8px;
  flex-wrap: wrap;
}

.file-picker {
  position: relative;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #9aa9b8;
  background: linear-gradient(#ffffff, #e4e9ef);
  color: var(--nav-text);
  padding: 5px 10px;
  cursor: pointer;
}

.file-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.icon-button {
  width: 32px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid #9aa9b8;
  background: linear-gradient(#ffffff, #e4e9ef);
  color: var(--nav-text);
}

.ui-icon {
  display: block;
  width: 18px;
  height: 18px;
}

.mic-icon,
.clip-icon,
.circle-square-icon {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
}

.mic-icon::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 1px;
  width: 6px;
  height: 10px;
  border: 2px solid currentColor;
  border-radius: 8px;
}

.mic-icon::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 10px;
  width: 12px;
  height: 7px;
  border: 2px solid currentColor;
  border-top: 0;
  box-shadow: 5px 7px 0 -4px currentColor;
}

.clip-icon::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 8px;
  height: 15px;
  border: 2px solid currentColor;
  border-radius: 8px;
  transform: rotate(28deg);
}

.circle-square-icon::before {
  content: "";
  position: absolute;
  inset: 1px;
  border: 2px solid currentColor;
}

.circle-square-icon::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.tool-button {
  border-color: #9aa9b8;
  background: linear-gradient(#ffffff, #e4e9ef);
  color: var(--nav-text);
  text-shadow: none;
}

.tool-button.recording {
  border-color: #8a3d30;
  background: linear-gradient(#b95e50, #984337);
  color: #fff;
  text-shadow: 0 -1px rgba(0, 0, 0, 0.18);
}

.recording,
.icon-button.circle-mode {
  border-color: #8a3d30;
  background: linear-gradient(#b95e50, #984337);
  color: #fff;
}

.recording .ui-icon,
.icon-button.circle-mode .ui-icon {
  filter: brightness(0) invert(1);
}

.send-button:disabled,
.tool-button:disabled {
  opacity: 0.58;
  cursor: default;
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.media-preview {
  margin-top: 8px;
  padding: 7px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--muted);
}

.media-preview video {
  display: block;
  max-width: 220px;
  max-height: 160px;
  margin-top: 6px;
  background: #111;
}

.media-preview audio {
  display: block;
  width: min(100%, 260px);
  margin-top: 6px;
}

.media-preview .circle-preview {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 50%;
}

.content-panel {
  grid-column: 2 / 5;
  min-height: calc(100vh - 82px);
  background: var(--panel-bg);
  border: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.75);
}

.content-body {
  padding: 10px 12px;
}

.content-section {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #edf1f5;
}

.content-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.content-section h2 {
  margin: 0 0 8px;
  color: #2b587a;
  font-size: 14px;
}

.empty-state.compact {
  padding: 14px 8px;
}

.person-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 48px;
  padding: 7px 0;
  border-bottom: 1px solid #edf1f5;
}

.person-row:last-child {
  border-bottom: 0;
}

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

.person-name {
  overflow: hidden;
  color: #2b587a;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-meta,
.video-caption {
  color: var(--muted);
  font-size: 12px;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.small-button {
  min-height: 28px;
  border: 1px solid #3b6389;
  background: linear-gradient(#6f8fb1, var(--accent));
  color: #fff;
  padding: 4px 9px;
  text-shadow: 0 -1px rgba(0, 0, 0, 0.15);
}

.small-button.muted {
  border-color: #9aa9b8;
  background: linear-gradient(#ffffff, #e4e9ef);
  color: var(--nav-text);
  text-shadow: none;
}

.small-button.danger {
  border-color: #8a3d30;
  background: linear-gradient(#b95e50, #984337);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  color: var(--muted);
  white-space: nowrap;
}

.mini-profile {
  padding: 12px;
  text-align: center;
}

.profile-avatar {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  margin: 0 auto 8px;
  border: 1px solid #c8d3df;
  background: var(--top-a);
  color: #fff;
  font-weight: 700;
  font-size: 24px;
  background-size: cover;
  background-position: center;
}

.profile-avatar.large {
  width: 112px;
  height: 112px;
  margin: 0;
  font-size: 32px;
}

.avatar-image {
  background-size: cover !important;
  background-position: center !important;
  color: transparent;
}

.mini-profile-name {
  color: #2b587a;
  font-weight: 700;
}

.mini-profile-login,
.mini-profile-bio,
.mini-profile-status {
  margin-top: 4px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.mini-profile .small-button {
  margin-top: 10px;
}

.post-form {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #edf1f5;
}

.post-form textarea,
.settings-form textarea,
.settings-form select {
  width: 100%;
  border: 1px solid var(--line-dark);
  background: #fff;
  color: var(--text);
  padding: 6px 7px;
  outline-color: var(--top-a);
}

.post-form textarea {
  resize: vertical;
}

.feed-list {
  display: grid;
  gap: 6px;
}

.post-item {
  border-bottom: 1px solid #edf1f5;
  padding: 12px 0;
}

.post-head {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  margin-bottom: 7px;
}

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

.profile-page {
  display: grid;
  gap: 12px;
}

.profile-hero {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding-bottom: 12px;
  border-bottom: 1px solid #edf1f5;
}

.profile-hero h2 {
  margin: 0 0 4px;
  color: #2b587a;
}

.profile-status {
  color: #33495e;
  font-weight: 700;
}

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

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px 14px;
}

.video-item {
  padding-bottom: 12px;
  border-bottom: 1px solid #edf1f5;
}

.video-item .message-video {
  width: 100%;
  max-height: 240px;
}

.video-info {
  margin-top: 8px;
}

.video-caption {
  margin: 6px 0 8px;
  overflow-wrap: anywhere;
}

.settings-form {
  max-width: 360px;
}

.settings-form label {
  display: block;
  margin-bottom: 12px;
  color: #485a6c;
}

.settings-form input {
  width: 100%;
  height: 31px;
  margin-top: 4px;
  padding: 5px 7px;
  border: 1px solid var(--line-dark);
  outline-color: var(--top-a);
}

.settings-form textarea,
.settings-form select {
  margin-top: 4px;
}

.settings-form .check-line {
  display: flex;
  gap: 8px;
  align-items: center;
}

.settings-form .check-line input {
  width: auto;
  height: auto;
  margin: 0;
}

.primary-button.inline {
  width: auto;
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 30;
  max-width: min(360px, calc(100vw - 32px));
  padding: 10px 12px;
  border: 1px solid #8295a7;
  background: #fff;
  box-shadow: 0 2px 12px rgba(31, 41, 51, 0.18);
  color: #263f57;
}

.theme-liquid {
  --page-bg: #eef3f8;
  --line: rgba(255, 255, 255, 0.42);
  --line-dark: rgba(118, 146, 176, 0.34);
  --panel-bg: rgba(255, 255, 255, 0.44);
  --soft-bg: rgba(255, 255, 255, 0.32);
  --hover-bg: rgba(255, 255, 255, 0.38);
  --active-bg: rgba(255, 255, 255, 0.54);
  background-attachment: fixed;
  background-size: cover;
}

.theme-liquid .top-line {
  background: rgba(62, 101, 146, 0.62);
  backdrop-filter: blur(18px) saturate(1.45);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.28), 0 1px rgba(51, 79, 109, 0.28);
}

.theme-liquid .auth-box,
.theme-liquid .dialogs-panel,
.theme-liquid .chat-panel,
.theme-liquid .people-panel,
.theme-liquid .content-panel,
.theme-liquid .search-results,
.theme-liquid .toast {
  border-color: rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.44);
  border-radius: 8px;
  box-shadow: 0 10px 32px rgba(35, 60, 88, 0.1), inset 0 1px rgba(255, 255, 255, 0.52);
  backdrop-filter: blur(22px) saturate(1.55);
}

.theme-liquid .left-nav {
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.32);
  box-shadow: 0 10px 32px rgba(35, 60, 88, 0.08), inset 0 1px rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(22px) saturate(1.45);
}

.theme-liquid .nav-item {
  min-height: 32px;
  border-radius: 8px;
  background-color: transparent;
  color: #294966;
  transition: color 0.15s ease;
}

.theme-liquid .nav-item:hover,
.theme-liquid .nav-item.active {
  background-color: rgba(255, 255, 255, 0.42) !important;
  background-image: none;
  color: #19364f;
}

.theme-liquid .nav-item.active {
  box-shadow: none;
  font-weight: 600;
}

.theme-liquid .nav-item.logout {
  color: #915668;
}

.theme-liquid .panel-title,
.theme-liquid .chat-header,
.theme-liquid .auth-head,
.theme-liquid .composer {
  background: rgba(255, 255, 255, 0.34);
}

.theme-liquid .messages-list {
  background: rgba(255, 255, 255, 0.3);
}

.theme-liquid .message.own .message-body,
.theme-liquid .reply-quote,
.theme-liquid .reply-preview,
.theme-liquid .dialog-item.active {
  background: rgba(255, 255, 255, 0.48);
}

.theme-liquid .primary-button,
.theme-liquid .send-button,
.theme-liquid .small-button {
  border-color: rgba(255, 255, 255, 0.52);
  background: rgba(61, 111, 170, 0.78);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.34);
}

.theme-liquid .tool-button,
.theme-liquid .icon-button,
.theme-liquid .file-picker,
.theme-liquid .small-button.muted {
  background: rgba(255, 255, 255, 0.54);
  border-color: rgba(255, 255, 255, 0.52);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.56);
}

@media (max-width: 960px) {
  .top-inner {
    grid-template-columns: 130px minmax(120px, 1fr);
  }

  .top-user {
    display: none;
  }

  .layout {
    grid-template-columns: 132px minmax(220px, 300px) minmax(0, 1fr);
  }

  .people-panel {
    grid-column: 2 / 4;
    width: 100%;
  }

  .content-panel {
    grid-column: 2 / 4;
  }

  .users-list {
    max-height: 220px;
  }
}

@media (max-width: 720px) {
  .top-inner {
    width: calc(100vw - 16px);
    grid-template-columns: 112px 1fr;
    gap: 8px;
  }

  .brand-text {
    display: none;
  }

  .layout {
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    margin-top: 8px;
    align-items: stretch;
  }

  .left-nav {
    grid-column: 1;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    padding-top: 0;
  }

  .dialogs-panel,
  .chat-panel,
  .people-panel,
  .content-panel {
    grid-column: 1;
    width: 100%;
    min-width: 0;
  }

  .nav-item {
    min-height: 32px;
    border: 1px solid var(--line);
    background: #fff;
    text-align: center;
  }

  .nav-item.logout {
    margin-top: 0;
  }

  .dialogs-list,
  .users-list {
    max-height: 180px;
  }

  .chat-panel {
    height: 72vh;
    min-height: 460px;
  }

  .composer-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tool-button,
  .send-button,
  .icon-button {
    width: 100%;
    padding-left: 6px;
    padding-right: 6px;
  }

  .content-panel {
    grid-column: 1;
  }

  .person-row {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .row-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}
