/* Автоматический помощник на главной странице (js/chat.js) */
.tj-open,.tj-chat{position:fixed;right:20px;bottom:20px;z-index:60;font-family:'Onest',"Segoe UI",Arial,sans-serif}
.tj-open{background:var(--red);color:#fff;border:2px solid #fff;border-radius:40px;padding:14px 24px;font-size:15px;font-weight:700;cursor:pointer;box-shadow:0 8px 24px rgba(0,0,0,.3)}
.tj-open:hover{background:var(--red-dark)}
.tj-open[hidden],.tj-chat[hidden]{display:none}
.tj-chat{width:380px;height:min(600px,calc(100vh - 40px));display:flex;flex-direction:column;background:#fff;color:var(--text);box-shadow:0 14px 44px rgba(0,0,0,.34)}
.tj-head{display:flex;justify-content:space-between;align-items:center;gap:12px;background:var(--dark);color:#fff;padding:14px 16px;border-bottom:3px solid var(--red)}
.tj-head b{display:block;font-size:16px;line-height:1.3}
.tj-head span{display:block;font-size:12px;color:#bbb}
.tj-close{background:none;border:0;color:#fff;font-size:30px;line-height:1;width:44px;height:44px;cursor:pointer}
.tj-log{flex:1;overflow-y:auto;overscroll-behavior:contain;padding:14px;background:var(--bg);display:flex;flex-direction:column;gap:10px}
.tj-log>*{flex-shrink:0}
.tj-msg{max-width:88%;padding:11px 14px;font-size:14px;line-height:1.5;overflow-wrap:anywhere}
.tj-msg.bot{align-self:flex-start;background:#fff;border:1px solid var(--line)}
.tj-msg.me{align-self:flex-end;background:var(--dark);color:#fff}
.tj-link{display:block;margin-top:8px;color:var(--red);font-weight:700;text-decoration:underline}
.tj-chips{display:flex;flex-wrap:wrap;gap:8px}
.tj-chip{background:#fff;border:1px solid var(--red);color:var(--red-dark);padding:9px 13px;font-size:13px;font-weight:700;cursor:pointer;font-family:inherit}
.tj-chip:hover,.tj-chip.main{background:var(--red);color:#fff}
.tj-chip.main:hover{background:var(--red-dark)}
.tj-chip.quiet{border-color:#bbb;color:#555}
.tj-chip.quiet:hover{background:#555;color:#fff}
.tj-card{background:#fff;border:1px solid var(--line);border-left:4px solid var(--red);padding:11px 14px;font-size:13px;line-height:1.5}
.tj-card b{display:block;font-size:16px}
.tj-card .tj-link{margin-top:4px}
.tj-lead{background:#fff;border:1px solid var(--line);border-top:3px solid var(--red);padding:14px;display:flex;flex-direction:column;gap:10px}
.tj-lead label{display:flex;flex-direction:column;gap:4px;font-size:13px;font-weight:700}
.tj-lead input,.tj-lead textarea,.tj-ask input{width:100%;padding:10px;border:1px solid #ccc;font-family:inherit;font-size:16px;font-weight:400}
.tj-lead textarea{min-height:76px;resize:vertical}
.tj-lead small{font-size:12px;color:var(--muted);margin-top:-4px}
.tj-lead .tj-agree{flex-direction:row;align-items:flex-start;gap:9px;font-weight:400;font-size:12px;color:#444}
.tj-lead .tj-agree input{width:20px;height:20px;flex:none;accent-color:var(--red)}
.tj-agree a{color:var(--red);text-decoration:underline}
.tj-lead .tj-trap{position:absolute;left:-9999px;width:1px;height:1px}
.tj-err{color:#8a1c21;font-size:13px;font-weight:700}
.tj-err:empty{display:none}
.tj-send,.tj-ask button{background:var(--red);color:#fff;border:0;font-family:inherit;font-weight:700;cursor:pointer}
.tj-send{padding:13px;font-size:14px;text-transform:uppercase}
.tj-send:disabled{opacity:.6;cursor:default}
.tj-ask{display:flex;gap:8px;padding:10px;border-top:1px solid var(--line);background:#fff}
.tj-ask input{flex:1;min-width:0}
.tj-ask button{padding:0 14px;font-size:13px}
/* Подвал главной: чтобы кнопка не закрывала последнюю строку */
.footer .copy{padding-bottom:64px}
@media(max-width:560px){
  .tj-open{right:14px;bottom:14px;padding:12px 18px;font-size:14px}
  .tj-chat{inset:0;width:auto;height:100vh;height:100dvh}
  .tj-lock,.tj-lock body{overflow:hidden}
}
