:root{--mashu-primary: #7c3aed;--mashu-primary-hover: #6d28d9;--mashu-bg: #ffffff;--mashu-bg-muted: #f3f4f6;--mashu-bg-welcome: linear-gradient(135deg, #fdf2f8 0%, #ede9fe 50%, #f3e8ff 100%);--mashu-text: #111827;--mashu-text-muted: #6b7280;--mashu-border: #e5e7eb;--mashu-radius: 24px;--mashu-radius-sm: 12px}.mashu-chat-container{background:var(--mashu-bg-welcome);border-radius:var(--mashu-radius);overflow:hidden;display:flex;flex-direction:column;min-height:280px;transition:min-height .4s ease,max-height .4s ease,background .4s ease}.mashu-chat-container--expanded{background:var(--mashu-bg);border:1px solid var(--mashu-border);min-height:420px;max-height:560px}.mashu-chat-welcome{display:flex;align-items:center;gap:24px;padding:32px;animation:mashu-fade-in .3s ease}.mashu-chat-welcome__avatar{flex-shrink:0;width:200px;display:flex;align-items:center;justify-content:center}.mashu-chat-welcome__avatar-img{width:180px;height:auto;border-radius:16px;object-fit:cover}.mashu-chat-welcome__content{flex:1;min-width:0;display:flex;flex-direction:column;gap:12px}.mashu-chat-welcome__content>.mashu-chat-input{padding:0}.mashu-chat-welcome__greeting{display:flex;align-items:center;gap:8px;width:100%;background:var(--mashu-bg);border-radius:24px;padding:12px 20px;font-size:15px;color:var(--mashu-text);box-shadow:0 1px 4px #0000000a}.mashu-chat-welcome__greeting-icon{font-size:18px}@media(max-width:640px){.mashu-chat-welcome{flex-direction:column;padding:24px 16px;gap:16px}.mashu-chat-welcome__avatar{width:120px}.mashu-chat-welcome__avatar-img{width:100px}}.mashu-chat-error{display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;padding:24px;text-align:center;color:var(--mashu-text-muted)}.mashu-chat-error__retry{margin-top:12px;padding:8px 16px;background:var(--mashu-primary);color:#fff;border:none;border-radius:var(--mashu-radius-sm);cursor:pointer;font-size:14px}.mashu-chat-error__retry:hover{background:var(--mashu-primary-hover)}.mashu-chat-messages{flex:1;overflow-y:auto;padding:20px 24px;display:flex;flex-direction:column;gap:12px;animation:mashu-fade-in .4s ease}.mashu-chat-greeting{display:flex;flex-direction:column;gap:12px}.mashu-chat-bubble{display:flex;max-width:75%}.mashu-chat-bubble--user{align-self:flex-end}.mashu-chat-bubble--assistant,[dir=rtl] .mashu-chat-bubble--user{align-self:flex-start}[dir=rtl] .mashu-chat-bubble--assistant{align-self:flex-end}.mashu-chat-bubble__content{padding:10px 16px;border-radius:var(--mashu-radius-sm);font-size:14px;line-height:1.6;word-break:break-word}.mashu-chat-bubble--user .mashu-chat-bubble__content{background:var(--mashu-primary);color:#fff;border-bottom-right-radius:2px}[dir=rtl] .mashu-chat-bubble--user .mashu-chat-bubble__content{border-bottom-right-radius:var(--mashu-radius-sm);border-bottom-left-radius:2px}.mashu-chat-bubble--assistant .mashu-chat-bubble__content{background:var(--mashu-bg-muted);color:var(--mashu-text);border-bottom-left-radius:2px}[dir=rtl] .mashu-chat-bubble--assistant .mashu-chat-bubble__content{border-bottom-left-radius:var(--mashu-radius-sm);border-bottom-right-radius:2px}.mashu-chat-bubble__markdown p{margin:0 0 8px}.mashu-chat-bubble__markdown p:last-child{margin-bottom:0}.mashu-chat-bubble__markdown h1,.mashu-chat-bubble__markdown h2,.mashu-chat-bubble__markdown h3,.mashu-chat-bubble__markdown h4,.mashu-chat-bubble__markdown h5,.mashu-chat-bubble__markdown h6{margin:8px 0 4px;font-weight:600}.mashu-chat-bubble__markdown ul,.mashu-chat-bubble__markdown ol{margin:4px 0;padding-left:20px}[dir=rtl] .mashu-chat-bubble__markdown ul,[dir=rtl] .mashu-chat-bubble__markdown ol{padding-left:0;padding-right:20px}.mashu-chat-bubble__markdown code{background:#0000000f;padding:2px 4px;border-radius:3px;font-size:.9em}.mashu-chat-bubble__markdown pre{background:#0000000f;padding:8px 12px;border-radius:6px;overflow-x:auto;margin:8px 0}.mashu-chat-bubble__markdown pre code{background:none;padding:0}.mashu-chat-bubble__markdown a{color:var(--mashu-primary);text-decoration:underline}.mashu-chat-bubble--user .mashu-chat-bubble__markdown a{color:#fff}.mashu-chat-bubble__options{display:flex;flex-wrap:wrap;gap:8px}.mashu-chat-bubble__option-btn{padding:6px 14px;background:var(--mashu-bg);border:1px solid var(--mashu-primary);color:var(--mashu-primary);border-radius:20px;cursor:pointer;font-size:13px;transition:background .15s,color .15s}.mashu-chat-bubble__option-btn:hover{background:var(--mashu-primary);color:#fff}.mashu-chat-thinking{display:flex;align-items:center;gap:8px;padding:8px 16px;background:var(--mashu-bg-muted);border-radius:var(--mashu-radius-sm);align-self:flex-start;max-width:75%}.mashu-chat-thinking__indicator{display:flex;gap:4px}.mashu-chat-thinking__indicator span{width:6px;height:6px;border-radius:50%;background:var(--mashu-text-muted);animation:mashu-thinking-pulse 1.4s infinite ease-in-out both}.mashu-chat-thinking__indicator span:nth-child(1){animation-delay:-.32s}.mashu-chat-thinking__indicator span:nth-child(2){animation-delay:-.16s}.mashu-chat-thinking__text{font-size:13px;color:var(--mashu-text-muted);font-style:italic}@keyframes mashu-thinking-pulse{0%,80%,to{transform:scale(.6);opacity:.4}40%{transform:scale(1);opacity:1}}.mashu-chat-starters{display:grid;grid-template-columns:1fr 1fr;gap:8px;width:100%}.mashu-chat-starters__btn{display:flex;align-items:center;gap:10px;width:100%;padding:12px 16px;background:var(--mashu-bg);border:none;border-radius:12px;cursor:pointer;font-size:13px;color:var(--mashu-text);transition:box-shadow .2s,transform .15s;box-shadow:0 1px 4px #0000000a;text-align:left}.mashu-chat-starters__btn:last-child:nth-child(odd){grid-column:1 / -1}.mashu-chat-starters__btn:hover{box-shadow:0 4px 12px #7c3aed1f;transform:translateY(-1px)}.mashu-chat-starters__icon{display:flex;align-items:center;color:var(--mashu-primary);flex-shrink:0}.mashu-chat-starters__label{line-height:1.3;font-weight:500}@media(max-width:640px){.mashu-chat-starters{grid-template-columns:1fr}}.mashu-chat-category{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}.mashu-chat-category__btn{padding:8px 18px;background:var(--mashu-bg);border:1.5px solid var(--mashu-primary);color:var(--mashu-primary);border-radius:20px;cursor:pointer;font-size:13px;font-weight:500;transition:background .15s,color .15s,transform .15s}.mashu-chat-category__btn:hover{background:var(--mashu-primary);color:#fff;transform:translateY(-1px)}.mashu-chat-input{display:flex;align-items:flex-end;gap:8px;padding:12px 16px;background:transparent;flex-shrink:0}.mashu-chat-container--expanded .mashu-chat-input{border-top:1px solid var(--mashu-border);background:var(--mashu-bg)}.mashu-chat-input__textarea{flex:1;border:1.5px solid var(--mashu-border);border-radius:24px;padding:10px 16px;font-size:14px;line-height:1.4;resize:none;outline:none;font-family:inherit;max-height:120px;background:var(--mashu-bg);color:var(--mashu-text);transition:border-color .15s}.mashu-chat-input__textarea:focus{border-color:var(--mashu-primary)}.mashu-chat-input__textarea:disabled{opacity:.6;cursor:not-allowed}.mashu-chat-input__send{width:40px;height:40px;border-radius:50%;background:var(--mashu-primary);color:#fff;border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:background .15s,opacity .15s}.mashu-chat-input__send:hover:not(:disabled){background:var(--mashu-primary-hover)}.mashu-chat-input__send:disabled{opacity:.4;cursor:not-allowed}@keyframes mashu-fade-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
