*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0f1117;
  --bg2: #1a1d27;
  --bg3: #22263a;
  --accent: #5b6af8;
  --accent-hover: #4757e8;
  --text: #e8eaf6;
  --text2: #8b93b8;
  --bubble-own: #3b4ed4;
  --bubble-other: #262c42;
  --border: #2e3350;
  --sidebar-w: 270px;
  --radius: 14px;
  --radius-sm: 8px;
  --badge-bg: #e05060;
  --unread-sep: #5b6af8;
}

html[data-theme="light"] {
  --bg: #f0f2f8;
  --bg2: #ffffff;
  --bg3: #e8eaf2;
  --accent: #5b6af8;
  --accent-hover: #4757e8;
  --text: #1a1d2e;
  --text2: #5a6080;
  --bubble-own: #5b6af8;
  --bubble-other: #e2e5f5;
  --border: #ced2e8;
  --badge-bg: #e05060;
  --unread-sep: #5b6af8;
}

html, body { height: 100%; height: 100dvh; font-family: 'Segoe UI', system-ui, sans-serif; background: var(--bg); color: var(--text); font-size: var(--font-size, 15px); overflow: hidden; }

a { color: inherit; text-decoration: none; }

/* ── Login ── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}
.login-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 36px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 8px 40px rgba(0,0,0,.5);
}
.login-title { font-size: 26px; font-weight: 700; text-align: center; margin-bottom: 4px; letter-spacing: -.5px; }
.login-sub { text-align: center; color: var(--text2); font-size: 13px; margin-bottom: 28px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 13px; color: var(--text2); font-weight: 500; }
.form-input {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 10px 14px;
  font-size: 1rem;
  outline: none;
  transition: border-color .2s;
}
.form-input:focus { border-color: var(--accent); }
.field-error { color: #e05060; font-size: 12px; margin-top: 2px; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 11px 22px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-full { width: 100%; }

.btn-secondary {
  background: var(--bg3);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-size: 14px;
  cursor: pointer;
}
.btn-secondary:hover { background: var(--border); }

/* ── Layout ── */
.layout {
  display: flex;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--border);
}
.header-actions { display: flex; align-items: center; gap: 4px; }
.sidebar-logo { font-size: 17px; font-weight: 700; letter-spacing: -.3px; }
.btn-logout {
  background: none;
  border: none;
  color: var(--text2);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  border-radius: 6px;
  transition: color .15s, background .15s;
}
.btn-logout:hover { color: var(--text); background: var(--bg3); }

.sidebar-me {
  padding: 10px 16px;
  font-size: 0.867rem;
  color: var(--text2);
  border-bottom: 1px solid var(--border);
}

/* ── Profile row ── */
.profile-row {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: background .15s;
}
.profile-row:hover { background: var(--bg3); }
.profile-avatar { width: 32px; height: 32px; font-size: 13px; flex-shrink: 0; }
.profile-name { flex: 1; color: var(--text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-edit-hint { color: var(--text2); font-size: 16px; opacity: .5; transition: opacity .15s; }
.profile-row:hover .profile-edit-hint { opacity: 1; }

/* ── Profile modal ── */
.profile-current {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}
.profile-big-avatar { width: 72px; height: 72px; font-size: 28px; }
.profile-current-name { font-size: 1.1rem; font-weight: 600; color: var(--text); }
.avatar-preview-wrap { margin-top: 6px; }
.avatar-preview-wrap img { max-height: 64px; border-radius: 50%; }
.btn-logout-profile {
  margin-right: auto;
  color: #e05060 !important;
  border-color: #e05060 !important;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ── Font-size dropdown ── */
.fs-toggle-wrap { position: relative; }
.fs-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text2);
  white-space: nowrap;
  z-index: 100;
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
}
.fs-dropdown.active { display: flex; }
.fs-dropdown .fs-label { font-weight: 600; letter-spacing: .3px; }
.fs-dropdown .fs-val { min-width: 24px; text-align: center; font-variant-numeric: tabular-nums; }
.fs-dropdown input[type=range] {
  width: 100px;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.fs-dropdown input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  cursor: pointer;
}
.fs-dropdown input[type=range]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  cursor: pointer;
}

.sidebar-section {
  padding: 10px 16px 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text2);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.btn-icon {
  background: none;
  border: none;
  color: var(--text2);
  font-size: 18px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  line-height: 1;
  transition: color .15s, background .15s;
}
.btn-icon:hover { color: var(--text); background: var(--bg3); }

.contact-list {
  list-style: none;
  overflow-y: auto;
  flex: 1;
  min-height: 40px;
}
.contact-item { }
.contact-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  border-radius: 0;
  transition: background .15s;
  font-size: 0.933rem;
}
.contact-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge {
  background: var(--badge-bg);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  padding: 0 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-link:hover, .contact-link.active { background: var(--bg3); }
.contact-link.active { border-left: 3px solid var(--accent); padding-left: 13px; }

.contact-empty { padding: 8px 16px; color: var(--text2); font-size: 0.867rem; }

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.avatar.grp { background: #3b8ed4; }

/* ── Chat area ── */
.chat-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}

.chat-header {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg2);
}
.chat-header-info { display: flex; flex-direction: column; gap: 2px; }
.chat-title { font-size: 1.133rem; font-weight: 600; }
.chat-members { font-size: 0.8rem; color: var(--text2); }
.btn-call {
  background: #27ae60;
  border: none;
  color: #fff;
  font-size: 18px;
  width: 40px; height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s; flex-shrink: 0;
}
.btn-call:hover { background: #1e8449; }

.chat-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text2);
  font-size: 18px;
}

/* ── Messages ── */
.messages-wrap {
  flex: 1;
  min-height: 0;
  overflow-y: scroll;
  display: grid;
}

#msg-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: flex-end;
  padding: 16px 20px;
}

.msg {
  display: flex;
  flex-direction: column;
  max-width: 65%;
}
.msg-own { align-self: flex-end; align-items: flex-end; }
.msg-other { align-self: flex-start; align-items: flex-start; }

.msg-author { font-size: 0.733rem; color: var(--text2); margin-bottom: 2px; padding-left: 4px; }

.msg-bubble {
  background: var(--bubble-other);
  border-radius: var(--radius);
  padding: 10px 14px;
  position: relative;
  word-break: break-word;
  line-height: 1.5;
}
.msg-own .msg-bubble {
  background: var(--bubble-own);
  border-bottom-right-radius: 4px;
}
.msg-other .msg-bubble { border-bottom-left-radius: 4px; }

.msg-text { font-size: 0.933rem; }
.msg-time {
  font-size: 0.733rem;
  color: rgba(255,255,255,.4);
  margin-top: 4px;
  display: block;
  text-align: right;
}

.msg-img {
  max-width: 320px;
  max-height: 280px;
  width: 100%;
  border-radius: var(--radius-sm);
  display: block;
  cursor: zoom-in;
  object-fit: contain;
}
.msg-video {
  display: block;
  width: 320px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  border-radius: var(--radius-sm);
  background: #000;
  object-fit: contain;
}
.media-link { display: block; }

/* ── Send area ── */
.send-area {
  padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
  background: var(--bg2);
  flex-shrink: 0;
}
.send-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 10px;
}
.msg-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 0.933rem;
  resize: none;
  line-height: 1.5;
  max-height: 140px;
  overflow-y: auto;
  font-family: inherit;
}
.msg-input::placeholder { color: var(--text2); }

.btn-attach {
  font-size: 20px;
  cursor: pointer;
  color: var(--text2);
  padding: 2px 4px;
  border-radius: 6px;
  transition: color .15s;
  line-height: 1;
  user-select: none;
}
.btn-attach:hover { color: var(--accent); }
.hidden-input { display: none; }

.btn-send {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  width: 36px;
  height: 36px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .15s;
}
.btn-send:hover { background: var(--accent-hover); }

.file-preview {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.867rem;
  color: var(--text2);
}
.file-preview img { max-height: 60px; border-radius: 6px; }
.file-preview video { max-height: 60px; border-radius: 6px; }
.file-preview .rm-file { cursor: pointer; color: #e05060; font-size: 16px; }
.hidden { display: none !important; }

/* ── Modal ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 100;
  align-items: center;
  justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 28px 24px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 12px 50px rgba(0,0,0,.6);
}
.modal-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 20px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

.member-checkboxes {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  max-height: 180px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.member-checkboxes label { display: flex; align-items: center; gap: 8px; font-size: 0.933rem; cursor: pointer; }
.member-checkboxes input[type=checkbox] { accent-color: var(--accent); width: 15px; height: 15px; }

/* ── Unread separator ── */
.unread-sep {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 6px;
  color: var(--unread-sep);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .7px;
}
.unread-sep::before, .unread-sep::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--unread-sep);
  opacity: .35;
}

/* ── Message actions (react + forward buttons) ── */
.msg {
  position: relative;
}
.msg-actions {
  position: absolute;
  top: 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s;
}
.msg-own  .msg-actions { left:  -23px; }
.msg-other .msg-actions { right: -23px; }
.msg:hover .msg-actions,
.msg-actions:hover {
  opacity: 1;
  pointer-events: auto;
}

.btn-forward,
.btn-react {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 26px;
  height: 26px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text2);
  padding: 0;
  line-height: 1;
  transition: color .15s, background .15s;
}
.btn-forward:hover,
.btn-react:hover { color: var(--accent); background: var(--bg); }

/* ── Reaction badges ── */
.msg-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 5px;
}
.reaction-badge {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1px 7px;
  font-size: 13px;
  cursor: pointer;
  transition: background .15s;
  line-height: 1.6;
}
.reaction-badge.reacted {
  background: rgba(91,106,248,.25);
  border-color: var(--accent);
}
.reaction-badge:hover { background: var(--bg); }

/* ── Emoji picker popup ── */
.emoji-picker {
  display: none;
  position: fixed;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 6px 10px;
  gap: 2px;
  z-index: 250;
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
}
.emoji-picker.active { display: flex; }
.emoji-btn {
  font-size: 22px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 2px 4px;
  border-radius: 8px;
  transition: background .1s, transform .1s;
  line-height: 1;
}
.emoji-btn:hover { background: var(--bg); transform: scale(1.25); }

.msg-fwd-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  background: rgba(91,106,248,.35);
  border-left: 3px solid var(--accent);
  border-radius: 0 4px 4px 0;
  padding: 3px 8px;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.msg-fwd-sent {
  display: block;
  font-size: 0.733rem;
  color: var(--text2);
  margin-top: 3px;
  opacity: .7;
}

/* ── Read receipts ── */
.msg-reads { min-height: 0; }
.read-receipt {
  display: block;
  font-size: 0.733rem;
  color: var(--accent);
  margin-top: 2px;
  opacity: .8;
}

/* ── Avatar image ── */
.avatar-img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* ── Forward modal room list ── */
.forward-room-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 320px;
  overflow-y: auto;
}
.forward-room-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  cursor: pointer;
  color: var(--text);
  font-size: 0.933rem;
  text-align: left;
  transition: background .15s;
}
.forward-room-btn:hover { background: var(--bg2); }

/* ── Toast ── */
.fwd-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--accent);
  color: #fff;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  z-index: 300;
}
.fwd-toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Lightbox ── */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.92);
  z-index: 200;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.lightbox-overlay.active { display: flex; }
.lb-media {
  max-width: 92vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  border-radius: var(--radius-sm);
  object-fit: contain;
  box-shadow: 0 8px 60px rgba(0,0,0,.8);
}
.lb-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: rgba(255,255,255,.1);
  border: none;
  color: #fff;
  font-size: 22px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.lb-close:hover { background: rgba(255,255,255,.2); }

/* ── Video call overlay ── */
.call-overlay {
  position: fixed; inset: 0; background: #000; z-index: 300;
  display: flex; align-items: center; justify-content: center;
}
.call-overlay.hidden { display: none; }
.remote-video {
  width: 100%; height: 100%; object-fit: cover;
}
.local-video {
  position: absolute; bottom: 90px; right: 16px;
  width: 120px; height: 90px;
  border-radius: 10px; object-fit: cover;
  border: 2px solid rgba(255,255,255,.3);
  background: #111;
}
.call-controls {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 16px;
}
.ctrl-btn {
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255,255,255,.15); border: none; color: #fff;
  font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.ctrl-btn:hover { background: rgba(255,255,255,.25); }
.ctrl-btn.ctrl-off { background: rgba(255,80,80,.5); }
.ctrl-hangup { background: #e74c3c !important; }
.ctrl-hangup:hover { background: #c0392b !important; }
.call-status {
  position: absolute; top: 20px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.7); font-size: 14px; background: rgba(0,0,0,.4);
  padding: 4px 14px; border-radius: 20px;
}
/* incoming call box */
.call-box { text-align: center; }
.call-avatar {
  width: 72px; height: 72px; border-radius: 50%; background: var(--accent);
  color: #fff; font-size: 30px; font-weight: 700; display: flex;
  align-items: center; justify-content: center; margin: 0 auto 12px;
}
.call-who { font-size: 18px; font-weight: 600; margin-bottom: 20px; }
.call-actions { display: flex; justify-content: center; gap: 24px; }
.btn-call-accept {
  width: 54px; height: 54px; border-radius: 50%; background: #27ae60;
  border: none; color: #fff; font-size: 22px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transform: rotate(135deg);
}
.btn-call-reject {
  width: 54px; height: 54px; border-radius: 50%; background: #e74c3c;
  border: none; color: #fff; font-size: 22px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

/* light theme fixes */
html[data-theme="light"] .msg-time { color: rgba(0,0,0,.35); }
html[data-theme="light"] .msg-own .msg-time { color: rgba(255,255,255,.55); }
html[data-theme="light"] .lightbox-overlay { background: rgba(0,0,0,.85); }

/* scrollbar */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* ── Back button (hidden on desktop) ── */
.btn-back {
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background .15s;
}
.btn-back:hover { background: var(--bg3); }

/* ── Mobile layout ── */
@media (max-width: 768px) {
  :root { --sidebar-w: 100%; }

  .layout { flex-direction: column; }

  /* Default (chat list): sidebar full-screen, chat hidden */
  .sidebar {
    width: 100%;
    min-width: 100%;
    height: 100vh;
    height: 100dvh;
    border-right: none;
  }
  .chat-area { display: none; }

  /* When a room is active: hide sidebar, show chat full-screen */
  .layout.has-room .sidebar { display: none; }
  .layout.has-room .chat-area {
    display: flex;
    width: 100%;
    height: 100vh;
    height: 100dvh;
  }

  /* Show back button */
  .btn-back { display: flex; }

  /* Chat header compact */
  .chat-header { padding: 10px 12px; gap: 8px; }
  .chat-title { font-size: 16px; }
  .chat-members { font-size: 11px; }

  /* Messages area mobile tweaks */
  #msg-list { padding: 12px 10px; }
  .msg { max-width: 85%; }
  .msg-img { max-width: 240px; }
  .msg-video { width: 240px; }

  /* Send area mobile */
  .send-area { padding: 8px 10px calc(12px + env(safe-area-inset-bottom, 0px)); }
  .send-row { padding: 6px 8px; }

  /* Sidebar sections full-width */
  .contact-link { padding: 12px 16px; }
  .contact-link.active { padding-left: 13px; }

  /* Avatar slightly bigger for touch */
  .avatar, .avatar-img { width: 40px; height: 40px; font-size: 16px; }

  /* Modal mobile */
  .modal-box { margin: 16px; max-width: calc(100vw - 32px); }

  /* Message actions always visible on mobile (no hover) */
  .msg-actions { opacity: 1; pointer-events: auto; }

  /* Emoji picker mobile */
  .emoji-picker { border-radius: 16px; padding: 8px 12px; }
  .emoji-btn { font-size: 26px; padding: 4px 6px; }

  /* Lightbox mobile */
  .lb-media { max-width: 98vw; max-height: 85vh; }
  .lb-close { top: 10px; right: 10px; }

  /* Call overlay mobile */
  .local-video { width: 90px; height: 68px; bottom: 80px; right: 10px; }
}
