:root{--bg:#fff;--surface:#fff;--surface-2:#f2f2f0;--text:#1b1d22;--muted:#6b7280;--border:#e3e5e8;--primary:#2563eb;--primary-text:#fff;--danger:#dc2626;--user-bubble:#f2f2f0;--user-text:#1b1d22;--code-bg:#0f172a;--code-text:#e2e8f0;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;color:var(--text);background:var(--bg);font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;line-height:1.5}*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{background:var(--bg)}button{font:inherit;color:inherit;cursor:pointer}button:disabled{opacity:.5;cursor:default}code{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:.9em}.muted{color:var(--muted)}.small{font-size:.85rem}.center{text-align:center}.error{color:var(--danger)}.row{align-items:center;gap:8px;display:flex}.row.wrap{flex-wrap:wrap}.btn{border:1px solid var(--border);background:var(--surface);border-radius:10px;padding:10px 16px;font-weight:500}.btn.primary{background:var(--primary);color:var(--primary-text);border-color:var(--primary)}.btn.ghost{background:0 0}.btn.danger{color:var(--danger);border-color:var(--danger);background:0 0}.btn.full{width:100%}.center-page{place-items:center;min-height:100%;padding:16px;display:grid}.card{background:var(--surface);border:1px solid var(--border);border-radius:16px;width:100%;max-width:440px;padding:24px}.logo{color:var(--primary);letter-spacing:-.02em;font-size:1.8rem;font-weight:800}.login-logo{width:96px;height:96px;margin:0 auto}.side-brand{align-items:center;gap:10px;padding:4px 4px 12px;font-size:1.1rem;font-weight:700;display:flex}.side-brand img{width:36px;height:36px}.login{text-align:center;gap:12px;display:grid}.login .btn{justify-content:center;align-items:center;gap:10px;display:flex}.login .icon{border-radius:50%;place-items:center;width:22px;height:22px;font-size:.9rem;font-weight:700;display:inline-grid}.btn.google .icon{color:#4285f4;background:#fff;border:1px solid #ddd}.btn.facebook{color:#fff;background:#1877f2;border-color:#1877f2}.btn.facebook .icon{color:#1877f2;background:#fff}.terms{max-width:640px}.terms h1{margin-top:0;font-size:1.4rem}.terms-body{border:1px solid var(--border);background:var(--surface-2);border-radius:10px;max-height:50vh;margin-bottom:16px;padding:4px 16px;overflow-y:auto}.terms-body h3{margin:14px 0 4px;font-size:1rem}.terms-body p{margin:0 0 8px}.terms .row{flex-wrap:wrap;justify-content:flex-end}.notice{background:var(--surface-2);border-radius:8px;padding:8px 12px}.checkbox{align-items:flex-start;gap:10px;margin:12px 0;display:flex}.checkbox input{margin-top:4px}.app{grid-template-columns:260px 1fr;height:100%;display:grid}.app.with-preview{grid-template-columns:260px minmax(0,1fr) minmax(0,1fr)}.sidebar{border-right:1px solid var(--border);background:#fafaf9;flex-direction:column;gap:8px;min-height:0;padding:12px;display:flex}.sidebar .btn.primary{background:#111;border-color:#111;border-radius:22px}.conv-list{flex-direction:column;flex:1;gap:2px;min-height:0;display:flex;overflow-y:auto}.conv{text-align:left;white-space:nowrap;text-overflow:ellipsis;background:0 0;border:none;border-radius:8px;flex-shrink:0;padding:8px 10px;line-height:1.4;overflow:hidden}.conv:hover,.conv.active{background:var(--surface-2)}.project-list{flex-direction:column;flex-shrink:0;gap:2px;max-height:32vh;display:flex;overflow-y:auto}.project-head{color:var(--muted);text-transform:uppercase;justify-content:space-between;align-items:center;padding:4px 10px 2px;font-size:.8rem;font-weight:600;display:flex}.project-head button{color:#1565ff;text-transform:none;background:0 0;border:none;padding:4px;font-size:.85rem}.project-item{text-align:left;background:0 0;border:none;border-radius:8px;flex-shrink:0;align-items:center;padding:0;display:flex}button.project-item{padding:8px 10px}.project-item.active{background:var(--surface-2);font-weight:600}.project-name{text-align:left;min-width:0;font-weight:inherit;white-space:nowrap;text-overflow:ellipsis;background:0 0;border:none;flex:1;padding:8px 10px;overflow:hidden}.project-edit{background:0 0;border:none;padding:6px 10px;font-size:1rem}.conv-empty{margin:0;padding:8px 10px;font-size:.9rem}.project-pill{border:1px solid var(--border);background:var(--surface-2);border-radius:18px;margin-top:14px;padding:8px 14px;font-size:.9rem}.project-dialog{width:min(520px,100%);max-height:calc(100vh - 32px);overflow-y:auto}.memory-note{color:var(--muted);margin:6px 0 0;font-size:.85rem}.field{flex-direction:column;gap:6px;margin-bottom:12px;display:flex}.field span{font-weight:600}.field input,.field textarea{font:inherit;border:1px solid var(--border);box-sizing:border-box;resize:vertical;border-radius:10px;width:100%;padding:10px 12px}.account-btn{text-align:left;background:0 0;border:none;border-radius:8px;align-items:center;gap:10px;padding:8px;display:flex}.account-btn:hover{background:var(--surface-2)}.account-btn img{border-radius:50%;width:28px;height:28px}.chat{flex-direction:column;min-width:0;min-height:0;display:flex}.chat-head{align-items:center;gap:8px;min-height:60px;padding:10px 12px;display:flex}.chat-head .title{text-align:center;white-space:nowrap;text-overflow:ellipsis;flex:1;min-width:0;font-weight:600;overflow:hidden}.icon-btn{color:var(--text);background:0 0;border:none;border-radius:12px;flex-shrink:0;place-items:center;width:44px;height:44px;display:grid}.icon-btn:hover{background:var(--surface-2)}.new-btn{margin-left:auto}.menu{display:none}.install-btn{border:1px solid var(--border);background:var(--surface);width:100%;font:inherit;border-radius:10px;padding:10px}.messages{flex-direction:column;flex:1;gap:14px;padding:16px;display:flex;overflow-y:auto}.empty{text-align:center;max-width:560px;margin:auto;padding:0 12px;transform:translateY(-10vh)}.empty-logo{width:96px;height:96px}.user-count{color:#0b6b1f;margin-top:2px;font-size:.7rem;line-height:1}.empty h2{margin:12px 0 0;font-family:Georgia,Times New Roman,serif;font-size:1.7rem;font-weight:400;line-height:1.3}.empty h2.greet{color:#0b6b1f;font-size:1.15rem}.greet-brand{color:#ff1a1a;letter-spacing:1px;font-family:system-ui,sans-serif;font-size:2.4rem;font-weight:800;display:block}.greet-intel{color:#1565ff}.msg{flex-direction:column;max-width:100%;display:flex}.msg.user{align-items:flex-end}.bubble{overflow-wrap:anywhere;max-width:min(760px,100%)}.bubble table{border-collapse:collapse;display:block;overflow-x:auto}.bubble th,.bubble td{border:1px solid var(--border);padding:4px 8px}.msg.user .bubble{background:var(--user-bubble);color:var(--user-text);border-radius:20px;padding:10px 16px}.msg.user .bubble p{white-space:pre-wrap;margin:0}.msg.assistant .bubble{padding:2px 0}.bubble pre{background:var(--code-bg);color:var(--code-text);border-radius:10px;padding:12px;overflow-x:auto}.bubble :not(pre)>code{background:var(--surface-2);border-radius:5px;padding:1px 5px}.typing{color:var(--muted)}.svg-image{flex-direction:column;align-items:flex-start;gap:8px;margin:8px 0;display:flex}.svg-image img{border:1px solid var(--border);background:#fff;border-radius:16px;width:100%;max-width:480px;height:auto}.svg-image button{border:1px solid var(--border);background:var(--surface);border-radius:999px;padding:8px 16px}.svg-image.drawing{color:var(--muted);border:1px dashed var(--border);border-radius:16px;padding:24px}.video-block{flex-direction:column;align-items:flex-start;gap:8px;margin:8px 0;display:flex}.video-block video{border:1px solid var(--border);background:#000;border-radius:16px;width:auto;max-width:min(100%,480px);max-height:70vh}.video-block.waiting{color:var(--muted);border:1px dashed var(--border);border-radius:16px;padding:24px}.video-download,.video-pick{border:1px solid var(--border);background:var(--surface);color:inherit;cursor:pointer;border-radius:999px;padding:8px 16px;text-decoration:none}.attach-chip{color:var(--muted);align-items:center;gap:10px;padding:4px 6px;font-size:.95rem;display:flex}.attach-chip img{object-fit:cover;border:1px solid var(--border);border-radius:10px;width:48px;height:48px}.attach-chip button{background:var(--surface-2);border:none;border-radius:999px;width:30px;height:30px;margin-left:auto}.msg-media{flex-wrap:wrap;align-items:center;gap:6px;margin-bottom:6px;display:flex}.msg-media img{object-fit:cover;border-radius:12px;width:96px;height:96px}.msg-media-tag{color:var(--muted);font-size:.85rem}.msg-actions{flex-wrap:wrap;gap:6px;margin-top:4px;display:flex}.msg-actions button{border:1px solid var(--border);background:var(--surface);border-radius:8px;padding:4px 10px;font-size:.85rem}.bubble a{color:#1565ff;overflow-wrap:anywhere;text-decoration:underline}.copy-pop{border:1px solid var(--border);background:#fff;border-radius:18px;align-self:flex-start;margin-top:6px;padding:6px 14px;font-size:.9rem;box-shadow:0 2px 10px #0000001f}.msg.user .copy-pop{align-self:flex-end}@media (hover:none){.bubble{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}.bubble pre,.bubble code{-webkit-user-select:text;user-select:text}}.msg-actions button.on{border-color:var(--primary);background:var(--surface-2)}.banner{margin:0 16px}.composer{background:var(--surface);border:1px solid var(--border);border-radius:28px;flex-direction:column;gap:10px;margin:8px 16px 16px;padding:14px 12px 12px;display:flex;box-shadow:0 4px 20px #0000000f}.composer textarea{resize:none;font:inherit;color:inherit;field-sizing:content;background:0 0;border:none;outline:none;min-height:1.5em;max-height:180px;padding:4px 8px;font-size:1.05rem}.composer textarea::placeholder{color:#8a8a85}.composer-bar{align-items:center;gap:8px;display:flex}.round{background:var(--surface-2);width:44px;height:44px;color:var(--text);border:none;border-radius:50%;flex-shrink:0;place-items:center;display:grid}.round.live{color:var(--danger);background:#fee2e2}.round.send{color:#fff;background:#111}.round.send:disabled{opacity:.35}.composer-bar .spacer{flex:1}.preview{border-left:1px solid var(--border);background:var(--surface);flex-direction:column;min-width:0;min-height:0;display:flex}.preview-bar{border-bottom:1px solid var(--border);justify-content:space-between;align-items:center;gap:8px;padding:8px 10px;display:flex}.tabs,.actions{gap:4px;display:flex}.preview-bar button{white-space:nowrap;background:0 0;border:1px solid #0000;border-radius:8px;padding:4px 10px}.preview-bar button:hover{background:var(--surface-2)}.tabs button.active{background:var(--surface-2);border-color:var(--border);font-weight:600}.frame-wrap{background:var(--surface-2);flex:1;justify-content:center;min-height:0;display:flex}.frame-wrap iframe{background:#fff;border:none;width:100%;height:100%}.frame-wrap.mobile{padding:16px 0}.frame-wrap.mobile iframe{border:1px solid var(--border);border-radius:16px;width:390px;max-width:100%}.files{flex:1;align-content:start;gap:10px;padding:10px;display:grid;overflow-y:auto}.file{border:1px solid var(--border);border-radius:10px;overflow:hidden}.file-head{background:var(--surface-2);justify-content:space-between;align-items:center;padding:6px 10px;font-family:ui-monospace,monospace;font-size:.85rem;display:flex}.file-head button{border:1px solid var(--border);background:var(--surface);border-radius:6px;padding:2px 8px;font-size:.8rem}.file pre{background:var(--code-bg);color:var(--code-text);max-height:400px;margin:0;padding:10px;overflow-x:auto}.modal-backdrop,.backdrop{z-index:20;background:#0006;position:fixed;inset:0}.modal-backdrop{place-items:center;padding:16px;display:grid}.modal h2{margin-top:0}@media (width<=860px){.app,.app.with-preview{grid-template-columns:1fr}.menu{display:block}.sidebar{z-index:30;width:280px;transition:transform .2s;position:fixed;inset:0 auto 0 0;transform:translate(-100%)}.sidebar.open{transform:none}.preview{z-index:25;border-left:none;position:fixed;inset:0}.messages{padding:12px}.composer{margin:6px 10px 12px}}
