/* Локальный консультант: фирменные Montserrat, тёплая бумага, чёрный и золото. */
.zchat { display: flex; flex-direction: column-reverse; align-items: flex-end; position: fixed; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); z-index: 1000; font: 14px/1.5 'Montserrat', sans-serif; color: #191713; }
.zchat [hidden] { display: none !important; }
.zchat button, .zchat input, .zchat textarea, .zchat select { font: inherit; box-sizing: border-box; }
.zchat button { cursor: pointer; }
.zchat button:disabled { opacity: .6; cursor: wait; }
.zchat :focus-visible { outline: 3px solid #926021; outline-offset: 3px; }
.zchat__launcher { display: flex; align-items: center; gap: 10px; border: 1px solid var(--z-line); border-radius: 999px; padding: 15px 21px; background: var(--z-black, #0b0b0b); color: #fff; box-shadow: 0 8px 30px #39270e26; font-weight: 600 !important; }
.zchat__panel { width: min(390px, calc(100vw - 36px)); height: min(720px, calc(100dvh - 100px)); display: flex; flex-direction: column; overflow: hidden; margin-bottom: 12px; border: 1px solid var(--z-line); border-radius: 20px; background: var(--z-paper, #fdfcfa); box-shadow: 0 16px 65px #39270e30; }
.zchat__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 18px 18px 12px; background: var(--z-cream, #f6f2ea); border-bottom: 1px solid var(--z-line); }
.zchat__head h2 { font-size: 15px; line-height: 1.4; margin: 0 0 4px; }
.zchat__head p { font-size: 11px; color: #665744; margin: 0; }
.zchat__close { flex: 0 0 34px; height: 34px; border: 1px solid var(--z-line); border-radius: 50%; background: #fff; font-size: 26px !important; line-height: 1; color: #191713; }
.zchat__scroll { flex: 1 1 auto; min-height: 65px; overflow-y: auto; overscroll-behavior: contain; padding: 16px; }
.zchat__messages { display: flex; flex-direction: column; gap: 10px; }
.zchat__bubble { max-width: 94%; margin: 0; padding: 11px 13px; border-radius: 14px 14px 14px 3px; background: var(--z-cream, #f6f2ea); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; }
.zchat__bubble--user { align-self: flex-end; border-radius: 14px 14px 3px 14px; background: #24211d; color: #fff; }
.zchat__bubble a { display: block; font-size: 11px; color: #79501d; margin-top: 5px; text-decoration: underline; }
.zchat__status { flex: 0 0 auto; font-size: 12px; padding: 0 18px; overflow-wrap: anywhere; }
.zchat__status:not(:empty) { padding: 10px 18px; border-top: 1px solid var(--z-line); background: var(--z-cream); }
.zchat__error { color: #8f2525; font-size: 12px; padding: 8px 18px; margin: 0; }
.zchat__form { flex: 0 0 auto; padding: 10px 18px; display: grid; gap: 7px; border-top: 1px solid var(--z-line); }
.zchat__form > label { font-size: 11px; font-weight: 600; }
.zchat__form textarea, .zchat__form select { width: 100%; border: 1px solid #b8ab97; border-radius: 10px; background: #fff; padding: 8px 10px; color: #191713; min-width: 0; }
.zchat__form select { font-size: 12px; }
.zchat__form textarea { resize: vertical; max-height: 100px; min-height: 48px; font-size: 16px; }
.zchat__progress { font-size: 11px; margin: 0; color: #665744; }
.zchat__consent { display: flex; align-items: flex-start; gap: 8px; line-height: 1.5; font-weight: 400 !important; }
.zchat__consent input { margin-top: 3px; flex: 0 0 auto; }
.zchat__consent a { color: #79501d; text-decoration: underline; }
.zchat__send { border: 0; border-radius: 999px; background: #24211d; color: #fff; padding: 10px; font-weight: 600 !important; }
.zchat__actions { padding: 5px 18px 14px; display: flex; flex-wrap: wrap; gap: 12px; font-size: 11px; }
.zchat__actions button, .zchat__actions a { background: none; border: none; padding: 2px 0; color: #665744; text-decoration: underline; }
.zchat__summary { margin-top: 14px; font-size: 12px; }
.zchat__summary summary { cursor: pointer; font-weight: 600; }
.zchat__summary dl { margin: 10px 0; }
.zchat__summary dt { font-weight: 600; }
.zchat__summary dd { margin: 0 0 6px; overflow-wrap: anywhere; }
@media (max-width: 480px), (max-height: 600px) {
  .zchat { right: max(10px, env(safe-area-inset-right)); bottom: max(10px, env(safe-area-inset-bottom)); }
  .zchat__panel { width: min(390px, calc(100vw - 20px)); height: calc(100dvh - 86px); margin-bottom: 8px; }
  .zchat__head { padding: 12px 14px 8px; }
  .zchat__form { padding: 8px 14px; gap: 5px; }
  .zchat__actions { padding: 4px 14px 10px; }
  .zchat__form textarea { min-height: 44px; }
}
