:root{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#17243b;background:#f7f9fc;font-synthesis:none;--accent:#0866f5;--accent-hover:#0755d1;--accent-ink:#1454c4;--on-accent:#ffffff;--accent-soft:#eef5ff;--accent-border:#cbddff;--focus:#0866f5;--border:#e1e7f0;--muted:#64738a;--surface:#fff;--radius:16px;--shadow:0 6px 24px #23375708;--vh:100dvh;--viewport-top:0px;line-height:1.5;color-scheme:light}*{box-sizing:border-box}html,body,#app{min-height:100%;background:#f7f9fc;color:#17243b}body{margin:0}button,input,textarea,select{font:inherit}button,a,input,textarea,select,summary{touch-action:manipulation}button{cursor:pointer}button:disabled{opacity:.55;cursor:wait}a{color:var(--accent-ink);overflow-wrap:anywhere}button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid var(--focus);outline-offset:3px}h1,h2,h3,h4,p{margin:0 0 .8em}h1{font-size:clamp(26px,3vw,36px);line-height:1.18;letter-spacing:-1px}h2{font-size:21px;letter-spacing:-.4px}h3{font-size:17px}h4{font-size:14px}p{overflow-wrap:anywhere}strong{font-weight:650}pre{margin:0}input,textarea,select{width:100%;min-width:0;border:1px solid #cfd8e6;border-radius:10px;padding:12px 14px;min-height:48px;background:#fff;color:inherit;font-size:16px}textarea{resize:vertical;min-height:96px;line-height:1.5}input:focus,textarea:focus,select:focus{outline:2px solid var(--focus);outline-offset:1px}input[type=checkbox]{width:22px;height:22px;min-height:22px;accent-color:var(--accent-ink)}[hidden]{display:none!important}.grow{flex:1;min-width:0}.muted{color:var(--muted)}.small{font-size:13px}.full{width:100%}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.eyebrow{font-size:11px;letter-spacing:1.8px;font-weight:750;color:#74839a;margin-bottom:12px}.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;min-width:48px;padding:11px 16px;border:1px solid var(--border);background:#fff;border-radius:10px;color:#233c60;font-weight:600;font-size:14px;line-height:1.35;text-align:center;text-decoration:none;transition:background .15s;white-space:normal}.button:hover{background:var(--accent-soft)}.button.primary{background:var(--accent);border-color:var(--accent);color:var(--on-accent);box-shadow:0 3px 10px #0866f51c}.button.primary:hover{background:var(--accent-hover)}.button.subtle{border-color:transparent;background:transparent}.button.subtle:hover{background:var(--accent-soft)}.button.icon{padding:8px;flex-shrink:0}.button.danger{color:#af2d3d;background:#fff0f2;border-color:#f1d2d7}.badge{font-size:10px;font-weight:750;letter-spacing:.6px;line-height:1.35;display:inline-flex;align-items:center;gap:5px;min-height:25px;padding:5px 8px;white-space:nowrap;border-radius:6px;flex-shrink:0}.badge.neutral{background:#eef2f8;color:#5c6b83}.badge.danger{background:#fff0e7;color:#a64114}.badge.test{background:var(--accent-soft);color:var(--accent-ink)}.notice{padding:12px 14px;margin:10px 0;background:var(--accent-soft);border:1px solid var(--accent-border);border-radius:10px;font-size:13px;line-height:1.5;color:#345885;overflow-wrap:anywhere}.notice.warning{color:#815526;background:#fff8e9;border-color:#f2dfb8}.toast-stack{position:fixed;bottom:calc(84px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:min(520px,calc(100% - 28px));z-index:10000;pointer-events:none}.toast{border-radius:12px;background:#17243b;color:#fff;padding:13px 16px;box-shadow:0 8px 32px #0002;font-size:14px;margin-top:8px;overflow-wrap:anywhere}.toast.error{background:#832c32}.field{display:flex;flex-direction:column;gap:7px;margin:0 0 18px;min-width:0}.field>span:first-child,.field>label{font-size:13px;font-weight:650}.field small{font-size:12px;color:var(--muted);font-weight:400}.field:has(input[type=checkbox]){display:flex;flex-direction:row;align-items:flex-start;gap:10px;padding:10px;border-radius:9px;background:#f5f7fb}.field input[type=checkbox]{order:-1;flex-shrink:0}.field-row,.section-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:20px 0 10px}.field-row strong{font-size:14px}.toolbar{display:flex;gap:8px;flex-wrap:wrap}.brand{display:flex;align-items:center;min-width:0;width:210px;max-width:100%;flex-shrink:1}.brand-logo{display:block;width:100%;height:auto;object-fit:contain}.brand.large{width:min(300px,100%);margin-bottom:28px}.mobile-header>.brand{flex:1;max-width:210px}.mobile-header>.button{flex-shrink:0}.sidebar>.brand{width:100%}.sidebar{display:none}.mobile-header{height:72px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 18px;background:#fff;border-bottom:1px solid var(--border);padding-top:env(safe-area-inset-top)}.mobile-header>.button{font-size:12px;padding:8px}.app-content{min-width:0}.preview-banner,.alpha-banner{font-size:10px;font-weight:650;letter-spacing:.45px;text-align:center;padding:7px 12px;line-height:1.5;background:var(--accent-soft);color:#345885;border-bottom:1px solid var(--accent-border)}.alpha-banner{background:#fff4dd;color:#8b652c}.main{width:100%;min-width:0}.page{max-width:1400px;margin:auto;padding:28px 18px calc(100px + env(safe-area-inset-bottom));min-width:0}.page-title{display:flex;gap:18px;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;margin-bottom:28px}.page-title>div{flex:1;min-width:min(260px,100%)}.page-title .muted{font-size:14px;max-width:620px}.page-title>.primary{width:100%}.list-toolbar{display:flex;gap:8px;margin-bottom:22px}.list-toolbar input{flex:1;width:0;border:0;box-shadow:var(--shadow)}.list-toolbar>.button{font-size:12px;white-space:nowrap;padding:10px}.project-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:16px}.project-card{background:#fff;border:1px solid var(--border);border-radius:var(--radius);padding:18px;box-shadow:var(--shadow);min-width:0}.card-top{display:flex;align-items:center;gap:12px;margin-bottom:13px}.project-avatar{height:44px;width:44px;flex-shrink:0;display:flex;align-items:center;justify-content:center;background:var(--accent-soft);border:1px solid var(--accent-border);color:var(--accent-ink);border-radius:11px;font-size:19px;font-weight:600}.project-name,.file-name{border:0;background:none;font-size:16px;font-weight:700;color:#172c4d;text-align:left;padding:6px 0;min-height:48px;overflow-wrap:anywhere;flex:1}.project-name:hover,.file-name:hover{color:var(--accent-ink)}.favorite{color:#8d9bb0;font-size:23px}.card-purpose{font-size:14px;min-height:21px}.next-step{font-size:13px;color:#456286;background:#f2f6fb;padding:10px;border-radius:8px}.card-top+.card-purpose{margin-top:0}.project-card>.button{justify-content:space-between;border-top:1px solid #edf1f6;border-radius:0;padding-bottom:0;margin-top:8px;color:var(--accent-ink)}.empty-state{grid-column:1/-1;text-align:center;border:1px dashed #ccd8e8;border-radius:16px;background:#fbfcff;padding:45px 22px}.empty-state p{font-size:14px;max-width:420px;margin:0 auto 20px}.empty-icon{display:inline-flex;align-items:center;justify-content:center;width:58px;height:58px;border-radius:15px;background:var(--accent-soft);color:var(--accent-ink);font-size:30px;letter-spacing:-3px;margin-bottom:20px}.back{margin-bottom:12px;margin-left:-12px}.work-note{background:#fff;border:1px solid var(--border);border-radius:var(--radius);padding:20px;margin-bottom:28px;display:grid;gap:15px}.work-note p{font-size:14px;white-space:pre-wrap}.work-note .eyebrow{margin-bottom:5px}.section-heading{align-items:flex-start;flex-wrap:wrap}.section-heading h2{margin:10px 0}.tab-list{display:grid;gap:12px}.tab-card{display:flex;align-items:center;gap:12px;border:1px solid var(--border);border-radius:12px;padding:12px;background:#fff;min-width:0}.file-icon{width:40px;height:44px;background:var(--accent-soft);border:1px solid var(--accent-border);color:var(--accent-ink);display:flex;align-items:center;justify-content:center;border-radius:7px;font-size:10px;font-weight:700;flex-shrink:0}.tab-card .file-name{font-size:15px;padding:0;min-height:34px}.tab-card .small{margin:0}.tab-card>.button{display:none}.project-tools{display:flex;gap:8px;flex-wrap:wrap;margin-top:28px}.mobile-nav{position:fixed;bottom:0;left:0;right:0;display:flex;justify-content:space-around;gap:8px;background:#fffc;backdrop-filter:blur(15px);border-top:1px solid var(--border);padding:6px 16px calc(6px + env(safe-area-inset-bottom));z-index:30}.mobile-nav .button{font-size:12px;flex:1}.workspace-page{padding-top:16px}.workspace-header{display:flex;align-items:center;gap:8px;flex-wrap:wrap;position:sticky;top:0;background:#f4f6af00;z-index:20;border-bottom:1px solid var(--border);padding:8px 0 14px;margin-bottom:14px;background:#f7f9fc}.workspace-header>.button{padding:8px;font-size:12px;margin-left:-8px}.workspace-context{flex:1;min-width:100px}.context-path{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:14px}.context-path strong{overflow-wrap:anywhere}.context-file{display:block;color:#647591;font-size:12px;overflow-wrap:anywhere}.save-status{font-size:11px;color:#546f9b;display:flex;align-items:center;gap:6px}.save-status:before{content:'';width:6px;height:6px;border-radius:50%;background:currentColor;flex-shrink:0}.save-status.saved{color:#428063}.save-status.conflict,.save-status.unknown,.save-status.local_only{color:#a16a20}.save-status.saving{color:var(--accent-ink)}.workspace-tabs{display:flex;gap:3px;align-items:center;flex-wrap:wrap;border-bottom:1px solid var(--border);margin-bottom:18px}.workspace-tabs .button{padding:10px 12px;font-size:12px}.workspace-tabs .active-tab{padding:13px 12px;color:var(--accent-ink);font-size:13px;font-weight:700;border-bottom:2px solid var(--accent-ink)}.workspace-grid{display:flex;flex-direction:column;gap:16px;min-width:0}.workspace-main{min-width:0;order:2}.source-slot{order:1;min-width:0}.source-slot>.notice{display:none}.source-card{background:#fff;border:1px solid var(--border);border-radius:12px;padding:14px;box-shadow:var(--shadow)}.source-top{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}.source-top strong{font-size:12px}.source-card>p{font-size:12px;margin:7px 0}.source-links{display:flex;gap:8px;flex-wrap:wrap}.source-links a{font-size:12px;line-height:1.35;display:flex;align-items:center;min-height:48px;padding:9px 12px;background:var(--accent-soft);border:1px solid var(--accent-border);border-radius:8px;text-decoration:none;font-weight:600}.source-card details summary{font-size:11px;color:var(--muted);cursor:pointer;padding-top:10px;min-height:36px}.source-card details p{font-size:12px;margin-top:8px}.source-card .metadata{white-space:pre-wrap;word-break:break-all;font-size:11px;max-height:220px;overflow:auto;padding:10px;background:#f6f8fb;border-radius:8px}.editor-card{background:#111c2e;border:1px solid #c9d5e6;border-radius:12px;overflow:hidden}.editor-tools{display:flex;flex-wrap:wrap;align-items:center;gap:1px;background:#fff;padding:7px 8px;border-bottom:1px solid var(--border)}.editor-tools>strong{font-size:13px;margin-right:8px;overflow-wrap:anywhere;max-width:100%;min-height:30px;display:flex;align-items:center}.editor-tools .version-label{font-size:10px;color:var(--muted);margin-right:auto}.editor-tools .button{font-size:11px;padding:8px;min-width:48px;min-height:48px}.main-editor .cm-editor{height:310px;max-height:70dvh}.cm-editor{max-width:100%;overflow:hidden}.cm-content{tab-size:2}.cm-scroller{overscroll-behavior:contain;scrollbar-width:thin}.cm-editor.cm-focused{outline:2px solid #588be6;outline-offset:-2px}.cm-panel.cm-search{padding:8px!important;display:flex;gap:5px;flex-wrap:wrap}.cm-panel.cm-search label{font-size:12px}.cm-panel.cm-search input[type=text]{width:150px;min-height:40px}.cm-panel.cm-search button{min-height:36px}.mini-editor{border-radius:10px;overflow:hidden;border:1px solid #d3ddea;margin-bottom:16px}.mini-editor .cm-editor{height:205px}.code-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:10px}.copy-main{grid-column:1/-1}.secondary-actions{display:flex;flex-wrap:wrap;gap:3px;margin-top:10px}.secondary-actions>.button{font-size:12px;padding:10px}.focused-workspace .source-slot,.focused-workspace .workspace-tabs{display:none}.focused-workspace .main-editor .cm-editor{height:calc(var(--vh) - 260px);max-height:none;min-height:200px}.focused-workspace .workspace-main{width:100%;max-width:none}.focused-workspace .workspace-grid{display:block}.focused-workspace .secondary-actions{display:none}.sheet{width:calc(100% - 20px);max-width:620px;max-height:calc(var(--vh) - 20px);margin:auto;border:1px solid #d1ddeb;border-radius:18px;padding:0;color:inherit;box-shadow:0 24px 100px #14243d38;background:#fff;overflow:hidden}.sheet[open]{display:flex;flex-direction:column}.sheet::backdrop{background:#12213877;backdrop-filter:blur(3px)}.sheet.wide{max-width:950px}.sheet-header{display:flex;gap:8px;justify-content:space-between;align-items:flex-start;flex-shrink:0;padding:20px 18px 16px;border-bottom:1px solid var(--border);background:#fff}.sheet-header h2{font-size:20px;margin-bottom:5px;overflow-wrap:anywhere}.sheet-header p{font-size:12px;margin:0}.sheet-body{padding:18px;overflow:auto;overscroll-behavior:contain;min-height:0}.sheet-footer{flex-shrink:0;display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap;padding:12px 18px max(12px,env(safe-area-inset-bottom));border-top:1px solid var(--border);background:#fff}.sheet-footer>.primary{flex:1;max-width:320px}.sheet-header .close{margin-top:-7px;margin-right:-8px}.review-context{display:flex;gap:10px;align-items:center;flex-wrap:wrap;border-top:1px solid var(--border);padding-top:16px;margin-top:22px;font-size:13px}.diff-status{font-size:12px;color:var(--muted);margin:12px 0}.segmented{display:flex;gap:6px;margin-bottom:10px;flex-wrap:wrap}.segmented .button{font-size:12px}.diff-lines{border:1px solid var(--border);border-radius:10px;overflow:hidden;margin-bottom:20px}.diff-row{display:flex;gap:4px;align-items:flex-start;background:#fafbfe;min-width:0;padding:4px 6px;border-bottom:1px solid #e8edf4;font-size:11px}.diff-row.added{background:#eafaee;color:#23683c}.diff-row.removed{background:#fff0f2;color:#973c4b}.diff-num{width:25px;flex-shrink:0;font-family:monospace;color:#8491a5;text-align:right}.diff-sign{width:12px;flex-shrink:0}.diff-row pre{white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-all;min-width:0;flex:1;font:12px/1.6 ui-monospace,SFMono-Regular,Consolas,monospace}.eol{opacity:.5;font-size:9px;white-space:nowrap}.compare-grid{display:grid;grid-template-columns:1fr;gap:12px;padding:12px}.compare-grid section{min-width:0}.history-row{display:flex;align-items:center;gap:10px;border-bottom:1px solid var(--border);padding:15px 0}.history-row strong{font-size:15px}.history-row p{font-size:13px;margin:3px 0}.history-row .button{font-size:12px;flex-shrink:0}.settings-grid{display:grid;grid-template-columns:1fr;gap:18px}.settings-card{background:#fff;border:1px solid var(--border);border-radius:16px;padding:22px;min-width:0}.settings-card p{font-size:14px}.settings-card .button{margin-top:8px}.install-tip{padding:25px 0}.install-tip p{font-size:14px;max-width:600px}.manual h2{margin-top:28px}.manual p{font-size:14px;white-space:pre-wrap}.auth-page{max-width:650px;margin:auto;padding:40px 20px}.auth-form{background:#fff;padding:26px;border:1px solid var(--border);border-radius:18px;box-shadow:var(--shadow)}.auth-form h1{font-size:27px}.auth-form pre,.recovery-codes{white-space:pre-wrap;overflow-wrap:anywhere;font-size:15px;background:#f1f5fb;border:1px solid var(--border);padding:18px;border-radius:10px}.setup-key{overflow-wrap:anywhere}.error-panel{padding:20px;color:#a53143}.link-row{display:flex;align-items:center;min-height:44px}
@media(min-width:650px){.page{padding:36px 30px 100px}.page-title>.primary{width:auto}.project-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.work-note{grid-template-columns:1fr 1fr;gap:22px}.work-note>.button{grid-column:1/-1;justify-self:start}.tab-card>.button{display:inline-flex}.settings-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.compare-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.sheet-header{padding:22px 24px 16px}.sheet-body{padding:22px 24px}.sheet-footer{padding:14px 24px}.code-actions{grid-template-columns:repeat(4,minmax(0,1fr))}.copy-main{grid-column:1/-1}.workspace-header{flex-wrap:nowrap}.main-editor .cm-editor{height:400px}}
@media(min-width:1024px){.app-shell{display:flex;min-height:100vh}.sidebar{display:flex;flex-direction:column;position:fixed;left:0;top:0;bottom:0;width:232px;padding:28px 18px 20px;background:#fff;border-right:1px solid var(--border);z-index:40}.sidebar>.brand{padding:0 8px}.sidebar-sub{font-size:11px;color:#8a97aa;margin:13px 8px 33px}.sidebar-link{text-align:left;display:block;min-height:48px;border:0;background:none;border-radius:10px;padding:13px 12px;margin-bottom:7px;font-size:13px;color:#4b607e}.sidebar-link:hover{background:var(--accent-soft);color:var(--accent-ink)}.sidebar-spacer{flex:1}.sidebar-version{font-size:11px;padding:13px;border-top:1px solid var(--border);color:#76859b}.sidebar-version p{margin-top:5px}.app-content{margin-left:232px;flex:1}.mobile-header,.mobile-nav{display:none}.page{padding:42px 36px 60px}.preview-banner,.alpha-banner{text-align:left;padding-left:36px}.page-title{margin-bottom:32px}.page-title>.primary{margin-top:9px}.project-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.project-card{padding:22px}.empty-state{padding:65px 30px}.workspace-page{padding:20px 24px 50px}.workspace-header{top:0;padding-top:8px}.workspace-grid{display:grid;grid-template-columns:minmax(0,1fr) 260px;align-items:start;gap:18px}.workspace-main{order:0}.source-slot{order:0;position:sticky;top:105px}.source-slot>.notice{display:block}.source-card{padding:18px}.source-links{flex-direction:column}.source-top{align-items:flex-start}.source-card .source-top strong{font-size:13px}.source-card details summary{padding:15px 0 8px}.main-editor .cm-editor{height:clamp(350px,58vh,650px);max-height:none}.editor-tools>.version-label{font-size:10px}.code-actions{grid-template-columns:repeat(2,minmax(0,1fr))}.copy-main{grid-column:1/-1}.workspace-context{min-width:0}.context-path{font-size:15px}.toast-stack{bottom:24px}.sheet{max-height:calc(100dvh - 50px)}.focused-workspace .main-editor .cm-editor{height:calc(100dvh - 270px)}.work-note{grid-template-columns:1fr 1fr auto;align-items:start}.work-note>.button{grid-column:auto}.source-top .badge{font-size:9px}.settings-grid{max-width:1080px}.button{font-size:13px}}
@media(min-width:1350px){.project-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.workspace-grid{grid-template-columns:minmax(0,1fr) 300px}.code-actions{grid-template-columns:repeat(4,minmax(0,1fr))}.copy-main{grid-column:1/-1}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}@media(max-height:550px){.mobile-nav{display:none}.sheet{max-height:calc(var(--vh) - 8px)}.sheet-header{padding:10px 14px}.sheet-header h2{font-size:17px}.sheet-body{padding:12px 14px}.sheet-footer{padding:8px 14px}.mini-editor .cm-editor{height:160px}.mobile-header{height:55px}.page{padding-bottom:35px}.workspace-header{position:static}}
.field-hint{font-size:12px!important;font-weight:400!important;color:var(--muted)}#toast{position:fixed;z-index:10000;bottom:calc(80px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:min(510px,calc(100% - 28px));display:none}#toast.visible{display:block}.initial-loading{padding:35px}.sheet{max-height:calc(var(--viewport-height,100dvh) - 20px)}.focused-workspace .main-editor .cm-editor{height:calc(var(--viewport-height,100dvh) - 260px)}@media(min-width:1024px){#toast{bottom:25px}}.cm-editor .cm-content{font-size:14px}@media(max-width:649px){.cm-editor .cm-content{font-size:16px}.workspace-header>.save-status{flex-basis:100%;padding-left:2px}}
@media(max-width:1023px){.workspace-active .mobile-header,.workspace-active .mobile-nav{display:none}.workspace-page{padding-bottom:28px}.workspace-header{padding-bottom:10px;margin-bottom:5px}.workspace-tabs{margin-bottom:12px}.workspace-grid{gap:12px}.source-card{padding:12px}.source-card details summary{min-height:30px}.main-editor .cm-editor{height:280px}.editor-tools>strong{max-width:calc(100% - 100px)}.editor-tools{padding:5px 8px}.code-actions{margin-bottom:6px}.workspace-active #toast{bottom:12px}}
.context-preview{white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;max-height:45dvh;overflow:auto;font:12px/1.55 ui-monospace,SFMono-Regular,Consolas,monospace;background:#f4f7fb;padding:16px;border:1px solid var(--border);border-radius:10px}.field:has(input[type=checkbox]){align-items:center}.field:has(input[type=checkbox]) .field-label{order:0}

.dialog-toast{display:none;margin:0 18px 12px;flex-shrink:0}.dialog-toast.visible{display:block}.dialog-toast.toast{position:relative;z-index:2}
@media(min-width:650px){.dialog-toast{margin:0 24px 14px}}
