/* LND-187: Pip's small chat (static/pip-chat.js), the same on every page that
   has one. Moved from landing.html (LND-41, LND-103) without a change to how
   it looks. The landing page doesn't load theme.css, so every token carries
   a fallback. */
.pchat{position:fixed;right:18px;bottom:calc(18px + env(safe-area-inset-bottom,0px));z-index:52;width:min(380px,calc(100vw - 24px));height:min(560px,calc(100vh - 110px));background:#fff;border-radius:24px;border:1px solid var(--line,#E6E8DF);box-shadow:var(--sh-float,0 12px 32px rgba(65,78,38,.14));display:flex;flex-direction:column;overflow:hidden;animation:pchatPop .3s var(--ease,cubic-bezier(.2,.8,.2,1))}
.pchat[hidden]{display:none}
.pchat-head{display:flex;align-items:center;gap:10px;padding:14px 14px 12px 16px;border-bottom:1px solid var(--line,#E6E8DF)}
.pchat-head b{font-size:17px;font-weight:600;display:block;line-height:22px}
.pchat-head small{font-size:13px;color:var(--text-2,#6D6D6D)}
.pchat-x{margin-left:auto;background:none;border:0;font-size:20px;line-height:1;color:var(--text-2,#6D6D6D);cursor:pointer;padding:4px}
/* LND-103 (ED-204): Pip hosts his chat; his current line is the bubble */
.pchat-host{display:flex;align-items:flex-end;gap:10px;padding:2px 16px 10px;border-bottom:1px solid var(--line,#E6E8DF);background:linear-gradient(var(--green-50,#EDF1DE),#fff);flex:none}
.pchat-host .owl{--s:72px;flex:none}
/* LND-189: the bubble's look, whole-line clamp and More/Less are
   static/pip-host.{css,js}, shared with the editor's Pip (ED-289); only sizes
   here. It was a 6.6em box that scrolled with no visible scrollbar, so his
   hello stopped at "What would you like to kn" */
.pchat-host .phl{margin:0 0 16px;padding:9px 13px;font-size:15px;line-height:21px}
.pchat-log{flex:1;overflow-y:auto;padding:14px;display:flex;flex-direction:column;gap:8px}
.pchat-msg{max-width:86%;padding:9px 13px;border-radius:18px 18px 18px 6px;background:var(--surface-2,#F7F8F3);font-size:15px;line-height:22px;white-space:pre-wrap;align-self:flex-start}
.pchat-msg.me{align-self:flex-end;background:var(--green-800,#414E26);color:#fff;border-radius:18px 18px 6px 18px}
.pchat-msg.wait{opacity:.6;font-style:italic}
.pchat-chips{display:flex;flex-wrap:wrap;gap:6px;padding:0 14px 8px}
.pchat-chips button{border:1px solid var(--green-200,#B4C979);background:var(--green-50,#EDF1DE);color:var(--green-800,#414E26);border-radius:999px;padding:6px 12px;font:500 13px/18px var(--f-ui,system-ui,sans-serif);cursor:pointer}
.pchat-form{display:flex;gap:8px;padding:10px 12px;border-top:1px solid var(--line,#E6E8DF)}
/* 16px: iOS zooms into any smaller box and stays zoomed (ED-97) */
.pchat-form input{flex:1;min-width:0;border:1px solid var(--line,#E6E8DF);border-radius:999px;padding:10px 14px;font-size:15px;background:var(--surface-2,#F7F8F3)}
.pchat-form button{border:0;border-radius:999px;background:var(--green-500,#677E32);color:#fff;padding:0 16px;font:500 15px/1 var(--f-ui,system-ui,sans-serif);cursor:pointer}
.pchat-try{margin:0 12px 12px;height:44px}
@keyframes pchatPop{from{opacity:0;transform:translateY(10px) scale(.96)}to{opacity:1;transform:none}}
@media (max-width:899px){
  .pchat{right:12px;bottom:calc(12px + env(safe-area-inset-bottom,0px));height:min(560px,calc(100vh - 90px))}
  .pchat-host .owl{--s:52px}
  .pchat-host .phl{margin-bottom:10px;font-size:14px;line-height:20px;--phl-lines:5;--phl-open-max:30dvh}
}
@media (pointer:coarse){.pchat-form input{font-size:16px}}
@media (prefers-reduced-motion:reduce){.pchat{animation:none;transition:none}}
