:root{color-scheme:dark;font-family:-apple-system,BlinkMacSystemFont,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Segoe UI,Inter,sans-serif;background:#0b1020;color:#e8edf7;--vh: 100vh;--vh: 100svh}*{box-sizing:border-box}html,body,#root{margin:0;min-height:100%;height:100%}body{background:radial-gradient(circle at top,rgba(76,120,255,.18),transparent 35%),linear-gradient(180deg,#0a0f1d,#11182b 45%,#121827);-webkit-font-smoothing:antialiased;overscroll-behavior-y:none}button,input,textarea,select{font:inherit}button{-webkit-tap-highlight-color:transparent}.loading-shell,.unlock-shell,.empty-state{min-height:var(--vh);display:grid;place-items:center;padding:16px}.unlock-card{width:min(420px,calc(100vw - 32px));padding:32px;border-radius:24px;background:#13192aeb;border:1px solid rgba(255,255,255,.08);box-shadow:0 20px 80px #00000047}.unlock-card h1{margin:8px 0 10px}.unlock-card p,.chat-toolbar p,.conversation-meta{color:#9cadcf}.eyebrow{color:#7dd3fc;letter-spacing:.08em;text-transform:uppercase;font-size:.75rem}.unlock-card input,.chat-toolbar select,.composer textarea{width:100%;margin-top:12px;border-radius:14px;border:1px solid rgba(255,255,255,.08);background:#0f1728;color:#eef3ff;padding:14px 16px;font-size:16px}.primary-button,.ghost-button{border:0;border-radius:14px;padding:12px 16px;cursor:pointer;min-height:44px}.primary-button{background:linear-gradient(135deg,#6d8cff,#55c4ff);color:#07111f;font-weight:700}.ghost-button{background:#ffffff0f;color:#eef3ff}.error-text{color:#fca5a5;margin:12px 0}.app-shell{display:grid;grid-template-columns:300px minmax(0,1fr);min-height:var(--vh);height:var(--vh)}.sidebar{border-right:1px solid rgba(255,255,255,.08);background:#080c17d9;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);padding:20px;overflow-y:auto;padding-top:max(20px,env(safe-area-inset-top));padding-bottom:max(20px,env(safe-area-inset-bottom));padding-left:max(20px,env(safe-area-inset-left))}.sidebar-header{margin-bottom:20px;display:flex;align-items:center;gap:8px}.sidebar-header .primary-button{flex:1}.sidebar-close{display:none;width:44px;padding:0;font-size:1.4rem;line-height:1}.sidebar-backdrop{display:none}.conversation-list{display:flex;flex-direction:column;gap:10px}.conversation-empty{color:#6f7fa3;font-size:.9rem;text-align:center;padding:20px 4px}.conversation-item{position:relative;width:100%;text-align:left;padding:14px 38px 14px 14px;border-radius:16px;border:1px solid rgba(255,255,255,.05);background:#ffffff08;color:inherit;cursor:pointer}.conversation-item.active{border-color:#7dd3fc66;background:#6289ff1f}.conversation-title,.conversation-meta{display:block}.conversation-title{font-weight:600;margin-bottom:6px;word-break:break-word}.conversation-meta{font-size:.8rem;word-break:break-all}.conversation-delete{position:absolute;top:8px;right:8px;width:28px;height:28px;display:grid;place-items:center;font-size:1.2rem;opacity:.7;border-radius:8px}.conversation-delete:hover{opacity:1;background:#ffffff0f}.chat-shell{display:grid;grid-template-rows:auto minmax(0,1fr);min-height:0}.chat-toolbar{display:flex;justify-content:space-between;align-items:end;gap:16px;padding:20px 24px;border-bottom:1px solid rgba(255,255,255,.08);padding-top:max(20px,env(safe-area-inset-top));padding-right:max(24px,env(safe-area-inset-right))}.chat-toolbar-title{display:flex;align-items:center;gap:12px;min-width:0}.chat-toolbar-title>div{min-width:0}.chat-toolbar h1{margin:0;font-size:1.15rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-toolbar p{margin:4px 0 0;font-size:.85rem}.menu-button{display:none;width:44px;padding:0;font-size:1.3rem;line-height:1;flex-shrink:0}.toolbar-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.toolbar-actions label{display:flex;flex-direction:column;gap:6px;font-size:.85rem}.toolbar-actions select{margin-top:0;padding:8px 12px;min-height:40px}.toggle-row{flex-direction:row!important;align-items:center;gap:8px!important}.toggle-row input[type=checkbox]{width:18px;height:18px}.thread-shell{display:grid;grid-template-rows:minmax(0,1fr) auto;min-height:0}.messages{overflow-y:auto;-webkit-overflow-scrolling:touch;padding:24px;display:flex;flex-direction:column;gap:18px}.message{max-width:860px;padding:16px 18px;border-radius:18px;border:1px solid rgba(255,255,255,.06);background:#ffffff08}.message.user{align-self:flex-end;background:#6181ff1f}.message-role{font-size:.75rem;text-transform:uppercase;letter-spacing:.08em;color:#93c5fd;margin-bottom:8px}.markdown-body{white-space:pre-wrap;word-break:break-word;line-height:1.65}.markdown-body p:first-child{margin-top:0}.markdown-body p:last-child{margin-bottom:0}.markdown-body pre,.markdown-body code{font-family:SFMono-Regular,ui-monospace,Menlo,monospace;font-size:.92em}.markdown-body pre{overflow-x:auto;-webkit-overflow-scrolling:touch;padding:12px;border-radius:12px;background:#0000003d}.composer{padding:16px 24px 20px;border-top:1px solid rgba(255,255,255,.08);padding-bottom:max(20px,env(safe-area-inset-bottom));padding-right:max(24px,env(safe-area-inset-right));padding-left:max(24px,env(safe-area-inset-left))}.composer textarea{resize:vertical;min-height:96px}.composer-actions{display:flex;justify-content:flex-end;margin-top:10px}@media (max-width: 768px){.app-shell{grid-template-columns:1fr}.sidebar{position:fixed;inset:0 auto 0 0;width:min(320px,86vw);z-index:30;transform:translate(-100%);transition:transform .22s ease;background:#0a0e1cf5;border-right:1px solid rgba(255,255,255,.1);border-bottom:0}.app-shell.sidebar-open .sidebar{transform:translate(0)}.app-shell.sidebar-open .sidebar-backdrop{display:block;position:fixed;top:0;right:0;bottom:0;left:0;background:#02050e8c;z-index:20}.sidebar-close,.menu-button{display:grid;place-items:center}.chat-toolbar{align-items:stretch;flex-direction:column;padding:14px 16px;gap:12px}.chat-toolbar h1{font-size:1rem}.chat-toolbar p{display:none}.toolbar-actions{gap:10px;justify-content:space-between}.toolbar-actions label>span{display:none}.toolbar-actions .toggle-row>span{display:inline;font-size:.85rem}.toolbar-actions select{min-width:0;max-width:180px}.messages{padding:16px;gap:14px}.message{padding:14px 16px;border-radius:16px;max-width:100%}.composer{padding:12px 16px 16px}.composer textarea{min-height:72px;padding:12px 14px}}
