/* Shared first-phase UI. Loaded after the original Tailwind bundle. */
.conversation-dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}.conversation-dialog-note{font-size:13px;line-height:1.7;color:#aaa;margin-top:12px}.conversation-dialog-error{font-size:13px;color:#f3a6a6;line-height:1.6;margin-top:8px}.conversation-danger-button{background:#b83232!important;color:#fff!important}.conversation-danger-button:hover{background:#982626!important}#delete-chat-title{overflow-wrap:anywhere;font-weight:550}html[data-theme=light] .conversation-dialog-note{color:#666}html[data-theme=light] .conversation-dialog-error{color:#a52d2d}
.chat-search-result{display:flex;flex-direction:column;gap:6px;width:100%;padding:12px;border-radius:12px;text-align:left;margin:3px 0}.chat-search-result:hover,.chat-search-result:focus-visible{background:#ffffff0c}.chat-search-result strong{font-size:14px;font-weight:550}.chat-search-result>span{font-size:12px;line-height:1.6;color:#aaa;white-space:pre-wrap;overflow-wrap:anywhere}.chat-search-result mark{background:#d0a94333;color:inherit;border-radius:3px}#search-status{font-size:12px;color:#999;margin:0 0 10px}.search-match{outline:1px solid #b89b5355;outline-offset:6px;border-radius:10px}
.chat-search-result>span{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;white-space:normal}.chat-search-result strong{overflow-wrap:anywhere}
html[data-theme=light] .chat-search-result:hover,html[data-theme=light] .chat-search-result:focus-visible{background:#f1f1f1}html[data-theme=light] .chat-search-result>span,html[data-theme=light] #search-status{color:#666}
.account-menu-identity{display:flex;align-items:center;gap:10px;padding:7px 8px 11px}
.account-menu-identity>span:last-child{display:grid;gap:2px;min-width:0}
.account-menu-identity strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:600}
.account-menu-identity small{color:#aaa;font-size:12px}
.account-menu-avatar{display:grid;place-items:center;width:32px;height:32px;flex:none;border-radius:50%;background:#ef4938;color:#fff;font-size:12px;font-weight:650}
html body .message-actions button:is(.feedback-like,.feedback-dislike),html[data-theme=light] body .message-actions button:is(.feedback-like,.feedback-dislike){background:transparent;color:#929292;box-shadow:none}
html body .message-actions button:is(.feedback-like,.feedback-dislike) .icon,html[data-theme=light] body .message-actions button:is(.feedback-like,.feedback-dislike) .icon{width:19px;height:19px;fill:currentColor;stroke:none;stroke-width:0;filter:none}
.rich-message{white-space:normal;overflow-wrap:anywhere;line-height:1.8;font-size:16px;min-width:0}
.rich-message>:first-child{margin-top:0}.rich-message>:last-child{margin-bottom:0}
.rich-message p{margin:0 0 1em}.rich-message h1,.rich-message h2,.rich-message h3,.rich-message h4{font-weight:650;line-height:1.4;margin:1.3em 0 .55em}
.rich-message h1{font-size:1.6em}.rich-message h2{font-size:1.35em}.rich-message h3{font-size:1.15em}
.rich-message ul,.rich-message ol{padding-left:1.5em;margin:.7em 0 1em}.rich-message ul{list-style:disc}.rich-message ol{list-style:decimal}.rich-message li{padding-left:.15em;margin:.3em 0}.rich-message li p{margin:.2em 0}
.rich-message a{color:#8ab4f8;text-decoration:underline;text-underline-offset:3px}.rich-message blockquote{border-left:3px solid #666;padding:0 1em;margin:1em 0;color:#bcbcbc}
.rich-message :not(pre)>code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.88em;background:#ffffff12;border-radius:5px;padding:2px 5px}
.message-code{border:1px solid #353535;border-radius:14px;overflow:hidden;margin:16px 0;background:#161616;white-space:normal}
.message-code-header{display:flex;justify-content:space-between;align-items:center;padding:8px 14px;background:#262626;font-size:12px;color:#aaa}
.code-copy{padding:4px 8px;border-radius:6px;color:#ccc}.code-copy:hover{background:#ffffff12}
.rich-message pre{margin:0;padding:18px;overflow:auto;max-width:100%;line-height:1.6;tab-size:2;white-space:pre}
.rich-message pre code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:13px;white-space:pre}
/* Token colours are local and theme-aware; inline prose code stays neutral. */
.message-code .hljs{color:#e6edf3}
.message-code :is(.hljs-keyword,.hljs-selector-tag,.hljs-literal,.hljs-deletion){color:#ff7b72}
.message-code :is(.hljs-string,.hljs-regexp,.hljs-meta .hljs-string,.hljs-addition){color:#a5d6ff}
.message-code :is(.hljs-number,.hljs-built_in,.hljs-type,.hljs-symbol,.hljs-attr,.hljs-variable,.hljs-template-variable){color:#79c0ff}
.message-code :is(.hljs-title,.hljs-section){color:#d2a8ff}
.message-code :is(.hljs-name,.hljs-selector-class,.hljs-selector-id){color:#7ee787}
.message-code :is(.hljs-comment,.hljs-quote){color:#8b949e;font-style:italic}
.message-code :is(.hljs-meta,.hljs-bullet){color:#ffa657}
.message-code .hljs-emphasis{font-style:italic}.message-code .hljs-strong{font-weight:700}
html[data-theme=light] .message-code .hljs{color:#24292f}
html[data-theme=light] .message-code :is(.hljs-keyword,.hljs-selector-tag,.hljs-literal,.hljs-deletion){color:#cf222e}
html[data-theme=light] .message-code :is(.hljs-string,.hljs-regexp,.hljs-meta .hljs-string,.hljs-addition){color:#0a3069}
html[data-theme=light] .message-code :is(.hljs-number,.hljs-built_in,.hljs-type,.hljs-symbol,.hljs-attr,.hljs-variable,.hljs-template-variable){color:#0550ae}
html[data-theme=light] .message-code :is(.hljs-title,.hljs-section){color:#8250df}
html[data-theme=light] .message-code :is(.hljs-name,.hljs-selector-class,.hljs-selector-id){color:#116329}
html[data-theme=light] .message-code :is(.hljs-comment,.hljs-quote){color:#6e7781}
html[data-theme=light] .message-code :is(.hljs-meta,.hljs-bullet){color:#953800}
.message-code-header>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.code-copy{flex:none}
.rich-message :is(h5,h6){font-weight:650;line-height:1.4;margin:1.3em 0 .55em}
.rich-message li>ul{list-style:circle}.rich-message li li>ul{list-style:square}
/* Topic suggestions are a list only; retain fetching/fallback without metadata. */
#search-suggestion-status,#search-suggestion-sources,#search-suggestion-retry{display:none!important}
/* Preserve alpha in generated images instead of painting a card/checkerboard. */
html body .generated-image-stage,html body .generated-image-preview,html body .generated-image-preview img,html[data-theme] body .image-editor .image-editor-surface{background:transparent;box-shadow:none}
/* Paint behind the image pixels, not the container: opaque images stay unchanged.
   Limit hover to pointing devices so a touch tap cannot leave the grid stuck on. */
@media(hover:hover) and (pointer:fine){
 html body .generated-image-stage:hover .generated-image-preview img{background-image:repeating-conic-gradient(#ffffff0d 0 25%,transparent 0 50%);background-size:32px 32px;background-position:center}
 html[data-theme=light] body .generated-image-stage:hover .generated-image-preview img{background-image:repeating-conic-gradient(#0000000d 0 25%,transparent 0 50%)}
}
.rich-message ul,.rich-message ol{list-style-position:outside;display:block;padding-inline-start:1.6em}.rich-message li{display:list-item}.rich-message li>ul,.rich-message li>ol{margin-block:.35em}.rich-message li::marker{color:currentColor}.rich-message table{max-width:100%}.rich-message blockquote>:last-child{margin-bottom:0}
@media(max-width:600px){body.logged-out[data-view=home] #greeting{font-size:25px;line-height:34px}body.logged-out[data-view=home] #greeting:after{content:none}}
.rich-message :is(th,td)[align=center]{text-align:center}.rich-message :is(th,td)[align=right]{text-align:right}
.message-table{overflow-x:auto;max-width:100%;margin:18px 0}.rich-message table{border-collapse:collapse;width:100%;font-size:14px;white-space:normal}
.rich-message th,.rich-message td{padding:10px 14px;text-align:left;border-bottom:1px solid #424242;min-width:100px;vertical-align:top}.rich-message th{font-weight:600;background:#ffffff08}
.rich-message hr{margin:24px 0;border-color:#414141}.rich-message .katex-display{overflow-x:auto;overflow-y:hidden;padding:6px 0;max-width:100%}
#toast{position:fixed;inset:72px 24px auto auto;max-width:min(380px,calc(100vw - 32px));transform:none;padding:14px 18px;border:1px solid #494949;border-radius:14px;background:#282828;color:#eee;box-shadow:0 12px 32px #0005;line-height:1.5;overflow-wrap:anywhere;z-index:500}
#toast:not([hidden]){animation:notice-in .18s ease-out}
@keyframes notice-in{from{opacity:0;translate:12px 0}to{opacity:1;translate:0 0}}
html[data-theme=light] .account-menu-identity small{color:#666}
html[data-theme=light] .rich-message a{color:#245fae}html[data-theme=light] .rich-message blockquote{color:#666;border-color:#ccc}
html[data-theme=light] .rich-message :not(pre)>code{background:#00000008}
html[data-theme=light] .message-code{background:#fafafa;border-color:#e0e0e0}html[data-theme=light] .message-code-header{background:#f0f0f0;color:#555}html[data-theme=light] .code-copy{color:#444}html[data-theme=light] .code-copy:hover{background:#00000008}
html[data-theme=light] .rich-message th,html[data-theme=light] .rich-message td{border-color:#ddd}html[data-theme=light] .rich-message th{background:#f6f6f6}
html[data-theme=light] #toast{background:#fff;color:#333;border-color:#e0e0e0;box-shadow:0 12px 32px #0002}
body.history-loading #composer{opacity:.6;pointer-events:none}
.message-versions{display:flex;align-items:center;gap:5px;margin-top:6px;color:#929292;font-size:12px;font-variant-numeric:tabular-nums}
.rich-message a.inline-citation{display:inline-block;padding:0 5px;margin:0 2px;border-radius:6px;font-size:11px;line-height:1.7;background:#ffffff12;color:#bbb;text-decoration:none;vertical-align:super}
.message-sources .source-card{display:flex;flex-direction:column;gap:3px;width:min(235px,100%);padding:10px 12px;border-radius:12px;background:#ffffff05;text-decoration:none}.source-card strong{font-size:12px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.source-card small{font-size:11px;color:#999}.message-sources .source-card:hover{background:#ffffff0c}.source-card:focus-visible,.inline-citation:focus-visible{outline:2px solid #999;outline-offset:2px}
.message-status:is([data-state=failed],[data-state=interrupted],[data-state=stopped]){color:#b8a58f}
html[data-theme=light] .rich-message a.inline-citation{background:#ededed;color:#555}html[data-theme=light] .message-sources .source-card{background:#fafafa}html[data-theme=light] .source-card small{color:#666}html[data-theme=light] .message-status:is([data-state=failed],[data-state=interrupted],[data-state=stopped]){color:#82623e}
.message-versions button{display:grid;place-items:center;width:28px;height:28px;border-radius:8px;font-size:22px;line-height:1}.message-versions button:hover:not(:disabled){background:#ffffff12}.message-versions button:disabled{opacity:.3;cursor:default}.message-row.user .message-versions{justify-content:flex-end}
.message-inline-editor{width:100%;padding:16px;background:#252525;border:1px solid #424242;border-radius:20px;text-align:left}
.message-inline-editor textarea{display:block;width:100%;min-height:110px;max-height:45vh;resize:vertical;background:transparent;color:inherit;border:0;outline:0;line-height:1.65;font-size:16px}
.message-inline-editor p{color:#999;font-size:12px;margin:10px 0}.message-inline-editor>div{display:flex;justify-content:flex-end;gap:8px}.message-inline-editor button{padding:8px 16px;border-radius:20px;font-size:14px}.edit-cancel{background:#353535}.edit-send{background:#eee;color:#171717}.edit-send:disabled{opacity:.5}.message-row.user.is-editing{max-width:100%;width:100%}
.message-versions button:focus-visible,.message-inline-editor button:focus-visible{outline:2px solid #999;outline-offset:2px}
html[data-theme=light] .message-inline-editor{background:#f6f6f6;border-color:#ddd}html[data-theme=light] .edit-cancel{background:#e7e7e7}html[data-theme=light] .edit-send{background:#171717;color:#fff}html[data-theme=light] .message-versions button:hover:not(:disabled){background:#00000009}
@media(max-width:600px){#toast{top:max(64px,env(safe-area-inset-top));right:16px}.rich-message{font-size:15px}.rich-message pre{padding:14px}.message-code-header{padding:7px 10px}.rich-message th,.rich-message td{padding:8px 10px}}
@media(prefers-reduced-motion:reduce){#toast:not([hidden]){animation:none}}
#site-announcement { margin: -12px auto 24px; padding: 12px 16px; max-width: 620px; border: 1px solid #8884; border-radius: 14px; color: inherit; font-size: 13px; line-height: 1.6; white-space: pre-wrap; }
.billing-dialog{width:min(760px,calc(100vw - 32px));max-height:85dvh;padding:24px;border:1px solid #ffffff24;border-radius:20px;background:#212121;color:#eee;box-shadow:0 24px 90px #0007}
.billing-dialog::backdrop{background:#0008;backdrop-filter:blur(3px)}
.billing-dialog h2{font-size:22px;margin:0 0 16px}.billing-nav{display:flex;gap:8px;flex-wrap:wrap;margin:18px 0}
.billing-content{max-height:52dvh;overflow:auto}.billing-content article{padding:16px 0;border-top:1px solid #8884}.billing-content p{font-size:14px;line-height:1.7;margin:8px 0}
.billing-content small{display:block;color:#999;overflow-wrap:anywhere}.billing-dialog button:disabled{opacity:.45;cursor:not-allowed}
html[data-theme="light"] .billing-dialog{background:#fff;color:#222;border-color:#ddd}
.payment-return{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin:0 0 24px;padding:16px 20px;border:1px solid #8884;border-radius:16px;background:#8881;font-size:14px;line-height:1.6}
.payment-return p{margin:0;flex:1 1 240px;overflow-wrap:anywhere}.payment-return button:disabled{opacity:.5;cursor:wait}
body.logged-out #mode-switch,body.logged-out #work-toolbar,body.logged-out #work-suggestions,body.logged-out #sidebar-project-list{display:none!important}
.plans-grid .plan-card{min-width:0}.plan-card h2,.plan-features li{overflow-wrap:anywhere}
/* Catalog-driven subscription cards. */
#plans-dialog .plans-view{width:min(1200px,calc(100% - 48px));padding:60px 0 48px}
#plans-dialog .plans-intro{text-align:center;border:0;padding:0}
#plans-dialog .plans-intro h1{font-size:28px;font-weight:500}
.plan-category-tabs{display:flex;width:min(350px,100%);margin:24px auto;background:#3b3b3b;padding:4px;border-radius:28px;gap:4px}
.plan-category-tabs button{flex:1;padding:9px 16px;border-radius:24px;color:#aaa;font-size:14px}
.plan-category-tabs button[aria-pressed=true]{background:#212121;color:#fff}
.plan-category-tabs button:focus-visible{outline:2px solid #aaa;outline-offset:2px}
#plans-dialog .plans-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,290px),1fr));gap:24px;margin-top:24px}
#plans-dialog .plan-card{display:flex;flex-direction:column;min-height:580px;border-radius:18px;background:transparent}
#plans-dialog .plan-card-top{min-height:0;padding:26px 24px 0}
#plans-dialog .plan-card h2{font-size:27px;line-height:1.35;padding-right:72px}
#plans-dialog .plan-price{display:flex;align-items:baseline;flex-wrap:wrap;gap:3px;margin:24px 0 18px;line-height:1.1}
#plans-dialog .plan-price small{font-size:20px;align-self:flex-start;padding-top:6px}
#plans-dialog .plan-price strong{font-size:46px;font-weight:600;letter-spacing:-2px}
#plans-dialog .plan-price span{font-size:11px;margin-left:4px;letter-spacing:0}
.plan-summary{font-size:14px;line-height:1.6;min-height:45px;margin-bottom:18px;overflow-wrap:anywhere}
#plans-dialog .plan-upgrade{min-height:44px;font-size:14px;background:#fff;color:#222}
#plans-dialog .plan-upgrade:disabled{opacity:.5;cursor:not-allowed}
#plans-dialog .plan-features{border:0;padding:24px;min-height:0;gap:18px;font-size:14px;color:inherit}
#plans-dialog .plan-features li:before{content:'✧';font-size:20px;line-height:1.15;color:inherit}
#plans-dialog .plan-recommended{top:27px;right:18px;font-size:11px;max-width:85px;overflow-wrap:anywhere}
.plan-card-note{margin-top:auto;padding:24px;color:#929292;font-size:12px;line-height:1.5;white-space:pre-line;overflow-wrap:anywhere}
.plans-purchase-note{text-align:center;color:#929292;font-size:12px;line-height:1.6;margin:32px auto}
.plans-empty{grid-column:1/-1;padding:80px 16px;text-align:center;color:#999}
#plans-dialog .plan-history{margin-top:32px}#plans-dialog .plan-history summary{cursor:pointer;font-size:16px;color:#999;padding:16px 0}
html[data-theme=light] .plan-category-tabs{background:#eee}html[data-theme=light] .plan-category-tabs button[aria-pressed=true]{background:#fff;color:#222}
html[data-theme=light] #plans-dialog .plan-upgrade{background:#222;color:#fff}
@media(max-width:640px){#plans-dialog .plans-view{width:calc(100% - 32px);padding-top:58px}#plans-dialog .plans-grid{grid-template-columns:1fr;gap:16px}#plans-dialog .plan-card{min-height:0}#plans-dialog .plan-price strong{font-size:42px}.plan-card-note:empty{display:none}}
.project-storage-note{font-size:12px;line-height:1.6;color:var(--text-secondary,#929292);margin:0 0 20px}
.project-organizer{display:flex;gap:10px;flex-wrap:wrap;margin:16px 0}
.project-organizer input,.project-organizer select{min-width:0;flex:1 1 180px;background:transparent;color:inherit;border:1px solid #7776;border-radius:10px;padding:10px 12px;font:inherit}
.project-organizer option{background:var(--bg-primary,#222);color:var(--text-primary,#eee)}
.project-chat-row{display:flex;align-items:center;gap:8px;min-width:0}
.project-chat-row .project-chat{flex:1;min-width:0}.project-chat-row .project-chat span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.project-file strong{overflow-wrap:anywhere}.project-organizer button{flex-shrink:0}
@media(max-width:640px){.project-organizer{flex-direction:column}.project-organizer input,.project-organizer select{flex-basis:auto;width:100%}.project-detail-actions{flex-wrap:wrap}.project-chat-row .secondary-button{padding:8px}.project-storage-note{margin-top:12px}}
.project-columns{grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr))}
.project-detail-head{flex-wrap:wrap}.project-detail-head>div:nth-child(3){flex:1;min-width:160px}
.project-file [data-project-file-download]{width:auto;min-width:44px;flex:0 0 auto;white-space:nowrap;font-size:12px}
.project-panel header>.secondary-button{flex-shrink:0}
@media(max-width:1100px){.project-detail-actions{flex:1 0 100%;margin-left:0}.project-detail-actions .secondary-button{display:inline-flex}.project-detail-head h1{white-space:normal;overflow-wrap:anywhere}}
.project-member-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:12px 0;border-bottom:1px solid #7773}.project-member-row p{flex:1;min-width:150px;overflow-wrap:anywhere}.project-member-row select{background:transparent;color:inherit;border:1px solid #7776;border-radius:8px;padding:8px}.project-member-row option{background:#222;color:#eee}#project-collaboration summary{cursor:pointer;font-weight:600}#project-collaboration>p,#project-shared-panel>p{font-size:13px;color:#999;margin:12px 0}.project-shared-dialog{width:min(780px,calc(100% - 32px));max-height:85dvh;margin:auto;overflow:auto;background:#202020;color:#eee;border:1px solid #555;border-radius:20px;padding:22px}.project-shared-dialog::backdrop{background:#0008}.project-shared-dialog header{display:flex;justify-content:space-between;gap:16px}.project-shared-dialog section{border-top:1px solid #7774;padding:16px 0}.project-shared-dialog section p{white-space:pre-wrap;overflow-wrap:anywhere}.project-shared-dialog section p:first-child{color:#999;font-size:12px;margin-bottom:8px}.project-chat-row{flex-wrap:wrap}.project-chat-row .project-chat{flex-basis:50%}
html[data-theme=light] .project-shared-dialog{background:#fff;color:#222}html[data-theme=light] .project-member-row option{background:#fff;color:#222}

#work-suggestions button span{display:grid;gap:4px;text-align:left}#work-suggestions button small,.work-start-note{font-size:12px;line-height:1.6;color:#929292}.work-start-note{padding:8px 14px;max-width:560px}.work-result-actions{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}.work-result-actions button{min-height:36px;padding:7px 12px;border:1px solid #7775;border-radius:10px;font-size:12px;color:inherit;background:transparent}.work-result-actions button:hover{background:#8882}.work-result-actions button:focus-visible{outline:2px solid #8b80ff;outline-offset:2px}.work-run[data-state=failed],.work-run[data-state=stopped]{border-color:#b9834555}.work-run[hidden]{display:none}
.points-card{border:1px solid #8884;border-radius:18px;padding:20px;margin:20px 0}.points-card h3{font-size:18px;font-weight:600;margin-bottom:10px}.points-card p{line-height:1.7;margin:8px 0}.points-card button{margin:8px 8px 0 0}.points-card progress{width:100%;height:9px;display:block;margin:14px 0;accent-color:#43a85c}.points-card small{color:#888}.points-dialog{max-width:900px;width:calc(100vw - 32px)}
.points-card .secondary-button{white-space:normal;max-width:100%;height:auto;overflow-wrap:anywhere}.points-card p{overflow-wrap:anywhere}
body[data-view="conversation"] .conversation-content{padding-bottom:calc(var(--home-composer-height,160px) + 96px)}
@media(max-width:600px){#work-suggestions button small{font-size:11px}.work-start-note{padding:4px 8px;font-size:11px}.work-result-actions button{min-height:40px}}
/* Mobile editor: persistent exit/zoom row, full-width tools, unobstructed canvas. */
@media(max-width:768px){
 .image-editor .image-editor-exit{display:grid;top:max(10px,env(safe-area-inset-top));left:12px;width:44px;height:44px;opacity:1}
 .image-editor .image-editor-zoom{top:max(10px,env(safe-area-inset-top));right:12px}
 .image-editor .image-editor-zoom>button{height:44px}
 .image-editor .image-editor-toolbar,.image-editor .image-editor-draw,.image-editor .image-editor-erase-toolbar{top:calc(max(10px,env(safe-area-inset-top)) + 54px);left:12px;right:12px;transform:none;width:auto;max-width:none;min-height:48px;border-radius:16px}
 .image-editor .image-editor-toolbar{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));padding:4px;overflow:visible;gap:2px}
 .image-editor .image-editor-toolbar button,.image-editor .image-editor-toolbar button:nth-last-child(-n+2){justify-content:center;gap:4px;padding:0 3px;min-width:0;height:40px;font-size:12px}
 .image-editor .image-editor-toolbar .icon{width:16px;height:16px;flex:none}
 .image-editor .image-editor-draw,.image-editor .image-editor-erase-toolbar{overflow-x:auto;scrollbar-width:thin;justify-content:flex-start}
 .image-editor .image-editor-stage{inset:calc(max(10px,env(safe-area-inset-top)) + 114px) 8px calc(84px + env(safe-area-inset-bottom))}
 .image-editor .image-editor-composer{bottom:max(14px,env(safe-area-inset-bottom));width:calc(100% - 20px)}
 .image-editor .image-editor-popover,.image-editor .image-editor-size{top:calc(max(10px,env(safe-area-inset-top)) + 112px);max-height:calc(100dvh - 218px);overflow-y:auto}
 .image-editor [hidden]{display:none!important}
}
@media(max-width:359px){.image-editor .image-editor-toolbar button{flex-direction:column;gap:2px;line-height:15px}}
/* Project workspace: conversation first, supporting resources second. */
.projects-view{--project-surface:#141414;--project-field:#202020;--project-line:#ffffff14;--project-muted:#a1a1aa;--project-text:#ededed;width:min(1120px,calc(100% - 64px));padding-top:42px;color:var(--project-text)}
.project-storage-note{font-size:12px;line-height:1.7;color:var(--project-muted);max-width:760px;margin-bottom:8px}
.projects-view>.project-organizer{justify-content:flex-end;margin-bottom:24px;gap:8px}
.projects-view>.project-organizer .secondary-button{font-size:12px;min-height:30px;padding:5px 12px}
.projects-head{margin-bottom:24px;gap:24px}.projects-head h1,.project-detail-head h1{font-size:30px;font-weight:650;letter-spacing:-.7px;line-height:1.3;overflow-wrap:anywhere;white-space:normal}.projects-head p,.project-detail-head p{line-height:1.7;margin-top:8px}
.projects-grid{gap:16px;margin-top:22px;grid-template-columns:repeat(auto-fill,minmax(min(100%,270px),1fr))}.project-card{background:var(--project-surface);border-color:var(--project-line);border-radius:20px;transition:border-color .16s,background .16s}.project-card:hover{border-color:#8887;background:var(--project-field)}.project-card-open{min-height:112px;padding:22px}.project-card-open strong{font-size:16px}.project-card-open small{line-height:1.6}
.project-detail-head{padding-bottom:24px;margin-bottom:0;border-bottom:1px solid var(--project-line)}.project-detail-actions{flex-wrap:wrap}.project-detail-head .project-mark{width:48px;height:48px;border-radius:15px}.project-detail-actions [data-action=project-new-chat]{background:var(--project-text);color:var(--project-surface);border-color:transparent}.project-detail-actions [data-action=project-new-work]{background:transparent;color:var(--project-text);border:1px solid #7775;font-weight:400}.project-detail-actions .project-delete{margin-left:8px}
.project-panel{background:var(--project-surface);border:1px solid var(--project-line);border-radius:20px;padding:22px;margin-top:20px}.project-panel header{align-items:flex-start}.project-panel h2{font-size:16px;line-height:1.5}.project-panel header p,.project-panel>p{line-height:1.7;color:var(--project-muted)}
#project-collaboration{padding:0;overflow:hidden;background:transparent}#project-collaboration summary{padding:18px 22px;font-size:14px;list-style:none;display:flex;align-items:center;gap:12px}#project-collaboration summary::-webkit-details-marker{display:none}#project-collaboration summary:after{content:'＋';margin-left:auto;color:var(--project-muted);font-size:20px;font-weight:400}#project-collaboration[open] summary:after{content:'−'}#project-collaboration[open] summary{border-bottom:1px solid var(--project-line);margin-bottom:18px}.project-disclosure-hint{font-size:12px;color:var(--project-muted);font-weight:400}#project-collaboration>p,#project-collaboration>form,#project-collaboration>div{margin-left:22px;margin-right:22px}#project-collaboration>div:last-child{margin-bottom:18px}#project-role-label{display:inline-block;background:var(--project-field);border-radius:7px;padding:4px 9px}
#project-invite-form{display:grid;grid-template-columns:minmax(140px,1fr) 140px auto;gap:10px}#project-invite-form[hidden]{display:none}.project-member-row{gap:10px;padding:14px 0}.project-member-row:last-child{border-bottom:0}.project-member-row p{font-size:13px;margin:0}.project-member-row .secondary-button{font-size:12px;min-height:34px}.project-member-row select{font-size:12px;min-height:34px}
.project-columns{gap:20px;align-items:start}.project-panel textarea{background:var(--project-field);color:var(--project-text);border-color:var(--project-line);min-height:120px}.project-chat-row{padding:8px;border:1px solid var(--project-line);border-radius:12px;gap:8px}.project-chat-row .project-chat{background:transparent;flex:1 1 180px;min-width:0;width:auto}.project-chat-row>.secondary-button{font-size:12px;min-height:32px;padding:5px 10px}.project-chats>.project-organizer{padding-bottom:16px;margin-bottom:12px;border-bottom:1px solid var(--project-line);gap:10px}.project-file{background:var(--project-field);padding:12px}.project-empty-note{padding:28px 12px;line-height:1.7}.projects-view :is(button,input,select,textarea,summary):focus-visible{outline:2px solid #8b80ff;outline-offset:3px}.projects-view input,.projects-view select{min-width:0;max-width:100%}
html[data-theme=light] .projects-view{--project-surface:#fff;--project-field:#f5f5f7;--project-line:#00000016;--project-muted:#65656d;--project-text:#202024}html[data-theme=light] .project-card,html[data-theme=light] .project-panel{background:var(--project-surface);border-color:var(--project-line)}html[data-theme=light] .project-panel textarea{background:var(--project-field);color:var(--project-text)}
@media(max-width:760px){#projects-view{padding-top:72px}.projects-view .project-detail-actions{display:grid;grid-template-columns:auto 1fr 1fr 32px;gap:5px}.projects-view .project-detail-actions :is(.secondary-button,.project-primary){padding:0 8px;font-size:12px;white-space:nowrap}.projects-view .project-detail-actions .project-delete{margin:0;width:32px}.projects-view>.project-organizer .secondary-button{width:auto;flex:none}.projects-view>.project-organizer{display:flex;flex-wrap:wrap}}
@media(max-width:760px){.projects-view{width:calc(100% - 32px);padding-top:24px;padding-bottom:48px}.projects-head{align-items:flex-start;gap:12px}.projects-head h1,.project-detail-head h1{font-size:25px}.projects-head>.project-primary{flex-shrink:0}.project-detail-head{gap:10px}.project-detail-head>div:nth-child(3){min-width:0;flex:1}.project-detail-actions{width:100%;gap:8px}.project-detail-actions .secondary-button,.project-detail-actions .project-primary{min-height:40px}.project-panel{padding:16px;border-radius:16px}.project-columns{grid-template-columns:1fr;gap:0}.project-disclosure-hint{display:none}#project-collaboration summary{padding:16px}#project-collaboration>p,#project-collaboration>form,#project-collaboration>div{margin-left:16px;margin-right:16px}#project-invite-form{grid-template-columns:1fr 1fr}#project-invite-email{grid-column:1/-1}.project-chats>.project-organizer{display:grid;grid-template-columns:minmax(0,1fr) auto}.project-chats #project-chat-search{grid-column:1/-1;width:100%}.project-member-row p{flex-basis:100%}.project-panel header{gap:10px}.project-panel header>.secondary-button{padding:6px 10px;font-size:12px}.project-chat-row .project-chat{flex-basis:100%}}
