/* Shared header and grouped services use the existing cream/red palette. */
.site-head .wrap { max-width: 1360px; margin-inline: auto; gap: 22px; }
.site-head .site-nav { align-items: center; gap: 18px; }
.nav-services { position: relative; }
.nav-services > summary { display: flex; align-items: center; gap: 7px; min-height: 44px; list-style: none; cursor: pointer; color: var(--fg-muted); font: inherit; font-size: 14px; white-space: nowrap; }
.nav-services > summary::-webkit-details-marker { display: none; }
.nav-services > summary::after { content: ''; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); margin-top: -4px; }
.nav-services[open] > summary::after { transform: rotate(225deg); margin-top: 3px; }
.nav-services > summary:hover,
.site-head .site-nav [aria-current] { color: var(--accent); }
.nav-services > summary:focus-visible,
.site-head .site-nav a:focus-visible,
.mm-services > summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.nav-services-panel { position: absolute; top: calc(100% + 10px); left: -20px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; width: 660px; padding: 24px; background: var(--surface-0, #fbf4e6); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 16px 40px rgba(50, 25, 15, .16); }
.nav-services:not([open]) > .nav-services-panel { display: none; }
.nav-service-title,
.mm-service-title { margin: 0 0 10px; color: var(--accent); font: 700 12px/1.4 var(--font-body, sans-serif); }
.site-head .nav-service-group a { display: flex; min-height: 44px; align-items: center; white-space: normal; }
.mm-services { flex-shrink: 0; border-bottom: 1px solid var(--border); }
.mm-services > summary { padding: 15px 4px; cursor: pointer; color: var(--ink); font: 700 18px/1.55 var(--font-display); text-transform: uppercase; }
.mm-service-group { padding: 12px 4px; }
.mm-service-group .mm-link { min-height: 44px; padding: 10px 8px; border-bottom: 0; font: 500 15px/1.5 var(--font-body); text-transform: none; }
.mm-panel [aria-current] { color: var(--accent); }
/* Three explicit contact actions, using the site's existing palette and type. */
.site-head .contact-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; margin-left: auto; }
.site-head .contact-actions .head-cta,
.site-head .contact-actions .header-direct-call,
.site-head .contact-actions .header-manager-chat {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 54px;
  margin: 0;
  padding: 10px 14px;
  font: 700 16px/1.2 var(--font-body, sans-serif);
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}
.site-head .contact-actions .head-cta::before { display: none; }
.site-head .contact-actions .head-cta { padding-inline: 24px; background: linear-gradient(#a61919, #760909); color: #fff; border: 1px solid #a62e2e; box-shadow: 0 5px 14px #64060626; }
.site-head .contact-actions svg { flex-shrink: 0; }
.site-head .contact-actions .header-direct-call, .site-head .contact-actions .header-manager-chat { gap: 8px; }
.header-direct-call { border: 1px solid #302521; border-radius: 7px; background: #302521; color: #fff; text-decoration: none; }
.header-direct-call:hover { background: #49332c; }
.site-head .contact-actions .head-cta:hover { background: #a61919; }
.site-head .contact-actions a:active, .site-head .contact-actions button:active { filter: brightness(.9); }
.header-direct-call:focus-visible { outline: 3px solid var(--accent, #971313); outline-offset: 3px; }
.header-manager-chat { border: 1px solid var(--accent, #971313); border-radius: 7px; background: var(--surface-0, #fbf4e6); color: var(--accent, #971313); cursor: pointer; }
.header-manager-chat:hover { background: var(--surface-2, #eee4d2); }
.header-manager-chat:focus-visible { outline: 3px solid var(--accent, #971313); outline-offset: 3px; }
/* Legacy status slot in the footer: the chat panel owns the live status line. */
[data-manager-chat-status] { display: none; }
/* The consent banner sits in the same corner; its choice comes first. */
body:has(#ar-cookie) .manager-chat-launcher { visibility: hidden; }
@media (min-width: 1001px) and (max-width: 1340px) {
  .site-head .wrap { height: auto; min-height: var(--topbar-h); flex-wrap: wrap; gap: 4px 16px; padding-block: 8px; }
  .site-head .contact-actions { flex: 1 0 100%; justify-content: flex-end; }
  html { scroll-padding-top: 150px; }
}
@media (max-width: 820px) {
  html { scroll-padding-top: 150px; }
  /* The second row of contact actions grows the sticky header instead of
     spilling past its background. */
  .site-head .wrap { height: auto; min-height: var(--topbar-h, 80px); flex-wrap: wrap; gap: 8px 12px; padding-block: 8px; }
  /* The dock carries its own «Написать»: the floating pill would cover it. */
  body:has(.cta-dock) .manager-chat-launcher { display: none; }
  /* The launcher stands down where the dock lives, so a waiting reply hoists
     the dock on screen — a sheet or the burger menu still owns the screen. */
  html.ar-chat-unread:not(.lead-sheet-open):not(:has(.mm-overlay.open)) .cta-dock { transform: translateY(0); }
  .site-head .logo { order: 0; }
  .site-head .nav-burger { order: 1; margin-left: auto; }
  .site-head .contact-actions { order: 2; flex: 1 0 100%; display: grid; grid-template-columns: 1.45fr 1fr; gap: 6px; align-items: stretch; }
  .site-head .contact-actions .head-cta,
  .site-head .contact-actions .header-direct-call,
  .site-head .contact-actions .header-manager-chat { min-width: 0; width: 100%; padding: 9px 5px; font-size: 12px; min-height: 68px; height: 68px; white-space: normal; text-align: center; }
  .site-head .contact-actions .header-direct-call, .site-head .contact-actions .header-manager-chat { flex-direction: column; gap: 4px; }
  .site-head .contact-actions svg { width: 16px; height: 16px; }
  .cta-dock { grid-template-columns: 1.45fr 1fr 1fr; align-items: stretch; padding-top: 6px; }
  .cta-dock .dock-status { display: none; }
  .cta-dock .dock-lead { order: 0; padding: 8px 5px; min-height: 48px; font: 700 12px/1.2 var(--font-body, sans-serif); text-transform: none; letter-spacing: 0; }
  .cta-dock .dock-lead .arrow, .cta-dock .dock-lead::before { display: none; }
  .cta-dock .dock-lead { min-height: 52px; height: 52px; background: #8d1010; color: #fff; }
  .cta-dock .dock-call { order: 1; width: 100%; height: auto; min-height: 52px; font-size: 12px; background: #302521; color: #fff; border-color: #302521; }
  .cta-dock .dock-chat { order: 2; position: relative; min-width: 0; min-height: 52px; font: 700 12px/1.2 var(--font-body, sans-serif); background: #fbf4e6; color: #971313; border: 1px solid #971313; }
}
@media (max-width: 350px) {
  .site-head .contact-actions .head-cta,
  .site-head .contact-actions .header-direct-call,
  .site-head .contact-actions .header-manager-chat,
  .cta-dock .dock-lead { font-size: 11px; }
}

.messenger-badges { display:flex; flex-shrink:0; gap:4px; }
.messenger-badges a { display:flex; align-items:center; justify-content:center; gap:5px; width:44px; min-height:44px; text-decoration:none; border-radius:6px; }
.messenger-badges span { display:none; }
.messenger-badges svg,.messenger-badges img { flex-shrink:0; width:24px; height:24px; }
.messenger-max { color:#6244bd; }
.messenger-telegram { color:#087eb2; }
.messenger-whatsapp { color:#12813c; }
.messenger-badges a:hover { background:#e7ddc9; }
.messenger-badges a:focus-visible { outline:2px solid #8d1010; outline-offset:2px; }
@media(min-width:1001px) and (max-width:1500px) { .site-head .wrap {height:auto;flex-wrap:wrap;padding-block:8px;gap:6px 16px} .site-head .contact-actions {flex:1 0 70%;justify-content:flex-end} }
@media(max-width:1000px) and (min-width:821px) { .site-head .wrap {gap:10px} }
@media(max-width:820px) { .messenger-badges {order:3;flex:1 0 100%;justify-content:center;gap:12px} .messenger-badges a {width:auto;min-height:44px;font:600 12px var(--font-body,sans-serif)} .messenger-badges span {display:inline} .messenger-badges svg,.messenger-badges img {width:20px;height:20px} html {scroll-padding-top:200px} }
@media(max-width:820px){
  .site-head .wrap{flex-wrap:nowrap;gap:0;padding:10px 8px;height:68px;min-height:68px;width:100%;max-width:none}
  .site-head .logo{flex:1 1 auto;min-width:0;max-width:none}
  .site-head .logo .brand-logo{width:clamp(64px,calc(100vw - 256px),120px)!important;height:auto!important;max-width:100%}
  .site-head .contact-actions{order:1;display:flex;flex:0 0 44px;margin:0}
  .site-head .contact-actions .head-cta{display:none}
  .site-head .contact-actions .header-direct-call{width:44px;height:44px;min-height:44px;padding:0;border-radius:50%;background:#8d1010;border-color:#8d1010}
  .site-head .header-direct-call span{display:none}
  .site-head .contact-actions svg{width:20px;height:20px}
  .site-head .messenger-badges{order:2;flex:0 0 132px;gap:0;margin:0}
  .site-head .messenger-badges a{width:44px;height:44px;min-height:44px;border-radius:50%;background:#fbf4e6;border:1px solid #d9c9b0}
  .site-head .messenger-badges svg{width:24px;height:24px}
  .site-head .messenger-badges span{display:none}
  .site-head .nav-burger{order:3;flex:0 0 44px;width:44px;min-width:44px;height:44px;margin:0;border-radius:50%;background:#fbf4e6;border:1px solid #d9c9b0}
  .cta-dock{grid-template-columns:1fr 1fr;padding-bottom:calc(8px + env(safe-area-inset-bottom,0px))}
  .cta-dock .dock-call{background:#fbf4e6;color:#8d1010;border-color:#8d1010;font-size:15px}
  .cta-dock .dock-chat{background:#8d1010;color:#fff;font-size:15px}
  body:has(#ar-cookie) .cta-dock,html.ar-chat-lock .cta-dock{visibility:hidden}
  html{scroll-padding-top:80px}
}
/* ---------------------------------------------------------------- the chat --
   Own chat panel: a physical control panel (chrome rail, LED, mono labels)
   painted with Tier-1 tokens only. The visitor writes to /api/chat directly,
   so the page stays free of third-party widget code. */

.site-chat {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9001;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: 380px;
  height: min(600px, calc(100vh - 48px));
  overflow: hidden;
  background: var(--surface-0);
  border: 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-panel), inset 0 1px 0 var(--chrome-hi);
  color: var(--ink);
  font: 500 15px/1.45 var(--font-body, sans-serif);
  animation: site-chat-in 160ms var(--ease) both;
}
.site-chat[hidden] { display: none; }
/* Desktop drop target: one oxblood frame, no layout shift. */
.site-chat.site-chat--drop { outline: 2px solid var(--accent); outline-offset: -2px; }
.site-chat ::selection { background: var(--accent-soft); color: var(--ink); }
@keyframes site-chat-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.site-chat__head {
  display: flex;
  flex: none;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: linear-gradient(180deg, var(--chrome-hi), var(--surface-2));
  border-bottom: 1px solid var(--border);
}
.site-chat__led {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(19, 122, 66, .18);
}
.site-chat__id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.site-chat__title {
  font-family: var(--font-display, "Arial Narrow", Impact, sans-serif);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.1;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--accent);
  overflow-wrap: break-word;
}
.site-chat__sub {
  font-family: var(--font-mono, Consolas, monospace);
  font-size: 11px;
  line-height: 1.3;
  color: var(--fg-muted);
}
.site-chat__close {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--fg-muted);
  cursor: pointer;
}
.site-chat__close:hover { background: var(--surface-2); color: var(--ink); }
.site-chat__close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.site-chat__close svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.site-chat__feed {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--surface-1);
  border-bottom: 1px solid var(--border-soft);
  scrollbar-width: thin;
  scrollbar-color: var(--surface-3) transparent;
}
/* A short conversation rests on the composer instead of hanging under the
   header — and the feed still scrolls once it fills up. */
.site-chat__feed > :first-child { margin-top: auto; }
.site-chat__hello {
  max-width: 85%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 14px 14px 4px 14px;
  background: var(--surface-0);
}
.site-chat__chips { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.site-chat__chips[hidden] { display: none; }
.site-chat__chip {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 40px;
  margin: 0;
  padding: 8px 14px;
  border: 1px solid var(--border-red);
  border-radius: 999px;
  background: var(--surface-0);
  color: var(--accent);
  font: 600 14px/1.2 var(--font-body, sans-serif);
  text-align: left;
  cursor: pointer;
}
.site-chat__chip:hover { background: var(--accent-soft); }
.site-chat__chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.site-chat__chip-label { min-width: 0; }
.site-chat__chip-arrow {
  flex: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.site-chat__msg {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 85%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-0);
  overflow-wrap: anywhere;
}
.site-chat__msg[data-from="manager"] { align-self: flex-start; border-bottom-left-radius: 4px; }
.site-chat__msg[data-from="visitor"] {
  align-self: flex-end;
  border-color: var(--border-red);
  border-bottom-right-radius: 4px;
  background: var(--accent-soft);
  color: var(--ink);
}
.site-chat__author {
  font-family: var(--font-mono, Consolas, monospace);
  font-size: 11px;
  line-height: 1.3;
  color: var(--fg-muted);
}
.site-chat__body { white-space: pre-wrap; overflow-wrap: anywhere; }
.site-chat__body a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.site-chat__body a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.site-chat__files { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.site-chat__file {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--border-red);
  border-radius: var(--radius-sm);
  background: var(--surface-0);
  color: var(--accent);
  font: 600 13px/1.3 var(--font-body, sans-serif);
  text-decoration: none;
}
.site-chat__file:hover { background: var(--accent-soft); }
.site-chat__file:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.site-chat__file--image, .site-chat__file--image:hover { padding: 0; border: 0; background: none; }
.site-chat__file-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-chat__file-size { flex: none; font-family: var(--font-mono, Consolas, monospace); font-size: 11px; font-weight: 500; color: var(--fg-muted); }
.site-chat__doc {
  flex: none;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.site-chat__thumb {
  display: block;
  /* Fixed box: a thumbnail that loads late must not shift the feed. */
  width: 220px;
  max-width: 100%;
  height: 150px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  object-fit: cover;
}

.site-chat__msg-time {
  align-self: flex-end;
  font-family: var(--font-mono, Consolas, monospace);
  font-size: 11px;
  line-height: 1;
  color: var(--fg-dim);
}
.site-chat__msg[data-from="manager"] .site-chat__msg-time { align-self: flex-start; }
.site-chat__msg-alert {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  font-size: 12px;
  color: var(--accent);
}
.site-chat__retry {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin: 0;
  padding: 5px 12px;
  border: 1px solid var(--border-red);
  border-radius: 999px;
  background: var(--surface-0);
  color: var(--accent);
  font: 700 12px/1.2 var(--font-body, sans-serif);
  cursor: pointer;
}
.site-chat__retry:hover { background: var(--surface-2); }
.site-chat__retry:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.site-chat__status {
  flex: none;
  margin: 0;
  padding: 8px 16px 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--accent);
}
.site-chat__status:empty { display: none; }

.site-chat__form {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 12px 16px 0;
  background: var(--surface-0);
}
/* Staged attachments sit between the feed and the field: they belong to the
   message that is being written, not to the panel chrome. */
.site-chat__pending { display: flex; flex-direction: column; gap: 6px; }
.site-chat__pending[hidden] { display: none; }
.site-chat__pending-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-1);
  font: 600 13px/1.3 var(--font-body, sans-serif);
}
.site-chat__pending-item[data-state="failed"] { border-color: var(--border-red); }
/* Both tiles are 36×36: the row keeps its height whether the picture is shown
   or a document mark stands in for it. */
.site-chat__pending-thumb,
.site-chat__pending-icon {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.site-chat__pending-thumb { display: block; object-fit: cover; }
.site-chat__pending-icon { display: grid; place-items: center; color: var(--fg-muted); }
.site-chat__pending-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.site-chat__pending-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.site-chat__pending-size { flex: none; font-family: var(--font-mono, Consolas, monospace); font-size: 11px; font-weight: 500; color: var(--fg-muted); }
.site-chat__pending-note { flex: none; font-size: 12px; color: var(--accent); }
.site-chat__pending-retry {
  flex: none;
  min-height: 26px;
  margin: 0;
  padding: 4px 10px;
  border: 1px solid var(--border-red);
  border-radius: 999px;
  background: var(--surface-0);
  color: var(--accent);
  font: 600 12px/1.2 var(--font-body, sans-serif);
  cursor: pointer;
}
.site-chat__pending-retry:hover { background: var(--accent-soft); }
.site-chat__pending-retry:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.site-chat__pending-remove {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--fg-muted);
  cursor: pointer;
}
.site-chat__pending-remove:hover { background: var(--surface-2); color: var(--ink); }
.site-chat__pending-remove:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.site-chat__pending-remove svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.site-chat__composer { display: flex; align-items: flex-end; gap: 8px; }
.site-chat__attach {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--fg-muted);
  cursor: pointer;
}
.site-chat__attach:hover { background: var(--surface-2); color: var(--ink); }
.site-chat__attach:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.site-chat__attach svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.site-chat__form textarea {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  max-height: 132px;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface-0);
  color: var(--ink);
  font: 16px/1.4 var(--font-body, sans-serif);
  caret-color: var(--accent);
  resize: none;
  overflow-y: hidden;
}
.site-chat__form textarea::placeholder { color: var(--fg-dim); }
.site-chat__form textarea:focus,
.site-chat__form textarea:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.site-chat__form button[type="submit"] {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border-red);
  border-radius: var(--radius-md);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}
.site-chat__form button[type="submit"]:hover { background: var(--accent-dark); }
.site-chat__form button[type="submit"]:active { transform: translateY(1px); }
.site-chat__form button[type="submit"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Nothing to send is a real state of the button, not a dimmed accent. */
.site-chat__form button[type="submit"]:disabled {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--chrome-low);
  opacity: 1;
  cursor: not-allowed;
}
.site-chat__form button[type="submit"] svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.site-chat__consent {
  flex: none;
  margin: 0;
  padding: 8px 16px 12px;
  background: var(--surface-0);
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--fg-muted);
}
.site-chat__consent a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.site-chat__consent a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 600px) {
  html.ar-chat-lock { overflow: hidden; }
  .site-chat {
    inset: 0;
    right: auto;
    bottom: auto;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    border: none;
    border-radius: 0;
  }
  .site-chat__head { padding-top: calc(10px + env(safe-area-inset-top)); padding-left: calc(12px + env(safe-area-inset-left)); padding-right: calc(12px + env(safe-area-inset-right)); }
  .site-chat__feed,
  .site-chat__form,
  .site-chat__status { padding-left: calc(16px + env(safe-area-inset-left)); padding-right: calc(16px + env(safe-area-inset-right)); }
  .site-chat__consent { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .site-chat__msg { max-width: 88%; }
  /* Thumbs and icons grow to a real touch target on a phone. */
  .site-chat__close,
  .site-chat__attach { width: 44px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .site-chat { animation: none; }
}
