/* 054: one shared creation desk; legacy production controls remain actual controls. */
body.agent-desk-ui{--desk-ink:#23324b;--desk-orange:#e96b43;--desk-muted:#65738b;--desk-purple:#7966b5;margin:0;background:#f5f7fb;color:var(--desk-ink);font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;font-size:16px}
.agent-desk-ui *{box-sizing:border-box}.agent-desk-ui button,.agent-desk-ui input,.agent-desk-ui textarea{font:inherit}.agent-desk-ui button{cursor:pointer}.agent-desk-ui button:disabled{cursor:not-allowed;opacity:.45}.agent-desk-ui button:focus-visible,.agent-desk-ui summary:focus-visible,.agent-desk-ui a:focus-visible{outline:3px solid #b1a1db;outline-offset:4px}.agent-desk-ui .sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.agent-desk-ui #app{min-height:100dvh}.agent-desk-ui #student-companion{display:none!important}
.desk-header{height:88px;max-width:1560px;margin:auto;padding:16px 32px;display:flex;align-items:center;justify-content:space-between;gap:24px;border-bottom:1px solid #e3e8f0;background:#f5f7fb;position:relative;z-index:45}.desk-header>div{display:flex;align-items:center;gap:24px}.desk-brand{border:0;background:none;display:flex;align-items:center;gap:12px;color:var(--desk-ink);padding:0;text-align:left;flex-shrink:0}.desk-brand>span{background:var(--desk-ink);color:white;border-radius:12px 12px 12px 3px;width:43px;height:43px;display:grid;place-items:center;font-weight:700;font-size:23px}.desk-brand strong{font-size:17px;font-weight:650}.desk-brand small{display:block;font-size:11px;font-weight:400;color:var(--desk-muted);margin-top:3px}.desk-project-name{font-size:14px;color:var(--desk-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.desk-header .save{font-size:12px;color:var(--desk-muted)}
.desk-bag{position:relative;flex-shrink:0}.desk-bag summary{list-style:none;font-size:14px;padding:10px 16px;border:1px solid #dce2ec;border-radius:10px;background:white;cursor:pointer}.desk-bag summary::-webkit-details-marker{display:none}.desk-bag>div{position:absolute;right:0;top:calc(100% + 10px);width:230px;padding:8px;background:white;box-shadow:0 16px 50px #23324b20;border:1px solid #e1e6ee;border-radius:14px;max-height:70dvh;overflow:auto}.desk-bag>div button{display:block;width:100%;text-align:left;border:0;background:white;color:var(--desk-ink);padding:12px;border-radius:8px;font-size:14px}.desk-bag>div button:hover{background:#f0edf8}.desk-bag [aria-current]{background:#f0edf8}.desk-bag hr{border:0;border-top:1px solid #e4e9f0;margin:6px 0}
.desk-welcome{max-width:820px;margin:0 auto;padding:30px 28px 32px;text-align:center}.desk-welcome-portrait{height:184px;display:flex;align-items:center;justify-content:center;position:relative}.desk-welcome-portrait img{height:181px;width:166px;object-fit:contain;filter:drop-shadow(0 12px 12px #23324b12);animation:desk-arrive .55s ease-out}.desk-welcome-portrait span{position:absolute;left:calc(50% + 75px);top:53px;padding:12px 20px;background:white;border:1px solid #e1e6ee;border-radius:18px 18px 18px 4px;font-size:14px;white-space:nowrap;transform:rotate(4deg)}.desk-welcome h1{font-size:clamp(30px,4vw,46px);line-height:1.3;letter-spacing:-1.2px;margin:18px 0;color:var(--desk-ink);font-weight:680}.desk-welcome>p{font-size:16px;color:var(--desk-muted);line-height:1.9;margin:0 0 25px}.desk-entry-options{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;margin:24px 0 18px}.desk-link{border:0;background:transparent;color:var(--desk-purple);padding:9px 10px;font-size:13px;line-height:1.5;border-radius:8px}.desk-link:hover{background:#eeebf5}.desk-entry-options .desk-link{background:#fff;border:1px solid #dfe5ee;border-radius:24px;padding:11px 18px;color:#4a5770;font-size:14px}.desk-entry-options .desk-link:hover{border-color:#a69acb;background:#f5f2fb}.desk-composer{text-align:left;padding:16px;background:white;border:1px solid #dce2eb;border-radius:18px;box-shadow:0 8px 32px #23324b05}.desk-welcome .desk-composer{max-width:700px;margin:0 auto 20px}.desk-composer textarea{display:block;resize:vertical;min-height:65px;max-height:220px;width:100%;border:0;background:none;padding:2px 2px 12px;color:var(--desk-ink);font-size:16px;line-height:1.8;outline:none}.desk-composer:focus-within{border-color:#9c8dc5;box-shadow:0 0 0 3px #7966b511}.desk-compose-bottom{display:flex;justify-content:space-between;align-items:center;gap:12px}.desk-compose-bottom>span{font-size:11px;color:#7a8598;line-height:1.6;max-width:68%}.desk-send,.desk-primary{padding:11px 19px;border:0;background:var(--desk-orange);color:#fff;border-radius:10px;white-space:nowrap;font-weight:600;font-size:14px;min-height:44px}.desk-send span{margin-left:8px}.desk-send:hover,.desk-primary:hover{background:#ce5734}.desk-sample{display:inline-block;margin:5px 0 14px;font-size:13px;color:#728097;text-decoration:none}.desk-welcome .desk-disclosure{font-size:11px;color:#8691a2}.desk-inspiration{max-width:650px;margin:20px auto;padding:20px;background:#e8f0eb;text-align:left;line-height:1.8;border-radius:10px}.desk-inspiration strong{font-size:15px}.desk-inspiration p{font-size:14px;margin-bottom:0}
.desk-layout{max-width:1560px;margin:auto;display:grid;grid-template-columns:minmax(0,3fr) minmax(0,2fr);gap:28px;padding:28px 32px 40px;align-items:start}.desk-layout[data-workspace-focus="artifact"]{grid-template-columns:minmax(0,2fr) minmax(0,3fr)}.desk-partner{position:sticky;top:20px;display:flex;flex-direction:column;min-width:0;height:calc(100dvh - 150px);max-height:calc(100dvh - 40px);min-height:0}.desk-partner-head{display:flex;gap:10px;align-items:center;padding:0 0 16px;border-bottom:1px solid #e3e7ef}.desk-partner-head img{width:64px;height:70px;object-fit:contain}.desk-partner-head strong{display:block;font-size:17px}.desk-partner-head span{display:block;font-size:12px;color:var(--desk-muted);margin-top:5px}.desk-partner-head>.desk-link{margin-left:auto;font-size:12px;padding:8px}.desk-messages{overflow:auto;overscroll-behavior:contain;min-height:0;flex:1;padding:20px 2px 12px;scrollbar-width:thin}.desk-message{font-size:16px;line-height:1.85;margin:0 0 20px;max-width:100%;overflow-wrap:anywhere}.desk-message p{margin:5px 0 0;white-space:pre-wrap}.desk-message>span{font-size:11px;color:var(--desk-muted)}.desk-message.user{background:#ece9f6;padding:13px 17px;border-radius:15px 15px 3px 15px;margin-left:28px}.desk-message.user>.desk-link{font-size:11px;padding:5px 0}.desk-message.assistant{padding-right:12px}.desk-message.local{border-left:2px solid #b8cfc2;padding-left:14px}.desk-lesson{flex-shrink:0;max-height:190px;overflow:auto;border:1px solid #dce7df;border-radius:12px;background:#edf4ef;margin:8px 0 14px}.desk-lesson summary{list-style:none;padding:14px;font-size:13px;cursor:pointer;font-weight:550}.desk-lesson summary span{color:#6d9381;margin-right:5px}.desk-lesson summary small{font-weight:400;display:block;color:#728577;font-size:11px;margin:5px 0 0 21px}.desk-lesson>div{padding:0 16px 16px;font-size:13px;line-height:1.8}.desk-method{font-weight:600;margin-top:0}.desk-example{color:#65776d}.desk-disclosure{font-size:10px;line-height:1.6;color:var(--desk-muted)}.desk-partner .desk-composer{padding:13px;box-shadow:none;flex-shrink:0}.desk-partner .desk-compose-bottom{gap:6px}.desk-partner .desk-compose-bottom>span{max-width:65%;font-size:10px}.desk-partner .desk-send{padding:9px 14px;font-size:13px}.desk-partner .desk-composer textarea{font-size:16px;min-height:96px}.desk-thinking{font-size:13px;color:#7966b5;padding:12px}.desk-artifact{min-width:0}.desk-artifact-bar{display:flex;gap:14px;align-items:center;justify-content:space-between;padding:0 2px 16px;font-size:13px;color:var(--desk-muted)}.desk-artifact-bar>span:first-child{color:var(--desk-ink);font-weight:600}.desk-artifact-bar>span:last-child{font-size:11px;margin-left:auto}
.desk-paper{background:white;border:1px solid #e1e6ed;border-radius:7px;padding:30px 38px;min-height:680px;box-shadow:0 5px 24px #23324b03}.desk-paper>header{display:flex;align-items:flex-start;justify-content:space-between;gap:15px;padding-bottom:20px;border-bottom:1px solid #edf0f4}.desk-eyebrow{font-size:12px;color:#939bae}.desk-paper h1{font-size:26px;line-height:1.5;margin:8px 0 0;font-weight:630;overflow-wrap:anywhere}.desk-title-label{display:block;margin-top:22px;font-size:12px;color:#7b8699}.desk-title-label input{display:block;width:100%;border:0;border-bottom:1px solid #e7eaf0;background:white;color:var(--desk-ink);padding:12px 0;font-weight:550;font-size:17px;outline:none}.desk-title-label input:focus{border-color:#9c8dc5}.desk-story-label{display:block;font-size:12px;color:#8c95a5;margin-top:25px}.desk-paper #desk-story{width:100%;min-height:290px;resize:vertical;font-size:17px;line-height:2.05;color:var(--desk-ink);background:transparent;border:0;padding:14px 0;outline:none}.desk-paper #desk-story:focus{box-shadow:0 2px #b1a1db}.desk-paper footer{display:flex;flex-direction:column;align-items:flex-start;gap:18px;padding:18px 0;border-top:1px solid #edf0f4}.desk-paper footer>span{font-size:11px;color:#8590a2}.desk-paper footer>div{display:flex;justify-content:flex-end;gap:10px;width:100%;flex-wrap:wrap}.desk-next{margin-top:20px;padding:18px;background:#f6f4fa;border-radius:10px;font-size:14px}.desk-next p{margin:0 0 5px}.desk-paper-import,.desk-welcome-import{padding-top:20px;text-align:left;line-height:1.7}.desk-paper-import>header{display:flex;align-items:center;justify-content:space-between}.desk-paper-import h2{font-size:17px}.desk-paper-import img,.desk-welcome-import img{max-width:100%}.desk-paper-import .paper-review,.desk-welcome-import .paper-review{margin-top:20px}
.agent-desk-ui .desk-existing-content{padding:24px!important;max-width:none!important;background:#fff;border:1px solid #e2e6ee;border-radius:8px;min-width:0;margin:0!important;min-height:650px}.desk-existing-content .intro{margin:0 0 22px!important}.desk-existing-content .intro h1{font-size:24px!important;line-height:1.5!important;letter-spacing:-.4px}.desk-existing-content .intro p{font-size:14px!important;line-height:1.8!important}.desk-existing-content .scene-backbar,.desk-existing-content>.footer{display:none!important}.desk-existing-content .canvas-workspace{grid-template-columns:minmax(0,1fr)}.desk-existing-content .canvas-layout{grid-template-columns:minmax(0,1fr)!important}.desk-existing-content .canvas-tools{width:auto!important;max-width:none!important}.desk-existing-content .studio-grid,.desk-existing-content .edit-grid{grid-template-columns:minmax(0,1fr)!important}.desk-existing-content .board-toolbar{flex-wrap:wrap}.desk-existing-content .shot-strip{max-width:100%;overflow:auto}.desk-existing-content video,.desk-existing-content img{max-width:100%}.desk-existing-content .stage-delivery{display:none}.desk-mobile-switch{display:none}.agent-desk-ui #toast{z-index:100}
@keyframes desk-arrive{from{opacity:0;transform:translateY(8px) rotate(-3deg)}to{opacity:1;transform:translateY(0) rotate(0)}}
@media(max-width:1000px){.desk-layout{grid-template-columns:minmax(0,3fr) minmax(0,2fr);gap:18px;padding:24px 20px}.desk-paper{padding:24px}.desk-header{padding:16px 20px}.desk-project-name{display:none}.desk-partner{min-height:0}}
@media(max-width:760px){.desk-header{height:76px;padding:12px 16px;gap:10px}.desk-brand strong{font-size:15px}.desk-brand>span{width:36px;height:36px;font-size:20px}.desk-header>div{gap:8px}.desk-header .save{display:none}.desk-bag summary{padding:9px 12px;font-size:13px}.desk-welcome{padding:30px 20px}.desk-welcome-portrait{height:155px}.desk-welcome-portrait img{height:150px;width:135px}.desk-welcome-portrait span{left:calc(50% + 50px);top:38px;font-size:12px;padding:10px}.desk-welcome h1{font-size:32px;letter-spacing:-.5px}.desk-welcome>p{font-size:14px}.desk-entry-options{gap:8px}.desk-entry-options .desk-link{font-size:12px;padding:9px 12px}.desk-compose-bottom>span{max-width:56%;font-size:10px}.desk-welcome .desk-send{font-size:13px;padding:10px 14px}.desk-mobile-switch{display:flex;gap:8px;padding:12px 16px 0}.desk-mobile-switch .desk-link{flex:1;background:#fff;border:1px solid #e0e4ec;min-height:44px}.desk-layout{display:block;padding:15px 16px 26px}.desk-layout[data-mobile-view="conversation"] .desk-artifact{display:none}.desk-layout[data-mobile-view="artifact"] .desk-partner{display:none}.desk-partner{position:static;height:calc(100dvh - 160px);min-height:480px;max-height:none}.desk-paper{padding:20px 18px;min-height:620px}.desk-paper h1{font-size:22px}.desk-paper>header>.desk-link{font-size:12px;white-space:nowrap}.desk-artifact-bar>span:last-child{display:none}.agent-desk-ui .desk-existing-content{padding:16px!important}.desk-existing-content .intro h1{font-size:22px!important}.desk-existing-content .row{flex-wrap:wrap}.desk-existing-content .template-cards{grid-template-columns:1fr!important}.desk-paper #desk-story{font-size:16px}}
@media(prefers-reduced-motion:reduce){.agent-desk-ui *{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
@media(min-width:761px) and (max-height:800px){.desk-partner .desk-lesson{max-height:120px}.desk-welcome{padding-top:16px}.desk-welcome-portrait{height:145px}.desk-welcome-portrait img{height:145px;width:140px}.desk-welcome-portrait span{top:36px}.desk-welcome h1{margin:12px 0;font-size:40px}.desk-welcome>p{margin-bottom:16px;font-size:15px}.desk-entry-options{margin:18px 0 14px}}

.scene-plate-photo{display:block;width:240px;max-width:100%;height:135px;object-fit:contain;background:#eef2f6;border-radius:8px;margin:8px 0}.scene-plate,.scene-background-review{padding:12px 0;border-top:1px solid #dce6eb}.scene-plate button,.scene-background-review button{margin:4px}.character-story-facts{margin:12px 0}.prompt-controls[hidden]{display:none}

.style-anchor-bar{position:sticky;top:8px;z-index:4;padding:12px;background:#fff;border:1px solid #dce6eb;border-radius:10px;margin:12px 0;max-height:55dvh;overflow:auto}.style-anchor-heading{display:flex;align-items:center;gap:12px}.style-anchor-heading p{font-size:12px;line-height:1.6;margin:5px 0;color:#63728a}.style-sample-photo{width:96px;height:64px;object-fit:contain;max-width:100%;display:block;background:#eef2f6}.style-anchor-bar .row{display:flex;gap:6px;flex-wrap:wrap}.style-anchor-settings{margin-top:8px}.style-anchor-settings>summary{cursor:pointer;font-size:13px}.style-sample-review{padding:12px 0;border-top:1px solid #dce6eb}.style-sample-review button{margin:4px}
/* Story: the task takes the wide column and its main action stays on screen while the page scrolls. */
@media(min-width:761px){
 body.agent-desk-ui[data-director-stage="story"] .desk-layout .desk-artifact{height:auto}
 body.agent-desk-ui[data-director-stage="story"] .desk-layout .desk-paper{overflow:visible}
 body.agent-desk-ui[data-director-stage="story"] .desk-layout .desk-paper>footer{position:sticky;bottom:0;z-index:2;background:#fff;padding:14px 0 12px}
}
