*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html,body,#app{height:100%}body{font-family:-apple-system,BlinkMacSystemFont,SF Pro Text,Inter,Segoe UI,sans-serif;color:#1d1d1f;background:#fff;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}button{font-family:inherit}.stellar-app{display:flex;height:100vh;overflow:hidden}.sidebar{width:260px;min-width:260px;background:#272729;display:flex;flex-direction:column;overflow:hidden}.logo-row{display:flex;align-items:center;justify-content:center;padding:20px 16px 18px;flex-shrink:0;border-bottom:1px solid rgba(255,255,255,.06)}.logo-mark{width:220px;height:90px;flex-shrink:0;background:url(/styl-logo-1.png) center/contain no-repeat}.new-chat-btn{margin:8px;padding:9px 12px;background:transparent;border:none;border-radius:8px;color:#ffffffd9;font-size:14px;font-weight:400;letter-spacing:-.12px;cursor:not-allowed;text-align:left;display:flex;align-items:center;gap:10px;flex-shrink:0;transition:background .15s ease,color .15s ease,transform .12s ease,opacity .15s ease;opacity:.35;width:calc(100% - 16px)}.new-chat-btn:not(:disabled){cursor:pointer;opacity:1}.new-chat-btn:not(:disabled):hover{background:#ffffff14;color:#fff}.new-chat-btn:not(:disabled):active{background:#ffffff1f;transform:scale(.97)}.new-chat-btn:focus-visible{outline:2px solid #0071e3;outline-offset:2px}.new-chat-btn svg{flex-shrink:0;opacity:.7}.new-chat-btn:not(:disabled) svg{opacity:1}.chat-list-label{font-size:11px;font-weight:600;color:#6e6e73;padding:4px 16px 6px;letter-spacing:.5px;text-transform:uppercase;flex-shrink:0}.chat-list{flex:1;overflow-y:auto;padding-bottom:8px}.chat-group-label{font-size:11px;font-weight:600;color:#6e6e73;padding:10px 16px 4px;letter-spacing:.5px;text-transform:uppercase}.chat-item{display:flex;align-items:center;gap:6px;padding:7px 12px 7px 16px;margin:1px 6px;border-radius:6px;cursor:pointer;color:#d1d1d6;font-size:13px;line-height:1.3;position:relative}.chat-item:hover{background:#ffffff14}.chat-item.is-active{background:#ffffff24;color:#fff}.chat-item-title{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-item-title[contenteditable=true]{outline:1px solid #0066cc;background:#0066cc26;border-radius:3px;padding:1px 3px;cursor:text}.chat-item-actions{display:none;align-items:center;gap:2px;flex-shrink:0}.chat-item:hover .chat-item-actions,.chat-item.is-active .chat-item-actions{display:flex}.chat-action-btn{width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center;background:transparent;color:#8e8e93;border:none;border-radius:4px;cursor:pointer}.chat-action-btn:hover{background:#ffffff1f;color:#fff}.profile-section{display:flex;align-items:center;gap:10px;padding:12px 16px;border-top:1px solid rgba(255,255,255,.1);flex-shrink:0}.frontend-version{padding:6px 16px 16px;color:#fff6;font-size:11px;letter-spacing:.2px;flex-shrink:0;display:flex;align-items:center;justify-content:flex-start;gap:8px;margin-top:auto}.version-badge{width:72px;height:72px;border-radius:50%;object-fit:cover}.profile-avatar{width:30px;height:30px;border-radius:50%;background:#06c;color:#fff;font-size:12px;font-weight:600;display:flex;align-items:center;justify-content:center;flex-shrink:0;letter-spacing:-.3px}.profile-info{min-width:0;flex:1}.profile-name{font-size:13px;font-weight:600;color:#f5f5f7;letter-spacing:-.224px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.profile-email{font-size:11px;color:#6e6e73;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.logout-btn{flex-shrink:0;width:28px;height:28px;display:flex;align-items:center;justify-content:center;background:transparent;border:1px solid rgba(255,255,255,.14);border-radius:6px;color:#f5f5f7;cursor:pointer;transition:background .12s ease,border-color .12s ease}.logout-btn:hover{background:#ffffff14;border-color:#ffffff47}.logout-btn:focus-visible{outline:2px solid #0066cc;outline-offset:2px}.logout-btn svg{width:14px;height:14px}.main{flex:1;display:flex;flex-direction:column;overflow:hidden;background:#fff}.chat-header{height:44px;display:flex;align-items:center;justify-content:space-between;padding:0 20px;background:#fffc;backdrop-filter:saturate(180%) blur(20px);-webkit-backdrop-filter:saturate(180%) blur(20px);border-bottom:1px solid rgba(0,0,0,.08);flex-shrink:0;position:sticky;top:0;z-index:10}.header-title{font-size:15px;font-weight:600;color:#1d1d1f;letter-spacing:-.224px}.status-badge{display:flex;align-items:center;gap:6px}.status-dot{width:8px;height:8px;border-radius:50%;background:#34c759;flex-shrink:0}.status-text{font-size:13px;color:#6e6e73;letter-spacing:-.12px}.messages-area{flex:1;overflow-y:auto;padding:24px 20px;display:flex;flex-direction:column;gap:16px;scroll-behavior:smooth;transition:opacity .18s ease}.message-row{display:flex;align-items:flex-end;gap:8px}.message-row.user{flex-direction:row-reverse}.msg-avatar{width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:600;flex-shrink:0}.msg-avatar.user{background:#f5f5f7;color:#1d1d1f;border:1px solid rgba(0,0,0,.08)}.msg-avatar.ai{background:url(/browser-logo.png) center/contain no-repeat;color:transparent}.message-bubble{max-width:760px;padding:11px 16px;font-size:17px;line-height:1.47;letter-spacing:-.374px;word-break:break-word;white-space:pre-wrap}.message-bubble.user{background:#06c;color:#fff;border-radius:18px 18px 4px}.message-bubble.ai{background:#f5f5f7;color:#1d1d1f;border-radius:4px 18px 18px}.message-bubble.error{background:#f5f5f7;color:#1d1d1f;border-radius:4px 18px 18px;border-left:3px solid #ff3b30}.message-bubble .markdown{white-space:normal}.message-bubble .markdown>:first-child{margin-top:0}.message-bubble .markdown>:last-child{margin-bottom:0}.message-bubble .markdown p{margin:0 0 .6em}.message-bubble .markdown ul,.message-bubble .markdown ol{margin:.2em 0 .6em;padding-left:1.4em}.message-bubble .markdown li{margin:.15em 0}.message-bubble .markdown h1,.message-bubble .markdown h2,.message-bubble .markdown h3,.message-bubble .markdown h4{margin:.6em 0 .3em;font-weight:600;line-height:1.3}.message-bubble .markdown h1{font-size:1.25em}.message-bubble .markdown h2{font-size:1.15em}.message-bubble .markdown h3{font-size:1.05em}.message-bubble .markdown h4{font-size:1em}.message-bubble .markdown code{background:#0000000f;padding:.1em .35em;border-radius:4px;font-size:.92em;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.message-bubble .markdown pre{background:#0000000f;padding:10px 12px;border-radius:8px;overflow-x:auto;margin:.4em 0}.message-bubble .markdown pre code{background:transparent;padding:0;border-radius:0}.message-bubble .markdown a{color:inherit;text-decoration:underline}.message-bubble .markdown blockquote{margin:.4em 0;padding-left:.8em;border-left:3px solid rgba(0,0,0,.15);color:#1d1d1fbf}.message-bubble.typing{background:#f5f5f7;border-radius:4px 18px 18px;padding:14px 16px;display:flex;align-items:center;gap:4px}.typing-dot{width:6px;height:6px;border-radius:50%;background:#6e6e73;animation:stellar-bounce 1.2s infinite}.typing-dot:nth-child(2){animation-delay:.2s}.typing-dot:nth-child(3){animation-delay:.4s}@keyframes stellar-bounce{0%,60%,to{transform:translateY(0)}30%{transform:translateY(-6px)}}.typing-label{font-size:14px;letter-spacing:-.12px;font-style:italic;background:linear-gradient(90deg,#6e6e73,#6e6e73 35%,#1d1d1f,#6e6e73 65%,#6e6e73);background-size:200% 100%;background-clip:text;-webkit-background-clip:text;color:transparent;-webkit-text-fill-color:transparent;animation:stellar-fade-in .25s ease,stellar-shimmer 2.4s linear infinite}@keyframes stellar-shimmer{0%{background-position:100% 0}to{background-position:-100% 0}}.welcome-state{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;color:#6e6e73;text-align:center;padding:40px 20px}.welcome-icon{width:200px;height:200px;border-radius:44px;background:url(/logo.png) center/contain no-repeat}.welcome-title{font-size:21px;font-weight:600;color:#1d1d1f;letter-spacing:-.374px}.welcome-sub{font-size:15px;color:#6e6e73;letter-spacing:-.224px;max-width:380px;line-height:1.47}.input-area{padding:12px 20px 16px;border-top:1px solid rgba(0,0,0,.08);background:#fff;flex-shrink:0}.input-row{display:flex;gap:8px;align-items:center}.chat-input{flex:1;border-radius:9999px;border:1px solid rgba(0,0,0,.12);padding:11px 20px;font-size:17px;font-family:inherit;line-height:1.47;letter-spacing:-.374px;color:#1d1d1f;outline:none;resize:none;background:#fff;transition:box-shadow .15s ease,border-color .15s ease}.chat-input:focus{border-color:#06c6;box-shadow:0 0 0 3px #0066cc1f}.chat-input::placeholder{color:#6e6e73}.send-btn{width:44px;height:44px;min-width:44px;background:#06c;color:#fff;border:none;border-radius:50%;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:transform .1s ease,opacity .15s ease;flex-shrink:0}.send-btn:hover{opacity:.88}.send-btn:active{transform:scale(.95)}.send-btn:focus-visible{outline:2px solid #0071e3;outline-offset:2px}.send-btn:disabled{opacity:.4;cursor:not-allowed}.hint-text{font-size:12px;color:#6e6e73;text-align:center;margin-top:8px;letter-spacing:-.12px}.login-page{min-height:100vh;display:flex;align-items:center;justify-content:center;background:#fff;padding:40px 20px}.login-card{display:flex;flex-direction:column;align-items:center;gap:28px}.login-logo{width:160px;height:160px;background:url(/logo.png) center/contain no-repeat}.login-btn{min-width:220px;padding:12px 24px;background:#06c;color:#fff;border:none;border-radius:9999px;font-size:17px;font-weight:600;letter-spacing:-.374px;cursor:pointer;transition:opacity .15s ease,transform .1s ease}.login-btn:hover{opacity:.88}.login-btn:active{transform:scale(.97)}.login-btn:focus-visible{outline:2px solid #0071e3;outline-offset:3px}.messages-area::-webkit-scrollbar{width:6px}.messages-area::-webkit-scrollbar-track{background:transparent}.messages-area::-webkit-scrollbar-thumb{background:#0000001f;border-radius:3px}.chat-list::-webkit-scrollbar{width:4px}.chat-list::-webkit-scrollbar-thumb{background:#ffffff1f;border-radius:2px}.chat-header-left{display:flex;align-items:center;gap:10px;min-width:0}.menu-btn{display:none;width:36px;height:36px;align-items:center;justify-content:center;background:transparent;border:none;border-radius:8px;color:#1d1d1f;cursor:pointer;flex-shrink:0;padding:0}.menu-btn:hover{background:#0000000f}.menu-btn:active{background:#0000001a}.menu-btn:focus-visible{outline:2px solid #0066cc;outline-offset:2px}.drawer-backdrop{display:none}@media(max-width:640px){.menu-btn{display:inline-flex}.sidebar{position:fixed;inset:0 auto 0 0;width:min(280px,85vw);min-width:0;z-index:50;transform:translate(-100%);transition:transform .22s ease;box-shadow:2px 0 16px #00000059}.stellar-app.drawer-open .sidebar{transform:translate(0)}.drawer-backdrop{display:block;position:fixed;top:0;right:0;bottom:0;left:0;background:#00000073;z-index:40;animation:stellar-fade-in .18s ease}.chat-header{padding:0 12px}.header-title{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.status-text{display:none}.messages-area{padding:16px 12px;gap:12px}.message-bubble{max-width:85%;font-size:16px}.input-area{padding:10px 12px calc(12px + env(safe-area-inset-bottom))}.chat-input{font-size:16px;padding:10px 16px}.hint-text{display:none}.chat-action-btn{width:32px;height:32px}.chat-item-actions{display:flex}.welcome-icon{width:140px;height:140px}.welcome-state{padding:24px 16px}.welcome-title{font-size:19px}.welcome-sub{font-size:14px}}@keyframes stellar-fade-in{0%{opacity:0}to{opacity:1}}@media(min-width:641px)and (max-width:900px){.sidebar{width:220px;min-width:220px}.logo-mark{width:180px;height:72px}.chat-header{padding:0 16px}.messages-area{padding:20px 16px}.message-bubble{max-width:90%}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.001ms!important;transition-duration:.001ms!important}}
