﻿:root { --tcw-ink:#15181c; --tcw-paper:#fff; --tcw-line:#ded9d1; --tcw-muted:#5c636e; --tcw-accent:#c8891a; }
.tcw-root { position:fixed; right:18px; bottom:18px; z-index:9999; font:14px/1.5 ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif; color:var(--tcw-ink); }
.tcw-toggle { display:flex; align-items:center; gap:8px; border:0; border-radius:999px; padding:12px 17px; background:var(--tcw-accent); color:#1b1305; font:inherit; font-weight:700; cursor:pointer; box-shadow:0 8px 24px rgba(21,24,28,.25); }
.tcw-toggle:hover { filter:brightness(1.06); }
.tcw-toggle svg { width:18px; height:18px; }
.tcw-panel { width:min(370px,calc(100vw - 24px)); height:min(540px,calc(100vh - 36px)); display:flex; flex-direction:column; background:var(--tcw-paper); border:1px solid var(--tcw-line); border-radius:16px; overflow:hidden; box-shadow:0 24px 60px rgba(21,24,28,.28); }
.tcw-panel[hidden], .tcw-toggle[hidden] { display:none; }
.tcw-head { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:13px 14px; background:var(--tcw-ink); color:#fff; }
.tcw-head strong { font-size:14px; }
.tcw-head small { display:block; color:#c9cdd3; font-size:10px; font-weight:500; }
.tcw-close { border:0; background:transparent; color:#fff; font:inherit; font-size:22px; line-height:1; cursor:pointer; padding:2px 5px; }
.tcw-thread { flex:1; overflow:auto; padding:14px; display:flex; flex-direction:column; gap:9px; background:#faf9f7; }
.tcw-msg { max-width:88%; padding:9px 11px; border-radius:10px; font-size:13px; line-height:1.5; white-space:pre-wrap; }
.tcw-msg.user { align-self:flex-end; background:#eef3f7; border:1px solid #dce6ee; }
.tcw-msg.assistant { align-self:flex-start; background:#fff; border:1px solid var(--tcw-line); }
.tcw-msg.error { color:#a52a2a; }
.tcw-form { display:flex; gap:7px; padding:10px; border-top:1px solid var(--tcw-line); background:#fff; }
.tcw-form textarea { flex:1; resize:none; min-height:42px; max-height:110px; padding:9px 10px; border:1px solid var(--tcw-line); border-radius:8px; font:inherit; font-size:13px; outline:none; }
.tcw-form textarea:focus { border-color:var(--tcw-accent); box-shadow:0 0 0 3px rgba(200,137,26,.12); }
.tcw-web { display:flex; align-items:center; gap:4px; color:var(--tcw-muted); font-size:11px; white-space:nowrap; }
.tcw-web input { accent-color:var(--tcw-accent); }
.tcw-form button { border:0; border-radius:8px; padding:0 13px; background:var(--tcw-accent); color:#1b1305; font:inherit; font-weight:700; cursor:pointer; }
.tcw-form button:disabled { opacity:.5; cursor:wait; }
.tcw-foot { padding:0 12px 9px; color:var(--tcw-muted); font-size:10px; background:#fff; }
.tcw-empty { color:var(--tcw-muted); font-size:12px; line-height:1.6; padding:4px 2px; }
.tcw-prompt { align-self:flex-start; border:1px solid var(--tcw-line); border-radius:999px; padding:6px 9px; background:#fff; color:var(--tcw-muted); font:inherit; font-size:11px; cursor:pointer; text-align:left; }
.tcw-prompt:hover { color:var(--tcw-ink); border-color:var(--tcw-accent); }
@media (max-width:520px) { .tcw-root { right:10px; bottom:10px; } .tcw-panel { height:min(70vh,540px); } }

.tcw-action { align-self:stretch; border:1px solid #c8891a; border-radius:10px; background:#fff8e7; padding:10px; font-size:12px; display:flex; flex-direction:column; gap:7px; }
.tcw-action strong { font-size:12px; }
.tcw-action p { margin:0; color:#5c636e; line-height:1.45; }
.tcw-action-buttons { display:flex; gap:7px; }
.tcw-action-buttons button { border:0; border-radius:7px; padding:6px 10px; background:#c8891a; color:#1b1305; font:inherit; font-weight:700; cursor:pointer; }
.tcw-action-buttons button.quiet { background:#fff; border:1px solid #ded9d1; color:#5c636e; font-weight:500; }
.tcw-action-buttons button:disabled { opacity:.55; cursor:wait; }
.tcw-action-status { color:#a52a2a; font-size:11px; }
.tcw-action-link { color:#9d5b12; font-weight:700; }
.tcw-feedback{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin-top:7px;padding-top:6px;border-top:1px dashed #ded9d1;font-size:10px;color:#5c636e}.tcw-feedback button{border:1px solid #ded9d1;background:#fff;color:#5c636e;border-radius:999px;padding:3px 7px;font:inherit;cursor:pointer}.tcw-feedback button:hover{border-color:#c8891a;color:#15181c}.tcw-feedback-status{color:#5c636e}.tcw-feedback-box{display:flex;flex-direction:column;gap:5px;margin-top:6px}.tcw-feedback-box textarea{width:100%;border:1px solid #ded9d1;border-radius:7px;padding:6px;font:inherit;font-size:11px;resize:vertical}.tcw-feedback-box button{align-self:flex-start;border:0;border-radius:6px;background:#c8891a;color:#1b1305;padding:4px 8px;font:inherit;font-size:11px;font-weight:700;cursor:pointer}
