/* --- Mobile full-screen fixes (iOS/Safari/PWA) --- */
html, body {
  height: 100%;
  overflow: hidden;
}

body.chat-open {
  overflow: hidden;
}

.message-list {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
body { min-height: 100dvh; padding-bottom: env(safe-area-inset-bottom); }
/* If you have a main app wrapper, ensure it stretches */
.app, .layout, .container { min-height: 100dvh; }

:root{
  --bg:#070A12;
  --card:#0C1020;
  --card2:#0E1530;
  --text:#E9EEFF;
  --muted:#A9B2D6;
  --line:rgba(255,255,255,.08);
  --accent:#6A7CFF;
  --accent2:#55D6FF;
  --danger:#FF4D6D;
  --shadow: 0 10px 30px rgba(0,0,0,.45);
  --radius:18px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Arial;
  background: radial-gradient(1200px 700px at 10% 10%, rgba(106,124,255,.25), transparent 60%),
              radial-gradient(900px 600px at 90% 20%, rgba(85,214,255,.18), transparent 55%),
              var(--bg);
  color:var(--text);
}

a{color:inherit}

.screen{min-height:100vh}
.page{padding:24px}

.auth-shell{max-width:1100px;margin:0 auto;padding:30px}
.auth-card{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap:18px;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border:1px solid var(--line);
  border-radius:var(--radius);
  overflow:hidden;
  box-shadow:var(--shadow);
}

.auth-left{
  padding:28px;
  background: linear-gradient(180deg, rgba(106,124,255,.12), rgba(0,0,0,0));
  border-right:1px solid var(--line);
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}
.logo-circle{
  width:54px;height:54px;border-radius:18px;
  display:flex;align-items:center;justify-content:center;
  font-weight:800;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color:#071022;
  box-shadow:0 10px 30px rgba(106,124,255,.35);
}
.logo-title{font-size:26px;font-weight:800;margin-top:14px}
.logo-subtitle{color:var(--muted);margin-top:4px}

.why-title{margin-top:18px;font-weight:700}
.why-list{margin:10px 0 0 18px;color:var(--muted)}
.note-tag{
  margin-top:18px;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid var(--line);
  color:var(--muted);
  background: rgba(0,0,0,.25);
}

.auth-right{padding:28px;background: rgba(0,0,0,.18)}
.step-title{margin:0 0 8px 0;font-size:22px}
.step-desc{margin:0 0 18px 0;color:var(--muted)}

.field-label{display:block;color:var(--muted);font-size:13px;margin-bottom:6px}
.field-input{
  width:100%;
  padding:14px 14px;
  border-radius:14px;
  border:1px solid var(--line);
  background: rgba(0,0,0,.25);
  color:var(--text);
  outline:none;
}
.field-input:focus{border-color: rgba(106,124,255,.55)}
.field-error{min-height:18px;color:#ffb3c0;margin-top:8px;font-size:13px}

.btn-primary, .btn-primary-small{
  border:0;
  border-radius:14px;
  padding:13px 14px;
  cursor:pointer;
  color:#071022;
  font-weight:800;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow:0 12px 30px rgba(106,124,255,.25);
}
.btn-primary{width:100%; margin-top:10px}
.btn-primary-small{padding:10px 12px; border-radius:12px}

.btn-ghost{
  border:1px solid var(--line);
  border-radius:14px;
  padding:13px 14px;
  cursor:pointer;
  color:var(--text);
  background: rgba(0,0,0,.15);
}
.btn-row{display:flex;gap:10px;margin-top:10px}
.btn-row button{flex:1}

.hint{margin-top:12px;color:var(--muted);font-size:13px}
.auth-footer{margin-top:14px;color:rgba(255,255,255,.5);text-align:center}

/* MAIN LAYOUT */
.layout-main{
  display:grid;
  grid-template-columns: 360px 1fr;
  height:100vh;
}

.sidebar{
  border-right:1px solid var(--line);
  background: rgba(0,0,0,.18);
  display:flex;
  flex-direction:column;
  min-height:0;
}

.sidebar-header{
  display:flex;
  align-items:center;
  gap:12px;
  padding:16px 16px 12px;
  border-bottom:1px solid var(--line);
}
.app-logo{
  width:42px;height:42px;border-radius:14px;
  display:flex;align-items:center;justify-content:center;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color:#071022;font-weight:900;
}
.app-name{font-weight:900}
.app-sub{font-size:12px;color:var(--muted)}

.btn-logout{
  margin-left:auto;
  border:1px solid var(--line);
  background: rgba(0,0,0,.22);
  color:var(--text);
  border-radius:12px;
  padding:8px 10px;
  cursor:pointer;
}

.sidebar-profile{
  padding:14px 16px;
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.sidebar-profile-main{display:flex;gap:12px;align-items:center}
.sidebar-profile-avatar{
  width:42px;height:42px;border-radius:16px;
  background: rgba(255,255,255,.08);
  display:flex;align-items:center;justify-content:center;
  font-weight:900;
}
.sidebar-profile-name{font-weight:800}
.sidebar-profile-phone{color:var(--muted);font-size:12px}

.btn-profile-edit{
  border:1px solid var(--line);
  background: rgba(0,0,0,.18);
  color:var(--text);
  border-radius:12px;
  padding:10px 12px;
  cursor:pointer;
}

.sidebar-search{
  padding:12px 16px;
  display:flex;
  gap:10px;
  border-bottom:1px solid var(--line);
}
.sidebar-search input{
  flex:1;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid var(--line);
  background: rgba(0,0,0,.25);
  color:var(--text);
  outline:none;
}
.btn-plus{
  width:44px;
  border-radius:14px;
  border:1px solid var(--line);
  background: rgba(0,0,0,.22);
  color:var(--text);
  cursor:pointer;
  font-size:20px;
}

.sidebar-chats{
  padding:10px;
  overflow:auto;
  flex:1;
  min-height:0;
}

.chat-item{
  display:flex;
  gap:12px;
  padding:12px;
  border-radius:14px;
  cursor:pointer;
  border:1px solid transparent;
}
.chat-item:hover{
  background: rgba(255,255,255,.04);
  border-color: var(--line);
}
.chat-avatar{
  width:44px;height:44px;border-radius:16px;
  background: rgba(255,255,255,.08);
  display:flex;align-items:center;justify-content:center;
  font-weight:900;
  background-position:center;
}
.chat-meta{min-width:0}
.chat-title{font-weight:850}
.chat-last{color:var(--muted);font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:240px}

.sidebar-footer{
  padding:12px 16px;
  border-top:1px solid var(--line);
  color:var(--muted);
  font-size:12px;
}

.dialog{display:flex;flex-direction:column;min-height:0}
.dialog-empty{
  margin:auto;
  color:var(--muted);
  text-align:center;
  padding:20px;
}
.dialog-main {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.dialog-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:14px 16px;
  border-bottom:1px solid var(--line);
  background: rgba(0,0,0,.12);
}
.dialog-title{font-weight:900;font-size:16px}
.dialog-icon-btn{
  border:1px solid var(--line);
  background: rgba(0,0,0,.18);
  color:var(--text);
  border-radius:12px;
  padding:10px 12px;
  cursor:pointer;
  margin-left:8px;
}

.message-list{
  padding:16px;
  overflow:auto;
  flex:1;
  min-height:0;
}

.msg{display:flex;margin-bottom:10px}
.msg-me{justify-content:flex-end}
.msg-peer{justify-content:flex-start}
.msg-bubble{
  max-width: 560px;
  padding:12px 14px;
  border-radius:16px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.06);
}
.msg-me .msg-bubble{
  background: linear-gradient(135deg, rgba(106,124,255,.22), rgba(85,214,255,.14));
}
.msg-image{
  max-width: 260px;
  border-radius:14px;
  display:block;
  margin-bottom:8px;
}

.typing-indicator{
  padding:8px 16px;
  color:var(--muted);
  font-size:12px;
}

.message-input-row{
  display:flex;
  gap:10px;
  padding:12px 16px;
  border-top:1px solid var(--line);
  background: rgba(0,0,0,.12);
  flex-shrink: 0;
}
.message-input-row input[type="text"]{
  flex:1;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid var(--line);
  background: rgba(0,0,0,.25);
  color:var(--text);
  outline:none;
}
.btn-attach{
  width:44px;
  border-radius:14px;
  border:1px solid var(--line);
  background: rgba(0,0,0,.22);
  color:var(--text);
  cursor:pointer;
}

/* Profile modal */
.profile-edit-panel{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,.55);
  display:none;
  align-items:center;
  justify-content:center;
  padding:20px;
}
.profile-edit-panel.open{display:flex}
.profile-edit-inner{
  width:min(520px, 96vw);
  background: rgba(10,14,30,.95);
  border:1px solid var(--line);
  border-radius:18px;
  box-shadow:var(--shadow);
  padding:18px;
}
.profile-edit-title{font-weight:900;margin-bottom:12px}
.profile-edit-label{display:block;color:var(--muted);font-size:13px;margin-top:10px}
.profile-edit-input, .profile-edit-textarea{
  width:100%;
  margin-top:6px;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid var(--line);
  background: rgba(0,0,0,.25);
  color:var(--text);
  outline:none;
}
.profile-edit-actions{display:flex;gap:10px;margin-top:14px}
.profile-edit-btn{
  flex:1;
  padding:12px 12px;
  border-radius:14px;
  cursor:pointer;
  border:1px solid var(--line);
}
.profile-edit-btn-cancel{background: rgba(0,0,0,.18); color:var(--text)}
.profile-edit-btn-save{
  border:0;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color:#071022;
  font-weight:900;
}

/* Call overlay */
.call-overlay{
  position:fixed; inset:0;
  background: rgba(0,0,0,.7);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
}
.call-inner{
  width:min(900px, 96vw);
  background: rgba(10,14,30,.95);
  border:1px solid var(--line);
  border-radius:18px;
  box-shadow:var(--shadow);
  overflow:hidden;
}
.call-videos{
  display:grid;
  grid-template-columns: 1fr 280px;
  gap:10px;
  padding:10px;
}
.call-video-remote{
  width:100%; height:420px;
  background:#000;
  border-radius:16px;
}
.call-video-local{
  width:100%; height:420px;
  background:#000;
  border-radius:16px;
}
.call-controls{
  display:flex;
  justify-content:center;
  gap:10px;
  padding:12px;
  border-top:1px solid var(--line);
}
.call-mini-btn{
  border:1px solid var(--line);
  background: rgba(0,0,0,.22);
  color:var(--text);
  border-radius:14px;
  padding:10px 12px;
  cursor:pointer;
}
.call-end-btn{
  border:0;
  border-radius:14px;
  padding:10px 14px;
  cursor:pointer;
  color:#071022;
  font-weight:900;
  background: linear-gradient(135deg, var(--danger), #FFB36B);
}
@media(max-width: 980px){
  .layout-main{grid-template-columns: 1fr}
  .sidebar{display:none}
  .call-videos{grid-template-columns: 1fr}
  .call-video-local{height:220px}
  .call-video-remote{height:280px}
}

/* ===== MOBILE (Telegram-like) ===== */

/* 1) Вход: делаем одну колонку на телефоне */
@media (max-width: 980px) {
  .auth-shell { padding: 14px; }
  .auth-card { grid-template-columns: 1fr; }
  .auth-left { border-right: 0; border-bottom: 1px solid var(--line); }
}

/* 2) Главный экран: список чатов <-> чат (как Telegram) */
@media (max-width: 980px) {
  .layout-main { grid-template-columns: 1fr; height: 100vh; }

  /* По умолчанию показываем список чатов */
  .sidebar { display: flex; height: 100vh; }
  .dialog  { display: none; height: 100vh; }

  /* Когда открыт чат — скрываем список, показываем диалог */
  body.chat-open .sidebar { display: none; }
  body.chat-open .dialog  { display: flex; }

  /* iOS: чтобы не зумило при фокусе */
  input, textarea, button { font-size: 16px; }
}

/* 3) Кнопка "назад" нужна только на мобиле */
.back-btn { display: none; }
@media (max-width: 980px) {
  .back-btn { display: inline-block; }
}

/* 4) Нижняя панель ввода: учитываем safe-area (iPhone) */
@media (max-width: 980px) {
  .message-input-row {
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }
}

/* Back button */
.back-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:40px;
  height:40px;
  border-radius:12px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.06);
  color:var(--text);
  cursor:pointer;
  flex:0 0 auto;
}

.back-btn:active{ transform: translateY(1px); }
.back-icon{ font-size:20px; line-height:1; }

/* На ПК можно сделать кнопку чуть менее заметной */
@media (min-width: 981px){
  .back-btn{ opacity:.8; }
  .back-btn:hover{ opacity:1; }
}

/* Back button: force visible on mobile */
@media (max-width: 980px) {
  #btn-back.back-btn { 
    display: inline-flex !important;
  }
}

.btn-voice.locked {
  outline: 2px solid rgba(120,180,255,.35);
}

.msg-meta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.msg {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}

.sidebar-avatar-img{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  object-fit: cover;
  display:block;
}

/* Аватар в профиле слева сверху */
.sidebar-profile-avatar{
  overflow: hidden; /* прячет всё лишнее (убирает белые края) */
}

.sidebar-avatar-img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover; /* ровная обрезка */
}

.msg-time{
  margin-top: 6px;
  font-size: 12px;
  opacity: .7;
}
.msg-me .msg-time{ text-align: right; }

.msg-time{
  margin-top: 6px;
  font-size: 12px;
  opacity: .7;
}
.msg-me .msg-time{ text-align: right; }

/* ====== Сообщения: ровная верстка (GRID, ПК) ====== */

.msg{
  display: grid;
  grid-template-columns: 34px auto;
  grid-template-areas:
    "avatar meta"
    "avatar bubble";
  column-gap: 10px;
  row-gap: 6px;
  margin: 12px 0;
  align-items: start;
}

.msg-me{
  grid-template-columns: auto 34px;
  grid-template-areas:
    "meta avatar"
    "bubble avatar";
  justify-items: end;
}

/* аватар */
.msg-avatar{
  grid-area: avatar;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255,255,255,.10);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* meta (имя • время) */
.msg-meta{
  grid-area: meta;
  font-size: 12px;
  opacity: .75;
  line-height: 1.2;
}

.msg-me .msg-meta{ text-align: right; }

/* пузырь */
.msg-bubble{
  grid-area: bubble;
  max-width: min(560px, 72vw);
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(6px);
  width: fit-content;
  justify-self: start;
}

.msg-me .msg-bubble{
  background: rgba(120,160,255,.14);
}

/* текст */
.msg-text{
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.35;
}

/* время внутри пузыря */
.msg-time{
  margin-top: 6px;
  font-size: 11px;
  opacity: .65;
}

.msg-me .msg-time{ text-align: right; }

/* медиа */
.msg-image{
  display: block;
  max-width: 360px;
  width: 100%;
  border-radius: 12px;
}
.msg-video{
  display: block;
  max-width: 420px;
  width: 100%;
  border-radius: 12px;
}
.msg-audio{
  width: 100%;
  max-width: 420px;
}

/* На телефоне: убираем grid и оставляем просто пузыри */
@media (max-width: 980px){
  .msg{
    display: block;
    margin: 10px 0;
  }
  .msg-bubble{
    max-width: 82vw;
  }
  .msg-avatar, .msg-meta{
    display: none;
  }
}

.msg-meta{ justify-self: start; }
.msg-me .msg-meta{ justify-self: end; }

.btn-icon{
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 0;
  cursor: pointer;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.9);
}

.btn-icon:hover{ background: rgba(255,255,255,.12); }

.modal{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal.hidden{ display: none; }

.modal-card{
  width: min(420px, 92vw);
  border-radius: 18px;
  padding: 16px;
  background: rgba(20, 26, 40, .92);
  border: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(10px);
}

.modal-title{
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.modal-text{
  opacity: .85;
  line-height: 1.35;
}

.modal-actions{
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn{
  padding: 10px 14px;
  border-radius: 12px;
  border: 0;
  cursor: pointer;
  background: rgba(255,255,255,.10);
  color: rgba(255,255,255,.92);
}

.btn:hover{ background: rgba(255,255,255,.14); }

/* ===== Mobile Start Screen (как "Начать общение") ===== */

.start-modal{
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(10,14,22,.96);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
}

.start-modal.hidden{ display: none; }

.start-header{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 12px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.start-back{
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.92);
  cursor: pointer;
}

.start-title{
  font-weight: 700;
  font-size: 18px;
  color: rgba(255,255,255,.95);
}

.start-spacer{ flex: 1; }

.start-search{
  padding: 12px;
}

.start-search input{
  width: 100%;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.92);
  padding: 0 14px;
  outline: none;
}

.start-actions{
  padding: 4px 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.start-item{
  display: flex;
  align-items: center;
  gap: 12px;
  height: 48px;
  border-radius: 14px;
  border: 0;
  cursor: pointer;
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.92);
  padding: 0 14px;
  text-align: left;
}

.start-item:hover{ background: rgba(255,255,255,.10); }

.start-icon{
  width: 26px;
  text-align: center;
  opacity: .9;
}

.start-list{
  padding: 10px 12px 16px;
  overflow: auto;
}

.start-user{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-radius: 14px;
  cursor: pointer;
}

.start-user:hover{
  background: rgba(255,255,255,.06);
}

.start-user .ava{
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.10);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.start-user .nm{
  font-weight: 650;
  color: rgba(255,255,255,.95);
}

.start-user .sub{
  font-size: 12px;
  opacity: .7;
}

/* Показываем этот экран только на телефоне */
@media (min-width: 981px){
  .start-modal{ display: none !important; }
}

.chat-avatar{
  position: relative;
  overflow: visible !important; /* чтобы точку не резало */
}

.chat-avatar .online-dot{
  position: absolute;
  right: 2px;   /* внутри аватара */
  bottom: 2px;  /* внутри аватара */
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2ee36a;
  border: 2px solid rgba(15,20,30,.9); /* обводка вместо box-shadow */
  display: none;
}

.chat-avatar.online .online-dot{
  display: block;
}

.chat-badge{
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 18px;
  text-align: center;
  background: #ff3b30;
  color: #fff;
  display: none;
}

.chat-badge.show{
  display: inline-block;
}

.new-msg-btn{
  position: absolute;
  right: 16px;
  bottom: 72px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(30,40,60,.85);
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  display: none;
  user-select: none;
}
.new-msg-btn.show{ display: inline-flex; gap: 8px; align-items: center; }

.new-msg-btn{
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 76px; /* над панелью ввода */
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.55);
  color: var(--text);
  cursor: pointer;
  z-index: 20;
}

.dialog-main{ position: relative; } /* важно для absolute */

.msg-divider{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  margin: 10px 0 14px;
  font-size: 12px;
  color: var(--muted);
  user-select:none;
}

.msg-divider::before,
.msg-divider::after{
  content:"";
  height:1px;
  flex:1;
  background: var(--line);
  opacity:.7;
}

.msg-status{
  font-size: 12px;
  opacity: .7;
  margin-left: 8px;
  user-select: none;
}

.msg-status{
  font-size: 12px;
  opacity: .85;
  margin-left: 8px;
  user-select: none;
}

.msg-status.delivered{
  color: var(--muted);
}

.msg-status.read{
  color: #4da3ff; /* синий как в телеге */
  opacity: 1;
}

.msg-deleted { opacity: 0.65; font-style: italic; }
.msg-edited { opacity: 0.7; font-size: 12px; }

.msg-menu {
  position: fixed;
  z-index: 9999;
  min-width: 180px;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(15, 18, 28, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}

.msg-menu button{
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
}

.msg-menu button:hover{
  background: rgba(255,255,255,.07);
}

.msg-menu .danger{
  color: #ff6b6b;
}

.msg-forward{
  font-size: 12px;
  opacity: .75;
  margin-bottom: 4px;
}

.msg-forward{
  font-size: 12px;
  opacity: 1;
  font-weight: 600;
  margin-bottom: 6px;
}

.msg-forward:hover{
  text-decoration: underline;
}

.msg-forward{
  font-size: 12px;
  opacity: .9;
  margin-bottom: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}

.msg-forward .fwd-ico{
  font-size: 13px;
  opacity: .9;
}

.msg-forward .fwd-who{
  text-decoration: underline;
  text-underline-offset: 2px;
  opacity: .95;
}

.msg-forward .fwd-who:hover{
  opacity: 1;
}

/* sender name in groups (Telegram-like) */
.msg-sender{
  font-size: 12px;
  opacity: .85;
  margin-bottom: 6px;
  font-weight: 600;
}
