.lab-intro{background:#191919;color:white;padding:48px 5vw}.lab-intro h1{font-size:clamp(38px,5vw,68px);line-height:1.05;letter-spacing:-2px;margin:16px 0}.lab-intro em{color:#ff4d08;font-style:normal}.lab-intro p{color:#ccc}.lab-layout{display:grid;grid-template-columns:320px minmax(0,1fr);gap:28px;padding:28px 4vw;background:#f3f0ea}.lab-controls,.export-panel{background:white;border:1px solid #dedbd4;border-radius:16px;padding:22px}.lab-controls h2,.lab-controls legend{font-size:17px;font-weight:700;margin:20px 0 14px}.lab-controls h2:first-child{margin-top:0}.lab-controls label{display:block;font-size:13px;font-weight:600;margin:12px 0}.lab-controls input:not([type=checkbox]),select{width:100%;padding:10px;border:1px solid #ccc;border-radius:7px;margin-top:6px;background:white;color:#191919}.lab-controls fieldset{border:0;padding:0;min-width:0}.pair{display:grid;grid-template-columns:1fr 1fr;gap:10px}.lab-controls .check{display:flex;align-items:center;gap:8px}.check input{flex-shrink:0}.hint{font-size:12px;color:#68645f;line-height:1.6}.upload{padding:15px;background:#ff4d08;color:white;border-radius:8px;cursor:pointer}.upload input{font-size:12px}.lab-controls button{padding:10px;border:1px solid #ccc;background:#faf9f6;border-radius:7px;cursor:pointer}.lab-controls button:focus-visible,button:focus-visible{outline:3px solid #ff4d08}#layers button{display:block;width:100%;text-align:left;margin:6px 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#layers button.active{border-color:#ff4d08;background:#fff0e8}.workspace-top{display:flex;justify-content:space-between;align-items:center;gap:15px}.workspace-top h2{font-size:22px}.workspace-top label{font-size:12px}.sheet-wrap{position:relative;background:#e4e0d8;border:1px solid #d2cdc4;border-radius:14px;padding:28px;min-height:350px;display:flex;justify-content:center;align-items:flex-start}#sheet{display:block;max-width:100%;height:auto;max-height:900px;box-shadow:0 5px 24px #0002;touch-action:none;background-color:white;background-image:conic-gradient(#ddd 25%,transparent 0 50%,#ddd 0 75%,transparent 0);background-size:16px 16px}#empty{position:absolute;top:35%;left:15%;right:15%;text-align:center;pointer-events:none;color:#666;font-size:14px}.export-panel{margin-top:20px;display:flex;gap:15px;flex-wrap:wrap;align-items:center}.export-panel>div{width:100%}.export-panel h2{font-size:22px;margin:0}.quality{padding:10px;background:#fff1df;font-size:12px}#status{font-size:13px;line-height:1.6}button:disabled{opacity:.45;cursor:not-allowed}@media(max-width:800px){.lab-layout{grid-template-columns:1fr;padding:18px}.lab-workspace{min-width:0}.sheet-wrap{padding:15px}.workspace-top h2{font-size:17px}header nav a{font-size:12px}}

/* Keep the artwork beside long editing controls. Fit it without distorting its ratio. */
.lab-layout{align-items:start}
.lab-workspace{position:sticky;top:106px;min-width:0;max-height:calc(100dvh - 122px);overflow:auto;scrollbar-gutter:stable}
.lab-preview{background:#f3f0ea}
.sheet-wrap{min-height:0;align-items:center;padding:16px}
#sheet{width:auto;height:auto;max-width:100%;max-height:calc(100dvh - 360px);object-fit:contain}
.workspace-top h2{margin:8px 0}
.export-panel{padding:14px;margin-top:12px;gap:10px}
.export-panel h2{font-size:18px}
.export-panel .hint{margin:6px 0}
@media(max-width:800px){
 .lab-layout{display:flex;flex-direction:column;gap:16px}
 .lab-workspace{display:contents}
 .lab-preview{order:0;position:sticky;top:90px;z-index:5;width:100%;padding:8px;border:1px solid #d2cdc4;border-radius:12px;box-shadow:0 4px 14px #0001}
 .lab-controls{order:1;width:100%}
 .export-panel{order:2;width:100%;margin-top:0}
 .workspace-top{gap:8px}
 .workspace-top .eyebrow{display:none}
 .workspace-top h2{font-size:14px;margin:4px 0}
 .workspace-top label{display:flex;align-items:center;gap:5px}
 .workspace-top select{width:auto;padding:5px;margin:0;font-size:12px}
 .sheet-wrap{padding:6px}
 #sheet{max-height:26dvh;max-width:100%}
 #status{font-size:11px;line-height:1.3;margin:6px 0 0}
 #empty{font-size:11px;top:25%}
 .lab-controls input,.lab-controls button,.lab-controls select{scroll-margin-top:calc(90px + 26dvh + 110px)}
}
@media(max-width:650px){.lab-preview{top:75px}.lab-controls input,.lab-controls button,.lab-controls select{scroll-margin-top:calc(75px + 26dvh + 110px)}}
