/* Виджет чата: ёлочный шар на еловой ветке у правого края экрана + панель диалога.
   Ветка (chat-branch.svg) входит из-за края, шар висит на нитке и покачивается.
   Новая ветка вместо прежней "плавающей" кнопки - 2026-09-24; прежний файл: chat_data/backup_seo_20260924/chat.css.
   (Ниже - прежние комментарии про положение относительно кнопки "наверх".)

   Кнопка "наверх" (.scrollToTop.medium) реально занимает круг ~63px с
   отступом margin:30px поверх right/bottom:20px - то есть видимая часть
   находится в диапазоне 50-113px от края экрана. Кнопка чата поставлена
   ровно над ней той же горизонтали (see .site-chat-btn right) с запасом
   по вертикали, и у неё больший z-index. На мобильных обе кнопки уменьшены
   и сдвинуты ближе к углу (см. icon_soc.css для .scrollToTop на мобильном
   и media-блок ниже для кнопки чата). */

.site-chat-btn {
  position: relative;
  margin-top: 66px;
  flex: 0 0 auto;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 32% 26%, #6f86c0 0%, #243d75 45%, #14264f 100%);
  box-shadow:
    0 10px 24px rgba(15, 30, 70, 0.4),
    inset 0 -6px 10px rgba(0, 0, 0, 0.18),
    inset 0 5px 9px rgba(255, 255, 255, 0.35);
  transition: transform .2s ease, box-shadow .2s ease;
  padding: 0;
}

.site-chat-btn::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 15px;
  height: 9px;
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, #f0cf78, #b8892a);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.site-chat-btn:hover {
  transform: scale(1.05);
  box-shadow:
    0 14px 30px rgba(15, 30, 70, 0.48),
    inset 0 -6px 10px rgba(0, 0, 0, 0.18),
    inset 0 5px 9px rgba(255, 255, 255, 0.35);
}

.site-chat-btn svg {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.site-chat-btn .site-chat-glint {
  position: absolute;
  top: 12px;
  left: 15px;
  width: 14px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  transform: rotate(-20deg);
  pointer-events: none;
}

.site-chat-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: #e0473c;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  display: none;
}

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

.site-chat-panel {
  position: fixed;
  right: 266px;
  bottom: 44px;
  width: 380px;
  max-width: calc(100vw - 290px);
  /* height (не max-height!) - иначе при небольшом количестве сообщений
     панель сжимается по контенту и для истории переписки остаётся
     совсем мало места. calc(100vh - 220px) не даёт панели вылезти
     за верх экрана на невысоких окнах (bottom:204px + запас). */
  height: min(74vh, 620px, calc(100vh - 90px));
  min-height: 320px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 18px 46px rgba(15, 30, 70, 0.4);
  overflow: hidden;
  z-index: 9500;
  display: none;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.site-chat-panel.open {
  display: flex;
}

.site-chat-header {
  background: linear-gradient(135deg, #243d75, #14264f);
  color: #fff;
  padding: 16px 44px 16px 18px;
  position: relative;
  flex: 0 0 auto;
}

.site-chat-header h3 {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 1.6rem;
  line-height: 1.1;
}

.site-chat-header p {
  margin: 2px 0 0;
  font-size: 0.8rem;
  color: #e8cf8a;
}

.site-chat-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease;
}

.site-chat-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.site-chat-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 14px 16px;
  background: #fbf8f1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-chat-msg {
  max-width: 84%;
  padding: 9px 12px;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.4;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.site-chat-msg.visitor {
  align-self: flex-end;
  background: linear-gradient(135deg, #243d75, #243d75);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.site-chat-msg.admin {
  align-self: flex-start;
  background: #fff;
  color: #1f2a4a;
  box-shadow: 0 1px 4px rgba(15, 29, 61, 0.14);
  border-bottom-left-radius: 4px;
}

.site-chat-msg-time {
  display: block;
  margin-top: 4px;
  font-size: 0.68rem;
  opacity: 0.65;
}

.site-chat-empty {
  text-align: center;
  color: #8a92a6;
  font-size: 0.85rem;
  margin: auto;
  padding: 20px 10px;
}

.site-chat-form {
  flex: 0 0 auto;
  padding: 12px 14px;
  background: #fff;
  border-top: 1px solid #ece5d3;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.site-chat-form input[type="text"],
.site-chat-form input[type="tel"],
.site-chat-form textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #e2dac6;
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 0.87rem;
  font-family: inherit;
  color: #1f2a4a;
  background: #fbf8f1;
  resize: none;
  transition: border-color .15s ease;
}

.site-chat-form input:focus,
.site-chat-form textarea:focus {
  outline: none;
  border-color: #243d75;
  background: #fff;
}

.site-chat-row {
  display: flex;
  gap: 8px;
}

.site-chat-row input {
  flex: 1 1 0;
  min-width: 0;
}

.site-chat-captcha {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: #566178;
}

.site-chat-captcha span {
  font-weight: 600;
  color: #1f2a4a;
  white-space: nowrap;
}

.site-chat-captcha input {
  width: 62px !important;
  flex: 0 0 auto;
  text-align: center;
}

/* согласие на обработку ПД перед первым сообщением (06.10.2026) */
.site-chat-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.35;
  color: #566178;
  cursor: pointer;
}

.site-chat-consent input {
  width: 16px !important;
  height: 16px;
  flex: 0 0 auto;
  margin: 1px 0 0;
  accent-color: #1b2f5c;
}

.site-chat-consent a {
  color: #1b2f5c;
  text-decoration: underline;
}

.site-chat-website-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.site-chat-send-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.site-chat-send-row textarea {
  flex: 1 1 0;
  min-height: 42px;
  max-height: 90px;
}

.site-chat-send-btn {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #243d75, #243d75);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .15s ease, opacity .15s ease;
}

.site-chat-send-btn:hover {
  transform: scale(1.06);
}

.site-chat-send-btn:disabled {
  opacity: 0.5;
  cursor: default;
  transform: none;
}

.site-chat-send-btn svg {
  width: 18px;
  height: 18px;
}

.site-chat-error {
  font-size: 0.78rem;
  color: #c53030;
  min-height: 1em;
}

.site-chat-hint {
  font-size: 0.74rem;
  color: #9aa1b4;
  margin-top: -2px;
}

@media (max-width: 767px) {
  .site-chat-panel {
    right: 10px;
    left: 10px;
    width: auto;
    max-width: none;
    bottom: 10px;
    height: min(calc(100vh - 20px), 640px);
    min-height: 0;
  }
  @supports (height: 1dvh) {
    .site-chat-panel { height: min(calc(100dvh - 20px), 640px); }
  }
  .site-chat-btn::before {
    top: -5px;
    width: 12px;
    height: 7px;
  }
}

.site-chat-name-compact {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.82rem;
  color: #566178;
  padding: 0 1px 2px;
}

.site-chat-name-compact.show {
  display: flex;
}

.site-chat-name-compact span {
  color: #1f2a4a;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-chat-edit-name {
  flex: 0 0 auto;
  border: none;
  background: none;
  color: #243d75;
  font-size: 0.78rem;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.site-chat-edit-name:hover {
  color: #14264f;
}

/* ===== Еловая ветка с шаром ===== */
.site-chat-branch {
  position: fixed;
  right: 0;
  bottom: 122px;
  width: 300px;
  height: 200px;
  z-index: 9490;
  pointer-events: none;
}
.site-chat-branch-img {
  position: absolute;
  right: 0;
  top: 0;
  width: 300px;
  height: 130px;
  max-width: none;
  filter: drop-shadow(0 5px 5px rgba(11, 26, 16, 0.32));
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
/* точка подвеса: на стволе ветки в 119px от правого края (центр шара). Внешний слой - физика от скролла (JS) */
.site-chat-swing {
  position: absolute;
  right: 88px;
  top: 60px;
  width: 62px;
  transform-origin: 50% 0;
  will-change: transform;
  pointer-events: auto;
}
.site-chat-hang {
  position: relative;
  width: 62px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform-origin: 50% 0;
  animation: site-chat-sway 6.5s ease-in-out infinite;
}
.site-chat-hang::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 72px;
  margin-left: -1px;
  border-radius: 1px;
  background: linear-gradient(180deg, #e7c766, #b8892a);
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.25);
}
.site-chat-hang:hover {
  animation: site-chat-swing 2s ease-in-out infinite;
}
.site-chat-branch.has-unread .site-chat-hang {
  animation: site-chat-jingle 1.5s ease-in-out infinite;
}
@keyframes site-chat-sway {
  0%, 100% { transform: rotate(-2.4deg); }
  50% { transform: rotate(2.4deg); }
}
@keyframes site-chat-swing {
  0%, 100% { transform: rotate(-7deg); }
  50% { transform: rotate(7deg); }
}
@keyframes site-chat-jingle {
  0%, 100% { transform: rotate(0deg); }
  15% { transform: rotate(11deg); }
  35% { transform: rotate(-9deg); }
  55% { transform: rotate(6deg); }
  75% { transform: rotate(-3deg); }
}
@media (prefers-reduced-motion: reduce) {
  .site-chat-hang,
  .site-chat-hang:hover,
  .site-chat-branch.has-unread .site-chat-hang {
    animation: none;
  }
}
/* статус "Елена онлайн" с мигающим зелёным индикатором */
.site-chat-online {
  display: flex;
  align-items: center;
  gap: 8px;
}
.site-chat-dot {
  position: relative;
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #c8a04b;
  box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.7);
  animation: site-chat-pulse 1.8s ease-out infinite;
}
@keyframes site-chat-pulse {
  0% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.75); opacity: 1; }
  60% { box-shadow: 0 0 0 8px rgba(61, 220, 132, 0); opacity: .55; }
  100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .site-chat-dot { animation: none; }
}

/* Размеры ветки, шара и нитки на ЛЮБОЙ ширине берутся из переменных --cb-* (их считает chat.js): ветка пропорционально
   уменьшается вместе с экраном, а шар всегда стоит над кнопкой «наверх». Значения ниже - запасные (полный размер). */
.site-chat-branch {
  right: var(--cb-off, 0px);
  bottom: var(--cb-bottom, 133px);
  width: var(--cb-w, 300px);
  height: var(--cb-h, 188px);
}
.site-chat-branch-img {
  width: var(--cb-w, 300px);
  height: var(--cb-imgh, 130px);
}
.site-chat-swing {
  right: var(--cb-swing-right, 88px);
  top: var(--cb-swing-top, 60px);
  width: var(--cb-ball, 62px);
}
.site-chat-hang { width: var(--cb-ball, 62px); }
.site-chat-hang::before { height: var(--cb-thread, 72px); }
.site-chat-btn {
  width: var(--cb-ball, 62px);
  height: var(--cb-ball, 62px);
  margin-top: var(--cb-drop, 66px);
}
.site-chat-btn svg {
  width: calc(var(--cb-ball, 62px) * 0.45);
  height: calc(var(--cb-ball, 62px) * 0.45);
}
@media (min-width: 768px) {
  .site-chat-panel {
    right: var(--cb-panel-right, 266px);
    max-width: calc(100vw - var(--cb-panel-right, 266px) - 24px);
  }
}

/* ===== вложения в чате (2026-09-25) ===== */
.site-chat-attach {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid #e2dac6;
  border-radius: 50%;
  background: #fbf8f1;
  color: #566178;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.site-chat-attach:hover { background: #fff; color: #243d75; border-color: #c8a04b; }
.site-chat-attach.has-files { color: #243d75; border-color: #c8a04b; background: #fff8e6; }
.site-chat-attach:disabled { opacity: .5; cursor: default; }
.site-chat-attach svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.site-chat-files { display: none; flex-wrap: wrap; gap: 6px; }
.site-chat-files.has { display: flex; }
.site-chat-chip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 4px 26px 4px 4px;
  border: 1px solid #e2dac6;
  border-radius: 10px;
  background: #fbf8f1;
  font-size: 0.74rem;
  color: #1f2a4a;
}
.site-chat-chip-thumb {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e8cf8a;
  color: #14264f;
  font-weight: 700;
  font-size: 0.62rem;
}
.site-chat-chip-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.site-chat-chip-info { display: flex; flex-direction: column; min-width: 0; max-width: 130px; line-height: 1.25; }
.site-chat-chip-info b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-chat-chip-info em { font-style: normal; color: #8a92a6; }
.site-chat-chip-x {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #8a92a6;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}
.site-chat-chip-x:hover { background: #ece5d3; color: #14264f; }

.site-chat-progress { position: relative; height: 20px; border-radius: 10px; background: #ece5d3; overflow: hidden; }
.site-chat-progress[hidden] { display: none; }
.site-chat-progress i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, #e8cf8a, #c8a04b); transition: width .2s ease; }
.site-chat-progress span { position: relative; display: block; text-align: center; font-size: 0.72rem; line-height: 20px; font-weight: 600; color: #14264f; }

.site-chat-atts { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.site-chat-atts:last-child { margin-bottom: 0; }
.site-chat-img { display: block; border-radius: 10px; overflow: hidden; line-height: 0; background: rgba(0, 0, 0, 0.06); }
.site-chat-img img { display: block; max-width: 100%; max-height: 210px; width: auto; height: auto; margin: 0 auto; }
.site-chat-file {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
}
.site-chat-msg.admin .site-chat-file { background: #fbf8f1; border-color: #e2dac6; }
.site-chat-file:hover { text-decoration: none; filter: brightness(1.06); }
.site-chat-file-ic { flex: 0 0 auto; min-width: 34px; padding: 6px 4px; border-radius: 8px; background: #e8cf8a; color: #14264f; font-size: 0.62rem; font-weight: 700; text-align: center; }
.site-chat-file-tx { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.site-chat-file-tx b { font-weight: 600; font-size: 0.8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 190px; }
.site-chat-file-tx em { font-style: normal; font-size: 0.7rem; opacity: .7; }

.site-chat-panel.drop::after {
  content: "Отпустите, чтобы прикрепить файл";
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  font-weight: 600;
  color: #14264f;
  background: rgba(251, 248, 241, 0.94);
  border: 2px dashed #c8a04b;
  border-radius: 18px;
}

.site-chat-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(10, 18, 40, 0.86);
  cursor: zoom-out;
}
.site-chat-lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); }
.site-chat-lightbox-x {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

/* ===== кнопка «звук уведомлений» в шапке чата ===== */
.site-chat-sound {
  position: absolute;
  top: 12px;
  right: 46px;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease;
}
.site-chat-sound:hover { background: rgba(255, 255, 255, 0.3); }
.site-chat-sound svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.site-chat-sound .sc-off { display: none; }
.site-chat-sound.off .sc-waves { display: none; }
.site-chat-sound.off .sc-off { display: inline; }
.site-chat-sound.off { color: #e8cf8a; }

/* =====================================================================================================
   Настройки чата (2026-09-27): статус «не в сети», приветствие у шара, автоответ, приветствие первым сообщением
   ===================================================================================================== */
.site-chat-online.is-off .site-chat-dot { background: #9aa3b5; box-shadow: none; animation: none; }
.site-chat-online.is-off .site-chat-dot::after { display: none; }
.site-chat-msg.is-auto::before { content: "автоответ"; display: block; margin-bottom: 4px; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #a98634; }
.site-chat-msg.site-chat-hello { max-width: 88%; }

.site-chat-welcome {
  position: fixed;
  right: var(--cb-panel-right, 110px);
  bottom: calc(var(--cb-bottom, 120px) - 6px);
  z-index: 998;
  width: 300px;
  max-width: calc(100vw - var(--cb-panel-right, 110px) - 16px);
  opacity: 0;
  transform: translateY(10px) scale(0.96);
  transform-origin: 100% 100%;
  transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.2, 0.8, 0.3, 1);
  pointer-events: none;
}
.site-chat-welcome.show { opacity: 1; transform: none; pointer-events: auto; }
.site-chat-welcome-body {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 14px 16px 15px 14px;
  border: 1px solid #e8cf8a;
  border-radius: 20px 20px 6px 20px;
  background: #fffdf8;
  box-shadow: 0 16px 40px rgba(15, 29, 61, 0.22);
  font: 400 0.9rem/1.45 var(--font-body, Inter, system-ui, sans-serif);
  color: #3a4666;
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.site-chat-welcome-body:hover { transform: translateY(-2px); box-shadow: 0 20px 46px rgba(15, 29, 61, 0.28); }
.site-chat-welcome-ava { flex: 0 0 38px; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: linear-gradient(135deg, #1b2f5c, #0f1d3d); color: #e8cf8a; font: 600 1.1rem/1 var(--font-head, Georgia, serif); box-shadow: 0 0 0 2px #e8cf8a; }
.site-chat-welcome-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.site-chat-welcome-txt b { font: 600 0.95rem/1.2 var(--font-head, Georgia, serif); color: #14264f; }
.site-chat-welcome-x {
  position: absolute;
  top: -10px;
  left: -10px;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid #e7dfcc;
  border-radius: 50%;
  background: #fff;
  color: #66708a;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(15, 29, 61, 0.15);
}
.site-chat-welcome-x:hover { color: #14264f; border-color: #c8a04b; }
@media (max-width: 767px) {
  .site-chat-welcome {
    right: 12px;
    left: 12px;
    width: auto;
    max-width: none;
    bottom: calc(var(--cb-bottom, 70px) + var(--cb-ball, 50px) + 14px);
  }
  .site-chat-welcome-body { border-radius: 20px 20px 6px 20px; }
}
@media (prefers-reduced-motion: reduce) { .site-chat-welcome { transition: opacity 0.2s ease; } }

/* даты в переписке: «Сегодня», «Вчера», «27 сентября» - по центру между сообщениями */
.site-chat-day { display: flex; align-items: center; gap: 10px; margin: 10px 0 4px; color: #8a92a6; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; }
.site-chat-day::before, .site-chat-day::after { content: ""; flex: 1 1 auto; height: 1px; background: linear-gradient(90deg, transparent, #e2dac6, transparent); }
.site-chat-day span { padding: 3px 10px; border-radius: 999px; background: #fbf8f1; border: 1px solid #ece4d2; white-space: nowrap; }
.site-chat-day:first-child { margin-top: 2px; }

/* 28.09.2026: фото Елены вместо буквы «Е» (файл /images/chat/elena-chat.jpg, 192x192) */
.site-chat-header.has-ava { padding-left: 74px; }
.site-chat-head-ava { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; background: #0f1d3d url(/images/chat/elena-chat.jpg) center/cover no-repeat; box-shadow: 0 0 0 2px #e8cf8a; }
.site-chat-msg.admin { position: relative; margin-left: 34px; }
.site-chat-msg.admin::after { content: ""; position: absolute; left: -34px; bottom: 0; width: 26px; height: 26px; border-radius: 50%; background: #0f1d3d url(/images/chat/elena-chat.jpg) center/cover no-repeat; box-shadow: 0 0 0 1.5px #e8cf8a; }
.site-chat-welcome-ava.is-photo { background: #0f1d3d url(/images/chat/elena-chat.jpg) center/cover no-repeat; color: transparent; font-size: 0; }

/* отметки прочтения (02.10.2026): ✓ доставлено, ✓✓ Елена прочитала */
.site-chat-tick { margin-left: 5px; letter-spacing: -2px; font-weight: 700; }
.site-chat-tick.is-read { color: #e8cf8a; opacity: 1; }
.site-chat-seen { align-self: flex-end; margin: -4px 4px 0 0; font-size: 0.7rem; color: #8a92a6; }
.site-chat-seen.is-read { color: #8f6f27; }

/* 12.10.2026: кликабельные ссылки в сообщениях */
.site-chat-msg a.site-chat-link, .site-chat-welcome-txt a.site-chat-link { color: inherit; text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; word-break: break-word; }
.site-chat-msg a.site-chat-link:hover, .site-chat-welcome-txt a.site-chat-link:hover { text-decoration-thickness: 2px; }
