:root{--bg:#0b0f19;--panel:#111827;--panel-2:#0f1524;--border:#1f2937;--text:#e5e7eb;--muted:#9ca3af;--accent:#6366f1;--accent-hover:#4f46e5;--user-bubble:#1e293b;--assistant-bubble:#0f1a2e;--danger:#f87171}*{box-sizing:border-box}body,html{margin:0;padding:0;height:100%;background:var(--bg);color:var(--text);font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif}.app{display:grid;grid-template-columns:380px 1fr;height:100vh;overflow:hidden}.chat{display:flex;flex-direction:column;border-right:1px solid var(--border);background:var(--panel);min-width:0}.chat__header{padding:14px 16px;border-bottom:1px solid var(--border);display:flex;align-items:center;gap:8px}.chat__logo{width:22px;height:22px;border-radius:6px;background:linear-gradient(135deg,var(--accent),#8b5cf6)}.chat__title{font-size:14px;font-weight:600}.chat__phase{margin-left:auto;font-size:11px;color:var(--muted);border:1px solid var(--border);padding:2px 8px;border-radius:999px}.chat__log{flex:1 1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:12px}.empty{margin:auto;text-align:center;color:var(--muted);font-size:13px;line-height:1.6;max-width:260px}.empty__examples{margin-top:14px;display:flex;flex-direction:column;gap:6px}.empty__chip{border:1px solid var(--border);background:var(--panel-2);color:var(--text);border-radius:8px;padding:8px 10px;font-size:12px;cursor:pointer;text-align:left}.empty__chip:hover{border-color:var(--accent)}.msg{font-size:13px;line-height:1.5;padding:10px 12px;border-radius:10px;white-space:pre-wrap;word-break:break-word}.msg--user{background:var(--user-bubble);align-self:flex-end;max-width:90%}.msg--assistant{background:var(--assistant-bubble);border:1px solid var(--border)}.msg--assistant,.msg--error{align-self:flex-start;max-width:95%}.msg--error{background:rgba(248,113,113,.1);border:1px solid rgba(248,113,113,.35);color:var(--danger)}.msg__files{margin-top:6px;font-size:11px;color:var(--muted);font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.thinking{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:13px;align-self:flex-start}.dot{width:6px;height:6px;border-radius:50%;background:var(--accent);animation:pulse 1.2s ease-in-out infinite}.dot:nth-child(2){animation-delay:.2s}.dot:nth-child(3){animation-delay:.4s}@keyframes pulse{0%,to{opacity:.3;transform:scale(.8)}50%{opacity:1;transform:scale(1)}}.composer{border-top:1px solid var(--border);padding:12px}.composer__box{display:flex;gap:8px;align-items:flex-end}.composer textarea{flex:1 1;resize:none;background:var(--panel-2);border:1px solid var(--border);border-radius:10px;color:var(--text);padding:10px 12px;font:inherit;font-size:13px;line-height:1.4;max-height:160px;outline:none}.composer textarea:focus{border-color:var(--accent)}.composer button{background:var(--accent);color:white;border:none;border-radius:10px;padding:10px 14px;font-size:13px;font-weight:600;cursor:pointer;height:40px}.composer button:hover:not(:disabled){background:var(--accent-hover)}.composer button:disabled{opacity:.5;cursor:not-allowed}.preview{display:flex;flex-direction:column;min-width:0;background:var(--panel-2)}.preview__bar{height:42px;border-bottom:1px solid var(--border);display:flex;align-items:center;gap:10px;padding:0 14px;font-size:12px;color:var(--muted)}.preview__url{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.preview__frame{flex:1 1;border:none;width:100%;background:white}.preview__placeholder{flex:1 1;display:grid;place-items:center;color:var(--muted);font-size:13px;text-align:center;padding:24px}.spinner{width:18px;height:18px;border:2px solid var(--border);border-top-color:var(--accent);border-radius:50%;animation:spin .8s linear infinite;display:inline-block;vertical-align:middle;margin-right:8px}@keyframes spin{to{transform:rotate(1turn)}}.chat__back{color:var(--muted);text-decoration:none;font-size:18px;line-height:1;padding:2px 6px;border-radius:6px}.chat__back:hover{background:var(--panel-2);color:var(--text)}.auth{min-height:100vh;display:grid;place-items:center;padding:24px}.auth__card{width:100%;max-width:360px;background:var(--panel);border:1px solid var(--border);border-radius:14px;padding:28px}.auth__brand{display:flex;align-items:center;gap:10px;font-weight:600;font-size:16px}.auth__logo{width:24px;height:24px;border-radius:7px;background:linear-gradient(135deg,var(--accent),#8b5cf6)}.auth__sub{color:var(--muted);font-size:13px;margin:10px 0 20px}.auth__form{display:flex;flex-direction:column;gap:10px}.auth__form input{background:var(--panel-2);border:1px solid var(--border);border-radius:9px;color:var(--text);padding:10px 12px;font-size:14px;outline:none}.auth__form input:focus{border-color:var(--accent)}.auth__primary{background:var(--accent);color:#fff;border:none;border-radius:9px;padding:10px;font-weight:600;font-size:14px;cursor:pointer;margin-top:4px}.auth__primary:hover{background:var(--accent-hover)}.auth__secondary{background:transparent;color:var(--muted);border:1px solid var(--border);border-radius:9px;padding:10px;font-size:13px;cursor:pointer}.auth__secondary:hover{color:var(--text);border-color:var(--accent)}.auth__error,.auth__notice{font-size:12px;border-radius:8px;padding:8px 10px;margin-bottom:12px}.auth__error{background:rgba(248,113,113,.1);border:1px solid rgba(248,113,113,.35);color:var(--danger)}.auth__notice{background:rgba(99,102,241,.1);border:1px solid rgba(99,102,241,.35);color:#a5b4fc}.dash{min-height:100vh}.dash__header{height:56px;border-bottom:1px solid var(--border);justify-content:space-between;padding:0 20px}.dash__brand,.dash__header{display:flex;align-items:center}.dash__brand{gap:10px;font-weight:600}.dash__logo{width:22px;height:22px;border-radius:6px;background:linear-gradient(135deg,var(--accent),#8b5cf6)}.dash__meta{gap:16px;font-size:12px;color:var(--muted)}.dash__meta,.dash__usage{display:flex;align-items:center}.dash__usage{gap:8px}.dash__bar{display:inline-block;width:80px;height:5px;border-radius:3px;background:var(--border);overflow:hidden}.dash__bar>span{display:block;height:100%;background:var(--accent)}.badge{text-transform:uppercase;letter-spacing:.04em;font-size:10px;font-weight:700;padding:3px 8px;border-radius:999px}.badge--free{background:var(--panel-2);border:1px solid var(--border);color:var(--muted)}.badge--pro{background:rgba(99,102,241,.15);border:1px solid var(--accent);color:#a5b4fc}.link-btn{background:none;border:none;color:var(--muted);cursor:pointer;font-size:12px}.link-btn:hover{color:var(--text)}.dash__main{max-width:960px;margin:0 auto;padding:28px 20px}.dash__error{background:rgba(248,113,113,.1);border:1px solid rgba(248,113,113,.35);color:var(--danger);border-radius:8px;padding:8px 12px;font-size:13px;margin-bottom:16px}.dash__create{display:flex;gap:10px;margin-bottom:24px}.dash__create input{flex:1 1;background:var(--panel);border:1px solid var(--border);border-radius:9px;color:var(--text);padding:10px 14px;font-size:14px;outline:none}.dash__create input:focus{border-color:var(--accent)}.dash__create button{background:var(--accent);color:#fff;border:none;border-radius:9px;padding:0 16px;font-weight:600;font-size:13px;cursor:pointer}.dash__create button:hover{background:var(--accent-hover)}.dash__empty{color:var(--muted);font-size:13px;text-align:center;padding:48px;border:1px dashed var(--border);border-radius:12px}.dash__grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));grid-gap:16px;gap:16px}.card-proj{position:relative;background:var(--panel);border:1px solid var(--border);border-radius:12px;overflow:hidden}.card-proj:hover{border-color:var(--accent)}.card-proj__main{display:block;padding:16px;text-decoration:none;color:var(--text)}.card-proj__thumb{width:100%;height:96px;border-radius:8px;background:linear-gradient(135deg,#1e293b,#0f1a2e);display:grid;place-items:center;font-size:32px;font-weight:700;color:var(--accent);margin-bottom:12px}.card-proj__name{font-size:14px;font-weight:600}.card-proj__date{font-size:11px;color:var(--muted);margin-top:2px}.card-proj__del{position:absolute;top:8px;right:8px}.card-proj__del button{width:24px;height:24px;border-radius:6px;border:none;background:rgba(0,0,0,.4);color:var(--muted);font-size:16px;line-height:1;cursor:pointer}.card-proj__del button:hover{background:rgba(248,113,113,.25);color:var(--danger)}.msg__heal{margin-top:6px;font-size:11px;color:#86efac;opacity:.85}.chat__history-btn{margin-left:auto;font-size:11px;color:var(--muted);background:transparent;border:1px solid var(--border);padding:4px 10px;border-radius:999px;cursor:pointer;transition:border-color .15s,color .15s}.chat__history-btn:hover{color:var(--text);border-color:var(--accent)}.history{background:var(--panel-2);max-height:44%;flex-direction:column}.history,.history__head{border-bottom:1px solid var(--border);display:flex}.history__head{align-items:center;justify-content:space-between;padding:10px 16px;font-size:12px;font-weight:600;color:var(--muted)}.history__close{background:transparent;border:none;color:var(--muted);cursor:pointer;font-size:13px;line-height:1}.history__close:hover{color:var(--text)}.history__list{overflow-y:auto;padding:6px}.history__empty{padding:16px;font-size:12px;color:var(--muted);text-align:center}.history__item{display:flex;align-items:center;gap:10px;padding:9px 10px;border-radius:8px}.history__item:hover{background:rgba(255,255,255,.03)}.history__item--current{background:rgba(99,102,241,.08)}.history__meta{min-width:0;flex:1 1}.history__summary{font-size:12.5px;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.history__time{margin-top:2px;font-size:11px;color:var(--muted);display:flex;align-items:center;gap:6px}.history__badge{font-size:10px;color:var(--accent);border:1px solid var(--accent);border-radius:999px;padding:0 6px;opacity:.9}.history__restore{flex-shrink:0;font-size:11px;color:var(--text);background:var(--panel);border:1px solid var(--border);padding:4px 10px;border-radius:6px;cursor:pointer;transition:border-color .15s,background .15s}.history__restore:hover:not(:disabled){border-color:var(--accent);background:var(--assistant-bubble)}.history__restore:disabled{opacity:.5;cursor:default}.chat__publish-btn{font-size:11px;font-weight:600;color:#fff;background:var(--accent);border:1px solid var(--accent);padding:4px 12px;border-radius:999px;cursor:pointer;transition:background .15s}.chat__publish-btn:hover{background:var(--accent-hover)}.chat__publish-btn--live{background:transparent;color:#4ade80;border-color:rgba(74,222,128,.5)}.chat__publish-btn--live:hover{background:rgba(74,222,128,.1)}.publish__top{padding:12px 16px;border-bottom:1px solid var(--border);display:flex;flex-direction:column;gap:10px}.publish__liverow{display:flex;align-items:center;gap:8px;min-width:0}.publish__dot{width:8px;height:8px;border-radius:50%;background:#4ade80;box-shadow:0 0 8px rgba(74,222,128,.7);flex-shrink:0}.publish__url{font-size:13px;color:#4ade80;text-decoration:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1 1}.publish__url:hover{text-decoration:underline}.publish__copy{flex-shrink:0;font-size:11px;color:var(--muted);background:var(--panel);border:1px solid var(--border);padding:3px 9px;border-radius:6px;cursor:pointer}.publish__copy:hover{color:var(--text);border-color:var(--accent)}.publish__actions{display:flex;gap:8px}.publish__btn{flex:0 0 auto;font-size:12px;color:var(--text);background:var(--panel);border:1px solid var(--border);padding:8px 14px;border-radius:8px;cursor:pointer;transition:border-color .15s,background .15s}.publish__btn:hover:not(:disabled){border-color:var(--accent)}.publish__btn:disabled{opacity:.6;cursor:default}.publish__btn--primary{color:#fff;background:var(--accent);border-color:var(--accent)}.publish__btn--primary:hover:not(:disabled){background:var(--accent-hover)}.publish__btn--wide{flex:1 1;text-align:center}.publish__status{font-size:10px;text-transform:uppercase;letter-spacing:.03em;border-radius:999px;padding:1px 7px;border:1px solid var(--border)}.publish__status--live{color:#4ade80;border-color:rgba(74,222,128,.5)}.publish__status--failed{color:var(--danger);border-color:rgba(248,113,113,.5)}.publish__status--building,.publish__status--queued{color:#fbbf24;border-color:rgba(251,191,36,.5)}.publish__status--superseded{color:var(--muted)}.publish__loglink{font-size:11px;color:var(--danger);background:none;border:none;cursor:pointer;text-decoration:underline;padding:0}.publish__log{margin:0 10px 8px;padding:10px;background:#0a0e17;border:1px solid var(--border);border-radius:8px;font-size:11px;line-height:1.5;color:#fca5a5;max-height:220px;overflow:auto;white-space:pre-wrap;word-break:break-word}.publish__warn{font-size:12px;line-height:1.5;color:#fcd34d;background:rgba(251,191,36,.08);border:1px solid rgba(251,191,36,.3);border-radius:8px;padding:9px 11px}.publish__warn strong{color:#fde68a}.publish__addr{display:flex;flex-direction:column;gap:5px}.publish__url--muted{color:var(--muted)}.publish__slugedit{display:flex;align-items:center;gap:6px}.publish__sluginput{flex:1 1;min-width:0;font-size:13px;color:var(--text);background:var(--panel-2);border:1px solid var(--accent);border-radius:6px;padding:5px 9px;outline:none}.publish__suffix{font-size:13px;color:var(--muted);flex-shrink:0}.publish__slugerr{font-size:11px;color:var(--danger)}.publish__hint{font-size:11px;color:var(--muted)}