:root{color-scheme:dark;--color-paper: #181818;--color-panel: #202020;--color-surface: #292929;--color-hover: #353535;--color-ink: #f2f2f2;--color-body: #d0d0d0;--color-muted: #aaa;--color-subtle: #999;--color-rule: #363636;--color-rule-strong: #505050;--color-accent: #8aafff;--color-accent-hover: #a6c2ff;--color-accent-soft: #26334e;--color-accent-ink: #101b30;--color-focus: #9bbaff;--color-error: #ffacac;--color-error-paper: #382326;--color-success: #a1d7b3;--color-success-dot: #83c89a;--color-graphite: #151515;--color-code-ink: #e3e3e3;--color-code-muted: #aaa;--color-backdrop: rgb(0 0 0 / .6);--color-shadow: rgb(0 0 0 / .35);--color-clear: oklch(100% 0 0 / 0);--font-display: "Space Grotesk", sans-serif;--font-body: "Inter", sans-serif;--font-mono: "JetBrains Mono", monospace;--space-xs: 4px;--space-sm: 8px;--space-md: 12px;--space-lg: 16px;--space-xl: 24px;--space-2xl: 32px;--space-gutter: 20px;--space-dialog: 28px;--space-section-sm: 40px;--space-touch: 44px;--space-section-md: 56px;--space-section-lg: 60px;--space-hero: 72px;--space-3xl: 48px;--space-4xl: 64px;--space-5xl: 80px;--text-xs: .6875rem;--text-sm: .75rem;--text-base: .8125rem;--text-md: .9375rem;--text-lg: 1.125rem;--text-xl: 1.5rem;--text-display: clamp(2.6rem, 4.4vw, 4.4rem);--radius-sm: 4px;--radius-md: 6px;--radius-lg: 10px;--radius-xl: 14px;--radius-round: 999px;--rule-width: 1px;--ease-out: cubic-bezier(.16, 1, .3, 1);--ease-in: cubic-bezier(.7, 0, .84, 0);--ease-in-out: cubic-bezier(.65, 0, .35, 1);--dur-micro: .12s;--dur-short: .22s;--dur-long: .3s}*{box-sizing:border-box}html,body{margin:0;min-width:320px;overflow-x:clip}body{background:var(--color-paper);color:var(--color-ink);font-family:var(--font-body);font-size:var(--text-base);-webkit-font-smoothing:antialiased}button,input,textarea,select{font:inherit}button,a{-webkit-tap-highlight-color:var(--color-clear)}button{cursor:pointer;color:inherit;background:none;border:0;white-space:nowrap}button{transition:transform var(--dur-micro) var(--ease-out)}button:active:not(:disabled){transform:translateY(1px)}button:disabled{cursor:not-allowed;opacity:.48}button[data-state=loading]{cursor:wait}button[data-state=success]{color:var(--color-success)}button[data-state=error]{color:var(--color-error);border-color:var(--color-error)}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid var(--color-focus);outline-offset:3px}input,textarea,select{color:var(--color-ink);background:var(--color-surface);border:1px solid var(--color-rule);border-radius:var(--radius-md)}input:hover,textarea:hover,select:hover{background:var(--color-paper)}input:disabled,textarea:disabled,select:disabled{opacity:.55;cursor:not-allowed}input[aria-invalid=true],textarea[aria-invalid=true]{border-color:var(--color-error)}input[data-state=success],textarea[data-state=success],select[data-state=success]{border-color:var(--color-success)}input[data-state=loading],textarea[data-state=loading],select[data-state=loading]{cursor:wait}input::placeholder,textarea::placeholder{color:var(--color-subtle)}a{color:var(--color-accent);text-underline-offset:4px}h1,h2,h3,p{margin:0}h1,h2,h3{font-family:var(--font-display);font-style:normal;min-width:0;overflow-wrap:anywhere}svg{flex-shrink:0}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:calc(-1 * var(--space-xs));overflow:clip;clip-path:inset(50%);white-space:nowrap;border:0}.skip-link{position:fixed;top:8px;left:8px;padding:var(--space-md);z-index:100;background:var(--color-surface);transform:translateY(-200%)}.skip-link:focus{transform:none}.app-shell{min-height:100dvh}.workspace-main{min-width:0}.is-editor{height:100dvh;min-height:0}.is-editor .workspace-main{display:flex;flex-direction:column;height:100dvh;min-height:0}.is-editor .topbar,.is-editor .error-banner{flex-shrink:0}.sidebar{position:fixed;inset:0 auto 0 0;z-index:40;width:232px;display:flex;flex-direction:column;background:var(--color-panel);border-right:1px solid var(--color-rule);padding:var(--space-dialog) var(--space-lg) 0;transform:translate(-100%);transition:transform var(--dur-short) var(--ease-out)}.sidebar.open{transform:none}.sidebar-backdrop{position:fixed;inset:0;z-index:35;background:var(--color-backdrop)}.wordmark{display:flex;align-items:center;gap:var(--space-sm);padding:0 var(--space-xs);font-family:var(--font-display);font-size:20px;font-weight:650;letter-spacing:-.8px;text-align:left}.wordmark-domain{font-weight:450;color:var(--color-muted)}.brand-symbol{width:31px;height:31px;display:grid;place-items:center;background:var(--color-accent);color:var(--color-accent-ink);border-radius:8px}.workspace-label{display:flex;align-items:center;gap:var(--space-sm);font-size:10px;color:var(--color-muted);margin:var(--space-2xl) var(--space-xs) var(--space-gutter);white-space:nowrap}.workspace-icon{color:var(--color-body)}.local-badge{margin-left:auto;font-size:7px;font-family:var(--font-mono);letter-spacing:.3px;color:var(--color-muted);border:1px solid var(--color-rule);padding:var(--space-xs) var(--space-xs);border-radius:3px}.new-project{min-height:43px;width:100%;display:flex;align-items:center;gap:var(--space-sm);background:var(--color-surface);color:var(--color-ink);border:1px solid var(--color-rule-strong);border-radius:var(--radius-md);padding:0 var(--space-md);font-weight:550;font-size:12px}.new-project>span{margin-left:auto;color:var(--color-muted);font-size:16px}.main-nav{display:flex;flex-direction:column;gap:var(--space-xs);margin:var(--space-gutter) 0 var(--space-xl)}.main-nav>button{display:flex;align-items:center;gap:var(--space-md);width:100%;padding:var(--space-md) var(--space-sm);color:var(--color-muted);font-size:12px;text-align:left;border-radius:var(--radius-md)}.main-nav>button.active{color:var(--color-accent);background:var(--color-accent-soft);font-weight:550}.count-badge{margin-left:auto;font-size:10px;color:var(--color-muted);font-variant-numeric:tabular-nums}.sidebar-projects{min-height:80px;overflow-y:auto}.sidebar-section-title{display:flex;align-items:center;justify-content:space-between;padding:0 var(--space-sm);color:var(--color-muted);font-family:var(--font-mono);font-size:8px;letter-spacing:.7px}.small-icon{display:grid;place-items:center;min-width:28px;min-height:28px;color:var(--color-muted)}.sidebar-empty{display:flex;flex-direction:column;gap:var(--space-xs);padding:var(--space-md) var(--space-sm);font-size:10px;color:var(--color-muted);line-height:1.5}.project-link{display:flex;align-items:center;gap:var(--space-sm);text-align:left;width:100%;min-height:36px;padding:var(--space-sm);border-radius:var(--radius-md);font-size:11px;color:var(--color-body)}.project-link>span:last-child{overflow:clip;text-overflow:ellipsis}.project-link.active{background:var(--color-hover);color:var(--color-ink)}.project-dot{width:5px;height:5px;border-radius:var(--radius-round);background:var(--color-rule-strong);flex-shrink:0}.project-link.active .project-dot{background:var(--color-accent)}.sidebar-bottom{margin-top:auto;padding-top:var(--space-dialog)}.command-trigger{display:flex;align-items:center;gap:var(--space-sm);min-height:37px;padding:var(--space-sm) var(--space-sm);width:100%;color:var(--color-muted);border:1px solid var(--color-rule);border-radius:var(--radius-md);background:var(--color-paper);font-size:10px}kbd{font-family:var(--font-mono);font-weight:400}.command-trigger kbd{margin-left:auto;font-size:9px}.runtime-summary{margin-top:var(--space-lg);padding:var(--space-lg) var(--space-xs) var(--space-lg);border-top:1px solid var(--color-rule)}.runtime-summary>div{display:flex;align-items:center;gap:var(--space-sm)}.status-dot{width:5px;height:5px;border-radius:var(--radius-round);display:inline-block;background:var(--color-success-dot);flex-shrink:0}.runtime-summary strong{font-size:10px;font-weight:550}.runtime-summary p{font-size:9px;color:var(--color-muted);margin:var(--space-sm) 0 var(--space-sm) var(--space-md);line-height:1.5}.runtime-summary button{color:var(--color-muted);display:flex;align-items:center;gap:var(--space-xs);margin-left:var(--space-md);padding:0;font-size:9px;min-height:22px}.settings-link{display:flex;align-items:center;gap:var(--space-sm);font-size:10px;color:var(--color-body);padding:var(--space-md) var(--space-xs);border-top:1px solid var(--color-rule);width:100%}.settings-link>svg:last-child{margin-left:auto}.sidebar-credit{display:flex;justify-content:space-between;font-size:8px;color:var(--color-muted);margin:var(--space-sm) calc(-1 * var(--space-lg)) 0;padding:var(--space-md) var(--space-lg);border-top:1px solid var(--color-rule)}.topbar{min-height:65px;padding:var(--space-md) var(--space-gutter);border-bottom:1px solid var(--color-rule);display:flex;align-items:center;justify-content:space-between;gap:var(--space-md)}.breadcrumb{display:flex;align-items:center;min-width:0;gap:var(--space-sm);font-size:11px;color:var(--color-muted)}.breadcrumb strong{color:var(--color-body);font-size:11px;font-weight:450;white-space:nowrap}.breadcrumb-divider{color:var(--color-rule-strong)}.desktop-breadcrumb,.breadcrumb-divider{display:none}.topbar-actions{display:flex;align-items:center;gap:var(--space-xl);flex-shrink:0}.button{display:inline-flex;align-items:center;justify-content:center;min-height:36px;gap:var(--space-sm);border:1px solid var(--color-rule);padding:var(--space-sm) var(--space-md);border-radius:var(--radius-md);font-weight:500;font-size:11px}.primary{background:var(--color-accent);color:var(--color-accent-ink);border-color:var(--color-accent)}.secondary,.connect-button{background:var(--color-surface);color:var(--color-body)}.text-button{display:inline-flex;align-items:center;gap:var(--space-xs);font-size:10px;color:var(--color-muted);min-height:32px;padding:0}.guide-trigger{display:none}.icon-button{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:var(--radius-sm);padding:0;flex-shrink:0;color:var(--color-muted)}.icon-button.selected{color:var(--color-ink);background:var(--color-hover)}.home-main{max-width:1250px;margin:0 auto;padding:0 var(--space-xl)}.home-hero{padding-top:var(--space-3xl)}.hero-title-row{display:flex;justify-content:space-between;align-items:center;gap:var(--space-xl)}.home-hero h1{font-size:var(--text-display);line-height:1.07;letter-spacing:-.055em;font-weight:500}.home-hero h1>span{color:var(--color-accent)}.ownership-note{display:none}.hero-description{color:var(--color-muted);font-size:12px;line-height:1.8;margin:var(--space-gutter) 0 var(--space-xl)}.composer{background:var(--color-surface);color:var(--color-ink);border:1px solid var(--color-rule-strong);border-radius:var(--radius-lg);padding:var(--space-lg)}.composer:focus-within{border-color:var(--color-accent)}.composer textarea{display:block;width:100%;min-height:86px;max-height:250px;resize:vertical;padding:0;background:var(--color-clear);border:0;border-radius:0;font-size:14px;line-height:1.6}.composer textarea:focus-visible{outline-offset:5px;border-radius:2px}.composer textarea::placeholder{color:var(--color-subtle)}.composer-bottom{display:flex;align-items:center;justify-content:space-between;gap:var(--space-sm);padding-top:var(--space-md)}.model-button{display:flex;align-items:center;gap:var(--space-sm);padding:var(--space-xs) var(--space-xs);border:1px solid var(--color-rule);border-radius:var(--radius-sm);color:var(--color-body);font-size:10px;min-height:30px;max-width:65%}.model-button>span:nth-child(2){display:flex;align-items:center;gap:var(--space-xs);min-width:0}.model-button small{font-size:9px;color:var(--color-muted);text-overflow:ellipsis;overflow:clip;max-width:118px}.model-symbol{color:var(--color-body);font-family:var(--font-display);font-size:12px;font-weight:650}.model-symbol>span{display:none}.composer-actions{display:flex;align-items:center;gap:var(--space-md)}.runtime-button{display:none;align-items:center;gap:var(--space-xs);padding:var(--space-xs) 0;color:var(--color-muted);font-size:9px}.send-button{display:grid;place-items:center;width:32px;height:32px;border-radius:var(--radius-md);background:var(--color-accent);color:var(--color-accent-ink)}.send-button:disabled{background:var(--color-hover);color:var(--color-subtle);opacity:1}.stop-button{background:var(--color-ink);color:var(--color-paper)}.prompt-meta{display:flex;justify-content:space-between;gap:var(--space-md);margin-top:var(--space-md);color:var(--color-muted);font-size:9px}.prompt-meta>span{display:inline-flex;align-items:center;gap:var(--space-xs)}.prompt-meta>span:last-child{display:none}.suggestions{display:flex;align-items:center;gap:var(--space-sm);flex-wrap:wrap;margin-top:var(--space-xl)}.suggestions>span{width:100%;font-size:9px;color:var(--color-muted);margin-bottom:var(--space-xs)}.suggestions>button{display:flex;align-items:center;gap:var(--space-xs);min-height:30px;border:1px solid var(--color-rule);border-radius:var(--radius-sm);padding:var(--space-xs) var(--space-sm);font-size:9px;color:var(--color-muted)}.template-section{margin-top:var(--space-section-md);scroll-margin-top:var(--space-xl)}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:var(--space-lg);margin-bottom:var(--space-gutter)}.section-heading h2{font-size:19px;font-weight:500;letter-spacing:-.7px}.section-heading p{font-size:10px;color:var(--color-muted);margin-top:var(--space-sm)}.section-aside{display:none;align-items:center;gap:var(--space-sm);font-size:8px;font-family:var(--font-mono);color:var(--color-muted);letter-spacing:.7px}.template-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--space-xl)}.template-card{display:block;padding:0;width:100%;text-align:left;min-width:0}.template-image{position:relative;aspect-ratio:1.52;border:1px solid var(--color-rule);border-radius:var(--radius-md);overflow:clip;background:var(--color-panel)}.template-image iframe,.project-thumbnail iframe{position:absolute;top:0;left:0;border:0;width:300%;height:300%;transform:scale(.333333);transform-origin:top left;pointer-events:none}.template-open{position:absolute;bottom:12px;right:12px;display:grid;place-items:center;width:30px;height:30px;background:var(--color-surface);color:var(--color-body);border:1px solid var(--color-rule);border-radius:var(--radius-md);opacity:0}.template-card:focus-visible .template-open{opacity:1}.template-details{display:flex;align-items:center;justify-content:space-between;padding-top:var(--space-md);gap:var(--space-sm)}.template-details>div{display:flex;flex-direction:column;gap:var(--space-xs)}.template-details h3{font-family:var(--font-body);font-size:12px;font-weight:550;letter-spacing:-.2px}.template-details span{font-size:10px;color:var(--color-muted)}.template-details>svg{color:var(--color-muted)}.home-footer{margin-top:var(--space-3xl);border-top:1px solid var(--color-rule);padding:var(--space-gutter) 0 var(--space-xl);display:flex;align-items:center;flex-wrap:wrap;justify-content:space-between;gap:var(--space-sm);color:var(--color-muted);font-size:9px}.home-footer>span,.home-footer>button{display:flex;align-items:center;gap:var(--space-sm)}.home-footer>button{padding:0;font-size:9px;min-height:26px}.recent-section{margin-top:var(--space-section-sm)}.recent-list{border-top:1px solid var(--color-rule)}.recent-row{min-height:65px;width:100%;padding:var(--space-sm) 0;border-bottom:1px solid var(--color-rule);display:flex;align-items:center;gap:var(--space-md);text-align:left}.recent-icon{width:36px;height:36px;background:var(--color-panel);border:1px solid var(--color-rule);border-radius:var(--radius-md);display:grid;place-items:center;color:var(--color-muted)}.recent-row>span:nth-child(2){min-width:0;display:flex;flex-direction:column;gap:var(--space-xs)}.recent-row strong{font-size:11px;font-weight:500;max-width:50vw;overflow:clip;text-overflow:ellipsis}.recent-row small{font-size:9px;color:var(--color-muted)}.recent-row>svg{margin-left:auto;color:var(--color-muted)}.error-banner{display:flex;justify-content:space-between;align-items:center;gap:var(--space-md);background:var(--color-error-paper);color:var(--color-error);padding:var(--space-sm) var(--space-gutter);border-bottom:1px solid var(--color-rule);font-size:11px;line-height:1.6}.error-banner .icon-button{color:var(--color-error)}.projects-page{padding:var(--space-3xl) 0}.projects-title{display:flex;justify-content:space-between;align-items:start;gap:var(--space-lg);flex-wrap:wrap;margin-bottom:var(--space-dialog)}.projects-title h1{font-size:37px;font-weight:500;letter-spacing:-1.8px}.projects-title p{font-size:11px;color:var(--color-muted);margin-top:var(--space-md);line-height:1.7}.project-search{display:flex;align-items:center;gap:var(--space-sm);color:var(--color-muted);margin-bottom:var(--space-dialog);max-width:350px}.project-search input{width:100%;height:40px;background:var(--color-surface);padding:var(--space-sm);font-size:12px}.project-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--space-xl)}.project-thumbnail{position:relative;display:block;width:100%;aspect-ratio:1.6;overflow:clip;background:var(--color-panel);padding:0;border:1px solid var(--color-rule);border-radius:var(--radius-md)}.saved-project{min-width:0}.saved-project-info{display:flex;justify-content:space-between;gap:var(--space-sm);padding:var(--space-sm) 0}.saved-project-info>button:first-child{display:flex;flex-direction:column;align-items:start;min-width:0;max-width:85%;gap:var(--space-xs);text-align:left;padding:0}.saved-project-info strong{font-size:12px;font-weight:500;overflow:clip;text-overflow:ellipsis;max-width:100%}.saved-project-info small{font-size:10px;color:var(--color-muted)}.delete-project{opacity:.75}.empty-state{display:flex;align-items:center;flex-direction:column;padding:var(--space-hero) var(--space-lg);text-align:center;color:var(--color-muted)}.empty-state h2{font-size:23px;font-weight:500;letter-spacing:-.7px;color:var(--color-ink);margin:var(--space-gutter) 0 var(--space-md)}.empty-state p{font-size:12px;line-height:1.7}.empty-state .button{margin-top:var(--space-gutter)}.project-name{width:clamp(100px,18vw,220px);min-width:0;font-size:12px;font-weight:500;text-overflow:ellipsis;background:var(--color-clear);border-color:var(--color-clear);padding:var(--space-xs)}.save-status{display:none;align-items:center;gap:var(--space-xs);font-size:9px;color:var(--color-muted)}.export-trigger{padding:var(--space-sm) var(--space-sm)}.editor-main{min-width:0;min-height:0;flex:1;display:flex;flex-direction:column}.mobile-editor-switch{display:flex;flex-shrink:0;padding:var(--space-sm) var(--space-lg);gap:var(--space-sm);border-bottom:1px solid var(--color-rule)}.mobile-editor-switch>button{display:flex;gap:var(--space-xs);align-items:center;font-size:11px;min-height:34px;padding:var(--space-xs) var(--space-md);color:var(--color-muted);border-radius:var(--radius-md)}.mobile-editor-switch>button.active{color:var(--color-accent);background:var(--color-accent-soft)}.builder-layout{display:grid;grid-template-columns:minmax(0,1fr);min-height:0;flex:1}.chat-panel{display:flex;flex-direction:column;min-width:0;min-height:0;height:100%;border-right:1px solid var(--color-rule);background:var(--color-paper)}.pane-preview .chat-panel,.pane-chat .preview-panel{display:none}.chat-heading{display:flex;align-items:center;gap:var(--space-sm);padding:var(--space-lg) var(--space-gutter);border-bottom:1px solid var(--color-rule);min-height:58px}.chat-heading strong{font-size:11px;font-weight:500}.agent-mark{width:24px;height:24px;display:grid;place-items:center;border:1px solid var(--color-rule);color:var(--color-accent);border-radius:var(--radius-md);background:var(--color-surface)}.chat-heading>.status-dot{margin-left:auto}.messages{flex:1;overflow-y:auto;overscroll-behavior:contain;padding:var(--space-xl) var(--space-gutter)}.message{margin-bottom:var(--space-dialog)}.message-author{display:flex;align-items:center;gap:var(--space-sm);font-size:10px;font-weight:550;margin-bottom:var(--space-sm);color:var(--color-body)}.message-author>svg{color:var(--color-accent)}.you-mark{width:18px;height:18px;background:var(--color-hover);color:var(--color-body);display:grid;place-items:center;border-radius:4px;font-size:9px}.message p{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.85;font-size:11px;color:var(--color-body)}.message.user p{padding:var(--space-md);border:1px solid var(--color-rule);background:var(--color-surface);border-radius:var(--radius-md)}.message-complete{display:inline-flex;align-items:center;gap:var(--space-xs);font-size:9px;margin-top:var(--space-md);color:var(--color-success)}.build-progress{display:flex;align-items:start;gap:var(--space-sm);padding:var(--space-sm) 0 var(--space-gutter);color:var(--color-accent)}.build-progress strong,.build-progress span{display:block;font-size:10px;font-weight:500}.build-progress span{color:var(--color-muted);margin-top:var(--space-sm);font-size:9px;line-height:1.6}.chat-compose{padding:var(--space-md);margin-top:auto}.compact{padding:var(--space-md)}.compact textarea{min-height:72px;font-size:11px}.compact .model-button{font-size:9px;max-width:79%;gap:var(--space-xs);border-color:var(--color-clear);padding:var(--space-xs) 0}.compact .model-button small{max-width:100px;font-size:8px}.compact .composer-bottom{padding-top:var(--space-xs)}.compact .send-button{width:28px;height:28px}.chat-compose>p{display:flex;justify-content:center;align-items:center;gap:var(--space-xs);font-size:8px;color:var(--color-muted);margin-top:var(--space-sm)}.preview-panel{display:flex;flex-direction:column;min-width:0;min-height:0;height:100%;background:var(--color-panel)}.preview-toolbar{display:flex;align-items:center;justify-content:space-between;min-height:52px;gap:var(--space-sm);padding:var(--space-sm) var(--space-md);background:var(--color-paper);border-bottom:1px solid var(--color-rule)}.editor-tabs{display:flex;gap:var(--space-xs)}.editor-tabs>button{display:flex;align-items:center;gap:var(--space-xs);font-size:10px;color:var(--color-muted);padding:var(--space-sm);border-radius:var(--radius-sm)}.editor-tabs>button.active{background:var(--color-hover);color:var(--color-ink)}.preview-tools{display:flex;align-items:center;gap:var(--space-xs)}.preview-tools .icon-button{width:28px;height:28px}.toolbar-divider{display:block;width:1px;height:15px;background:var(--color-rule);margin:0 var(--space-xs)}.preview-canvas{flex:1;min-height:0;padding:var(--space-md);display:flex;justify-content:center;background:var(--color-panel);color:var(--color-ink)}.preview-canvas iframe{display:block;border:1px solid var(--color-rule);border-radius:var(--radius-sm);width:100%;height:100%;background:var(--color-surface)}.preview-canvas.mobile iframe{width:min(390px,100%)}.preview-footer{display:flex;align-items:center;justify-content:space-between;gap:var(--space-sm);padding:var(--space-sm) var(--space-md);min-height:31px;border-top:1px solid var(--color-rule);background:var(--color-paper);color:var(--color-muted);font-size:8px}.preview-footer>span{display:flex;align-items:center;gap:var(--space-xs)}.preview-footer .status-dot{width:4px;height:4px}.preview-empty{width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:var(--space-section-sm) var(--space-lg);text-align:center}.preview-empty-icon{display:grid;place-items:center;width:68px;height:68px;border:1px solid var(--color-rule-strong);border-radius:var(--radius-lg);color:var(--color-muted);margin-bottom:var(--space-xl)}.preview-empty h2{font-size:23px;font-weight:450;letter-spacing:-.6px}.preview-empty p{font-size:11px;color:var(--color-muted);max-width:36ch;line-height:1.8;margin-top:var(--space-md)}.preview-empty .button{margin-top:var(--space-gutter)}.code-workspace{display:flex;flex-direction:column;flex:1;min-height:0;background:var(--color-graphite);color:var(--color-code-ink)}.file-toolbar{display:flex;align-items:center;justify-content:space-between;gap:var(--space-sm);padding:var(--space-sm) var(--space-md);background:var(--color-paper);color:var(--color-body);border-bottom:1px solid var(--color-rule)}.file-toolbar>label{display:flex;align-items:center;min-width:0;gap:var(--space-xs)}.file-toolbar select{font-size:10px;padding:var(--space-sm) var(--space-xs);background:var(--color-clear);border-color:var(--color-clear);max-width:125px}.file-toolbar>div{display:flex;align-items:center;gap:var(--space-xs)}.file-toolbar .button{font-size:10px;padding:var(--space-sm) var(--space-sm);min-height:32px}.code-editor{flex:1;width:100%;min-height:200px;border:0;border-radius:0;resize:none;padding:var(--space-gutter);background:var(--color-graphite);color:var(--color-code-ink);font:11px/1.85 var(--font-mono);tab-size:2;white-space:pre;overflow:auto}.code-editor:hover{background:var(--color-graphite)}.code-editor:focus-visible{outline-offset:-3px}.code-footer{display:flex;justify-content:space-between;gap:var(--space-md);padding:var(--space-sm) var(--space-md);color:var(--color-code-muted);font-family:var(--font-mono);font-size:8px}.dialog{position:fixed;inset:0;margin:auto;width:min(550px,calc(100% - 32px));height:fit-content;max-height:min(88dvh,850px);overflow-y:auto;border:1px solid var(--color-rule-strong);border-radius:var(--radius-xl);padding:var(--space-gutter);background:var(--color-paper);color:var(--color-ink);box-shadow:0 20px 70px var(--color-shadow);animation:dialog-in var(--dur-long) var(--ease-out)}.dialog::backdrop{background:var(--color-backdrop)}.dialog-heading{display:flex;justify-content:space-between;align-items:center;gap:var(--space-md)}.dialog-heading h2{font-size:23px;font-weight:500;letter-spacing:-.9px}.dialog-heading .icon-button{margin:calc(-1 * var(--space-xs)) calc(-1 * var(--space-xs)) 0 0}.dialog-intro{color:var(--color-muted);margin:var(--space-sm) 0 var(--space-xl);font-size:11px;line-height:1.7}.segmented{display:flex;border-bottom:1px solid var(--color-rule);gap:var(--space-gutter);margin:var(--space-xs) 0 var(--space-xl)}.segmented>button{display:flex;align-items:center;gap:var(--space-sm);color:var(--color-muted);padding:0 0 var(--space-md);font-size:11px;border-bottom:2px solid var(--color-clear)}.segmented>button.selected{color:var(--color-accent);border-bottom-color:var(--color-accent)}.provider-options{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--space-sm);margin-bottom:var(--space-xl)}.provider-option{display:flex;align-items:center;gap:var(--space-sm);text-align:left;padding:var(--space-md) var(--space-md);border:1px solid var(--color-rule);border-radius:var(--radius-md);background:var(--color-surface);color:var(--color-body)}.provider-option.selected,.storage-option.selected{border-color:var(--color-accent);background:var(--color-accent-soft);color:var(--color-ink)}.provider-mark{display:grid;place-items:center;width:30px;height:30px;font-family:var(--font-display);font-size:24px}.provider-option>span:nth-child(2),.storage-option>span{display:flex;flex-direction:column;gap:var(--space-xs)}.provider-option strong,.storage-option strong{font-size:11px;font-weight:550}.provider-option small,.storage-option small{font-size:9px;color:var(--color-muted)}.provider-option>svg:last-child,.storage-option>svg:last-child{margin-left:auto;color:var(--color-accent)}.field{display:flex;flex-direction:column;gap:var(--space-sm);margin-top:var(--space-gutter)}.field>span{font-size:11px;font-weight:500}.field input{width:100%;min-height:42px;padding:var(--space-md) var(--space-md);font-size:12px}.field small{font-size:10px;color:var(--color-muted);line-height:1.6}.key-field{display:flex;align-items:center;border:1px solid var(--color-rule);border-radius:var(--radius-md);background:var(--color-surface)}.key-field input{border:0;background:var(--color-clear);min-width:0}.key-field button{font-size:10px;color:var(--color-muted);padding:var(--space-sm);min-height:40px}.small-link{display:inline-flex;align-items:center;gap:var(--space-xs);font-size:10px;margin-top:var(--space-sm);text-decoration:none;min-height:25px}.check-field{display:flex;gap:var(--space-sm);align-items:start;margin:var(--space-xl) 0 var(--space-gutter)}.check-field>input{accent-color:var(--color-accent);width:15px;height:15px;margin:var(--space-xs) 0 0}.check-field>span{font-size:11px;line-height:1.5}.check-field small{display:block;font-size:9px;color:var(--color-muted);margin-top:var(--space-xs);line-height:1.6}.privacy-note{display:flex;align-items:start;gap:var(--space-sm);border-top:1px solid var(--color-rule);padding:var(--space-lg) 0 var(--space-xs);color:var(--color-muted)}.privacy-note p{font-size:10px;line-height:1.7}.settings-feedback{min-height:30px;padding-top:var(--space-md);font-size:10px;line-height:1.6}.error-text{color:var(--color-error)}.success-text{color:var(--color-success);display:flex;align-items:center;gap:var(--space-xs)}.dialog-actions{display:flex;align-items:center;justify-content:space-between;gap:var(--space-sm);margin-top:var(--space-lg)}.dialog-actions .button{min-height:39px}.storage-options{display:flex;flex-direction:column;gap:var(--space-sm)}.storage-option{display:flex;align-items:center;gap:var(--space-md);padding:var(--space-lg);border:1px solid var(--color-rule);border-radius:var(--radius-md);background:var(--color-surface);color:var(--color-body);text-align:left}.storage-explainer{padding:var(--space-xl) 0 0}.storage-explainer h3{font-size:19px;font-weight:500;letter-spacing:-.5px}.storage-explainer p,.helper{font-size:10px;line-height:1.8;color:var(--color-muted);margin-top:var(--space-md)}.command-dialog{padding:0}.command-dialog .dialog-heading{padding:var(--space-gutter) var(--space-gutter) 0}.command-dialog .dialog-heading h2{font-size:19px}.command-input{display:flex;align-items:center;gap:var(--space-sm);padding:var(--space-lg) var(--space-gutter);border-bottom:1px solid var(--color-rule);color:var(--color-muted)}.command-input input{border:0;min-width:0;width:100%;padding:var(--space-sm) 0;border-radius:0;background:var(--color-clear);font-size:12px}.command-results{padding:var(--space-sm);max-height:45dvh;overflow-y:auto}.command-results>button{min-height:43px;width:100%;display:flex;align-items:center;gap:var(--space-md);padding:var(--space-sm) var(--space-md);border-radius:var(--radius-md);font-size:12px;color:var(--color-body);text-align:left}.command-results>button.selected{background:var(--color-hover);color:var(--color-ink)}.command-results>button>span{min-width:0;overflow:clip;text-overflow:ellipsis}.command-results kbd{margin-left:auto;color:var(--color-muted)}.command-results p{padding:var(--space-gutter) var(--space-md);font-size:11px;color:var(--color-muted)}.command-footer{padding:var(--space-md) var(--space-gutter);display:flex;gap:var(--space-gutter);font-size:9px;color:var(--color-muted);border-top:1px solid var(--color-rule)}.export-options{display:flex;flex-direction:column;gap:var(--space-md)}.export-options>button{display:flex;align-items:center;gap:var(--space-lg);text-align:left;padding:var(--space-gutter) var(--space-lg);border:1px solid var(--color-rule);border-radius:var(--radius-md);background:var(--color-surface);white-space:normal}.export-options>button>span{display:flex;flex-direction:column;gap:var(--space-sm)}.export-options strong{font-size:12px;font-weight:550}.export-options small{font-size:10px;color:var(--color-muted);line-height:1.7}.export-options>button>svg:first-child{color:var(--color-accent)}.export-options>button>svg:last-child{margin-left:auto;color:var(--color-muted)}.export-helper{display:flex;align-items:center;gap:var(--space-xs);margin-top:var(--space-gutter);font-size:9px}.history-list{margin-top:var(--space-lg)}.history-list>div{display:flex;align-items:center;gap:var(--space-md);padding:var(--space-lg) 0;border-bottom:1px solid var(--color-rule)}.history-point{width:7px;height:7px;background:var(--color-accent);border-radius:var(--radius-round);flex-shrink:0}.history-list>div>span:nth-child(2){display:flex;flex-direction:column;gap:var(--space-sm);flex:1;min-width:0}.history-list strong{font-size:11px;font-weight:500;overflow-wrap:anywhere}.history-list small{font-size:9px;color:var(--color-muted)}.history-list .button{font-size:9px;padding:var(--space-sm) var(--space-sm)}.guide-content{margin-top:var(--space-gutter)}.guide-content p{font-size:12px;line-height:1.85;color:var(--color-muted);margin:var(--space-sm) 0 var(--space-lg)}.guide-content h3{font-size:18px;font-weight:500;letter-spacing:-.5px;margin-top:var(--space-dialog)}.notice{position:fixed;bottom:20px;left:16px;right:16px;z-index:60;display:flex;align-items:center;gap:var(--space-md);padding:var(--space-md) var(--space-lg);background:var(--color-ink);color:var(--color-paper);font-size:11px;line-height:1.7;border-radius:var(--radius-md);box-shadow:0 5px 30px var(--color-shadow)}.notice>span{flex:1}.notice>button{color:var(--color-paper);font-size:11px}.notice>button:not(.icon-button){text-decoration:underline;text-underline-offset:3px}.spin{animation:spin 1.5s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}@keyframes dialog-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}@media(hover:hover){.button.secondary:hover,.connect-button:hover,.new-project:hover{background:var(--color-hover)}.button.primary:hover,.send-button:not(:disabled):hover{background:var(--color-accent-hover)}.icon-button:hover,.project-link:hover,.main-nav>button:not(.active):hover{background:var(--color-hover);color:var(--color-ink)}.text-button:hover,.home-footer>button:hover,.runtime-summary button:hover{color:var(--color-accent)}.suggestions>button:hover,.model-button:hover{border-color:var(--color-rule-strong);background:var(--color-panel)}.template-card:hover .template-open{opacity:1}.template-card:hover .template-image,.project-thumbnail:hover{border-color:var(--color-rule-strong)}.command-results>button:hover,.export-options>button:hover{background:var(--color-hover)}}@media(min-width:40rem){.topbar{padding:var(--space-lg) var(--space-dialog);min-height:73px}.desktop-breadcrumb,.breadcrumb-divider{display:inline}.guide-trigger{display:inline-flex}.home-main{padding:0 var(--space-section-sm)}.home-hero{padding-top:var(--space-section-md)}.hero-description{font-size:13px}.mobile-break{display:none}.ownership-note{display:flex;gap:var(--space-md);align-items:start;margin-right:var(--space-md);padding-top:var(--space-2xl)}.ownership-icon{color:var(--color-muted);padding-top:var(--space-xs)}.ownership-note p{color:var(--color-muted);font-size:11px;line-height:1.85}.ownership-note strong{color:var(--color-body);font-weight:500}.composer{padding:var(--space-gutter)}.composer textarea{min-height:95px;font-size:15px}.runtime-button{display:flex}.prompt-meta>span:last-child{display:inline-flex}.suggestions{gap:var(--space-sm);margin-top:var(--space-xl)}.suggestions>span{width:auto;margin:0 var(--space-xs) 0 0}.suggestions>button{font-size:9px;padding:var(--space-xs) var(--space-sm)}.section-aside{display:flex}.template-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--space-lg)}.template-image{aspect-ratio:1.33}.template-details h3{font-size:11px}.template-details span{font-size:9px}.project-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.save-status{display:inline-flex}.provider-options{grid-template-columns:repeat(2,minmax(0,1fr))}.notice{left:auto;width:max-content;max-width:550px;right:24px}.mobile-editor-switch{display:none}.builder-layout{grid-template-columns:280px minmax(0,1fr)}.pane-preview .chat-panel,.pane-chat .preview-panel{display:flex}.chat-panel,.preview-panel{height:100%}.compact{padding:var(--space-md)}.compact textarea{min-height:72px;font-size:11px}.preview-canvas{padding:var(--space-lg)}}@media(min-width:64rem){.app-shell{display:grid;grid-template-columns:232px minmax(0,1fr)}.sidebar{transform:none;position:sticky;top:0;height:100dvh}.mobile-menu,.sidebar-backdrop{display:none}.home-main{padding:0 var(--space-section-md)}.topbar{padding:var(--space-lg) var(--space-dialog)}.home-hero{padding-top:var(--space-section-md)}.template-section{margin-top:var(--space-section-md)}.template-image{aspect-ratio:1.35}.project-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.builder-layout{grid-template-columns:300px minmax(0,1fr)}}@media(min-width:85rem){.home-main{padding:0 var(--space-hero)}.home-hero{padding-top:var(--space-3xl)}.home-hero h1{font-size:60px}.hero-description{margin-top:var(--space-gutter);margin-bottom:var(--space-xl);font-size:13px}.home-hero .composer{padding:var(--space-gutter)}.home-hero .composer textarea{min-height:80px}.ownership-note{margin-right:var(--space-xl)}.template-grid{gap:var(--space-gutter)}.template-image{aspect-ratio:1.5}.template-details>div{flex-direction:row;align-items:center;gap:var(--space-sm)}.template-details span{font-size:9px}.template-section,.home-footer{margin-top:var(--space-touch)}.builder-layout{grid-template-columns:325px minmax(0,1fr)}}@media(pointer:coarse){.button,.icon-button,.small-icon,.model-button,.send-button,.runtime-button,.suggestions>button,.text-button,.home-footer>button,.main-nav>button,.settings-link,.project-link,.command-trigger,.segmented>button,.editor-tabs>button,.preview-tools .icon-button,.mobile-editor-switch>button,.key-field button,.runtime-summary button{min-height:44px}.icon-button,.small-icon,.send-button,.preview-tools .icon-button{min-width:44px}.composer-bottom{align-items:end}.model-button small{max-width:75px}.file-toolbar .button{min-height:44px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}@media(pointer:coarse)and (max-width:39.999rem){.preview-tools>.icon-button[aria-label="Desktop preview"],.preview-tools>.icon-button[aria-label="Mobile preview"],.preview-tools>.toolbar-divider{display:none}}.model-picker{min-width:0;max-width:100%}.model-picker .model-button{display:flex;gap:6px;align-items:center;max-width:100%;padding:5px 9px;border:0;border-radius:20px;background:var(--color-panel);font-size:11px}.model-trigger-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:145px;text-transform:capitalize}.model-trigger-effort{color:#9cbdff;text-transform:capitalize;font-size:10px}.model-popover{position:fixed;inset:auto;margin:0;padding:12px;border:1px solid #ffffff12;border-radius:19px;background:#292929;color:#f0f0f0;box-shadow:0 8px 24px #00000024;overflow:auto;font-size:12px;color-scheme:dark}.model-popover:popover-open{animation:model-popover-in .15s ease-out}.model-popover::backdrop{background:transparent}.model-popover button{color:inherit}.model-popover button:focus-visible,.model-popover input:focus-visible{outline:2px solid #b8a5ff;outline-offset:3px}.effort-heading{display:flex;align-items:center;justify-content:space-between;color:#aaa}.effort-heading>svg{color:#929292}.effort-title{color:#9cbdff!important;font-size:14px;padding:0;font-weight:500}.popover-icon{display:grid;place-items:center;width:22px;height:22px;color:#999!important;border-radius:5px}.popover-icon:hover{background:#ffffff0c}.effort-model{display:flex;align-items:center;justify-content:center;max-width:100%;margin:0 auto 12px;padding:0 8px;gap:2px;font-size:11px;color:#bbb!important;white-space:normal;overflow-wrap:anywhere}.effort-model:hover{color:#fff!important}.cosmic-slider{position:relative;height:27px;margin:0 0 8px}.cosmic-track{position:absolute;inset:0;overflow:hidden;border-radius:20px;background:#454545}.cosmic-fill{position:absolute;inset:0;background:var(--effort-gradient, linear-gradient(100deg, #8dbfff 0%, #669fff 34%, #3d79e8 66%, #2258c9 100%));transform-origin:left;transform:scaleX(calc(.07 + var(--effort) * .93));transition:transform .3s cubic-bezier(.18,.8,.25,1)}.cosmic-stars{position:absolute;inset:0;opacity:calc(.25 + var(--effort) * .65);background-image:radial-gradient(circle at 8% 48%,#fff 0 .7px,transparent 1.2px),radial-gradient(circle at 12% 73%,#fff9 0 .5px,transparent 1px),radial-gradient(circle at 19% 30%,#fff9 0 .8px,transparent 1.1px),radial-gradient(circle at 25% 58%,#fff8 0 .5px,transparent 1px),radial-gradient(circle at 36% 36%,#fff 0 .6px,transparent 1px),radial-gradient(circle at 42% 77%,#fffa 0 .5px,transparent 1px),radial-gradient(circle at 50% 25%,#fffb 0 .7px,transparent 1px),radial-gradient(circle at 58% 48%,#fff9 0 .6px,transparent 1px),radial-gradient(circle at 65% 72%,#fff8 0 .5px,transparent 1px),radial-gradient(circle at 73% 32%,#fff 0 .8px,transparent 1.2px),radial-gradient(circle at 81% 65%,#fff8 0 .6px,transparent 1px)}.cosmic-thumb{position:absolute;left:2px;top:1px;width:25px;height:25px;border-radius:50%;background:#fff;box-shadow:0 0 0 1px #ffffff35;transform:translate(calc(var(--effort) * (256px - 29px)));transition:transform .3s cubic-bezier(.18,.8,.25,1);pointer-events:none}.cosmic-slider{container-type:inline-size}.cosmic-thumb{transform:translate(calc(var(--effort) * (100cqw - 29px)))}.cosmic-slider input{position:relative;display:block;appearance:none;-webkit-appearance:none;width:100%;height:27px;padding:0;margin:0;opacity:0;cursor:pointer}.cosmic-slider:focus-within{outline:2px solid #b8a5ff;outline-offset:4px;border-radius:20px}.cosmic-slider input::-webkit-slider-thumb{appearance:none;width:27px;height:27px}.cosmic-slider input::-moz-range-thumb{width:27px;height:27px;border:0}.effort-meta{display:flex;justify-content:space-between;gap:8px;font-size:9px;color:#aaa}.model-popover .interaction-modes{display:flex;gap:3px;padding:3px;margin-top:12px;background:#222;border-radius:8px}.model-popover .interaction-modes button{flex:1;padding:6px 8px;font-size:10px;color:#aaa;border-radius:5px}.model-popover .interaction-modes button[aria-pressed=true]{color:#eee;background:#404040}.model-list-heading{display:flex;gap:7px;align-items:center;color:#aaa;margin-bottom:8px}.model-provider-tabs{display:flex;gap:4px;padding:3px;background:#222;border-radius:7px;margin-bottom:10px}.model-provider-tabs button{flex:1;font-size:10px;padding:6px;border-radius:5px;color:#aaa}.model-provider-tabs button[aria-pressed=true]{background:#404040;color:#eee}.model-search{display:flex;align-items:center;gap:6px;padding:6px 8px;background:#333;border:1px solid #ffffff0a;border-radius:7px;color:#aaa}.model-search input{width:100%;min-width:0;background:transparent;border:0;padding:3px 0;font-size:11px;color:#eee}.model-search input:hover{background:transparent}.model-current{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;text-align:left;font-size:12px;padding:12px 0 8px}.model-current>span{min-width:0}.model-current small{display:block;overflow:hidden;text-overflow:ellipsis;max-width:220px;color:#aaa;font-size:10px;margin-top:3px}.model-catalog-status{display:flex;flex-wrap:wrap;gap:5px;color:#aaa;font-size:10px;line-height:1.5;padding:4px 0}.model-catalog-status button{color:#c0a7ff;text-decoration:underline}.model-options{max-height:240px;overflow-y:auto;margin:2px -5px -4px;scrollbar-width:thin}.model-options button{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:8px 6px;text-align:left;font-size:12px;border-radius:6px;white-space:normal}.model-options button span{overflow-wrap:anywhere}.model-options button svg{flex-shrink:0;color:#c6c6c6}.model-options button:hover,.model-current:hover{background:#ffffff09}.model-options button[aria-selected=true]{color:#c8b4ff}.model-options p{font-size:11px;color:#aaa;padding:8px}.message p{white-space:pre-wrap;overflow-wrap:anywhere}@keyframes model-popover-in{0%{opacity:0;transform:translateY(5px) scale(.98)}to{opacity:1;transform:none}}@media(prefers-reduced-motion:no-preference){.ultracode-active .cosmic-stars{animation:cosmic-drift 9s linear infinite,cosmic-shimmer 3s ease-in-out infinite alternate}}@keyframes cosmic-drift{0%{transform:translate(0)}to{transform:translate(-50%)}}@keyframes cosmic-shimmer{0%{opacity:.55}to{opacity:.95}}@media(prefers-reduced-motion:reduce){.model-popover:popover-open{animation:none}.cosmic-fill,.cosmic-thumb{transition:none}}@media(max-width:400px){.model-trigger-name{max-width:98px}.model-picker .model-button{gap:4px;padding:5px 7px}}.composer-bottom .composer-actions{margin-left:auto;min-width:0}.composer-actions .model-picker{flex:0 1 auto}.model-trigger-effort.is-ultracode{color:#c4a4ff}.ultracode-active{--effort-gradient: linear-gradient(100deg, #8597ff 0%, #c0a7ff 34%, #9470dd 66%, #592ac0 100%)}.ultracode-active .effort-title{color:#bf9dff!important}.cosmic-stars{width:200%;background-size:50% 100%;background-repeat:repeat-x;pointer-events:none}
