.editor-page{background:#f4f7fa}
.editor-header{min-height:76px;display:flex;align-items:center;justify-content:space-between;gap:20px}
.editor-back{display:flex;align-items:center;min-height:44px;color:var(--blue);font-size:.875rem;font-weight:700;text-align:right}
.editor-main{width:min(1440px,calc(100% - 48px));padding-block:28px max(28px,env(safe-area-inset-bottom))}
.editor-heading{display:flex;align-items:center;justify-content:space-between;gap:28px;margin-bottom:24px;padding:24px 28px;border-radius:10px;background:var(--blue);color:#fff}
.editor-kicker{font-size:.6875rem;letter-spacing:.1em;font-weight:700;color:#dbeaf5;margin:0 0 10px}
.editor-heading h1{font-size:clamp(2rem,3.6vw,2.75rem);color:#fff;margin:0}
.editor-heading>p{font-size:.9375rem;color:#e1edf5;margin:0;max-width:320px}
.editor-layout{display:grid;grid-template-columns:280px minmax(0,1fr);gap:24px;align-items:start}
.editor-controls{min-width:0;padding:22px;background:#fff;border:1px solid #dfe8ef;border-radius:10px}
.editor-controls label{font-size:.8125rem;margin-bottom:18px}
.editor-controls h2{font-family:Manrope,Arial,sans-serif;font-size:1rem;font-weight:700;margin-bottom:16px}
.editor-color-line{display:flex;justify-content:space-between;gap:10px;font-size:.8125rem;font-weight:700;margin-bottom:12px}
#garment-color-name{font-weight:400;color:var(--muted)}
.editor-swatches{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px;margin-bottom:24px;padding:3px}
.editor-swatches button{width:28px;height:28px;justify-self:center;padding:0;border:1px solid #a8b8c4;border-radius:50%;box-shadow:0 0 0 3px #fff}
.editor-swatches button[aria-pressed=true]{outline:2px solid var(--blue);outline-offset:3px}
.editor-add-tools{padding-top:20px;border-top:1px solid var(--line)}
.upload-help{font-size:.75rem;margin:8px 0 20px}
.editor-add-tools textarea{min-height:74px}
.editor-layer-panel{margin-block:24px;border-block:1px solid var(--line);padding:16px 0}
.editor-layer-panel summary{font-size:.875rem;font-weight:700;cursor:pointer;min-height:28px}
#layer-count{font-size:.75rem;font-weight:400;color:var(--muted);margin-left:6px}
.layer-list{display:grid;gap:6px;margin-top:12px;max-height:250px;overflow:auto;padding:4px;margin-inline:-4px}
.layer-list button{width:100%;min-height:44px;padding:9px 10px;border:1px solid var(--line);border-radius:5px;background:#fff;color:var(--navy);font-size:.8125rem;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;text-align:left}
.layer-list button[aria-pressed=true]{background:#edf4f9;border-color:var(--blue)}
#empty-layers{font-size:.8125rem;margin:12px 0 0}
.editor-text-style{display:grid;grid-template-columns:minmax(0,1fr) 76px;gap:12px}
#text-color{padding:5px}
input[type=range]{min-height:40px;padding:0;border:0;accent-color:var(--blue)}
.editor-nudge{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
.editor-nudge button{min-width:0;min-height:44px;border:1px solid var(--line);border-radius:5px;background:#f4f8fb;color:var(--blue);font-weight:700}
#center-layer{grid-column:1/-1;font-size:.8125rem}
.editor-remove{min-height:44px;padding:10px 0;margin-top:4px;border:0;background:none;color:#963b3b;font-size:.8125rem}
.editor-preview{min-width:0;padding:16px 20px;background:#e0ecf5;border:1px solid #c5d9e8;border-top:4px solid var(--blue);border-radius:10px}
.preview-toolbar{display:flex;align-items:flex-start;gap:8px;justify-content:space-between}
.editor-sides{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));flex:1;min-width:0;gap:3px;padding:3px;background:#fff;border:1px solid #cadbe8;border-radius:7px}
.editor-sides button{min-width:0;min-height:44px;padding:8px;border:0;border-radius:5px;background:none;color:var(--blue);font-size:.8125rem;font-weight:700;line-height:1.35}
.editor-sides button[aria-pressed=true]{background:var(--blue);color:#fff}
.editor-undo{min-height:44px;flex-shrink:0;padding:8px 4px;border:0;background:none;color:var(--blue);font-size:.8125rem;font-weight:700}
.editor-undo:disabled{opacity:.45}
.shoulder-help{font-size:.75rem;color:var(--muted);text-align:center;margin:8px 0 0}
.preview-selection{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;margin-top:12px;padding:6px 10px;background:#f7fafc;border:1px solid #c5d9e8;border-radius:6px;font-size:.8125rem}
.preview-selection>span{min-width:0;color:var(--muted)}
.preview-selection button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:44px;padding:8px 10px;border:1px solid #cba5a5;border-radius:5px;background:#fff;color:#963b3b;font-size:.8125rem;font-weight:600}
.preview-selection svg{width:16px;height:16px;flex-shrink:0}
.design-stage{width:100%;max-width:760px;height:clamp(440px,calc(100svh - 330px),760px);margin:8px auto;touch-action:pan-y}
.design-stage>svg{display:block;width:100%;height:100%;overflow:hidden;user-select:none;-webkit-user-select:none}
.design-stage [data-layer-id]{touch-action:none;outline:none}
.design-stage [data-layer-id]:focus-visible{filter:drop-shadow(0 0 4px #f18a41)}
.preview-help{text-align:center}
.preview-help>p{font-size:.8125rem;line-height:1.5;color:var(--muted);margin:0 0 10px}
.guide-switch{display:inline-flex;flex-direction:row;align-items:center;gap:8px;min-height:32px;margin:0;color:var(--muted);font-size:.75rem;font-weight:400}
.guide-switch input{width:18px;min-height:18px;accent-color:var(--blue)}
.editor-disclaimer{font-size:.75rem;line-height:1.5;color:var(--muted);text-align:center;margin:12px auto 0;max-width:440px}
.editor-status{font-size:.8125rem;line-height:1.5;color:var(--blue);text-align:center;min-height:20px;margin:10px 0 0}
.editor-actions{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px 22px;margin-top:24px;border:1px solid var(--line);border-radius:10px;background:#fff}
.editor-actions p{font-size:.875rem;color:var(--muted);max-width:300px;margin:0}
.editor-actions>div{display:flex;gap:10px;min-width:0;flex-wrap:wrap;justify-content:flex-end}
#download-status{margin:12px 0 20px}
@media(min-width:961px) and (min-height:700px){.editor-preview{position:sticky;top:calc(var(--header-height) + 16px)}}
@media(min-width:961px){.editor-sides:has([data-side=rightShoulder]:not([hidden])){grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:960px){
 .editor-layout{grid-template-columns:1fr;gap:20px}.editor-preview{grid-row:1;position:static}
 .editor-controls{padding:24px}.editor-controls .editor-swatches{max-width:320px}
 .editor-heading{padding:22px 24px;gap:20px}.editor-heading>p{max-width:280px}
 .design-stage{height:auto;aspect-ratio:1/1.1;max-width:640px}
 .editor-actions{flex-direction:column;align-items:stretch;gap:16px}.editor-actions p{max-width:none;text-align:center}.editor-actions>div{justify-content:center}
 .editor-sides:has([data-side=rightShoulder]:not([hidden])){grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media(max-width:639px){
 .editor-header{gap:16px;min-height:72px}.editor-header .wordmark img{width:132px}.editor-back{font-size:.75rem;max-width:130px}
 .editor-main{width:calc(100% - 24px);padding-top:20px}.editor-heading{display:block;padding:20px;margin-bottom:20px}.editor-heading>p{margin-top:12px;max-width:none}.editor-kicker{font-size:.625rem}
 .editor-controls{padding:20px}.editor-preview{padding:12px 8px 16px}
 .editor-sides:has([data-side=rightShoulder]:not([hidden])){grid-template-columns:repeat(2,minmax(0,1fr))}
 .design-stage{height:auto;aspect-ratio:1/1.1;max-width:none}
 .preview-help>p{font-size:.75rem}.editor-actions{padding:18px}.editor-actions>div{display:grid;grid-template-columns:1fr;gap:10px}
 .editor-actions .button{width:100%}.editor-actions p{font-size:.8125rem}
}
@media(max-height:600px) and (orientation:landscape){.editor-preview{position:static}.design-stage{height:280px}.editor-heading{padding-block:18px}}

.editor-header-links{display:flex;align-items:center;gap:24px}
#save-design-form{padding:0;border:0;margin-top:24px}#save-design-status{font-size:.875rem;color:var(--blue)}
@media(max-width:639px){.editor-header-links{gap:8px;flex-direction:column;align-items:flex-end}.editor-header-links .editor-back{min-height:28px}}

/* A focused proof review, separate from the editing tools. */
.proof-dialog{width:min(1080px,calc(100% - 32px));max-width:none;max-height:92svh;padding:28px;border-radius:12px;overflow:auto;background:#f3f7fa}
.proof-dialog-top{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:24px}
.proof-dialog-top .editor-kicker{color:var(--blue);margin-bottom:8px}
.proof-dialog-top h2{font-size:clamp(1.5rem,3vw,2rem);margin:0}
.proof-dialog-top .close-dialog{position:static;flex-shrink:0}
.proof-sheet{padding:28px;background:#fff;border-top:5px solid var(--blue);border-radius:6px}
.proof-brand{display:flex;justify-content:space-between;align-items:center;gap:16px;padding-bottom:20px;border-bottom:1px solid var(--line);margin-bottom:24px}
.proof-brand img{width:172px;height:auto}.proof-brand span{font-size:.8125rem;color:var(--blue)}
.proof-sheet h3{font-size:1.75rem;margin:0 0 8px}.proof-meta{font-size:.875rem;font-weight:700;color:var(--blue);margin:0 0 12px}
.proof-description{font-size:.875rem;line-height:1.7;color:var(--muted);margin:0 0 24px}
.proof-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.proof-grid figure{margin:0;min-width:0;padding:16px;background:#edf4f9;border-radius:6px;break-inside:avoid}
.proof-grid figcaption{font-weight:700;color:var(--blue);font-size:.8125rem;margin-bottom:8px}
.proof-grid img,.proof-grid svg{display:block;width:100%;height:auto;aspect-ratio:600/660;object-fit:contain}
.proof-notice{border-left:3px solid var(--blue);padding-left:12px;margin:24px 0 12px;font-size:.8125rem;line-height:1.7;color:var(--muted)}
.proof-contact{font-size:.75rem;color:var(--blue);margin:0}
.proof-actions{display:flex;flex-wrap:wrap;gap:10px;padding:14px 0;background:#f3f7fa;position:sticky;bottom:-28px;border-top:1px solid var(--line);z-index:1}
.proof-send-note{font-size:.75rem;line-height:1.6;color:var(--muted);margin:8px 0 0}
.print-proof{display:none}
@media(max-width:639px){
 .proof-dialog{width:calc(100% - 16px);padding:16px;max-height:94svh}.proof-sheet{padding:16px}.proof-brand{gap:8px;flex-wrap:wrap}.proof-brand img{width:140px}
 .proof-grid{grid-template-columns:1fr}.proof-grid figure{padding:12px}.proof-sheet h3{font-size:1.5rem}
 .proof-actions{bottom:-16px;display:grid;grid-template-columns:1fr;width:100%;padding-block:12px}.proof-actions .button{width:100%;white-space:normal}
}
@media print{
 @page{size:A4;margin:12mm}
 body.editor-page{background:#fff!important;padding:0!important}
 body.editor-page>header,body.editor-page>main,body.editor-page>a,body.editor-page>dialog,body.editor-page>noscript{display:none!important}
 body.editor-page .print-proof{display:block!important}
 .print-proof .proof-sheet{padding:0;border:0}.print-proof .proof-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:5mm}
 .print-proof .proof-brand{margin-bottom:5mm;padding-bottom:4mm}.print-proof .proof-sheet h3{font-size:18pt}
 .print-proof .proof-grid figure{padding:3mm}.print-proof .proof-grid img,.print-proof .proof-grid svg{max-height:85mm}
 .print-proof .proof-description,.print-proof .proof-meta{font-size:9pt;margin-bottom:4mm}
 .print-proof .proof-notice,.print-proof .proof-contact{font-size:8pt}
}
