.tb-chat{position:fixed;right:24px;bottom:24px;z-index:1000;font-family:Inter,Arial,sans-serif;color:#111310;font-size:14px}
.tb-chat [hidden]{display:none!important}
.tb-chat button,.tb-chat textarea{font:inherit}
.tb-chat button{cursor:pointer}.tb-chat button:disabled{cursor:wait;opacity:.55}
.tb-chat button:focus-visible,.tb-chat a:focus-visible,.tb-chat textarea:focus-visible{outline:3px solid #858a7b;outline-offset:3px}
.tb-chat-launch{width:60px;height:60px;border:1px solid #555;background:#383838;color:white;border-radius:50%;display:grid;place-items:center;box-shadow:0 6px 24px #0002;position:relative}
.tb-chat-launch:hover{background:#171717}.tb-chat-launch svg{width:27px;height:27px}
.tb-chat-badge{position:absolute;top:-3px;right:-3px;border:2px solid #f5f5f0;border-radius:20px;min-width:23px;padding:2px 5px;background:#111;color:white;font-size:11px}
.tb-chat-panel{position:absolute;bottom:76px;right:0;width:380px;height:min(570px,calc(100dvh - 120px));background:#f5f5f0;border:1px solid #d5d5cf;border-radius:18px;box-shadow:0 12px 50px #0003;display:flex;flex-direction:column;overflow:hidden}
.tb-chat-head{display:flex;align-items:center;justify-content:space-between;padding:20px;background:#383838;color:white;gap:12px}
.tb-chat-head strong{display:block;font-size:24px;font-weight:900;letter-spacing:-.06em}.tb-chat-status{display:block;font-size:11px;color:#deded8;margin-top:4px}
.tb-chat-close{border:0;background:transparent;color:white;width:40px;height:40px;font-size:27px;border-radius:8px}.tb-chat-close:hover{background:#555}
.tb-chat-log{overflow-y:auto;flex:1;min-height:0;padding:20px;overscroll-behavior:contain;display:flex;flex-direction:column;gap:12px}
.tb-chat-empty{color:#626262;font-size:14px;line-height:1.7;margin:auto 0}.tb-chat-empty strong{display:block;color:#111;font-size:20px;line-height:1.3;margin-bottom:10px;font-weight:900}
.tb-chat-message{max-width:92%;align-self:flex-start;background:#e7e7e1;border-radius:12px 12px 12px 3px;padding:11px 13px;overflow-wrap:anywhere;flex-shrink:0}
.tb-chat-message.is-own{align-self:flex-end;background:#383838;color:white;border-radius:12px 12px 3px 12px}
.tb-chat-text{white-space:pre-wrap;line-height:1.6;margin:0}.tb-chat-meta{display:block;font-size:10px;opacity:.7;margin-top:6px}
.tb-chat-message a{color:inherit}.tb-chat-message img,.tb-chat-message video{max-width:100%;max-height:240px;display:block;border-radius:6px;margin-top:8px}.tb-chat-message audio{max-width:100%;width:250px;margin-top:8px}
.tb-chat-notice{font-size:12px;line-height:1.5;margin:0;padding:10px 16px;background:#e7e7e1}.tb-chat-notice a{color:inherit}
.tb-chat-form{border-top:1px solid #d8d8d2;padding:12px;display:flex;gap:8px;align-items:flex-end;background:#f5f5f0}
.tb-chat-input{resize:none;min-width:0;flex:1;border:0;border-radius:8px;background:#eeeeea;padding:12px;line-height:1.45;max-height:110px;color:#111}
.tb-chat-send{border:0;background:#383838;color:white;border-radius:9px;width:44px;height:44px;flex-shrink:0;font-size:22px}.tb-chat-send:hover{background:#171717}
.tb-chat-filebar{display:flex;align-items:center;gap:10px;padding:0 14px 12px;font-size:11px;color:#666;min-height:30px}.tb-chat-filebar button{background:none;border:0;color:#555;text-decoration:underline;padding:5px}.tb-chat-filename{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}
@media(max-width:600px){.tb-chat{right:16px;bottom:max(16px,env(safe-area-inset-bottom))}.tb-chat-launch{width:54px;height:54px}.tb-chat-panel{position:fixed;left:12px;right:12px;top:max(12px,env(safe-area-inset-top));bottom:calc(82px + env(safe-area-inset-bottom));width:auto;height:auto;max-height:none}.tb-chat-head{padding:14px 16px}.tb-chat-input{font-size:16px}}

.tb-chat-head{padding:10px 16px;flex-shrink:0}.tb-chat-head strong{font-size:20px}.tb-chat-status{margin-top:2px;font-size:10px}.tb-chat-input{height:44px;min-height:44px;max-height:44px;padding:11px 12px;line-height:22px;overflow-y:auto}.tb-chat-send{display:grid;place-items:center}.tb-chat-send svg{width:23px;height:23px}.tb-chat-form,.tb-chat-filebar{flex-shrink:0}

/* Keep composer controls equal, including their focus treatment. */
.tb-chat-form{align-items:center}
.tb-chat .tb-chat-input{box-sizing:border-box;height:44px;min-height:44px;max-height:44px;padding:11px 12px;border:0;line-height:22px;outline:none}
.tb-chat .tb-chat-input:focus-visible{outline:none;box-shadow:inset 0 0 0 2px #858a7b}
.tb-chat .tb-chat-send{box-sizing:border-box;height:44px;min-height:44px;max-height:44px;width:44px;padding:0}

.tb-chat-compose{display:flex;align-items:center;flex:1;min-width:0;background:#eeeeea;border-radius:8px}
.tb-chat-compose:focus-within{box-shadow:inset 0 0 0 2px #858a7b}
.tb-chat-compose .tb-chat-attach{display:grid;place-items:center;flex:0 0 38px;width:38px;height:40px;border:0;background:transparent;border-radius:8px;color:#626262;padding:8px}
.tb-chat-compose .tb-chat-attach:hover{color:#111310;background:#deded8}
.tb-chat-attach svg{width:21px;height:21px}
.tb-chat-compose .tb-chat-input{background:transparent;padding-left:2px}
.tb-chat-compose .tb-chat-input:focus-visible{box-shadow:none}
.tb-chat-filehint{white-space:nowrap;text-decoration:none}

.tb-chat-onboarding{padding:18px;overflow-y:auto;min-height:0;flex:1}
.tb-chat-onboarding h2{font-size:20px;line-height:1.2;margin:0 0 8px;font-weight:900}
.tb-chat-onboarding>p{font-size:12px;line-height:1.5;color:#626262;margin:0 0 14px}
.tb-chat-onboarding>label:not(.tb-chat-consent){display:block;font-size:12px;margin:0 0 12px}
.tb-chat-onboarding input:not([type=checkbox]){display:block;width:100%;box-sizing:border-box;margin-top:5px;padding:10px 12px;border:1px solid #ccc;border-radius:8px;background:#eeeeea;font:inherit;font-size:16px;color:#111}
.tb-chat-consent{display:flex;align-items:flex-start;gap:9px;font-size:11px;line-height:1.5}
.tb-chat-consent input{width:18px;height:18px;flex-shrink:0;accent-color:#383838;margin:2px 0}
.tb-chat-policy{display:block;margin:9px 0 15px;font-size:11px;color:#383838;text-underline-offset:3px}
.tb-chat-begin{width:100%;min-height:44px;border:0;border-radius:8px;background:#383838;color:white}
.tb-chat-onboarding input:focus-visible{outline:2px solid #858a7b;outline-offset:2px}
.tb-chat-onboarding [aria-invalid=true]{border-color:#a33!important}
.tb-chat-onboarding .tb-chat-onboarding-error{color:#922;margin:10px 0}

.tb-chat-checkrow{display:flex;align-items:flex-start;gap:9px;margin:12px 0;font-size:12px;line-height:1.5}
.tb-chat-checkrow input{width:18px;height:18px;flex-shrink:0;accent-color:#383838;margin:1px 0}
.tb-chat-checkrow a,.tb-chat-checkrow .tb-chat-policy{display:block;color:#383838;margin:0;font-size:12px;text-underline-offset:3px}
.tb-chat-begin{margin-top:8px}

/* Subtle invitation: two soft pulses followed by a pause. */
.tb-chat-launch[aria-expanded="false"]{animation:tb-chat-pulse 6s ease-in-out 2s infinite}
@keyframes tb-chat-pulse{
  0%,40%,100%{transform:scale(1);box-shadow:0 6px 24px #0002,0 0 0 0 rgba(56,56,56,0)}
  10%{transform:scale(1.045);box-shadow:0 6px 24px #0002,0 0 0 7px rgba(56,56,56,.10)}
  20%{transform:scale(1);box-shadow:0 6px 24px #0002,0 0 0 12px rgba(56,56,56,0)}
  30%{transform:scale(1.035);box-shadow:0 6px 24px #0002,0 0 0 6px rgba(56,56,56,.08)}
}
.tb-chat-launch:hover,.tb-chat-launch:focus-visible{animation:none}
@media(prefers-reduced-motion:reduce){.tb-chat-launch[aria-expanded="false"]{animation:none}}
