/* Unified neutral surfaces. Loaded after the account and workflow layouts. */
html[data-theme=light]{--bg:#e4e4e1;--paper:#e4e4e1;--surface:#e4e4e1;--surface-soft:#d9d9d5;--field:#e4e4e1;--text:#20201e;--ink:#20201e;--muted:#595954;--secondary:#464642;--quiet:#64645f;--line:#c5c5bf;--border:#c5c5bf;--accent:#9e722c;--accent-hover:#825b21;--sidebar:#e4e4e1;background:var(--bg);color:var(--ink)}
html[data-theme=dark]{--accent:#e3b96b;--accent-hover:#efcb88;--sidebar:#000;--quiet:#aaa;--secondary:#c4c4c4}
body{background:var(--bg)}main,.home-view,.projects-view,.workspace,.auth-view,.admin-view,.topbar{min-width:0;background:var(--bg)}
.sidebar,html[data-theme=dark] .sidebar{background:var(--bg);border-right:1px solid var(--border);color:var(--secondary)}
.brand{gap:12px;letter-spacing:0;color:var(--ink);padding:0;min-height:56px}.brand-sub{color:var(--muted);font-size:10px;letter-spacing:4px}.beta{color:var(--muted);border-color:var(--border);background:transparent}
.brand-mark.te-brand{width:54px;height:54px;flex:0 0 54px;border:1px solid #8e713d;border-radius:14px;box-shadow:inset 0 0 0 3px #111,0 3px 12px #0002}.te-brand img{width:118px;height:118px;object-fit:contain}
.nav-item,.count,.recent-item,.sidebar-empty,.side-section,.sidebar-footer,.sidebar-footer small,.brand-sub{color:var(--secondary)}.nav-item:hover,.nav-item.active,.recent-item:hover,.recent-item.current{background:var(--surface-soft);color:var(--ink)}
html[data-theme=dark] .nav-item:hover,html[data-theme=dark] .nav-item.active,html[data-theme=dark] .recent-item.current{background:#181818;color:#fff}
.new-project{background:var(--accent);color:#fff;font-weight:650;min-height:46px}.new-project kbd{color:inherit}html[data-theme=dark] .new-project{color:#15120c}.local-note{border-color:var(--border);background:transparent;color:var(--secondary)}.local-note small{color:var(--muted)}.sidebar-footer{border-color:var(--border)}
.topbar{gap:16px;min-height:80px;height:auto;padding-top:12px;padding-bottom:12px}.breadcrumb{min-width:0;flex:1}.breadcrumb strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:430px}.topbar-actions{display:flex;align-items:center;gap:14px;flex-shrink:0}.theme-switch{display:flex;gap:3px;padding:4px;border:1px solid var(--border);border-radius:100px;background:var(--surface)}.theme-switch button{width:36px;height:36px;border-radius:50%;background:transparent;color:var(--secondary);font:22px/1 Arial,sans-serif;display:grid;place-items:center}.theme-switch button:hover{background:var(--surface-soft)}.theme-switch button[aria-pressed=true]{background:var(--ink);color:var(--bg)}
.engine-status{min-height:44px;border-color:var(--border);color:var(--secondary);max-width:210px}.primary-button{background:var(--accent);color:#fff;border:1px solid transparent;font-weight:650}.primary-button:hover{background:var(--accent-hover)}html[data-theme=dark] .primary-button{color:#15120c}.send-button{background:var(--accent);color:#fff}html[data-theme=dark] .send-button{color:#15120c}
.home-view{padding-top:55px;max-width:1240px}.hero h1{font-size:64px;font-weight:550;letter-spacing:-2px;line-height:1.1;max-width:100%;margin-top:26px}.hero h1>span{color:var(--accent)}.hero-spark{stroke:var(--accent)}.hero-copy{max-width:700px;font-size:18px;color:var(--secondary)}.prompt-card{border-radius:18px;border-color:var(--border);padding:24px;box-shadow:none}.prompt-card:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 12%,transparent)}.prompt-card textarea{min-height:115px;line-height:1.7}.prompt-tools{min-width:0}.model-note{overflow-wrap:anywhere}.idea-card{border-color:var(--border);border-radius:12px;min-height:220px;transition:transform .18s,border-color .18s}.idea-card:hover{transform:translateY(-4px);border-color:var(--accent)}.idea-link{color:var(--ink)}.idea-title{font-weight:650}.card-number{color:var(--muted)}.bottom-strip{border-color:var(--border)}
.studio-footer{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;text-align:center;gap:22px;margin:44px clamp(18px,4vw,60px) 0;padding:32px 0 28px}.studio-footer>a.creator-credit{flex:none;width:min(420px,100%);max-width:100%;border-radius:14px;overflow:hidden;background:#000;border:1px solid #2b2b2b}.studio-footer .creator-credit img{width:100%;height:auto;border-radius:0}.footer-information{max-width:880px}.studio-footer nav{justify-content:center;align-items:center;gap:0 24px;margin:12px 0}.studio-footer nav a{min-height:44px;display:inline-flex;align-items:center;text-decoration:underline;text-underline-offset:4px}.studio-footer p{font-size:13px}.studio-footer small{font-size:12px;line-height:1.7}
.workspace-heading{align-items:center;flex-wrap:wrap;gap:18px}.workspace-heading>div:first-child{min-width:0;flex:1}.workspace-heading h1{overflow-wrap:anywhere;max-width:none}.workspace-actions{display:flex;gap:8px;flex-wrap:wrap}.workspace-actions button{min-height:44px}.workspace-columns{height:auto;min-height:0;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr)}.conversation-panel,.output-panel{height:clamp(590px,76vh,960px);min-width:0;border-color:var(--border)}.message-body,.message-role,.project-card p{overflow-wrap:anywhere}.messages{min-height:0}.mobile-workspace-nav{display:none}.budget-bar{background:var(--surface);font-size:13px}.file-tree{flex-shrink:0}.code-content{min-width:0}.code-content pre{max-width:100%;overflow:auto}.followup-form textarea{font-size:16px}.settings-dialog,.how-dialog{max-height:90dvh;overflow:auto}.settings-dialog input:not([type=checkbox]),#planForm select{width:100%;min-width:0;background:var(--field);color:var(--ink);border:1px solid var(--border);border-radius:8px;padding:12px;font-size:16px;min-height:46px}.settings-dialog a{text-decoration:underline}.empty-state p{max-width:42ch}.auth-card .checkbox-label a{text-decoration:underline}
.auth-card,.admin-card,.project-card,.conversation-panel,.output-panel,.settings-dialog,.how-dialog,.stat-card,.secondary-button,.followup-form,.output-footer,.idea-card,.prompt-card{background:var(--surface)}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
@media(max-width:1150px){.topbar{padding-left:24px;padding-right:24px}.topbar-actions{gap:10px}.home-view{padding:42px 32px 0}.hero h1{font-size:52px}.hero-spark{display:none}.workspace-columns{grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr)}.workspace-actions button{font-size:13px;padding:10px 12px}}
@media(max-width:900px){.workspace-columns{grid-template-columns:minmax(0,1fr)}.mobile-workspace-nav{display:flex;gap:4px;padding:5px;border:1px solid var(--border);border-radius:12px;margin:16px 0;background:var(--surface)}.mobile-workspace-nav button{flex:1;min-width:0;min-height:44px;border-radius:8px;background:transparent;color:var(--secondary);font-size:14px}.mobile-workspace-nav button[aria-pressed=true]{background:var(--ink);color:var(--bg)}.workspace[data-mobile-panel=conversation] .output-panel{display:none}.workspace[data-mobile-panel=output] .conversation-panel{display:none}.conversation-panel,.output-panel{height:min(76dvh,820px);min-height:470px}.topbar .breadcrumb>span:not(:last-child){display:none}.topbar .breadcrumb-slash{display:none}.hero h1{font-size:46px}.hero-copy{font-size:17px}.ideas-grid{gap:14px}.idea-card{min-height:210px}.admin-view{overflow:hidden}}
@media(max-width:650px){
 .app-shell{overflow-x:clip}.sidebar{width:min(300px,88vw);padding:22px 20px 0;height:100dvh}.sidebar-backdrop{background:#0009;backdrop-filter:blur(3px)}main{margin-left:0;width:100%;max-width:100%}.topbar{min-height:72px;padding:10px 12px;gap:6px;position:sticky;top:0;z-index:12;background:var(--bg)}.breadcrumb{gap:8px;font-size:12px}.breadcrumb strong{max-width:100px;font-size:12px}.mobile-menu{display:inline-flex;min-width:40px;min-height:44px;align-items:center;justify-content:center}.topbar-actions{gap:6px}.theme-switch{gap:0;padding:3px}.theme-switch button{width:32px;height:36px;font-size:21px}.engine-status{width:38px;min-width:38px;padding:0;justify-content:center}.engine-status #engineLabel,.engine-status [data-icon=chevron]{display:none}.engine-status .status-dot{width:8px;height:8px;margin:0}
 .home-view{padding:30px 18px 0}.hero .eyebrow{font-size:10px;letter-spacing:1px;line-height:1.7}.hero h1{font-size:40px;letter-spacing:-1.5px;line-height:1.15;margin:20px 0 18px;word-break:normal}.hero-copy{font-size:16px;line-height:1.75;margin-bottom:26px}.hero-copy br{display:none}.prompt-card{padding:18px 15px;border-radius:14px}.prompt-card textarea{font-size:16px;min-height:125px}.prompt-toolbar{gap:14px}.prompt-tools{width:100%;gap:8px;justify-content:space-between}.prompt-toolbar>.primary-button{width:100%;justify-content:center;min-height:48px;margin:0;font-size:15px}.prompt-tools .subtle-button{min-height:44px;font-size:13px;padding:6px 0}.model-picker select{font-size:14px;min-height:44px;max-width:150px}.model-note{font-size:12px;line-height:1.8}.budget-bar{font-size:12px;padding:12px;line-height:1.8}.prompt-help{gap:5px;line-height:1.8}.prompt-help button{min-height:36px}.section-heading{margin-top:32px;gap:7px}.section-heading h2{font-size:17px;line-height:1.6}.section-heading>span{font-size:13px}.ideas-grid{grid-template-columns:1fr 1fr;gap:10px}.idea-card{padding:18px 13px;min-height:230px}.idea-title{font-size:15px;line-height:1.5}.idea-desc{font-size:13px;line-height:1.7}.idea-link{font-size:12px;line-height:1.6}.card-number{font-size:9px}.bottom-strip{margin-top:28px}.bottom-strip p{font-size:13px;line-height:1.8}.studio-footer{margin:30px 18px 0;padding:25px 0 24px;gap:20px}.studio-footer>a.creator-credit{width:min(380px,100%)}.studio-footer nav{gap:0 18px}.studio-footer nav a{font-size:13px;min-height:44px}.studio-footer p{font-size:12px;line-height:1.8}
 .workspace{padding:22px 14px 14px}.workspace-heading{gap:14px}.workspace-heading>div:first-child{flex:1 0 100%}.workspace-heading h1{font-size:24px;line-height:1.3;margin-top:10px}.workspace-heading .eyebrow{font-size:10px}.workspace-actions{width:100%;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.workspace-actions button{font-size:11px;padding:10px 5px;min-height:44px;justify-content:center;white-space:normal}.workspace-actions button span:not([data-icon]){display:inline}.workspace-actions button svg{display:none}.workspace .budget-bar{margin-bottom:12px}.mobile-workspace-nav{margin:10px 0 14px}.mobile-workspace-nav button{font-size:13px}.conversation-panel,.output-panel{height:72dvh;min-height:450px;border-radius:12px}.messages{padding:16px}.message-body{font-size:16px;line-height:1.75}.followup-form{padding:14px}.followup-modelbar label{font-size:12px}.followup-modelbar select{min-height:44px;font-size:14px;max-width:160px}.followup-form textarea{min-height:85px}.followup-form>div>span{font-size:10px}.followup-form .send-button,.followup-form #stopButton{min-height:44px}.output-toolbar{min-height:54px}.output-tab{min-height:48px;padding:0 8px;font-size:12px}.output-tab svg{display:none}.file-tree{width:105px}.file-tree button{font-size:11px;overflow-wrap:anywhere}.code-content pre{font-size:12px}.output-footer{font-size:10px}.preview-address{font-size:9px}.preview-address>span:first-child{display:none}.settings-dialog,.how-dialog{padding:22px;width:calc(100vw - 24px);max-width:100%;max-height:90dvh}.dialog-heading h2{font-size:25px;line-height:1.25}.dialog-heading .icon-button{min-width:40px;min-height:44px}.auth-view{padding:28px 14px}.auth-card{padding:24px 20px}.auth-card h1{font-size:29px}.projects-view{padding:28px 16px}.projects-heading{flex-wrap:wrap;gap:10px}.projects-heading h1{font-size:32px}.projects-heading>.secondary-button{font-size:13px;margin:0}.project-grid{grid-template-columns:minmax(0,1fr)}.admin-stats{grid-template-columns:1fr 1fr}.stat-card strong{font-size:21px}.admin-card h2{font-size:20px}.admin-table{font-size:13px}.toast{font-size:14px;left:50%;max-width:calc(100vw - 24px);bottom:calc(16px + env(safe-area-inset-bottom))}
}
@media(max-width:360px){.hero h1{font-size:34px}.breadcrumb strong{max-width:70px}.ideas-grid{grid-template-columns:1fr}.idea-card{min-height:175px}.workspace-actions{grid-template-columns:repeat(2,minmax(0,1fr))}.workspace-actions button{font-size:13px}.theme-switch button{width:29px}.model-picker select{max-width:136px}}
@media(prefers-reduced-motion:reduce){.idea-card:hover{transform:none}}

.mobile-menu-close{display:none}html[data-theme=light] textarea::placeholder{color:#696962;opacity:1}@media(max-width:650px){.mobile-menu-close{display:flex;position:absolute;right:8px;top:7px;z-index:1;align-items:center;justify-content:center;min-width:40px;min-height:44px;font-size:26px}.sidebar .brand{margin-top:22px}.sidebar .local-note{display:none}.sidebar .nav-item{min-height:48px}}

.topbar .mobile-brand{display:none}@media(max-width:650px){.topbar .mobile-brand{display:block;flex:0 0 36px;width:36px;height:36px;border-radius:10px}.topbar .mobile-brand img{width:80px;height:80px}}@media(max-width:400px){.breadcrumb strong{display:none}}

.legal-page{background:var(--bg);color:var(--ink)}.legal-page a{color:var(--ink)}.legal-page td,.legal-page th{border-color:var(--border)}.legal-page .legal-note{background:var(--surface-soft);border-color:var(--border)}.legal-theme-control{display:flex;justify-content:flex-end;margin:12px 0}.legal-page footer{display:flex;flex-direction:column;align-items:center;gap:22px;text-align:center;border-color:var(--border)}.legal-page footer img{width:420px;max-width:100%;border-radius:12px}.legal-page footer .legal-nav{justify-content:center}.legal-page .legal-nav a{min-height:44px;display:inline-flex;align-items:center}

html[data-theme=dark] .new-project{background:var(--accent);color:#15120c}

@media(max-width:650px){.topbar{padding-left:10px;padding-right:10px}.breadcrumb{gap:6px}.mobile-menu{min-width:44px}.topbar-actions{gap:4px}.theme-switch button{width:44px;height:44px}.engine-status{width:44px;min-width:44px}.mobile-menu-close{min-width:44px}}@media(max-width:500px){.breadcrumb strong{display:none}}

.legal-page *,.legal-page *::before,.legal-page *::after{box-sizing:border-box}.legal-page main{max-width:100%}.legal-page p,.legal-page td{overflow-wrap:anywhere}
.studio-footer>a.creator-credit,.legal-page footer>a{border:0;border-radius:0;box-shadow:none;background:transparent;overflow:visible}
.studio-footer .creator-credit img,.legal-page footer img{border:0;border-radius:0;box-shadow:none}
html .studio-footer img.signature-light,html .legal-page footer img.signature-light{display:none}
html[data-theme=light] .studio-footer img.signature-light,html[data-theme=light] .legal-page footer img.signature-light{display:block}
html[data-theme=light] .studio-footer img.signature-dark,html[data-theme=light] .legal-page footer img.signature-dark{display:none}
.admin-privacy-note{color:var(--secondary);font-size:14px;line-height:1.8;padding:16px 0;border-top:1px solid var(--border)}

@media(max-width:650px){.topbar .breadcrumb>span.mobile-brand{display:block}}

/* The selected mode is a moving thumb, not three independent filled buttons. */
.theme-switch{position:relative;isolation:isolate}.theme-switch::before{content:'';position:absolute;z-index:0;left:4px;top:4px;bottom:4px;width:calc((100% - 8px)/3);border-radius:100px;background:var(--ink);transform:translateX(calc(var(--theme-index,2)*100%));pointer-events:none}.theme-switch[data-ready=true]::before{transition:transform .26s cubic-bezier(.22,.8,.25,1),background-color .22s ease}.theme-switch button{position:relative;z-index:1;transition:color .2s ease,background-color .2s ease}.theme-switch button[aria-pressed=true]{background:transparent;color:var(--bg)}
body,main,.sidebar,.topbar,.prompt-card,.idea-card,.conversation-panel,.output-panel,.auth-card,.admin-card,.stat-card,.budget-bar,.settings-dialog,.followup-form,.model-picker select{transition:background-color .22s ease,color .22s ease,border-color .22s ease}
@media(prefers-reduced-motion:reduce){.theme-switch[data-ready=true]::before,.theme-switch button,body,main,.sidebar,.topbar,.prompt-card,.idea-card,.conversation-panel,.output-panel,.auth-card,.admin-card,.stat-card,.budget-bar,.settings-dialog,.followup-form,.model-picker select{transition:none!important}}

.sidebar{transition:transform .2s ease,background-color .22s ease,color .22s ease,border-color .22s ease}.idea-card{transition:transform .18s ease,background-color .22s ease,color .22s ease,border-color .22s ease}
.project-filters{display:flex;align-items:end;gap:14px;flex-wrap:wrap;margin-top:24px}.project-filters label{display:grid;gap:8px;font-size:14px;flex:1;min-width:180px}.project-filters input,.project-filters select,.preview-size-controls select{min-height:44px;padding:10px 12px;border:1px solid var(--border);border-radius:8px;background:var(--field);color:var(--ink);font-size:16px;min-width:0;width:100%}.project-filters button{min-height:44px}.preview-size-controls{display:flex;align-items:center;gap:12px;padding:10px 14px;border-bottom:1px solid var(--border);font-size:13px}.preview-size-controls select{width:auto;max-width:65%;font-size:14px}.preview-size-hint{margin:0;padding:8px 14px;color:var(--secondary);font-size:12px;line-height:1.5}.preview-content{display:block;overflow:auto;background:var(--surface-soft);min-width:0}.preview-content iframe{display:block;width:var(--preview-width,100%);min-width:var(--preview-width,100%);max-width:none;height:100%;min-height:300px;margin:0 auto}.preview-content .empty-state{height:100%;min-height:300px;display:flex;flex-direction:column;align-items:center;justify-content:center}.project-card-footer{flex-wrap:wrap;gap:10px}.project-card-footer>span{overflow-wrap:anywhere}
@media(max-width:650px){.project-filters{display:grid;grid-template-columns:minmax(0,1fr)}.project-filters label{min-width:0}.preview-size-controls{gap:8px;padding:8px 10px}.preview-size-controls label{font-size:12px}.preview-size-hint{padding:6px 10px;font-size:11px}}
