.web-chat-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.web-chat-toggle{position:fixed;right:max(20px,env(safe-area-inset-right));bottom:max(20px,env(safe-area-inset-bottom));z-index:60;width:58px;height:58px;border-radius:50%;border:0;background:#1f6a62;color:#fff;box-shadow:0 6px 18px rgba(0,0,0,.25);cursor:pointer;display:flex;align-items:center;justify-content:center}
/* Two-tone focus ring: visible on white, on the green header and on green buttons. */
.web-chat-toggle:focus-visible,.web-chat-close:focus-visible,.web-chat-send:focus-visible,.web-chat-action:focus-visible,.web-chat-form textarea:focus-visible{outline:3px solid #111;outline-offset:2px;box-shadow:0 0 0 5px #fff}
.web-chat-panel{position:fixed;right:20px;bottom:90px;z-index:61;width:380px;max-width:calc(100vw - 40px);height:560px;max-height:calc(100vh - 120px);max-height:calc(100dvh - 120px);display:flex;flex-direction:column;background:#fff;color:#1f2a28;border-radius:16px;box-shadow:0 12px 36px rgba(0,0,0,.28);overflow:hidden}
.web-chat-panel[hidden]{display:none}
.web-chat-head{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;background:#1f6a62;color:#fff}
.web-chat-head h2{margin:0;font-size:1.05rem;color:inherit}
.web-chat-close{background:transparent;border:0;color:#fff;font-size:1.6rem;line-height:1;cursor:pointer;min-width:44px;min-height:44px}
.web-chat-note{margin:0;padding:8px 16px;font-size:.8rem;background:#f1f6f5;color:#2f4744}
.web-chat-list{list-style:none;margin:0;padding:12px 16px;flex:1;overflow-y:auto;overscroll-behavior:contain;display:flex;flex-direction:column;gap:8px}
.web-chat-msg{max-width:85%;padding:8px 12px;border-radius:14px;white-space:pre-wrap;overflow-wrap:anywhere}
.web-chat-msg p{margin:0}
.web-chat-msg small{display:block;margin-top:4px;font-size:.75rem;color:#3d4f4c}
.web-chat-msg.from-user{align-self:flex-end;background:#e3efe9}
.web-chat-msg.from-coach{align-self:flex-start;background:#f4f1ea}
.web-chat-empty{margin:0;padding:0 16px 8px;color:#4a5856;font-size:.9rem}
.web-chat-empty[hidden]{display:none}
.web-chat-status-row{display:flex;align-items:center;gap:8px;padding:0 16px;min-height:1.6em}
.web-chat-status{margin:0;flex:1;font-size:.85rem;color:#2f4744}
.web-chat-status.error{color:#8f1414}
.web-chat-action{border:1px solid #1f6a62;background:#fff;color:#1f6a62;border-radius:8px;padding:4px 10px;min-height:36px;font-weight:600;cursor:pointer}
.web-chat-action[hidden]{display:none}
.web-chat-form{display:flex;gap:8px;padding:10px 12px;padding-bottom:max(10px,env(safe-area-inset-bottom));border-top:1px solid #e3e3e3}
.web-chat-form textarea{flex:1;resize:none;font:inherit;font-size:max(16px,1rem);padding:8px 10px;border:1px solid #8a9a97;border-radius:10px;min-height:44px}
.web-chat-send{min-width:72px;min-height:44px;border:0;border-radius:10px;background:#1f6a62;color:#fff;font-weight:600;cursor:pointer}
.web-chat-send:disabled{opacity:.6;cursor:progress}
@media (max-width:640px){
 .web-chat-panel{inset:0;right:0;bottom:auto;width:100%;max-width:none;height:100%;height:100dvh;max-height:none;border-radius:0;padding-top:env(safe-area-inset-top)}
 body.web-chat-open{overflow:hidden}
 body.web-chat-open .web-chat-toggle{display:none}
}
@media (prefers-reduced-motion:no-preference){.web-chat-toggle{transition:transform .15s}.web-chat-toggle:hover{transform:scale(1.05)}}
