/* Escape assistant — floating chat */
.chat-fab{
  position:fixed;right:20px;bottom:20px;z-index:110;
  display:flex;align-items:center;gap:10px;padding:14px 20px 14px 16px;
  background:#17110d;color:#f0ece6;border:1.5px solid rgba(240,236,230,.22);border-radius:999px;cursor:pointer;
  font-family:var(--ui);font-size:14px;font-weight:600;letter-spacing:.02em;
  box-shadow:0 10px 30px rgba(23,17,13,.42);transition:transform .22s,background .22s;
}
.chat-fab:hover{transform:translateY(-2px);background:#241a13}
.chat-fab svg{width:20px;height:20px}
.chat-fab .dot{position:absolute;top:11px;right:13px;width:9px;height:9px;border-radius:50%;
  background:#7ec98a;border:2px solid #17110d}
.chat-fab.hide{display:none}
/* On phones the label collides with hero content — collapse to an icon circle */
@media (max-width:720px){
  .chat-fab{bottom:calc(84px + env(safe-area-inset-bottom,0px));right:14px;
    width:48px;height:48px;padding:0;border-radius:50%;justify-content:center;gap:0}
  .chat-fab span:not(.dot){display:none}
  .chat-fab .dot{top:2px;right:2px}
}
.chat-fab svg{width:20px !important;height:20px !important;flex:none}

.chat-panel{
  position:fixed;right:20px;bottom:20px;z-index:120;width:min(390px,calc(100vw - 32px));
  height:min(620px,calc(100vh - 40px));background:var(--bg);
  border:1px solid var(--line);border-radius:14px;overflow:hidden;
  display:none;flex-direction:column;box-shadow:0 24px 70px rgba(30,22,16,.42);
}
.chat-panel.open{display:flex;animation:chatIn .26s cubic-bezier(.2,.7,.3,1)}
@keyframes chatIn{from{opacity:0;transform:translateY(16px) scale(.98)}to{opacity:1;transform:none}}
@media (max-width:720px){
  .chat-panel{right:0;bottom:0;left:0;width:100%;border-radius:0;border:0;
    height:100vh;height:100dvh;
    padding-bottom:env(safe-area-inset-bottom,0px);
    padding-top:env(safe-area-inset-top,0px)}
}

.chat-head{display:flex;align-items:center;gap:12px;padding:16px 18px;background:var(--espresso);color:var(--stone);flex:none}
.chat-head .who{flex:1;min-width:0}
.chat-head .nm{font-family:var(--ui);font-weight:700;font-size:15px;line-height:1.2}
.chat-head .st{font-family:var(--ui);font-size:11.5px;opacity:.72;display:flex;align-items:center;gap:6px;margin-top:2px}
.chat-head .st i{width:7px;height:7px;border-radius:50%;background:#7ec98a;display:inline-block}
.chat-head button{background:none;border:0;color:var(--stone);cursor:pointer;font-size:26px;line-height:1;padding:0 2px;opacity:.8}
.chat-head button:hover{opacity:1}
.chat-avatar{width:36px;height:36px;border-radius:50%;background:var(--stone);flex:none;
  background-image:url('/images/logo-black.png');background-size:150% auto;background-position:center;background-repeat:no-repeat}

.chat-body{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:18px;
  display:flex;flex-direction:column;gap:12px;background:var(--bg);scroll-behavior:smooth}
.msg{max-width:84%;padding:12px 15px;border-radius:14px;font-size:14.5px;line-height:1.5;font-family:var(--ui);
  animation:msgIn .3s cubic-bezier(.2,.7,.3,1) both}
@keyframes msgIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.msg.bot{background:var(--bg-2);color:var(--ink);align-self:flex-start;border-bottom-left-radius:4px}
.msg.me{background:var(--espresso);color:var(--bg);align-self:flex-end;border-bottom-right-radius:4px}
.msg b{font-weight:700}
.msg a{color:var(--brown);text-decoration:underline}
.msg.bot ul{margin:8px 0 0;padding-left:18px}
.msg.bot li{margin-bottom:5px}

.typing{display:flex;gap:4px;align-items:center;padding:14px 16px;background:var(--bg-2);
  border-radius:14px;border-bottom-left-radius:4px;align-self:flex-start;width:fit-content}
.typing i{width:6px;height:6px;border-radius:50%;background:var(--brown);opacity:.5;
  animation:blink 1.3s infinite}
.typing i:nth-child(2){animation-delay:.18s}
.typing i:nth-child(3){animation-delay:.36s}
@keyframes blink{0%,60%,100%{opacity:.3;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}

.chat-quick{display:flex;flex-wrap:wrap;gap:7px;padding:0 18px 12px}
.chat-quick button{
  padding:9px 14px;border:1px solid var(--brown);background:transparent;color:var(--brown);
  border-radius:999px;cursor:pointer;font-family:var(--ui);font-size:13px;font-weight:500;
  transition:background .18s,color .18s;
}
.chat-quick button:hover{background:var(--brown);color:var(--bg)}
.chat-quick button.primary{background:var(--espresso);border-color:var(--espresso);color:var(--bg)}
.chat-quick button.primary:hover{background:#3d2e23}

.chat-input{display:flex;gap:8px;padding:12px 14px;border-top:1px solid var(--line);background:var(--bg-3);flex:none}
.chat-input input{flex:1;min-width:0;border:1px solid var(--line);background:var(--bg);color:var(--ink);
  border-radius:999px;padding:12px 16px;font-family:var(--ui);font-size:16px;-webkit-appearance:none;appearance:none}
.chat-input input:focus{outline:none;border-color:var(--brown)}
.chat-input button{border:0;background:var(--espresso);color:var(--stone);width:42px;height:42px;
  border-radius:50%;cursor:pointer;flex:none;display:grid;place-items:center}
.chat-input button:hover{background:#3d2e23}
.chat-input button svg{width:18px !important;height:18px !important}
