#mtt-ai{--gold:#E5A900;--navy:#101827;--bg:#fff;font-family:inherit;position:relative;z-index:99998}
#mtt-ai *{box-sizing:border-box}
#mtt-ai-launch{position:fixed;left:auto;right:20px;bottom:20px;border:0;background:var(--navy);color:#fff;border-radius:999px;padding:11px 15px;display:flex;align-items:center;gap:8px;box-shadow:0 10px 30px #0002;cursor:pointer;font:inherit}
#mtt-ai-launch span{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:var(--gold);color:var(--navy);font-size:18px}
#mtt-ai-panel{position:fixed;left:auto;right:20px;bottom:82px;width:min(390px,calc(100vw - 24px));height:min(600px,calc(100vh - 110px));background:#fff;border:1px solid #e8e8e8;border-radius:20px;overflow:hidden;box-shadow:0 22px 70px #0003;z-index:99999}
#mtt-ai-panel[hidden]{display:none}
#mtt-ai-panel header{height:70px;background:var(--navy);color:#fff;padding:13px 16px;display:flex;align-items:center;justify-content:space-between}
#mtt-ai-panel header div{display:flex;flex-direction:column;gap:3px}#mtt-ai-panel header small{opacity:.72}
#mtt-ai-close{border:0;background:#ffffff14;color:#fff;width:34px;height:34px;border-radius:50%;font-size:24px;cursor:pointer}
#mtt-ai-messages{height:calc(100% - 190px);overflow:auto;padding:15px;background:#f7f8fa;display:flex;flex-direction:column;gap:9px}
.mtt-ai-msg{max-width:88%;padding:10px 12px;border-radius:14px;line-height:1.75;white-space:pre-wrap;font-size:14px;background:#fff;border:1px solid #eceef1;align-self:flex-start}
.mtt-ai-msg.user{background:var(--navy);color:#fff;border-color:var(--navy);align-self:flex-end}.mtt-ai-msg.wait{opacity:.6}
.mtt-ai-quick{height:43px;padding:5px 10px;display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;border-top:1px solid #eee}
.mtt-ai-quick button{white-space:nowrap;border:1px solid #e5e5e5;background:#fff;border-radius:999px;padding:5px 9px;font:inherit;font-size:11px;cursor:pointer}
#mtt-ai-form{height:49px;margin:0 9px;display:flex;align-items:center;gap:7px;border:1px solid #ddd;border-radius:13px;padding:5px 7px}
#mtt-ai-input{border:0;outline:0;resize:none;width:100%;max-height:70px;font:inherit;font-size:13px;line-height:1.6;background:transparent}
#mtt-ai-form>button{border:0;background:var(--gold);color:var(--navy);width:36px;height:36px;border-radius:10px;cursor:pointer;font-size:17px}
#mtt-ai-panel footer{height:28px;text-align:center;padding:5px 8px;color:#777;font-size:9.5px}
@media(max-width:600px){#mtt-ai-launch{left:auto;right:12px;bottom:72px;padding:9px}#mtt-ai-launch b{display:none}#mtt-ai-panel{left:6px;right:6px;bottom:6px;width:auto;height:min(76vh,620px);border-radius:20px}#mtt-ai-messages{height:calc(100% - 190px)}}
@media(prefers-reduced-motion:reduce){#mtt-ai *{scroll-behavior:auto!important;transition:none!important}}
.mtt-ai-msg a{display:inline-block;margin:3px 4px;color:#0b63ce;text-decoration:underline;font-weight:600}
@media(min-width:1000px){#mtt-ai-panel{width:410px;height:min(570px,calc(100vh - 120px));bottom:86px}}

.mtt-ai-debug{font-size:11px;direction:ltr;text-align:left;opacity:.65;margin:2px 10px 8px;padding:3px 7px;border:1px dashed currentColor;border-radius:7px}

/* v1 stable polish */
#mtt-ai-panel{box-shadow:0 18px 55px rgba(15,23,42,.20);border:1px solid rgba(15,23,42,.08)}
#mtt-ai-panel .mtt-ai-msg{line-height:1.9}
#mtt-ai-panel a{word-break:break-word}
.mtt-ai-debug{display:none!important}
@media (min-width:769px){
  #mtt-ai-panel{width:min(410px,calc(100vw - 32px));max-height:min(680px,calc(100vh - 110px))}
}
@media (max-width:768px){
  #mtt-ai-panel{position:fixed!important;left:0!important;right:0!important;bottom:0!important;top:auto!important;width:100%!important;height:min(78vh,680px)!important;max-height:78vh!important;border-radius:22px 22px 0 0!important;margin:0!important}
  #mtt-ai-panel .mtt-ai-body{overscroll-behavior:contain}
}

/* v1.0.1 final polish */
@media (min-width:769px){
  #mtt-ai-panel{width:min(395px,calc(100vw - 32px));max-height:min(640px,calc(100vh - 120px))}
}
