@keyframes tegoClearSpin{to{transform:rotate(360deg)}}@keyframes tegoFadeIn{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}@keyframes tegoBounce{0%,60%,to{transform:translateY(0);opacity:.4}30%{transform:translateY(-5px);opacity:1}}@keyframes tego-spin{to{transform:rotate(360deg)}}#tego-fab,.tego-header{display:flex;align-items:center;color:#fff}#tego-fab,#tego-panel{position:fixed;bottom:8px;right:8px}#tego-fab{z-index:10000;width:64px;height:64px;border-radius:50%;border:0;background:linear-gradient(135deg,var(--accent, #7c3aed) 0%,var(--accent-hover, #6d28d9) 100%);cursor:pointer;justify-content:center;box-shadow:0 4px 14px rgba(124,58,237,.35),0 2px 6px rgba(0,0,0,.12);transition:transform .2s ease,box-shadow .2s ease,opacity .3s ease;opacity:.55}#tego-fab:hover{transform:scale(1.08);box-shadow:0 6px 20px rgba(124,58,237,.45),0 3px 8px rgba(0,0,0,.15);opacity:1}#tego-fab:active{transform:scale(.96)}#tego-fab.tego-fab-dragging{cursor:grabbing!important;transform:scale(1.05);opacity:1;transition:none;user-select:none}#tego-fab.tego-fab-hidden{opacity:0;pointer-events:none;transform:scale(.6)}#tego-panel{z-index:10001;width:380px;height:520px;min-width:380px;min-height:520px;max-width:calc(100vw - 48px);max-height:calc(100vh - 48px);background:var(--card-bg, #ffffff);border-radius:16px;box-shadow:0 8px 32px rgba(0,0,0,.12),0 2px 8px rgba(0,0,0,.08);display:flex;flex-direction:column;overflow:hidden;opacity:0;visibility:hidden;transform:translateY(16px) scale(.95);transform-origin:bottom right;transition:opacity .25s cubic-bezier(.4,0,.2,1),transform .25s cubic-bezier(.4,0,.2,1),visibility .25s}#tego-panel.tego-open{opacity:1;visibility:visible;transform:translateY(0) scale(1)}.tego-header{justify-content:space-between;padding:14px 16px;background:linear-gradient(135deg,var(--sidebar-bg, #0c0f1d) 0%,var(--sidebar-bg-mid, #16133a) 100%);flex-shrink:0;cursor:grab}.tego-header:active{cursor:grabbing}.tego-header-left{display:flex;align-items:center;gap:10px}.tego-avatar{width:34px;height:34px;border-radius:10px;background:linear-gradient(135deg,var(--accent, #7c3aed),#a78bfa);display:flex;align-items:center;justify-content:center;font-weight:700;font-size:15px;color:#fff;flex-shrink:0}.tego-title{font-weight:600;font-size:.95rem;line-height:1.2}.tego-subtitle{font-size:.75rem;opacity:.7;line-height:1.2}.tego-header-actions{display:flex;align-items:center;gap:4px}.tego-clear-history-btn,.tego-header-btn{background:0 0;cursor:pointer;border-radius:8px;display:flex;align-items:center;justify-content:center}.tego-header-btn{border:0;color:rgba(255,255,255,.7);padding:6px;transition:background .15s ease,color .15s ease}.tego-clear-history-btn:hover,.tego-header-btn:hover{background:rgba(255,255,255,.12);color:#fff}.tego-clear-history-btn{border:1px solid rgba(255,255,255,.3);color:rgba(255,255,255,.8);padding:4px 10px;font-size:.72rem;font-weight:500;font-family:inherit;min-width:80px;min-height:28px;transition:background .3s ease,color .3s ease,border-color .3s ease}.tego-clear-history-btn:hover{border-color:rgba(255,255,255,.5)}.tego-clear-history-btn.tego-clear-loading{pointer-events:none;border-color:rgba(255,255,255,.2)}.tego-clear-spinner{width:14px;height:14px;border:2px solid rgba(255,255,255,.3);border-top-color:#fff;border-radius:50%;animation:tegoClearSpin .6s linear infinite}.tego-clear-history-btn.tego-clear-success{background:rgba(74,222,128,.25);border-color:rgba(74,222,128,.6);color:#86efac}.tego-clear-history-btn.tego-clear-error{background:rgba(248,113,113,.25);border-color:rgba(248,113,113,.6);color:#fca5a5}.tego-reset-layout-btn{background:0 0;border:1px solid rgba(255,255,255,.3);color:rgba(255,255,255,.8);cursor:pointer;padding:4px 10px;border-radius:8px;font-size:.72rem;font-weight:500;font-family:inherit;display:flex;align-items:center;justify-content:center;min-width:80px;min-height:28px;transition:background .3s ease,color .3s ease,border-color .3s ease}.tego-reset-layout-btn:hover{background:rgba(255,255,255,.12);color:#fff;border-color:rgba(255,255,255,.5)}.tego-reset-layout-btn.tego-clear-success{background:rgba(74,222,128,.25);border-color:rgba(74,222,128,.6);color:#86efac}.tego-messages{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:12px;background:var(--body-bg, #f1f5f9)}.tego-messages::-webkit-scrollbar{width:5px}.tego-messages::-webkit-scrollbar-thumb{background:rgba(0,0,0,.15);border-radius:3px}.tego-messages::-webkit-scrollbar-track{background:0 0}.tego-welcome,.tego-welcome-avatar{display:flex;align-items:center;justify-content:center}.tego-welcome{flex-direction:column;text-align:center;padding:32px 16px;flex:1}.tego-welcome-avatar{width:48px;height:48px;border-radius:14px;background:linear-gradient(135deg,var(--accent, #7c3aed),#a78bfa);font-weight:700;font-size:22px;color:#fff;margin-bottom:12px}.tego-welcome-title{font-weight:600;font-size:1.05rem;color:var(--text-primary, #0f172a);margin-bottom:6px}.tego-welcome-text{font-size:.825rem;color:var(--text-secondary, #64748b);line-height:1.5;max-width:260px}.tego-msg{display:flex;gap:8px;max-width:100%;animation:tegoFadeIn .2s ease}.tego-msg-user{flex-direction:row-reverse}.tego-msg-avatar{width:26px;height:26px;border-radius:8px;background:linear-gradient(135deg,var(--accent, #7c3aed),#a78bfa);display:flex;align-items:center;justify-content:center;font-weight:700;font-size:11px;color:#fff;flex-shrink:0;margin-top:2px}.tego-msg-bubble{padding:10px 14px;border-radius:14px;font-size:.84rem;line-height:1.55;word-wrap:break-word;overflow-wrap:break-word;max-width:82%}.tego-msg-user .tego-msg-bubble{background:linear-gradient(135deg,var(--accent, #7c3aed),var(--accent-hover, #6d28d9));color:#fff;border-bottom-right-radius:4px}.tego-msg-bot .tego-msg-bubble{background:var(--card-bg, #ffffff);color:var(--text-primary, #0f172a);border-bottom-left-radius:4px;box-shadow:0 1px 3px rgba(0,0,0,.06)}.tego-msg-bot .tego-msg-bubble strong{font-weight:600}.tego-msg-bot .tego-msg-bubble code{background:rgba(124,58,237,.08);padding:1px 5px;border-radius:4px;font-size:.8rem;font-family:"SFMono-Regular",Consolas,"Liberation Mono",Menlo,monospace}.tego-msg-bot .tego-msg-bubble pre{background:var(--sidebar-bg, #0c0f1d);color:#e2e8f0;padding:10px 12px;border-radius:8px;overflow-x:auto;margin:8px 0;font-size:.78rem}.tego-msg-bot .tego-msg-bubble pre code{background:0 0;padding:0;color:inherit}.tego-msg-bot .tego-msg-bubble ul{margin:6px 0;padding-left:18px}.tego-msg-bot .tego-msg-bubble li,.tego-msg-bot .tego-msg-bubble ol li{margin-bottom:3px}.tego-msg-bot .tego-msg-bubble ol{margin:6px 0;padding-left:22px}.tego-msg-bot .tego-msg-bubble h1,.tego-msg-bot .tego-msg-bubble h2,.tego-msg-bot .tego-msg-bubble h3,.tego-msg-bot .tego-msg-bubble h4,.tego-msg-bot .tego-msg-bubble h5,.tego-msg-bot .tego-msg-bubble h6{margin:10px 0 4px;font-weight:600;line-height:1.3}.tego-msg-bot .tego-msg-bubble h1{font-size:1.15rem}.tego-msg-bot .tego-msg-bubble h2{font-size:1.05rem}.tego-msg-bot .tego-msg-bubble h3{font-size:.95rem}.tego-msg-bot .tego-msg-bubble h4,.tego-msg-bot .tego-msg-bubble h5,.tego-msg-bot .tego-msg-bubble h6{font-size:.88rem}.tego-msg-bot .tego-msg-bubble blockquote{border-left:3px solid var(--accent, #7c3aed);margin:8px 0;padding:4px 10px;color:var(--text-muted, #64748b);font-style:italic}.tego-msg-bot .tego-msg-bubble hr{border:0;border-top:1px solid var(--border, #e2e8f0);margin:10px 0}.tego-msg-bot .tego-msg-bubble a{color:var(--accent, #7c3aed);text-decoration:underline}.tego-msg-bot .tego-msg-bubble a:hover{opacity:.8}.tego-msg-bot .tego-msg-bubble p{margin:0 0 6px}.tego-msg-bot .tego-msg-bubble p:last-child{margin-bottom:0}.tego-msg-bot .tego-msg-bubble table{width:100%;border-collapse:collapse;margin:8px 0;font-size:.8rem}.tego-msg-bot .tego-msg-bubble td,.tego-msg-bot .tego-msg-bubble th{border:1px solid var(--border, #e2e8f0);padding:5px 8px}.tego-msg-bot .tego-msg-bubble th{background:rgba(124,58,237,.06);font-weight:600}.tego-msg-bot .tego-msg-bubble tr:nth-child(even){background:rgba(0,0,0,.02)}.tego-dots{display:flex;gap:4px;padding:4px 0}.tego-dots span{width:7px;height:7px;border-radius:50%;background:var(--text-muted, #94a3b8);animation:tegoBounce 1.2s infinite}.tego-dots span:nth-child(2){animation-delay:.15s}.tego-dots span:nth-child(3){animation-delay:.3s}.tego-input-area{padding:12px 16px 14px;background:var(--card-bg, #ffffff);border-top:1px solid var(--border-color, #e2e8f0);flex-shrink:0}.tego-compressing,.tego-usage{font-size:.72rem;text-align:center}.tego-usage{color:var(--text-muted, #94a3b8);margin-bottom:8px;display:none}.tego-compressing{color:var(--primary, #6366f1);margin-bottom:6px;font-style:italic}.tego-disclaimer{display:flex;align-items:center;justify-content:center;gap:8px;margin-bottom:8px;font-size:.72rem}.tego-disclaimer-text{color:var(--text-muted, #94a3b8)}.tego-disclaimer-btn{background:0 0;border:0;font-size:.72rem;font-family:inherit;cursor:pointer;padding:0;white-space:nowrap}.tego-disclaimer-btn:hover,.tego-disclaimer-link:hover{color:var(--accent-hover, #6d28d9)}.tego-disclaimer-btn,.tego-disclaimer-link{color:var(--accent, #7c3aed);font-weight:600;text-decoration:underline;text-underline-offset:2px;transition:color .15s ease}.tego-input-row{display:flex;align-items:flex-end;gap:8px}#tego-input{flex:1;resize:none;border:1.5px solid var(--border-color, #e2e8f0);border-radius:12px;padding:9px 14px;font-size:.84rem;font-family:var(--font-sans, 'Inter', sans-serif);color:var(--text-primary, #0f172a);background:var(--body-bg, #f1f5f9);outline:0;transition:border-color .15s ease,box-shadow .15s ease;line-height:1.45;max-height:100px;overflow-y:auto}#tego-input:focus{border-color:var(--accent, #7c3aed);box-shadow:0 0 0 3px rgba(124,58,237,.1)}#tego-input::placeholder{color:var(--text-muted, #94a3b8)}.tego-send-btn{width:36px;height:36px;border-radius:10px;border:0;background:linear-gradient(135deg,var(--accent, #7c3aed),var(--accent-hover, #6d28d9));color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:opacity .15s ease,transform .1s ease}.tego-send-btn:disabled{opacity:.4;cursor:not-allowed}.tego-send-btn:not(:disabled):hover{transform:scale(1.06)}.tego-send-btn:not(:disabled):active{transform:scale(.95)}.tego-resize{position:absolute;z-index:2}.tego-resize-top{top:0;left:12px;right:12px;height:6px;cursor:n-resize}.tego-resize-bottom{bottom:0;left:12px;right:12px;height:6px;cursor:s-resize}.tego-resize-left{top:12px;left:0;bottom:12px;width:6px;cursor:w-resize}.tego-resize-right{top:12px;right:0;bottom:12px;width:6px;cursor:e-resize}.tego-resize-top-left{top:0;left:0;width:14px;height:14px;cursor:nw-resize}.tego-resize-top-right{top:0;right:0;width:14px;height:14px;cursor:ne-resize}.tego-resize-bottom-left{bottom:0;left:0;width:14px;height:14px;cursor:sw-resize}.tego-resize-bottom-right{bottom:0;right:0;width:14px;height:14px;cursor:se-resize}#tego-panel.tego-resizing{transition:none;user-select:none}@media (max-width:767.98px){#tego-fab{top:auto!important;left:auto!important;right:14px!important;bottom:calc(14px + env(safe-area-inset-bottom,0))!important;width:56px;height:56px;opacity:.92}#tego-panel{top:auto!important;left:0!important;right:0!important;bottom:0!important;width:100vw!important;height:min(82vh,640px)!important;height:min(82dvh,640px)!important;min-width:0!important;min-height:0!important;max-width:100vw!important;max-height:100vh!important;max-height:100dvh!important;border-radius:18px 18px 0 0;transform:translateY(100%);transform-origin:bottom center}#tego-panel.tego-open{transform:translateY(0)}.tego-reset-layout-btn,.tego-resize{display:none}.tego-header{cursor:default;padding:12px 14px}.tego-header-left{min-width:0}.tego-header-actions{gap:6px;flex-shrink:0}.tego-clear-history-btn{min-width:0;min-height:32px;padding:5px 8px;font-size:.68rem;white-space:nowrap}.tego-header-btn{width:34px;height:34px;padding:0}.tego-messages{padding:12px 10px;gap:10px}.tego-msg{gap:6px}.tego-msg-avatar{width:22px;height:22px;border-radius:7px;font-size:10px}.tego-msg-bubble{max-width:calc(100% - 34px);font-size:.82rem;padding:9px 11px}.tego-msg-user .tego-msg-bubble{max-width:88%}.tego-welcome{padding:24px 12px 18px}.tego-welcome-avatar{width:42px;height:42px;border-radius:12px;font-size:19px}.tego-welcome-text{max-width:100%}.tego-input-area{padding:10px 10px calc(10px + env(safe-area-inset-bottom,0))}.tego-disclaimer{justify-content:flex-start;font-size:.68rem;line-height:1.35;text-align:left}#tego-input{border-radius:10px;padding:9px 11px;font-size:16px;max-height:88px}.tego-send-btn{width:40px;height:40px;border-radius:12px}.tego-phases-bubble{min-width:0;width:100%}}@media (max-width:380px){#tego-fab{width:52px;height:52px}}.tego-phases-bubble{padding:10px 14px!important;min-width:200px}.tego-phase{display:flex;align-items:center;gap:8px;padding:3px 0;font-size:12.5px;color:#888;transition:color .3s}.tego-phase-active{color:#6366f1;font-weight:500}.tego-phase-done{color:#22c55e}.tego-phase-check{font-size:13px;line-height:1}.tego-phase-spinner{display:inline-block;width:12px;height:12px;border:2px solid #6366f1;border-top-color:transparent;border-radius:50%;animation:tego-spin .7s linear infinite;flex-shrink:0}.tego-phase-done .tego-phase-spinner{animation:none;border:0}@media (max-width:767.98px){.tego-phases-bubble{min-width:0;width:100%}}