/* A single illustrated composition scales together with the 1600px atelier. */
#atelier-stage:is([data-view=create],[data-view=teach]){grid-template-rows:64px minmax(0,1fr) 32px}
#atelier-stage:is([data-view=create],[data-view=teach])>header{height:64px;padding-block:8px;background:#fbf2e3}
#atelier-stage:is([data-view=create],[data-view=teach])>footer{height:32px;padding-block:3px;background:#fbf2e3}
#atelier-stage:is([data-view=create],[data-view=teach])>main{overflow:hidden;background:#cfa578;display:flex;align-items:center;justify-content:center}
.illustrated-editor,.illustrated-lesson{position:relative;flex:none;width:1600px;height:900px;color:#644726;font-family:Georgia,'Noto Serif SC','Songti SC','SimSun',serif}
.illustrated-editor{background:url('assets/studio/collage-desk.webp') center/100% 100% no-repeat}
.illustrated-editor .page-top{position:absolute;left:135px;right:120px;top:40px;margin:0;max-width:none;height:55px;padding:0;display:flex;align-items:center;justify-content:center}
.illustrated-editor .page-top h2{font-size:34px;letter-spacing:5px;color:#634222}.illustrated-editor .page-top .eyebrow{font-size:10px;color:#977148;text-align:center;margin-bottom:3px;letter-spacing:3px}.illustrated-editor .page-top .editor-home{position:absolute;left:0;font-size:17px;letter-spacing:2px}.illustrated-editor .editor-top-actions{position:absolute;right:0;top:22px;font-size:12px}.illustrated-editor .editor-top-actions button{color:#70563a}
#atelier-stage .illustrated-editor .collage-editor{position:absolute;left:112px;top:122px;width:1415px;height:722px;min-height:0;max-width:none;margin:0;grid-template-columns:360px minmax(0,1fr) 245px;border:0;border-radius:0;overflow:hidden;background:transparent;box-shadow:none;gap:0}
#atelier-stage .illustrated-editor .panel{padding:12px 22px;background:transparent;border:0;overflow:auto;scrollbar-width:thin}
 .illustrated-editor .material-panel-head h3{font-size:25px;letter-spacing:3px}
.illustrated-editor .category-strip{margin:2px 0 13px}
.illustrated-editor .category-strip .category{
 width:100%;display:grid;grid-template-columns:98px repeat(4,minmax(0,1fr));gap:4px;
 padding:4px 0;border-bottom:1px solid #dec8ab;border-radius:0;
}
.illustrated-editor .category-strip .category button{
 min-width:0;min-height:34px;padding:5px 2px;border-radius:18px;
 color:#745c42;font-size:13px;letter-spacing:0;
}
.illustrated-editor .category-strip .category button:hover{background:#eee2cb}
.illustrated-editor .category-strip .category button.active{background:#538475;color:#fff7e8}
.illustrated-editor .catalog-motifs{max-height:345px;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.illustrated-editor .catalog-motifs .motif-btn{height:108px;background:#fff6e860;border-color:#ddba94}.illustrated-editor .catalog-motifs .motif-btn img,.illustrated-editor .catalog-motifs .motif-btn svg{height:75px}.illustrated-editor .catalog-motifs .motif-btn span{font-size:10px;color:#947557}.illustrated-editor .starter-section{margin-top:12px;padding-top:12px}.illustrated-editor .starter-section h3{font-size:23px}.illustrated-editor .starter-grid{max-height:123px}.illustrated-editor .starter-card img{height:83px;aspect-ratio:auto}.illustrated-editor .template-list{gap:5px;display:flex;flex-wrap:wrap}.illustrated-editor #save-starter,.illustrated-editor #editor-manage{font-size:10px;padding:5px 7px}
#atelier-stage .illustrated-editor .canvas-area{background:transparent;padding:0 16px 12px;min-height:0;justify-content:start;display:flex;flex-direction:column}.illustrated-editor .canvas-toolbar{height:46px;color:#5c7468}.illustrated-editor .canvas-toolbar>span{font-size:13px;letter-spacing:2px}.illustrated-editor .canvas-scroll{height:565px;flex:none;padding:12px 4px 10px}.illustrated-editor .canvas-zoom-shell{height:504px;width:405px}.illustrated-editor .paper-wrap{box-shadow:0 3px 13px #635e4533;border:1px solid #c9bda5;border-radius:4px;overflow:visible}.illustrated-editor #design-canvas{border-radius:3px;touch-action:none}.illustrated-editor .paper-meta{margin:0 0 4px;color:#998971;font-size:9px}.illustrated-editor .editor-actions{margin:9px 0 0;justify-content:center;gap:8px;border-top:1px solid #b8bca249;padding-top:10px;width:100%}.illustrated-editor .editor-actions button{font-size:13px!important;color:#6c4e32;background:#fff5dfb5;border:1px solid #d5b78e;border-radius:6px;min-width:66px;padding:9px 7px!important}
#atelier-stage .illustrated-editor .right-panel{background:#fff5e7cf;border-left:1px solid #d5b58a;padding:18px 16px 10px}.illustrated-editor .right-panel h3{font-size:21px;letter-spacing:3px}.illustrated-editor #layer-list{max-height:225px}.illustrated-editor .layer-row{background:#fff9ec70}.illustrated-editor .layer-row.active{background:#dce9df;border-color:#6d9b88}.illustrated-editor .right-bottom{padding-top:8px}.illustrated-editor .palettes{gap:6px;margin:7px 0 14px}.illustrated-editor .palette{padding:7px 4px}.illustrated-editor .editor-next{background:linear-gradient(#497e70,#2f6258);border:1px solid #245249;border-radius:10px;color:#fff3d9;height:54px;letter-spacing:3px;font-size:18px!important}.illustrated-editor .right-panel .panel-note{font-size:10px;line-height:1.7}.illustrated-editor .layer-adjust{margin-top:8px}.illustrated-editor .layer-adjust summary{font-size:12px}
.illustrated-lesson{background:#bc8f5c;overflow:hidden}.loom-full-scene{position:absolute;inset:0;touch-action:none}.loom-full-scene>svg{width:100%;height:100%;display:block}.loom-back{position:absolute;left:30px;top:24px;color:#fff7df;font-size:19px;letter-spacing:2px;text-shadow:0 2px 6px #142f35;z-index:2}.loom-lesson-card{position:absolute;left:45px;top:115px;width:270px;padding:23px 24px 18px;border:1px solid #fff0d4;border-radius:13px;background:linear-gradient(130deg,#fff1d9eb,#f5dfb9cc);box-shadow:0 5px 20px #67401a1c;backdrop-filter:blur(4px)}.loom-eyebrow{font-size:10px;letter-spacing:3px;color:#a77a49}.loom-lesson-tabs{display:flex;gap:10px;margin:14px 0 12px}.loom-lesson-tabs button{font-size:14px;color:#8a7253;border-bottom:1px solid transparent;padding-bottom:4px}.loom-lesson-tabs button[aria-pressed=true]{color:#376e64;border-color:#376e64}.loom-lesson-card h2{font-size:39px;letter-spacing:5px;margin:0 0 10px;color:#59391b}.loom-lesson-card>p{font-size:15px;line-height:1.9;margin:0 0 14px}.lesson-steps{display:flex;align-items:center;justify-content:space-between;font-size:16px;margin:15px 0 18px}.lesson-steps i{font-size:12px;font-style:normal;color:#b4976f}.lesson-steps span{border-radius:12px;padding:3px 7px}.lesson-steps span.active{background:#56877a;color:#fff4d7}#study-counter{display:block;font-size:23px;font-weight:400;letter-spacing:2px}#study-segment{display:block;font-size:11px;margin:8px 0 16px;color:#8c7b5e}.loom-lesson-card .loom-knowledge{font-size:11px;line-height:1.9;padding-top:13px;border-top:1px solid #c8ab823d;color:#917052}.loom-lesson-card .primary{background:#4b8071;border:1px solid #356b5d;border-radius:7px;color:#fff2d4;font-size:14px;letter-spacing:1px;min-height:43px;width:100%;margin-top:4px;padding:7px 10px}.loom-lesson-card .primary:disabled{opacity:.45}.loom-small-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:12px}.loom-small-actions button{padding:7px 2px;border:1px solid #bd945d;border-radius:5px;background:#ffedcb8c;font-size:11px;color:#76512c}.loom-lesson-card details{margin-top:12px;font-size:10px;line-height:1.7;color:#96784e}.loom-lesson-card summary{cursor:pointer}.loom-lesson-card details p{font-size:10px}.loom-lesson-card details a{color:#4e8170}
.loom-tools{position:absolute;right:34px;top:488px;width:240px;display:grid;grid-template-columns:1fr 1fr;gap:8px;pointer-events:none}.loom-tools button{pointer-events:auto;touch-action:none;cursor:grab;border:1px solid #d9ae75;background:linear-gradient(#ffecc6e0,#efcd97a6);border-radius:10px;padding:3px 4px 9px;transition:transform .18s,box-shadow .18s}.loom-tools button:nth-child(3){grid-column:1/3;width:135px;justify-self:center}.loom-tools button>svg{display:block;width:100%;height:65px;pointer-events:none}.loom-tools button>span{display:block;font-size:12px;color:#76502d;pointer-events:none}.loom-tools button.active{outline:2px solid #3b8d82;transform:translateY(-5px);box-shadow:0 5px 15px #66502a33}.loom-tools button.tool-needed:not(.active){box-shadow:0 0 0 2px #fff5ccaa}.loom-tools button:active{cursor:grabbing}.loom-prompt{position:absolute;left:50%;width:660px;transform:translateX(-50%);bottom:51px;display:grid;place-items:center;text-align:center;min-height:51px;padding:10px 22px;background:#fff1d4ee;border:1px solid #bb8747;border-radius:12px;box-shadow:0 3px 10px #754e252b;pointer-events:none}.loom-prompt p{font-size:16px;line-height:1.6;margin:0;color:#62401e}.loom-scope-label{position:absolute;inset-inline:0;bottom:25px;text-align:center;color:#775135;font-size:10px;letter-spacing:2px;pointer-events:none}
.catalog-trash{padding:20px;border:1px solid #d9c5a9;margin-top:25px}.catalog-trash summary{cursor:pointer;color:#7c6650}.trash-list{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-top:15px}.trash-list>div{display:flex;align-items:center;gap:8px;padding:8px;background:#f4ebdd}.trash-list img{width:45px;height:45px;object-fit:contain}.trash-list span{font-size:11px;flex:1}.trash-list button{font-size:11px;color:#477567}.delete-material{color:#a55f47!important}.material-reference-warning{font-size:12px;line-height:1.9;color:#9d674a;background:#f7ecdc;padding:12px}
.loom-lesson-card .lesson-steps{gap:4px}.loom-lesson-card .lesson-steps span{white-space:nowrap;flex:none}.loom-lesson-card .lesson-steps i{flex:none}
.manager-selection{display:flex;gap:18px;align-items:center;padding:14px 18px;margin-bottom:18px;background:#eee4d3;font-size:12px}.manager-selection>span{color:#978268;font-size:11px}.manager-selection input,.manager-select input{accent-color:#5c8170}.manager-select{display:flex;align-items:center;font-size:10px;color:#92785a;margin-bottom:8px;gap:4px}.manager-select input{margin:0}
.illustrated-lesson{user-select:none;-webkit-user-select:none}.loom-full-scene image,.loom-tools svg{pointer-events:none}
.working-scene-illustration{position:relative;width:100%;max-width:650px;aspect-ratio:1672/941;overflow:hidden;border-radius:10px;box-shadow:0 8px 35px #74543120}.working-scene-illustration>svg{display:block;width:100%;height:100%}.working-scene-illustration>span{position:absolute;bottom:7%;left:37%;right:37%;padding:7px 8px;text-align:center;border:1px solid #e0be84;border-radius:15px;background:#fff2d8d9;font-size:11px;color:#806344}.scene-working-shuttle{animation:scene-weave-pass 2.8s ease-in-out infinite}.scene-working-thread{animation:scene-weave-thread 2.8s ease-in-out infinite;transform-origin:center}@keyframes scene-weave-pass{0%,100%{transform:translate(430px,650px)}50%{transform:translate(1000px,650px)}}@keyframes scene-weave-thread{0%,100%{opacity:.25}50%{opacity:.85}}@media(prefers-reduced-motion:reduce){.scene-working-shuttle,.scene-working-thread{animation:none}}
/* V16: align the workspace to the painted panel rather than its surrounding desk. */
#atelier-stage .illustrated-editor .collage-editor{grid-template-columns:400px minmax(0,1fr) 245px}
#atelier-stage .illustrated-editor .canvas-area{position:relative;display:grid;grid-template-rows:60px minmax(0,1fr) 66px;padding:0!important;gap:0;overflow:hidden}
.illustrated-editor .canvas-toolbar{height:60px;grid-row:1;padding:0 18px;gap:12px;align-self:start}
.illustrated-editor .canvas-toolbar>div{gap:8px}.illustrated-editor .canvas-toolbar .canvas-formats{display:flex;gap:0;border:1px solid #d7bf9e;border-radius:20px;overflow:hidden;background:#fff3df}
.illustrated-editor .canvas-formats button{font-size:15px;letter-spacing:2px;padding:7px 15px;min-width:63px;color:#836242}
.illustrated-editor .canvas-formats button[aria-pressed=true]{background:#518477;color:#fff4df}
.illustrated-editor .canvas-scroll{grid-row:2;height:auto;min-height:0;display:flex;align-items:flex-start;justify-content:flex-start;padding:16px 24px 38px;overflow:auto}
.illustrated-editor .canvas-zoom-shell{margin:auto;flex:none}
#atelier-stage .illustrated-editor .paper-wrap{width:100%;height:100%;max-width:none}
.illustrated-editor .paper-meta{position:absolute;left:20px;right:20px;bottom:76px;height:16px;margin:0;display:flex;justify-content:space-between;font-size:11px;pointer-events:none}
.illustrated-editor .editor-actions{grid-row:3;margin:0;padding:11px 8px 0;border:0;align-items:flex-start;align-self:stretch;gap:7px}
.illustrated-editor .editor-actions button{font-size:12px!important;min-width:60px;padding:9px 5px!important}
.illustrated-editor .editor-actions #flip[aria-pressed=true]{color:#fff4df;background:#518477;border-color:#518477}
.illustrated-editor .editor-top-actions{top:17px}.illustrated-editor .page-top h2{margin:0;line-height:1.3;font-size:34px}.illustrated-editor .page-top .editor-home{font-size:16px;color:#75522d}
.canvas-output-note{border-top:1px solid #d6b98e80;margin:0 0 20px;padding-top:18px;display:flex;flex-direction:column;gap:8px;color:#896e4b;font-size:12px;line-height:1.7}.canvas-output-note strong{font-size:20px;font-weight:400;letter-spacing:1px;color:#5e6f5d}.canvas-output-note small{font-size:10px}
.paper-background-layer{border-top:1px solid #d2bd9e;padding:12px 4px 5px;display:flex;flex-direction:column;gap:5px;color:#9b8463;font-size:11px}.paper-background-layer small{font-size:9px;color:#a8987c}.background-picked{outline:2px solid #438576!important;outline-offset:-2px}
.parked-loom-tool{cursor:grab;touch-action:none}.parked-loom-tool:active{cursor:grabbing}.parked-loom-tool svg{pointer-events:none}.parked-loom-tool:focus-visible>rect{stroke:#3b8a78;stroke-width:3}
.expected-tool{animation:expected-tool-glow 1.35s ease-in-out infinite;filter:drop-shadow(0 0 4px #a2f5d7)}
@keyframes expected-tool-glow{0%,100%{filter:drop-shadow(0 0 2px #6ed8b2) drop-shadow(0 0 4px #fff5bb)}50%{filter:drop-shadow(0 0 5px #53bda1) drop-shadow(0 0 10px #f9ffd4)}}
.beat-guide{animation:beat-guide-motion 1.4s ease-in-out infinite;pointer-events:none}.shuttle-guide{pointer-events:none}@keyframes beat-guide-motion{0%,100%{transform:translateY(0);opacity:.6}50%{transform:translateY(8px);opacity:1}}
.study-complete-panel{position:absolute;z-index:5;left:50%;top:50%;transform:translate(-50%,-50%);width:430px;padding:35px 34px 25px;text-align:center;border:1px solid #eed3a9;border-radius:17px;background:linear-gradient(135deg,#fff6e8f7,#f8e5c8f2);box-shadow:0 15px 90px #593b2550;backdrop-filter:blur(8px)}.study-complete-panel>span{font-size:12px;letter-spacing:3px;color:#8b785a}.study-complete-panel h2{font-size:28px;margin:18px 0;color:#665032}.study-complete-panel p{font-size:13px;color:#9e8969;margin-bottom:24px}.study-complete-panel .primary{font-size:15px;background:#477e6b;border-color:#366b58;border-radius:8px;min-height:49px;letter-spacing:2px}.study-complete-panel .text-btn{display:block;margin:15px auto 0;font-size:12px;color:#9c8361}
.working-scene-illustration .thumb-reveal-mask{animation:thumb-weave-reveal 6s linear infinite}.working-scene-illustration .scene-working-shuttle{animation:thumb-shuttle 6s linear infinite}
@keyframes thumb-weave-reveal{0%{y:730px;height:0}82%,95%{y:385px;height:345px}99.9%{y:385px;height:345px}100%{y:730px;height:0}}
@media(prefers-reduced-motion:reduce){.expected-tool,.beat-guide,.working-scene-illustration .scene-working-shuttle{animation:none}.working-scene-illustration .thumb-reveal-mask{animation:none;y:385px;height:345px}}

@keyframes thumb-shuttle{0.000%{transform:translate(520px,680px)}2.267%{transform:translate(900px,680px)}2.412%{transform:translate(900px,670px)}4.679%{transform:translate(520px,670px)}4.824%{transform:translate(520px,660px)}7.091%{transform:translate(900px,660px)}7.235%{transform:translate(900px,650px)}9.502%{transform:translate(520px,650px)}9.647%{transform:translate(520px,640px)}11.914%{transform:translate(900px,640px)}12.059%{transform:translate(900px,630px)}14.326%{transform:translate(520px,630px)}14.471%{transform:translate(520px,620px)}16.738%{transform:translate(900px,620px)}16.882%{transform:translate(900px,610px)}19.149%{transform:translate(520px,610px)}19.294%{transform:translate(520px,600px)}21.561%{transform:translate(900px,600px)}21.706%{transform:translate(900px,590px)}23.973%{transform:translate(520px,590px)}24.118%{transform:translate(520px,580px)}26.385%{transform:translate(900px,580px)}26.529%{transform:translate(900px,570px)}28.796%{transform:translate(520px,570px)}28.941%{transform:translate(520px,560px)}31.208%{transform:translate(900px,560px)}31.353%{transform:translate(900px,550px)}33.620%{transform:translate(520px,550px)}33.765%{transform:translate(520px,540px)}36.032%{transform:translate(900px,540px)}36.176%{transform:translate(900px,530px)}38.444%{transform:translate(520px,530px)}38.588%{transform:translate(520px,520px)}40.855%{transform:translate(900px,520px)}41.000%{transform:translate(900px,510px)}43.267%{transform:translate(520px,510px)}43.412%{transform:translate(520px,500px)}45.679%{transform:translate(900px,500px)}45.824%{transform:translate(900px,490px)}48.091%{transform:translate(520px,490px)}48.235%{transform:translate(520px,480px)}50.502%{transform:translate(900px,480px)}50.647%{transform:translate(900px,470px)}52.914%{transform:translate(520px,470px)}53.059%{transform:translate(520px,460px)}55.326%{transform:translate(900px,460px)}55.471%{transform:translate(900px,450px)}57.738%{transform:translate(520px,450px)}57.882%{transform:translate(520px,440px)}60.149%{transform:translate(900px,440px)}60.294%{transform:translate(900px,430px)}62.561%{transform:translate(520px,430px)}62.706%{transform:translate(520px,420px)}64.973%{transform:translate(900px,420px)}65.118%{transform:translate(900px,410px)}67.385%{transform:translate(520px,410px)}67.529%{transform:translate(520px,400px)}69.796%{transform:translate(900px,400px)}69.941%{transform:translate(900px,390px)}72.208%{transform:translate(520px,390px)}72.353%{transform:translate(520px,380px)}74.620%{transform:translate(900px,380px)}74.765%{transform:translate(900px,370px)}77.032%{transform:translate(520px,370px)}77.176%{transform:translate(520px,360px)}79.444%{transform:translate(900px,360px)}79.588%{transform:translate(900px,350px)}81.855%{transform:translate(520px,350px)}95%,99.9%{transform:translate(520px,350px)}100%{transform:translate(520px,680px)}}
#atelier-stage .illustrated-editor .canvas-area{grid-template-columns:minmax(0,1fr);justify-content:stretch;justify-items:stretch;align-items:stretch}
.illustrated-editor .paper-meta{width:auto!important;max-width:none}
.loom-lesson-card #study-counter[data-colours=true]{font-size:17px;letter-spacing:.5px;white-space:nowrap}
.illustrated-editor .paper-meta{bottom:25px;left:18px;right:18px;z-index:1}

/* Tool trays are only needed on first pickup; resting tools stay clear of the motif. */
.loom-tools button:disabled{opacity:.48;cursor:default;transform:none;outline:0;box-shadow:none}
.loom-tools button.tool-needed:not(:disabled){animation:expected-tool-glow 1.35s ease-in-out infinite}
.illustrated-editor .paper-meta{bottom:17px;font-size:10px}
.illustrated-editor .editor-actions{padding-bottom:26px}
.illustrated-editor .canvas-scroll{padding-bottom:18px}

.room-hotspot{z-index:2}
