  .rex-launcher {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 99999;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    border: 2px solid var(--amber);
    background: var(--charcoal);
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 26px rgba(26, 20, 18, 0.4);
    animation: rexBob 3.6s ease-in-out infinite;
    transition: box-shadow 0.25s ease;
  }
  @keyframes rexBob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-5px); }
  }
  .rex-launcher:hover {
    animation: rexWag 0.6s ease;
    box-shadow: 0 12px 32px rgba(26, 20, 18, 0.5);
  }
  @keyframes rexWag {
    0%, 100% { transform: rotate(0deg)   translateY(-3px); }
    25%      { transform: rotate(-9deg)  translateY(-3px); }
    75%      { transform: rotate(9deg)   translateY(-3px); }
  }
  .rex-launcher:active { transform: scale(0.95); }
  .rex-launcher:focus-visible { outline: 2px solid var(--amber-light); outline-offset: 3px; }

  .rex-launcher-frame {
    width: calc(100% - 6px);
    height: calc(100% - 6px);
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--cream);
    pointer-events: none;
  }
  .rex-launcher-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

  .rex-launcher-ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1px solid var(--amber);
    animation: rexPulse 2.8s ease-out infinite;
    pointer-events: none;
  }
  @keyframes rexPulse {
    0%   { transform: scale(1);    opacity: 0.5; }
    80%  { transform: scale(1.32); opacity: 0; }
    100% { transform: scale(1.32); opacity: 0; }
  }

  .rex-launcher-badge {
    position: absolute;
    bottom: -2px; right: -2px;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--amber);
    border: 2px solid var(--warm-white);
    display: flex; align-items: center; justify-content: center;
    color: var(--charcoal);
    pointer-events: none;
  }
  .rex-launcher.rex-hidden { display: none; }

  .rex-greeting-bubble {
    position: fixed;
    right: 24px;
    bottom: 102px;
    z-index: 99998;
    max-width: 224px;
    background: rgba(26, 20, 18, 0.92);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: rgba(245, 240, 232, 0.94);
    font-family: 'Mulish', sans-serif;
    font-size: 0.78rem;
    line-height: 1.45;
    padding: 12px 15px;
    border-radius: 14px 14px 2px 14px;
    border: 1px solid rgba(200, 133, 58, 0.35);
    box-shadow: 0 10px 28px rgba(0,0,0,0.3);
    opacity: 0;
    transform: translateY(8px);
    animation: rexGreetIn 0.5s 3s ease forwards;
    cursor: pointer;
  }
  .rex-greeting-bubble em {
    font-style: italic;
    color: var(--amber-light);
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.9rem;
  }
  @keyframes rexGreetIn { to { opacity: 1; transform: translateY(0); } }
  .rex-greeting-bubble.rex-greeting--hidden {
    opacity: 0 !important;
    pointer-events: none;
    transition: opacity 0.35s ease;
  }

  @media (max-width: 480px) {
    .rex-greeting-bubble { right: 14px; max-width: 62vw; }
  }

  .rex-window {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 100000;
    width: 384px;
    max-width: calc(100vw - 32px);
    height: 608px;
    max-height: calc(100vh - 48px);
    background: var(--warm-white);
    border-radius: 10px;
    box-shadow: 0 28px 70px rgba(26, 20, 18, 0.4), 0 0 0 1px rgba(200,133,58,0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform-origin: calc(100% - 34px) calc(100% - 34px);
    transform: scale(0.08) translateY(6px);
    pointer-events: none;
    transition: opacity 0.32s cubic-bezier(.2,.9,.25,1), transform 0.38s cubic-bezier(.2,.9,.25,1);
  }
  .rex-window.rex-window--open {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
  }

  @media (max-width: 480px) {
    .rex-window {
      right: 12px; left: 12px; bottom: 12px;
      width: auto;
      height: calc(100vh - 24px);
      height: calc(100dvh - 24px);
      transform-origin: calc(100% - 30px) calc(100% - 30px);
    }
  }

  .rex-window-header {
    position: relative;
    display: flex; align-items: center; gap: 12px;
    padding: 16px 18px;
    background:
      radial-gradient(ellipse 120% 140% at 100% 0%, rgba(200, 133, 58, 0.28) 0%, transparent 60%),
      var(--charcoal);
    flex: none;
    overflow: hidden;
  }
  .rex-window-header::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.06;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(245,240,232,0.9) 1px, transparent 1.4px);
    background-size: 16px 16px;
  }
  .rex-window-header img {
    width: 42px; height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--amber);
    flex: none;
    position: relative;
    z-index: 1;
  }
  .rex-window-header-info { flex: 1; min-width: 0; position: relative; z-index: 1; }
  .rex-window-header-name {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 1.3rem;
    color: var(--cream);
    line-height: 1.1;
  }
  .rex-window-header-status {
    font-family: 'Mulish', sans-serif;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(245, 240, 232, 0.55);
    display: flex; align-items: center; gap: 5px;
    margin-top: 2px;
  }
  .rex-window-header-status::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%;
    background: var(--sage); flex: none;
    box-shadow: 0 0 0 0 rgba(122,140,114,0.6);
    animation: rexStatusPulse 2.4s infinite;
  }
  @keyframes rexStatusPulse {
    0%   { box-shadow: 0 0 0 0 rgba(122,140,114,0.55); }
    70%  { box-shadow: 0 0 0 5px rgba(122,140,114,0); }
    100% { box-shadow: 0 0 0 0 rgba(122,140,114,0); }
  }
  .rex-window-reset {
    background: none; border: none;
    color: rgba(245, 240, 232, 0.6);
    cursor: pointer; padding: 6px; line-height: 0;
    margin-right: 2px;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    transition: color 0.2s, background 0.2s;
    flex: none;
    position: relative;
    z-index: 1;
  }
  .rex-window-reset:hover { color: var(--cream); background: rgba(245,240,232,0.08); }
  .rex-window-reset:focus-visible { outline: 2px solid var(--amber-light); outline-offset: 2px; }

  .rex-window-close {
    background: none; border: none;
    color: rgba(245, 240, 232, 0.6);
    cursor: pointer; padding: 6px; line-height: 0;
    border-radius: 50%;
    transition: color 0.2s, background 0.2s;
    flex: none;
    position: relative;
    z-index: 1;
  }
  .rex-window-close:hover { color: var(--cream); background: rgba(245,240,232,0.08); }
  .rex-window-close:focus-visible { outline: 2px solid var(--amber-light); outline-offset: 2px; }

  .rex-window-body {
    position: relative;
    flex: 1; overflow-y: auto;
    padding: 18px;
    display: flex; flex-direction: column; gap: 14px;
    background: var(--warm-white);
    scroll-behavior: smooth;
  }
  .rex-window-body::-webkit-scrollbar { width: 6px; }
  .rex-window-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

  .rex-scroll-fade {
    position: sticky;
    top: -18px;
    left: 0; right: 0;
    height: 18px;
    margin: -18px -18px 0;
    background: linear-gradient(var(--warm-white), rgba(253,250,245,0));
    pointer-events: none;
    z-index: 2;
  }

  .rex-group { display: flex; align-items: flex-end; gap: 8px; max-width: 88%; animation: rexMsgIn 0.28s ease both; }
  .rex-group--user { align-self: flex-end; }
  .rex-group--bot  { align-self: flex-start; }
  @keyframes rexMsgIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .rex-group-avatar {
    width: 24px; height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border);
    flex: none;
  }
  .rex-group-avatar-spacer { width: 24px; flex: none; }

  .rex-group-col { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
  .rex-group--user .rex-group-col { align-items: flex-end; }

  .rex-bubble {
    padding: 10px 14px;
    font-family: 'Mulish', sans-serif;
    font-size: 0.9rem; line-height: 1.5;
    white-space: pre-wrap; word-break: break-word;
    box-shadow: 0 1px 2px rgba(26,20,18,0.05);
  }
  .rex-group--user .rex-bubble { background: var(--amber); color: var(--charcoal); border-radius: 12px 12px 2px 12px; }
  .rex-group--bot .rex-bubble  { background: var(--cream); color: var(--charcoal); border: 1px solid var(--border); border-radius: 12px 12px 12px 2px; }
  .rex-group--user .rex-bubble:not(:last-child) { border-radius: 12px 4px 4px 12px; }
  .rex-group--user .rex-bubble:not(:first-child) { border-radius: 4px 4px 2px 12px; }
  .rex-group--user .rex-bubble:only-child { border-radius: 12px 12px 2px 12px; }
  .rex-group--bot .rex-bubble:not(:last-child) { border-radius: 12px 12px 4px 4px; }
  .rex-group--bot .rex-bubble:not(:first-child) { border-radius: 4px 12px 12px 4px; }
  .rex-group--bot .rex-bubble:only-child { border-radius: 12px 12px 12px 2px; }

  .rex-group-time {
    font-family: 'Mulish', sans-serif;
    font-size: 0.62rem;
    color: var(--text-soft);
    opacity: 0.55;
    padding: 0 3px;
  }

  .rex-typing-row { display: flex; align-items: flex-end; gap: 8px; }
  .rex-typing-bubble {
    background: var(--cream);
    border: 1px solid var(--border);
    border-radius: 12px 12px 12px 2px;
    padding: 11px 14px;
    display: flex; align-items: center; gap: 7px;
  }
  .rex-typing-label {
    font-family: 'Mulish', sans-serif;
    font-size: 0.72rem;
    color: var(--text-soft);
    opacity: 0.75;
  }
  .rex-typing-dots { display: flex; align-items: center; gap: 4px; }
  .rex-typing-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--brown); opacity: 0.5;
    animation: rexTypingBounce 1.2s infinite ease-in-out;
  }
  .rex-typing-dot:nth-child(2) { animation-delay: 0.15s; }
  .rex-typing-dot:nth-child(3) { animation-delay: 0.3s; }
  @keyframes rexTypingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-4px); opacity: 0.9; }
  }

  .rex-window-footer {
    flex: none;
    padding: 12px 14px;
    border-top: 1px solid var(--border);
    box-shadow: 0 -6px 16px -12px rgba(26,20,18,0.3);
    background: var(--warm-white);
  }
  .rex-input-capsule {
    display: flex; align-items: flex-end; gap: 6px;
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 6px 6px 6px 16px;
    background: var(--cream);
    transition: border-color 0.2s, box-shadow 0.2s;
  }
  .rex-input-capsule:focus-within {
    border-color: var(--amber);
    box-shadow: 0 0 0 3px rgba(200,133,58,0.15);
  }
  .rex-input {
    flex: 1; resize: none;
    border: none;
    padding: 8px 0;
    font-family: 'Mulish', sans-serif;
    font-size: 0.88rem;
    color: var(--charcoal);
    background: transparent;
    max-height: 90px; line-height: 1.4;
  }
  .rex-input:focus { outline: none; }
  .rex-input::placeholder { color: var(--text-soft); opacity: 0.6; }
  .rex-send-btn {
    flex: none; width: 36px; height: 36px;
    border-radius: 50%; border: none;
    background: var(--amber); color: var(--charcoal);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
  }
  .rex-send-btn:hover { background: var(--amber-light); }
  .rex-send-btn:active { transform: scale(0.94); }
  .rex-send-btn:disabled { opacity: 0.5; cursor: default; }
  .rex-send-btn:focus-visible { outline: 2px solid var(--amber-light); outline-offset: 2px; }
  .rex-send-btn svg { transition: transform 0.15s; }
  .rex-send-btn:not(:disabled):active svg { transform: translate(1px, -1px); }

  .rex-window-footnote {
    flex: none; text-align: center;
    font-family: 'Mulish', sans-serif;
    font-size: 0.64rem; letter-spacing: 0.03em;
    color: var(--text-soft); opacity: 0.65;
    padding: 8px 12px 2px;
    background: var(--warm-white);
  }

  .rex-window-poweredby {
    flex: none; text-align: center;
    font-family: 'Mulish', sans-serif;
    font-size: 0.6rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-soft);
    opacity: 0.45;
    padding: 0 12px 8px;
    background: var(--warm-white);
  }
  .rex-window-poweredby strong {
    color: var(--brown);
    font-weight: 700;
  }

  @media (prefers-reduced-motion: reduce) {
    .rex-launcher { animation: none; }
    .rex-launcher:hover { animation: none; }
    .rex-launcher-ring { animation: none; opacity: 0; }
    .rex-greeting-bubble { animation: none; opacity: 1; transform: none; }
    .rex-window { transition: none; }
    .rex-typing-dot { animation: none; }
    .rex-group { animation: none; }
    .rex-window-header-status::before { animation: none; }
  }

/* ═══════════════════════════════════════════════════════════════
   PetHelp / Rex UI refinement — 2026-07
   Typography, rich bot answers, links, emphasis and polish.
   ═══════════════════════════════════════════════════════════════ */

.rex-window {
  border-radius: 16px;
  border: 1px solid rgba(107,76,59,.10);
  box-shadow: 0 30px 80px rgba(26,20,18,.34), 0 8px 24px rgba(26,20,18,.12);
}

.rex-window-header {
  padding: 15px 17px;
  border-bottom: 1px solid rgba(232,168,90,.12);
}

.rex-window-body {
  padding: 20px 18px 22px;
  gap: 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(107,76,59,.24) transparent;
}
.rex-window-body::-webkit-scrollbar { width: 5px; }
.rex-window-body::-webkit-scrollbar-track { background: transparent; }
.rex-window-body::-webkit-scrollbar-thumb {
  background: rgba(107,76,59,.22);
  border-radius: 999px;
}
.rex-window-body::-webkit-scrollbar-thumb:hover {
  background: rgba(107,76,59,.38);
}

.rex-group { max-width: 91%; }
.rex-bubble {
  padding: 12px 15px;
  font-size: .895rem;
  line-height: 1.62;
  letter-spacing: -.005em;
}
.rex-group--bot .rex-bubble {
  background: #f7f2ea;
  border-color: rgba(107,76,59,.16);
  box-shadow: 0 5px 18px rgba(42,36,32,.045);
}
.rex-group--user .rex-bubble {
  background: #c98539;
  color: #241e1a;
  box-shadow: 0 5px 15px rgba(107,76,59,.10);
}

/* Rich answer typography */
.rex-bubble a {
  color: #76503a;
  font-weight: 700;
  text-decoration-color: rgba(118,80,58,.38);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color .18s ease, text-decoration-color .18s ease, background .18s ease;
}
.rex-bubble a:hover {
  color: #a56c37;
  text-decoration-color: #a56c37;
}
.rex-bubble a:focus-visible {
  outline: 2px solid rgba(200,133,58,.55);
  outline-offset: 2px;
  border-radius: 3px;
}
.rex-group--user .rex-bubble a { color: #3c2b20; }

.rex-bubble strong {
  font-weight: 750;
  color: #2a2420;
}
.rex-bubble .rex-price {
  display: inline-block;
  font-weight: 800;
  color: #68452f;
  white-space: nowrap;
}
.rex-bubble .rex-clinic {
  font-weight: 800;
  color: #3b302a;
}
.rex-bubble .rex-label {
  font-weight: 700;
  color: #5d493c;
}
.rex-bubble .rex-phone-link,
.rex-bubble .rex-web-link {
  font-weight: 750;
}

.rex-group-time {
  font-size: .59rem;
  opacity: .46;
  margin-top: 1px;
}

.rex-typing-bubble {
  box-shadow: 0 4px 14px rgba(42,36,32,.04);
}
.rex-typing-label { font-weight: 500; }

.rex-window-footer {
  padding: 11px 13px 9px;
  border-top-color: rgba(107,76,59,.12);
}
.rex-input-capsule {
  min-height: 48px;
  border-color: rgba(107,76,59,.20);
  background: #f8f3eb;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.65);
}
.rex-input-capsule:hover { border-color: rgba(107,76,59,.34); }
.rex-input-capsule:focus-within {
  border-color: #c8853a;
  box-shadow: 0 0 0 3px rgba(200,133,58,.12), 0 5px 16px rgba(107,76,59,.06);
}
.rex-send-btn {
  width: 38px;
  height: 38px;
  box-shadow: 0 3px 9px rgba(107,76,59,.14);
}
.rex-send-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 12px rgba(107,76,59,.18);
}

.rex-window-footnote {
  padding-top: 6px;
  font-size: .61rem;
  line-height: 1.4;
  opacity: .56;
}
.rex-window-poweredby {
  font-size: .57rem;
  opacity: .38;
  padding-bottom: 7px;
}

@media (max-width: 480px) {
  .rex-window {
    border-radius: 15px;
  }
  .rex-window-body {
    padding: 18px 14px 20px;
  }
  .rex-group {
    max-width: 94%;
  }
  .rex-bubble {
    font-size: .91rem;
    line-height: 1.58;
    padding: 11px 14px;
  }
}


/* PetHelp / Rex: footer centering, soft online glow, branded PETHELP */
.rex-status-dot,
.rex-online-dot {
  background: #78a85b !important;
  box-shadow: 0 0 0 3px rgba(120,168,91,.10),
              0 0 9px rgba(120,168,91,.42) !important;
}

.rex-window-footnote {
  width: 100%;
  box-sizing: border-box;
  text-align: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 12px !important;
  padding-right: 12px !important;
}

.rex-window-poweredby {
  width: 100%;
  text-align: center !important;
  letter-spacing: .075em;
  color: rgba(79,69,62,.48);
}

.rex-window-poweredby strong,
.rex-window-poweredby b,
.rex-window-poweredby a {
  font-weight: 700;
  color: #c8853a;
  text-decoration: none;
  letter-spacing: .12em;
}

@media (max-width: 480px) {
  .rex-window-footnote {
    text-align: center !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
}


/* === PETHELP EXACT FIX v3 ===
   Uses the ACTUAL selectors present in this widget.
*/

/* Actual online lamp is ::before on header status */
.rex-window-header-status::before {
  width: 7px !important;
  height: 7px !important;
  background: #78a85b !important;
  box-shadow:
    0 0 5px rgba(120,168,91,.78),
    0 0 10px rgba(120,168,91,.34) !important;
  animation: none !important;
}

/* Footer: force true centering independent of parent layout */
.rex-window-footnote {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 7px 18px 2px !important;
  text-align: center !important;
  white-space: normal !important;
  overflow-wrap: normal !important;
}
.rex-window-footnote br {
  display: none;
}

/* Powered by */
.rex-window-poweredby {
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 1px 12px 8px !important;
  text-align: center !important;
  color: #8b8179 !important;
  opacity: .62 !important;
}
.rex-window-poweredby strong {
  color: #c8853a !important;
  font-weight: 800 !important;
  letter-spacing: .11em !important;
}


/* === PETHELP UI v5 — markup-aware fix === */

/* softer online lamp */
.rex-window-header-status::before {
  background: #789465 !important;
  box-shadow: 0 0 5px rgba(120,148,101,.34) !important;
}

/* branded PETHELP.BY in header */
.rex-window-header-status {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
}
.rex-status-sep { color: rgba(245,240,232,.38); }
.rex-header-brand { font-weight: 700; letter-spacing: .055em; }
.rex-header-brand .rex-brand-pet { color: rgba(245,240,232,.68); }
.rex-header-brand .rex-brand-help { color: #c8853a; }
.rex-header-brand .rex-brand-by { color: rgba(245,240,232,.55); }

/* footer: text and phone are now separate DOM elements */
.rex-window-footnote {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  padding: 7px 12px 2px !important;
  margin: 0 !important;
  text-align: center !important;
  box-sizing: border-box !important;
}
.rex-window-footnote > span {
  display: block !important;
  width: 100% !important;
  text-align: center !important;
}
.rex-window-footnote .rex-footer-phone {
  display: block !important;
  width: max-content !important;
  margin: 1px auto 0 !important;
  color: #9a6738 !important;
  font-weight: 700 !important;
  text-align: center !important;
  text-decoration: none !important;
}

/* branded PETHELP in powered-by line */
.rex-window-poweredby .rex-brand-pet { color: #6b4c3b !important; }
.rex-window-poweredby .rex-brand-help { color: #c8853a !important; }


/* === PETHELP HEADER EXACT v6 ===
   Reference: green lamp + green "НА СВЯЗИ",
   amber PETHELP, neutral .BY
*/
.rex-window .rex-window-header-status::before {
  width: 7px !important;
  height: 7px !important;
  background: #82b85d !important;
  box-shadow:
    0 0 4px rgba(130,184,93,.72),
    0 0 9px rgba(130,184,93,.28) !important;
  animation: none !important;
}

.rex-window .rex-window-header-status > span:first-child {
  color: #8fbd67 !important;
  font-weight: 700 !important;
}

.rex-window .rex-window-header-status .rex-status-sep {
  color: rgba(245,240,232,.55) !important;
}

.rex-window .rex-window-header-status .rex-header-brand .rex-brand-pet,
.rex-window .rex-window-header-status .rex-header-brand .rex-brand-help {
  color: #cf8a3b !important;
  font-weight: 800 !important;
}

.rex-window .rex-window-header-status .rex-header-brand .rex-brand-by {
  color: rgba(245,240,232,.72) !important;
  font-weight: 700 !important;
}


/* === PETHELP v7: фирменное переливание ТОЛЬКО кольца вокруг Рэкса ===
   Логика взята из слогана "Рядом, когда это действительно важно.":
   amber-light -> warm white -> amber-light, медленное мягкое движение.
   Фото, размер кнопки и остальные элементы виджета не меняются.
*/
.rex-launcher {
  border-color: transparent !important;
  overflow: visible !important;
}

/* внутреннее аккуратное кольцо у фотографии */
.rex-launcher-frame {
  position: relative !important;
  z-index: 2 !important;
  border: 2px solid rgba(245,240,232,.88) !important;
}

/* вместо расходящейся пульсации — живое фирменное кольцо */
.rex-launcher-ring {
  position: absolute !important;
  inset: -4px !important;
  border-radius: 50% !important;
  border: 0 !important;
  opacity: 1 !important;
  transform: none !important;
  background: conic-gradient(
    from 0deg,
    #e8a85a 0deg,
    #fff6e8 72deg,
    #c8853a 145deg,
    #e8a85a 220deg,
    #fff6e8 292deg,
    #e8a85a 360deg
  ) !important;
  -webkit-mask:
    radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)) !important;
  mask:
    radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)) !important;
  filter: drop-shadow(0 0 4px rgba(232,168,90,.30)) !important;
  animation: rexBrandRingShimmer 5s ease-in-out infinite !important;
  pointer-events: none !important;
  z-index: 3 !important;
}

@keyframes rexBrandRingShimmer {
  0%   { transform: rotate(0deg);   filter: drop-shadow(0 0 3px rgba(232,168,90,.22)); }
  50%  { transform: rotate(180deg); filter: drop-shadow(0 0 6px rgba(232,168,90,.42)); }
  100% { transform: rotate(360deg); filter: drop-shadow(0 0 3px rgba(232,168,90,.22)); }
}

@media (prefers-reduced-motion: reduce) {
  .rex-launcher-ring {
    animation: none !important;
  }
}


/* === PETHELP v8: clean Rex launcher ===
   Убираем нижний правый badge: кольцо само является индикатором активности.
*/
.rex-launcher-badge {
  display: none !important;
}


/* === PETHELP v9: readable Rex teaser === */

/* Основной текст подсказки — заметно светлее и контрастнее */
.rex-teaser,
.rex-launcher-hint,
.rex-hint {
  color: #f4eee5 !important;
  font-weight: 600 !important;
  text-shadow: 0 1px 1px rgba(0,0,0,.22) !important;
}

/* Курсивная/акцентная часть */
.rex-teaser em,
.rex-teaser i,
.rex-launcher-hint em,
.rex-launcher-hint i,
.rex-hint em,
.rex-hint i {
  color: #e7b66f !important;
  font-weight: 600 !important;
  opacity: 1 !important;
}

/* Маленькие лапки: светлый янтарный, чтобы читались на шоколадном фоне */
.rex-teaser .paw,
.rex-teaser .paws,
.rex-launcher-hint .paw,
.rex-launcher-hint .paws,
.rex-hint .paw,
.rex-hint .paws {
  color: #dca45b !important;
  opacity: 1 !important;
  filter: drop-shadow(0 0 2px rgba(220,164,91,.28)) !important;
}


/* Дополнительная контрастность для текста внутри тёмной плашки */
.rex-teaser *,
.rex-launcher-hint *,
.rex-hint * {
  opacity: 1;
}


/* Exact selector for the small launcher greeting */
.rex-greeting-bubble {
  color: #fff8ef !important;
  font-weight: 650 !important;
  font-size: .82rem !important;
  line-height: 1.5 !important;
}
.rex-greeting-bubble em {
  color: #efbd75 !important;
  opacity: 1 !important;
  font-weight: 650 !important;
  font-size: .96rem !important;
  text-shadow: 0 0 5px rgba(239,189,117,.16) !important;
}
/* paw emoji / trailing symbol gets a little more visibility */
.rex-greeting-bubble {
  text-shadow: 0 1px 1px rgba(0,0,0,.22);
}


/* === PETHELP v10: stronger teaser contrast + light branded paws === */
.rex-greeting-bubble {
  background: rgba(31, 24, 21, .97) !important;
  color: #fffaf2 !important;
  font-weight: 700 !important;
  font-size: .84rem !important;
  border-color: rgba(200,133,58,.55) !important;
}

.rex-greeting-bubble em {
  color: #f0bd74 !important;
  font-weight: 700 !important;
  opacity: 1 !important;
}

/* Paw mark in site's warm cream tone */
.rex-greeting-paws {
  color: #f3e5cf !important;
  opacity: 1 !important;
  filter: grayscale(1) sepia(.22) brightness(1.75) !important;
  text-shadow: 0 0 5px rgba(243,229,207,.22) !important;
  font-style: normal !important;
}


/* === PETHELP v11: paws are intentionally large and light === */
.rex-greeting-bubble .rex-greeting-paws {
  display: inline-block !important;
  margin-left: 5px !important;
  font-family: "Segoe UI Symbol", "Arial Unicode MS", sans-serif !important;
  font-style: normal !important;
  font-size: 1.18rem !important;
  line-height: .8 !important;
  color: #f6e7cf !important;
  opacity: 1 !important;

  /* Emoji glyphs ignore CSS color on many browsers.
     Force the rendered paw toward the site's warm cream. */
  filter: grayscale(1) brightness(2.8) sepia(.16) !important;
  text-shadow: 0 0 4px rgba(246,231,207,.32) !important;
  vertical-align: -0.10em !important;
}


/* === PETHELP: карта — точка для Рэкса без ввода адреса текстом ===
   Кнопка в капсуле ввода открывает Яндекс.Карту поверх окна чата;
   выбранная точка уходит в chat.php как {location:{lat,lon}}, а бэкенд
   сам превращает координаты в адрес (geocodeReverse() в core.php).
*/

.rex-map-btn {
  flex: none; width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--brown);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.rex-map-btn:hover { background: var(--cream); border-color: var(--amber); color: var(--amber); }
.rex-map-btn:active { transform: scale(0.94); }
.rex-map-btn:disabled { opacity: 0.5; cursor: default; }
.rex-map-btn:focus-visible { outline: 2px solid var(--amber-light); outline-offset: 2px; }

@keyframes rexMapPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(200,133,58,0.5); }
  50% { box-shadow: 0 0 0 7px rgba(200,133,58,0); }
}
.rex-map-btn--pulse {
  border-color: var(--amber);
  color: var(--amber);
  animation: rexMapPulse 1.5s ease-in-out infinite;
}

.rex-map-overlay {
  position: absolute; inset: 0;
  z-index: 5;
  border-radius: inherit;
  background: var(--warm-white);
  display: flex; flex-direction: column;
  opacity: 0; pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.rex-map-overlay.rex-map-overlay--open {
  opacity: 1; pointer-events: auto; transform: translateY(0);
}

.rex-map-overlay-header {
  flex: none;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  background: var(--charcoal);
  color: var(--cream);
  font-family: 'Mulish', sans-serif;
  font-size: 0.86rem;
  font-weight: 600;
}
.rex-map-close {
  background: none; border: none; color: rgba(245,240,232,0.65);
  cursor: pointer; padding: 4px; line-height: 0; border-radius: 50%;
  transition: color 0.2s, background 0.2s;
}
.rex-map-close:hover { color: var(--cream); background: rgba(245,240,232,0.08); }
.rex-map-close:focus-visible { outline: 2px solid var(--amber-light); outline-offset: 2px; }

.rex-map-search {
  flex: none;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--warm-white);
}
.rex-map-search-input {
  flex: 1; min-width: 0;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 8px 14px;
  font-family: 'Mulish', sans-serif;
  font-size: 0.82rem;
  color: var(--charcoal);
  background: var(--cream);
  outline: none;
  transition: border-color 0.2s;
}
.rex-map-search-input::placeholder { color: var(--text-soft); opacity: 0.7; }
.rex-map-search-input:focus { border-color: var(--amber); }
.rex-map-search-btn {
  flex: none; width: 34px; height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--amber);
  color: var(--charcoal);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}
.rex-map-search-btn:hover { background: var(--amber-light); }
.rex-map-search-btn:active { transform: scale(0.94); }
.rex-map-search-btn:focus-visible { outline: 2px solid var(--amber-light); outline-offset: 2px; }

.rex-map-canvas { flex: 1; min-height: 0; background: var(--cream); }

.rex-map-overlay-footer {
  flex: none;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  background: var(--warm-white);
}
.rex-map-hint {
  font-family: 'Mulish', sans-serif;
  font-size: 0.72rem;
  color: var(--text-soft);
  opacity: 0.75;
  flex: 1; min-width: 0;
}
.rex-map-confirm {
  flex: none;
  border: none; border-radius: 18px;
  padding: 9px 18px;
  background: var(--amber); color: var(--charcoal);
  font-family: 'Mulish', sans-serif;
  font-size: 0.82rem; font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}
.rex-map-confirm:hover:not(:disabled) { background: var(--amber-light); }
.rex-map-confirm:disabled { opacity: 0.45; cursor: default; }

@media (max-width: 480px) {
  .rex-map-overlay-header { padding: 12px 14px; }
  .rex-map-overlay-footer { flex-wrap: wrap; }
  .rex-map-hint { flex-basis: 100%; order: 2; }
  .rex-map-confirm { order: 1; margin-left: auto; }
}
