/* Scope all layout changes to the existing workshop. */
#workshop{scroll-margin-top:76px}
#workshop>.wrap{max-width:1360px}
#workshop .steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;border:1px solid var(--line);background:#f5eddd;border-radius:12px;overflow:hidden;margin:28px 0 24px;position:sticky;top:70px;z-index:30;box-shadow:0 9px 24px -21px #39261999}
#workshop .stepbtn{justify-content:center;border-radius:0;border:0;border-right:1px solid var(--line);padding:15px 12px;background:#faf4e8}
#workshop .stepbtn:last-child{border-right:0}
#workshop .stepbtn.on{background:var(--lacquer);box-shadow:none;color:#fff1d9}
#workshop .bench{grid-template-columns:minmax(0,1fr) 350px;gap:22px;align-items:start}
#workshop .bench>.panel{position:sticky;top:151px;border-radius:12px}
#workshop .bench>.panel>.panel-hd{padding:15px 20px;gap:6px}
#workshop .bench>.panel>.panel-hd .hint{font-size:11px;line-height:1.8}
#workshop #assembleStageWrap,#workshop #paintStageWrap,#workshop #performStageWrap{height:clamp(480px,67vh,720px);min-height:0}
#workshop #assembleStageWrap{background:radial-gradient(ellipse at 50% 40%,#fffaf0,#eee1c7)}
#workshop #paintStageWrap{background:radial-gradient(ellipse at 50% 40%,#fffaf0,#eee1c7)}
#workshop #performStageWrap{border:8px solid #4e3e2b}
#workshop .progress-pill{background:#faf3e6;padding:13px 20px}
#workshop .side-col{gap:16px;min-width:0}
#workshop .side-col>.panel{border-radius:12px}
#workshop .operation-reference .panel-hd{padding:12px 16px}
#workshop .operation-reference .panel-hd b{font-size:13px}
#workshop .operation-reference .character-chooser{padding:10px 14px;border:0;background:#f7efdf}
#workshop .operation-reference .character-choice{width:100%;font-size:12px;padding:8px 10px;text-align:left;box-shadow:none}
#workshop .source-reference{margin:10px 14px!important;padding:10px!important;background:#faf4e8}
#workshop .source-reference summary{font-size:12px!important}
#workshop .operation-reference>p{font-size:11px!important;padding:0 16px 12px!important;line-height:1.8}
#workshop .classified-tray{padding:14px;max-height:390px;overflow-y:auto;overscroll-behavior:contain}
#workshop .part-category .items{grid-template-columns:1fr 1fr}
#workshop .piece-button{min-height:76px;background:#fffaf2}
#workshop .piece-button svg{width:48px;height:60px}
#workshop .piece-button span{font-size:11px}
#workshop .side-col .info-card{padding:17px 18px;background:#f7efdf;box-shadow:none}
#workshop .side-col .info-card h4{font-size:14px}
#workshop .side-col .info-card p{font-size:12px;line-height:1.9}
#workshop #step2 .side-col>.panel,#workshop #step3 .side-col>.panel{max-height:calc(100vh - 180px);overflow-y:auto;overscroll-behavior:contain}
#workshop .palette{gap:8px}
#workshop .palette button{border-radius:7px}
#workshop .act-row{gap:8px}
#workshop .act-btn{padding:15px 8px}
#workshop .readout{min-height:48px}
@media(max-width:1100px){#workshop .bench{grid-template-columns:minmax(0,1fr) 310px;gap:16px}#workshop>.wrap{padding:0 22px}#workshop .classified-tray{max-height:350px}}
@media(max-width:820px){#workshop .bench{grid-template-columns:1fr}#workshop .bench>.panel{position:static}#workshop .side-col{display:grid;grid-template-columns:1fr 1fr;gap:16px}#workshop #step1 .side-col>.panel:not(.operation-reference){grid-column:1/-1}#workshop .classified-tray{max-height:340px}#workshop .part-category .items{grid-template-columns:repeat(3,1fr)}#workshop #step2 .side-col>.panel,#workshop #step3 .side-col>.panel{max-height:none}#workshop #assembleStageWrap,#workshop #paintStageWrap,#workshop #performStageWrap{height:560px}#workshop .operation-reference{grid-column:1/-1}#workshop #step1 .side-col>.info-card{grid-column:1/-1}}
@media(max-width:580px){#workshop>.wrap{padding:0 14px}#workshop .steps{top:64px;border-radius:9px;margin:22px 0 16px}#workshop .stepbtn{font-size:11px;gap:4px;padding:12px 4px;letter-spacing:0}#workshop .stepbtn .num{width:21px;height:21px;font-size:11px}#workshop .side-col{display:flex;flex-direction:column}#workshop .bench{gap:14px}#workshop #assembleStageWrap,#workshop #paintStageWrap,#workshop #performStageWrap{height:480px}#workshop .part-category .items{grid-template-columns:1fr 1fr}#workshop .bench>.panel>.panel-hd{padding:12px 14px}#workshop .bench>.panel>.panel-hd .hint{font-size:10px}#workshop .piece-button{min-height:70px}#workshop #performStageWrap{border-width:5px}}

/* Assembly stage: parchment screen, brass details, and numbered sockets. */
#workshop #step1 .bench>.panel{border:1px solid #d6c5aa;background:#fcf8ef;box-shadow:0 18px 45px -30px #5c3c2155;overflow:hidden}
#workshop #step1 .bench>.panel>.panel-hd{background:linear-gradient(100deg,#faf3e6,#f3e8d4);border-bottom:1px solid #dfcfb6;padding:18px 22px}
#workshop #step1 .bench>.panel>.panel-hd b{font-family:var(--serif);font-size:17px;letter-spacing:.16em;font-weight:500}
#workshop #step1 .bench>.panel>.panel-hd b:before{content:'◈';font-size:13px;color:#a47745;margin-right:9px}
#workshop #assembleStageWrap{isolation:isolate;background:radial-gradient(ellipse at 50% 43%,#fffcf0 15%,#f5ead0 66%,#e8d8b7);border:12px solid #c9af8666;box-shadow:inset 0 0 38px #a77c2e19;position:relative}
#workshop #assembleStageWrap:before{content:'';position:absolute;inset:10px;pointer-events:none;z-index:2;border:1px solid #b08b5040;border-radius:1px;background:linear-gradient(#b49364,#b49364) left top/20px 2px no-repeat,linear-gradient(#b49364,#b49364) left top/2px 20px no-repeat,linear-gradient(#b49364,#b49364) right top/20px 2px no-repeat,linear-gradient(#b49364,#b49364) right top/2px 20px no-repeat,linear-gradient(#b49364,#b49364) left bottom/20px 2px no-repeat,linear-gradient(#b49364,#b49364) left bottom/2px 20px no-repeat,linear-gradient(#b49364,#b49364) right bottom/20px 2px no-repeat,linear-gradient(#b49364,#b49364) right bottom/2px 20px no-repeat}
#workshop #assembleStageWrap:after{content:'';position:absolute;inset:12px;pointer-events:none;background:repeating-linear-gradient(0deg,#ae8d4510 0 1px,transparent 1px 4px);z-index:-1;opacity:.4}
#workshop #sockLayer{z-index:1}
#workshop .assembly-stage-label{position:absolute;left:28px;top:28px;display:flex;gap:10px;align-items:center;pointer-events:none;z-index:3;color:#7e6547;font-family:var(--serif);font-size:18px;letter-spacing:.18em}
#workshop .assembly-stage-label small{display:block;font-family:var(--sans);font-size:9px;color:#9a8668;letter-spacing:.13em;margin-top:2px}
#workshop .assembly-seal{font-size:17px;border:1px solid #a2674a;color:#97543b;padding:2px 5px;line-height:1.7}
#workshop .assembly-stage-edition{position:absolute;right:29px;top:30px;writing-mode:vertical-rl;font-family:var(--serif);font-size:10px;letter-spacing:.2em;color:#a28c68;pointer-events:none;z-index:3}
#workshop .assembly-caption{position:absolute;bottom:16px;left:20px;right:20px;pointer-events:none;text-align:center;color:#8d775a;font-size:11px;letter-spacing:.1em;z-index:3}
#workshop .assembly-reference{opacity:.12;filter:grayscale(.5);transition:opacity .2s}
#workshop .assembly-target.is-selected .assembly-reference{opacity:.3;filter:none}
#workshop .assembly-socket{fill:#fffcf4eb;stroke:#b59a6e;stroke-width:1;stroke-dasharray:2 3;transition:fill .2s,stroke .2s;cursor:pointer}
#workshop .assembly-socket.near{fill:#8c3b28;stroke:#8c3b28;stroke-width:2;stroke-dasharray:none}
#workshop .socket-number{font-family:var(--sans);font-size:10px;font-weight:500;fill:#8c7252;letter-spacing:.04em}
#workshop .assembly-target.is-selected .socket-number,#workshop .assembly-target:has(.assembly-socket.near) .socket-number{fill:#fff4dc}
#workshop .socket-name{font-family:var(--serif);font-size:12px;fill:#82432c;paint-order:stroke;stroke:#fff9ea;stroke-width:4px;stroke-linejoin:round}
#workshop #step1 .progress-pill{padding:15px 22px;gap:14px;background:#f6eddd;border-top:1px solid #ddcdb3}
#workshop #step1 .progress-pill .bar{height:4px;background:#dfcfb3}
#workshop #step1 .progress-pill .bar i{background:linear-gradient(90deg,#b7975d,#8d4930)}
#workshop #step1 .progress-pill b{font-size:12px;font-weight:500}
#workshop #step1 .piece-button{border-color:#dfd0b6;background:linear-gradient(135deg,#fffdf7,#f4ebd9);box-shadow:0 3px 8px -7px #754c2c66;transition:border-color .2s,box-shadow .2s,background .2s}
#workshop #step1 .piece-button:hover{border-color:#b89660;box-shadow:0 6px 14px -10px #754c2c88}
#workshop #step1 .piece-button.selected{border-color:#9f6246;box-shadow:inset 3px 0 #97533a;background:#fff4df}
#workshop #step1 .part-category h4{display:flex;align-items:center;gap:8px;font-family:var(--serif);font-weight:500;letter-spacing:.18em}
#workshop #step1 .part-category h4:after{content:'';height:1px;flex:1;background:#dac9aa80}
@media(max-width:580px){#workshop #assembleStageWrap{border-width:7px}#workshop .assembly-stage-label{left:22px;top:23px;font-size:15px}#workshop .assembly-stage-label small{font-size:8px}#workshop .assembly-stage-edition{right:23px;top:25px;font-size:9px}#workshop .assembly-caption{font-size:10px;bottom:13px;letter-spacing:0}#workshop #step1 .bench>.panel>.panel-hd{padding:14px 16px}#workshop #step1 .progress-pill{padding:13px 16px}}

/* Backlit pale silk screen, confined to the performance panel. */
#workshop #performStageWrap{background:#f3ead4;border:9px solid #c5ae88;border-top-color:#d2bd9c;border-bottom-color:#bda37b;box-shadow:inset 0 0 0 1px #9b7c4c55;isolation:isolate}
#workshop #performStageWrap #pSky{z-index:0;background:radial-gradient(ellipse at 50% 44%,#fff7df,#e6d6b4)}
#workshop #performStageWrap .holder{z-index:2}
#workshop #performStageWrap #pLamp{z-index:1;inset:0!important;left:0!important;top:0!important;width:100%!important;height:100%!important;transform:none!important;mix-blend-mode:normal!important;pointer-events:none}
#workshop #performStageWrap .screen-weave{position:absolute;inset:0;z-index:3;pointer-events:none;opacity:.34;background-image:repeating-linear-gradient(0deg,#8b77471a 0 .6px,transparent .6px 3px),repeating-linear-gradient(90deg,#fffaf352 0 .7px,transparent .7px 3.5px);mix-blend-mode:multiply}
#workshop #performStageWrap .screen-edge{position:absolute;inset:0;z-index:4;pointer-events:none;border:1px solid #9d805a55;box-shadow:inset 0 0 42px 9px #8e6c3020,inset 0 0 4px 1px #68522822;background:linear-gradient(rgba(95,75,35,var(--screen-dim,.04)),rgba(95,75,35,var(--screen-dim,.04)))}
#workshop #performStageWrap .screen-edge:before{content:'';position:absolute;inset:10px;border:1px dashed #9a81523a}
#workshop #performStageWrap .stage-hint{z-index:5;color:#77613f;background:#fffcf0c9;border:1px solid #c9b48b77;font-size:10px;letter-spacing:.1em;border-radius:3px;backdrop-filter:blur(4px);box-shadow:0 2px 9px #8d713215}
#workshop #step3 .tone-row button{border:1px solid #c6b797;box-shadow:inset 0 0 8px #9a794218;width:38px;height:38px}
#workshop #step3 .tone-row button.on{border:2px solid #8b6843}
@media(max-width:580px){#workshop #performStageWrap{border-width:6px}}

/* Multiple figures, with the same tools and independent in-session progress. */
#workshop .operation-reference .character-chooser{flex-direction:column;gap:8px;padding:12px}
#workshop .operation-reference .character-choice{display:flex;align-items:center;gap:12px;border:1px solid #ddcbb0;padding:8px 12px;background:#fffbf3;text-align:left}
#workshop .operation-reference .character-choice img{width:42px;height:58px;object-fit:contain;flex:none}
#workshop .operation-reference .character-choice span{flex:1;min-width:0}
#workshop .operation-reference .character-choice b{display:block;font-size:13px;font-weight:500;color:#705337}
#workshop .operation-reference .character-choice small{display:block;font-family:var(--sans);font-size:10px;color:#9b8566;letter-spacing:.04em;margin-top:3px}
#workshop .operation-reference .character-choice i{font-style:normal;font-size:15px;color:#aa8c62}
#workshop .operation-reference .character-choice.on{background:#fff1d5;border-color:#a16c46;box-shadow:inset 3px 0 #8f4d31}
#workshop #stageRoleName{font-weight:400}

/* Keep the complete moving figure inside both the silk screen and viewport. */
#workshop:has(#step3.on) .steps{top:var(--performance-nav,88px)}
#workshop #step3{scroll-margin-top:var(--performance-offset,160px)}
#workshop #step3 .bench>.panel{top:var(--performance-offset,160px)}
#workshop #step3 #performStageWrap{height:min(720px,var(--performance-height,calc(100svh - 248px)));min-height:120px}
#workshop #performStageWrap .holder{inset:42px 18px 16px;left:18px;bottom:16px;width:auto;height:auto;min-width:0;min-height:0;transform:none;display:block}
#workshop #performStageWrap .holder svg{display:block;width:100%;height:100%;max-width:none;max-height:none;min-width:0;min-height:0;overflow:hidden}
@media(max-width:580px){#workshop #performStageWrap .holder{inset:42px 10px 12px;left:10px;bottom:12px}}
