/* Studio additions retain FITCODED's existing panel palette and type. */
.studio-projectbar{display:flex;align-items:center;gap:8px;padding:10px 16px;border-bottom:1px solid var(--line);background:#1b1a21}.studio-projectbar>div{flex:1;min-width:80px}.studio-projectbar strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:15px Georgia}.studio-eyebrow{display:block;color:var(--green);font:8px monospace;letter-spacing:1.5px;margin-bottom:3px}.studio-projectbar button,.studio-panel button,#studio-dialog button,.reference-editor button,.reference-switch button{border:1px solid #514651;border-radius:4px;background:#2a2631;padding:8px 11px;font-size:11px}.studio-stages{display:flex;gap:4px;padding:8px 12px;border-bottom:1px solid var(--line);background:var(--panel)}.studio-stages button{flex:1;padding:8px 4px;border:1px solid transparent;background:none;color:var(--muted);border-radius:4px;font-size:12px}.studio-stages button[aria-current=step]{border-color:#657e6b;color:#c5e2ce;background:#26302b}.studio-stages small{font:9px monospace;margin-right:5px;opacity:.7}.studio-panel{padding:14px 20px;border-bottom:1px solid var(--line);background:#1b1a21;max-height:42dvh;overflow:auto}.studio-stage-heading{display:flex;align-items:baseline;gap:14px}.studio-stage-heading h2{font:22px Georgia;margin:0 0 10px}.studio-stage-heading p{font-size:11px;line-height:1.6;color:var(--muted);margin:0 0 12px}.studio-design-preview{display:flex;gap:14px;align-items:center}.studio-design-preview .flat-art{width:180px;margin:0;padding:6px;flex-shrink:0}.studio-design-preview svg{max-height:145px}.studio-sources{display:grid;grid-template-columns:repeat(2,1fr);gap:9px}.studio-sources>div{border:1px solid var(--line);padding:11px;border-radius:4px}.studio-sources b{display:block;font-size:11px}.studio-sources span{display:block;font:9px monospace;color:var(--green);margin:6px 0}.studio-sources p{font-size:11px;line-height:1.5;color:var(--muted);margin:0}.studio-check-summary{font-size:12px;color:var(--green);margin-bottom:10px}.studio-check-summary small{display:block;color:var(--muted);font-size:10px;margin-top:5px}.studio-issues{display:grid;gap:6px}.studio-issues button.studio-issue{text-align:left;padding:12px;border-left:3px solid #d8b37d;background:#29262b}.studio-issue b{display:block;font-size:11px;line-height:1.6;font-weight:500}.studio-issue span{display:block;font:9px monospace;color:#d8b37d;margin-top:6px}.studio-issues .error{border-color:#e698a5}.studio-piece-warning{fill:none;stroke:#f3b76a;stroke-width:2px;stroke-dasharray:7 4;stroke-linejoin:round}.studio-field-focus{outline:2px solid #f3b76a!important;outline-offset:3px}.studio-preview-notice{border-left:3px solid #d8b37d;padding:10px 14px;font-size:12px;line-height:1.6;background:#28252b;color:#d8c3a5}.studio-export{display:grid;grid-template-columns:repeat(3,1fr);gap:8px 12px}.studio-export select{margin:6px 0 2px;padding:8px}.studio-export>label:nth-child(4),.studio-export>div,.studio-export>p{grid-column:1/-1}.studio-primary{background:#a2c3ab!important;color:#17231b!important;border-color:#a2c3ab!important}.studio-error{color:#f1a2b0;font-size:12px}.start-readiness{font-size:11px;line-height:1.7!important;border-left:2px solid var(--green);padding-left:14px;margin:0 0 20px!important;max-width:620px}.preview-card em{color:#b3a7c2}.studio-panel [disabled]{opacity:.45;cursor:default}#studio-dialog{width:min(980px,95vw);max-width:980px;max-height:92dvh;padding:24px;overflow:auto}.studio-dialog-head{display:flex;gap:20px;justify-content:space-between;align-items:center;margin-bottom:16px}.studio-dialog-head h2{font:26px Georgia;margin:0}.studio-dialog-head button{font-size:22px!important;background:none!important;border:0!important}#studio-dialog input:not([type=checkbox]){width:100%;padding:11px;background:var(--field);border:1px solid var(--line);color:var(--text);margin-bottom:18px}#studio-dialog .hint{max-width:650px}.project-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:18px 0}.project-list article{border:1px solid var(--line);padding:16px;border-radius:5px}.project-list h3{color:var(--text);font:19px Georgia;letter-spacing:0;margin-bottom:8px}.project-list p{font-size:11px;color:var(--muted)}.project-list select{margin-bottom:8px}.project-list button{margin:4px 4px 0 0}.comparison-selects,.comparison-flats{display:grid;grid-template-columns:1fr 1fr;gap:14px}.comparison-flats{margin-top:18px}.comparison-flats>div{min-width:0}.comparison-flats h4{font-size:12px;line-height:1.6}.comparison-flats svg{width:100%;max-height:340px;background:#faf9f6;border-radius:5px;padding:12px}.comparison-preview{text-align:center;padding:28px}.comparison-preview svg{width:100px;height:100px;background:none}#compare-result table{width:100%;font-size:11px;border-collapse:collapse}#compare-result td,#compare-result th{text-align:left;padding:10px;border-bottom:1px solid var(--line);word-break:break-word}.reference-switch{display:flex;flex-wrap:wrap;gap:6px;margin:12px 0}.reference-switch button{margin:0;padding:7px;font-size:10px}.reference-editor{width:min(820px,95vw);max-height:92dvh;overflow:auto}.reference-editor canvas{display:block;max-width:100%;max-height:42dvh;margin:14px auto;background:#f4f2ed}.reference-edit-controls{display:grid;grid-template-columns:1fr 1fr;gap:10px 18px}.reference-edit-controls select{margin-top:5px}.reference-edit-controls output{float:right;color:var(--green)}.photo-pocket-controls{padding:16px;border:1px solid var(--line);margin-bottom:14px}.photo-pocket-controls summary{color:var(--text)}.photo-body .studio-sources{grid-template-columns:1fr}section.controls[hidden]{display:none!important}.studio-panel:empty{display:none}@media(max-width:700px){.studio-projectbar{padding:9px 12px;flex-wrap:wrap}.studio-projectbar strong{max-width:180px}.studio-stages{gap:0;padding:6px}.studio-stages button{font-size:10px;padding:8px 2px}.studio-stages small{display:none}.studio-panel{padding:12px;max-height:36dvh}.studio-stage-heading{display:block}.studio-stage-heading h2{font-size:20px}.studio-sources,.project-list{grid-template-columns:1fr}.studio-export{grid-template-columns:1fr}.studio-export>label{grid-column:1/-1}.comparison-selects{grid-template-columns:1fr}.comparison-flats{gap:8px}.studio-design-preview .flat-art{width:130px}.reference-edit-controls{grid-template-columns:1fr}main{min-height:0}.studio-projectbar button{padding:7px;font-size:10px}}
@media print{.studio-projectbar,.studio-stages,.studio-panel,#studio-dialog,.reference-editor{display:none!important}}

.workspace{overflow:auto}.workspace>.canvas{min-height:220px;flex:1 0 220px}.studio-projectbar,.studio-stages,.studio-panel,.toolbar,.j-piecebar,.seam-editor,.zoom-toolbar,.legend{flex-shrink:0}.studio-panel{max-height:200px}.workspace[data-stage=fit] .studio-panel{max-height:180px}.workspace:not([data-stage=pattern]) .seam-editor{display:none}.studio-stages{min-height:48px}.studio-stages button{white-space:nowrap}.studio-stage-heading p{max-width:550px}.studio-projectbar{min-height:50px}@media(max-width:700px){.workspace>.canvas{min-height:200px;flex-basis:200px}.studio-panel{max-height:180px}.studio-stages button{font-size:9px}.studio-projectbar{min-height:45px}}

.guide-frame{margin:auto}.guide-frame line{stroke-width:1.5}.guide-frame circle{stroke-width:1.5}.guide-frame text{font:bold 9px system-ui;stroke-width:2px}.photo-reference .hint{font-size:10px}.back-reference-dialog{max-width:min(800px,95vw);max-height:92dvh}
.studio-fit-badge{display:inline-block;min-width:14px;text-align:center;padding:1px 3px;border-radius:8px;background:#483b2e;color:#f3c489;font:9px monospace}.studio-projectbar{position:sticky;top:0;z-index:4}.studio-stages{position:sticky;top:50px;z-index:3}.studio-issues .studio-issue:focus-visible{outline:2px solid var(--green)}
.studio-design-preview svg{height:110px;max-height:110px}.studio-design-preview .flat-art{width:160px}.studio-design-preview .hint{margin:0;max-width:320px}@media(max-width:700px){.studio-design-preview .flat-art{width:120px}.studio-design-preview svg{height:95px;max-height:95px}}

.photo-design-sketch svg{display:block;width:100%;height:auto;max-height:260px;}

#tshirt-workflow {width:min(760px,94vw);max-height:90dvh;overflow:auto}
#tshirt-workflow label {display:block;margin-block:.5rem}
#tshirt-workflow input {display:block;width:100%;box-sizing:border-box}
.tshirt-preview {display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:.75rem}
.tshirt-preview figure {margin:0;text-align:center}
.tshirt-preview svg {width:100%;height:150px}
.tshirt-progress {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.4rem;list-style:none;padding:0}
.tshirt-progress li {padding:.55rem .25rem;text-align:center;border-bottom:2px solid currentColor;opacity:.65}
.tshirt-progress li[aria-current="step"] {font-weight:700;opacity:1}

.tee-flat-art{background:#fbfcfa;border:1px solid var(--line);border-radius:6px;padding:12px;margin-bottom:16px}
.tee-technical-flat{display:block;width:100%;height:auto;max-height:320px}
.tee-live-measures{display:grid;grid-template-columns:1fr 1fr;gap:14px 10px;margin:12px 0 20px}
.tee-live-measures dt{font-size:12px;color:var(--muted)}
.tee-live-measures dd{margin:4px 0 0;font-size:16px;color:var(--text)}
.tee-live-preview button{background:var(--field);color:var(--text);border:1px solid var(--line);border-radius:5px;padding:10px;margin:0 5px 8px 0}
#tee-fit-comparison{width:min(950px,94vw);max-width:min(950px,94vw);max-height:90dvh;overflow:auto;background:var(--panel);color:var(--text);border:1px solid var(--line);border-radius:10px;padding:24px}
#tee-fit-comparison>p{font-size:14px;color:var(--muted)}
#tee-fit-comparison h3{font-size:16px;letter-spacing:0;color:var(--text);margin:0 0 14px}
.tee-fit-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.tee-fit-options article{border:1px solid var(--line);padding:18px;border-radius:6px}
.tee-fit-options article>div{background:#fbfcfa;border-radius:4px;padding:8px}
.tee-fit-options article p{font-size:14px;line-height:1.7;min-height:48px}
.tee-fit-options button{background:var(--field);color:var(--text);border:1px solid var(--line);border-radius:5px;padding:10px 14px;width:100%}
.tee-fit-options button[aria-pressed=true]{border:2px solid var(--green)}
@media(max-width:640px){.tee-fit-options{grid-template-columns:1fr}.tee-fit-options .tee-technical-flat{max-height:210px}.tee-fit-options article p{min-height:0}.tee-live-measures{grid-template-columns:1fr 1fr}}

#tee-change-preview{width:min(1050px,94vw);max-width:min(1050px,94vw);max-height:90dvh;overflow:auto;background:var(--panel);color:var(--text);border:1px solid var(--line);border-radius:8px;padding:24px}
.tee-change-pieces{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:15px}
.tee-change-pieces figure{min-width:0;margin:0;border:1px solid var(--line);padding:10px;border-radius:6px}
.tee-change-pieces svg{display:block;width:100%;height:230px;background:#fff;border-radius:3px}
.tee-change-pieces figcaption{font-size:14px;padding-top:8px}
.tee-change-actions{display:flex;gap:12px;position:sticky;bottom:-24px;background:var(--panel);padding-block:20px}
.tee-change-actions button{padding:12px 16px;border:1px solid var(--line);border-radius:5px;background:var(--field);color:var(--text)}
#tee-confirm-change{background:var(--green);color:var(--bg)}
#tee-adjust-editor input:not([type=range]),.tee-fabric-controls input{width:100%;padding:10px;background:var(--field);color:var(--text);border:1px solid var(--line);border-radius:4px}
#tee-adjust-editor button,.tee-fabric-controls button{padding:10px 14px;background:var(--field);color:var(--text);border:1px solid var(--line);border-radius:4px;margin-top:12px}
#tee-adjust-editor p,.tee-fabric-controls p{font-size:13px;line-height:1.7}
.tee-help{margin:6px 0 15px;background:none;border:0;color:var(--green);padding:0;text-decoration:underline;font-size:12px;text-underline-offset:3px}
#pattern .tee-seam-hit{fill:none;stroke:transparent;stroke-width:1.4;cursor:pointer;pointer-events:stroke}
#pattern .tee-measure-hit{fill:none;stroke:#6289a0;stroke-width:.2;stroke-dasharray:.8 .5;cursor:pointer;pointer-events:stroke}
#pattern .tee-measure-label{font-size:1.1px;pointer-events:none}
#pattern :is(.tee-seam-hit,.tee-measure-hit):is(:hover,:focus,.tee-target-selected){stroke:#b84d39;stroke-width:.5;outline:none}
#steps .tee-sewing-status{padding:12px;border:1px solid var(--line);border-radius:5px}
#steps [data-tee-step]{margin-right:7px}
#dialog-body .measure-diagram{display:block;max-height:270px;width:100%;background:#f7faf7}
#dialog-body li{line-height:1.8;margin-bottom:10px}
@media(max-width:600px){.tee-change-pieces{grid-template-columns:1fr 1fr}.tee-change-actions{flex-wrap:wrap}.tee-change-pieces svg{height:180px}}

#pattern .tee-measure-button{display:block;font:1.15px system-ui,sans-serif;line-height:1.4;margin:0;padding:.25px .4px;background:#edf5f1;color:#264d3a;border:.08px solid #759281;border-radius:.25px;white-space:nowrap;cursor:pointer}
#pattern .tee-measure-button:focus{outline:.2px solid #a32029;outline-offset:.1px}

#revision-reprint{margin-top:22px;padding-top:20px;border-top:1px solid var(--line)}
#revision-reprint h3{margin-bottom:12px}
#revision-reprint p{font-size:14px;line-height:1.65}
#revision-reprint button{background:var(--field);color:var(--text);border:1px solid var(--line);border-radius:4px;padding:11px 15px}
#revision-reprint button:disabled{opacity:.55;cursor:default}
.revision-patterns{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px}
.revision-patterns figure{min-width:0;margin:0;padding:10px;border:1px solid var(--line);border-radius:5px}
.revision-patterns svg{width:100%;height:210px;background:#fff;display:block}
.revision-patterns figcaption{font-size:13px;padding-top:8px}

#studio-dialog>.studio-dialog-head{position:sticky;top:-24px;background:var(--panel);z-index:2;padding-block:14px}
