.dfchat{--df-red:var(--e-global-color-accent,#E60021);--df-bg:#0b0d10;--df-panel:#111419;--df-card:#171b21;--df-line:rgba(255,255,255,.1);--df-text:#f7f8fa;--df-muted:#aab1bd;position:fixed;right:22px;bottom:22px;z-index:99990;font-family:inherit;color:var(--df-text)}
.dfchat *{box-sizing:border-box}.dfchat-launch{display:flex;align-items:center;gap:10px;min-height:48px;padding:0 18px;border:1px solid rgba(255,255,255,.18);border-radius:999px;background:#111419;color:#fff;font-weight:700;box-shadow:0 14px 40px rgba(0,0,0,.28);cursor:pointer}.dfchat-launch:hover{transform:translateY(-1px)}.dfchat-launch-dot{width:9px;height:9px;border-radius:50%;background:var(--df-red);box-shadow:0 0 0 5px rgba(230,0,33,.14)}
.dfchat-panel{position:absolute;right:0;bottom:60px;width:min(410px,calc(100vw - 32px));height:min(690px,calc(100vh - 110px));min-height:480px;border:1px solid var(--df-line);border-radius:22px;background:rgba(11,13,16,.98);box-shadow:0 24px 80px rgba(0,0,0,.5);overflow:hidden;backdrop-filter:blur(18px);display:grid;grid-template-rows:auto auto 1fr auto auto auto}.dfchat-panel[hidden]{display:none}
.dfchat-head{display:flex;justify-content:space-between;gap:12px;padding:16px 16px 14px;border-bottom:1px solid var(--df-line);background:linear-gradient(135deg,rgba(230,0,33,.12),transparent 54%)}.dfchat-head>div:first-child{display:grid;gap:2px}.dfchat-head strong{font-size:15px}.dfchat-head small{color:var(--df-muted);font-size:12px}.dfchat-status{font-size:9px;letter-spacing:.16em;color:#7ce5a3;font-weight:800}.dfchat-head-actions{display:flex;gap:6px}.dfchat-close,.dfchat-reset{width:38px;height:38px;border:1px solid var(--df-line);border-radius:50%;background:rgba(255,255,255,.04);color:#fff;font-size:22px;cursor:pointer}.dfchat-reset{font-size:16px}.dfchat-context{margin:10px 14px 0;padding:8px 10px;border:1px solid rgba(230,0,33,.25);border-radius:12px;background:rgba(230,0,33,.07);color:#fff;font-size:12px}.dfchat-context:before{content:'CURRENT CONTEXT · ';color:var(--df-muted);font-size:9px;letter-spacing:.08em;font-weight:800}
.dfchat-messages{overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:12px;scroll-behavior:smooth}.dfchat-msg{max-width:88%;padding:11px 13px;border-radius:16px;line-height:1.48;font-size:14px;white-space:normal;word-wrap:break-word}.dfchat-msg strong{color:inherit}.dfchat-msg.bot{align-self:flex-start;background:var(--df-card);border:1px solid var(--df-line);border-bottom-left-radius:5px}.dfchat-msg.user{align-self:flex-end;background:var(--df-red);color:#fff;border-bottom-right-radius:5px}.dfchat-msg.typing{display:flex;gap:5px;align-items:center;width:56px}.dfchat-msg.typing i{width:6px;height:6px;border-radius:50%;background:#9ca3af;animation:dfchatdot 1s infinite ease-in-out}.dfchat-msg.typing i:nth-child(2){animation-delay:.15s}.dfchat-msg.typing i:nth-child(3){animation-delay:.3s}@keyframes dfchatdot{0%,60%,100%{opacity:.3;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}
.dfchat-actions{align-self:flex-start;display:flex;flex-wrap:wrap;gap:7px;max-width:96%}.dfchat-actions a,.dfchat-suggestions button{min-height:38px;border:1px solid var(--df-line);border-radius:999px;padding:8px 11px;background:transparent;color:#fff;font-size:12px;font-weight:650;text-decoration:none;cursor:pointer}.dfchat-actions a:first-child{background:#fff;color:#111;border-color:#fff}.dfchat-suggestions{display:flex;gap:7px;overflow-x:auto;padding:0 14px 10px;scrollbar-width:none}.dfchat-suggestions::-webkit-scrollbar{display:none}.dfchat-suggestions button{flex:0 0 auto;background:rgba(255,255,255,.035);color:#dfe3e8}.dfchat-suggestions button:hover{border-color:rgba(230,0,33,.55)}
.dfchat-form{display:grid;grid-template-columns:1fr 44px;gap:8px;padding:11px 12px;border-top:1px solid var(--df-line);background:#0e1115}.dfchat-form textarea{resize:none;max-height:110px;min-height:44px;border:1px solid var(--df-line);border-radius:14px;background:#15191f;color:#fff;padding:11px 12px;font:inherit;font-size:14px;outline:none}.dfchat-form textarea:focus{border-color:rgba(230,0,33,.7);box-shadow:0 0 0 3px rgba(230,0,33,.08)}.dfchat-form button{height:44px;border:0;border-radius:14px;background:var(--df-red);color:#fff;font-size:20px;font-weight:800;cursor:pointer}.dfchat-form button:disabled{opacity:.45;cursor:not-allowed}.dfchat-foot{padding:0 14px 11px;color:#777f8c;font-size:9px;line-height:1.35;background:#0e1115}
@media(max-width:600px){.dfchat{right:12px;bottom:12px}.dfchat-panel{position:fixed;left:0;right:0;bottom:0;width:100%;height:min(82vh,760px);min-height:520px;border-radius:22px 22px 0 0;border-left:0;border-right:0;border-bottom:0}.dfchat-launch{min-height:46px;padding:0 15px}.dfchat-msg{max-width:92%;font-size:14px}.dfchat-form textarea{font-size:16px}}
@media(prefers-reduced-motion:reduce){.dfchat *{animation:none!important;scroll-behavior:auto!important;transition:none!important}}

/* v0.6.3 model-page mobile launcher: stay accessible without covering copy. */
@media(max-width:600px){
  body.dfx-has-mobile-conversion-bar .dfchat{right:14px;bottom:84px}
  body.dfx-has-mobile-conversion-bar .dfchat-launch{width:48px;height:48px;min-height:48px;padding:0;border-radius:50%;justify-content:center;overflow:hidden;box-shadow:0 10px 28px rgba(0,0,0,.28)}
  body.dfx-has-mobile-conversion-bar .dfchat-launch>span:last-child{display:none}
  body.dfx-has-mobile-conversion-bar .dfchat-launch-dot{width:14px;height:14px;box-shadow:0 0 0 6px rgba(230,0,33,.18)}
  body.dfx-has-mobile-conversion-bar .dfchat-panel{height:min(82vh,760px)}
}

/* v0.8.2 interaction polish: clearer prompts, proper Dongfeng brand red. */
.dfchat-msg{font-size:14.5px;line-height:1.55}
.dfchat-actions a:focus-visible,.dfchat-suggestions button:focus-visible,.dfchat-launch:focus-visible,.dfchat-form button:focus-visible{outline:3px solid #E60021;outline-offset:3px}
.dfchat-context{font-weight:600}
@media(max-width:600px){.dfchat-panel{height:min(85dvh,760px);min-height:0}.dfchat-msg{font-size:15px}}
