html:has(.shirt-config-page){height:100%;overflow:hidden}
.shirt-config-page{height:100vh;height:100dvh;overflow:hidden;display:flex;flex-direction:column;padding-bottom:0!important;background:#f6f6f2}
.shirt-config-page .announcement,.shirt-config-page .shop-nav,.shirt-config-page footer,.shirt-config-page .sock-config-head{display:none}
.shirt-config-page header{position:static;flex:none;min-height:70px;padding:8px 4%;gap:16px}
.shirt-config-page header .brand img{width:110px;height:56px}
.shirt-config-page .sock-config-wrap{flex:1;min-height:0;display:flex;flex-direction:column;padding:12px 3% 0;gap:12px}
.shirt-quick-tools{display:flex;align-items:center;gap:16px;flex:none}
.shirt-quick-tools>span{flex:1;font-size:14px;font-weight:bold}
.shirt-quick-tools .button{min-height:44px;font-size:12px;padding:12px 18px}
.shirt-config-page .sock-workspace{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1.5fr) minmax(330px,1fr);gap:24px;align-items:stretch}
.shirt-config-page .sock-stage{position:static;min-height:0;display:flex;flex-direction:column;background:white;overflow:hidden}
.shirt-config-page .sock-stage-top{padding:10px 16px;flex:none}
.shirt-config-page .sock-canvas-box{flex:1;min-height:0;height:auto!important;aspect-ratio:auto;display:grid;place-items:center}
.shirt-config-page .sock-canvas-box canvas{max-width:100%;max-height:100%;aspect-ratio:1;flex:none}
.shirt-config-page .sock-side-previews{flex:none;padding:8px 12px}
.shirt-config-page .sock-side-previews canvas{width:48px;height:48px}
.shirt-config-page .sock-stage-note{display:none}
.shirt-editor-home{display:flex;flex-direction:column;min-height:0;background:white;border:1px solid #ddd}
.shirt-editor-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));flex:none;border-bottom:1px solid #ddd;background:white}
.shirt-editor-tabs button{min-height:48px;border:0;background:white;color:#555;font-weight:700;font-size:13px}
.shirt-editor-tabs button[aria-pressed=true]{background:#151515;color:white}
.shirt-config-page .sock-editor-controls{min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:20px}
.shirt-config-page .sock-editor-controls>section{border:0;padding:0;margin:0}
.shirt-config-page .sock-editor-controls>section[hidden]{display:none}
.shirt-config-page .sock-editor-controls h2{margin:0 0 16px}
.shirt-config-page .sock-model-switch img{height:80px;object-fit:contain}
.shirt-config-page .config-order-bar{position:static;flex:none;padding:10px 16px!important;width:100%;box-shadow:none}
@media(max-width:700px){
 .shirt-config-page header{height:56px;min-height:56px;padding:4px 12px;gap:12px;flex-wrap:nowrap}
 .shirt-config-page header .brand img{width:84px;height:44px}
 .shirt-config-page header a{font-size:10px;white-space:nowrap}
 .shirt-config-page header .bag{margin-left:auto}
 .shirt-config-page header .config-back{display:none}
 .shirt-config-page .sock-config-wrap{padding:0;gap:0}
 .shirt-quick-tools{padding:8px 12px;justify-content:space-between;gap:8px;background:white;border-bottom:1px solid #eee}
 .shirt-quick-tools>span{display:none}
 .shirt-quick-tools .button,.shirt-quick-tools .design-help-button{font-size:11px;padding:10px 12px}
 .shirt-config-page .sock-workspace{display:flex;gap:0}
 .shirt-config-page .sock-stage{flex:1;min-width:0;border:0}
 .shirt-config-page .sock-stage-top{padding:8px 12px;gap:8px;align-items:center;flex-wrap:nowrap}
 .shirt-config-page .sock-side-buttons button{padding:9px 12px;font-size:12px}
 .shirt-config-page .sock-view-tools label{font-size:11px;white-space:nowrap}
 .shirt-config-page .sock-side-previews{display:none}
 .shirt-config-page .sock-workspace{flex-direction:column}
 .shirt-config-page .shirt-editor-home{display:flex;flex:none;height:34dvh;min-height:180px;max-height:300px;border:0;border-top:1px solid #ddd}
 .shirt-editor-tabs button{min-height:40px;font-size:12px}
 .shirt-config-page .sock-editor-controls{flex:1;padding:10px 12px}
 .shirt-config-page .sock-editor-controls h2{display:none}
 .shirt-config-page .sock-editor-controls label{margin:10px 0 5px;font-size:12px}
 .shirt-config-page .sock-editor-controls textarea{padding:8px;min-height:50px;font-size:16px}
 .shirt-config-page .sock-editor-controls select{padding:8px;font-size:16px}
 .shirt-config-page .sock-tools{margin:0;gap:8px}
 .shirt-config-page .sock-tools button,.shirt-config-page .sock-tools>label{margin:0;min-height:38px;padding:9px 12px}
 .shirt-config-page #sideDesignCount{margin:0 0 8px;font-size:11px}
 .shirt-config-page .sock-layers{margin:8px 0}
 .shirt-config-page .sock-layers:empty,.shirt-config-page #sockUploadStatus:empty{display:none}
 .shirt-config-page .sock-editor-controls input{font-size:16px}
 .shirt-config-page .config-order-bar{padding:8px 12px!important}
 .shirt-config-page .config-order-bar .button{min-height:44px;padding:10px 16px;font-size:13px}
}

.sock-gesture-hint{font-size:11px;line-height:1.5;color:#666;margin:8px 0}.shirt-config-page #sockScaleValue{float:right;font-weight:400}

.shirt-product-bar{flex:none;background:#fff;border:1px solid #ddd;padding:10px 14px;border-radius:8px}
.shirt-product-fields{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr) minmax(100px,.7fr) auto;align-items:end;gap:12px}
.shirt-product-fields label{display:flex;flex-direction:column;min-width:0;gap:4px;margin:0;font-size:12px;font-weight:700}
.shirt-product-fields select{width:100%;min-width:0;min-height:44px;padding:8px 28px 8px 10px;font-size:16px;background:#fff;color:#151515;border:1px solid #aaa;border-radius:4px}
.shirt-product-fields select:focus-visible{outline:3px solid #e6ce00;outline-offset:2px}
.shirt-product-fields .design-help-button{min-height:44px;white-space:nowrap}
.shirt-product-bar .sock-stock{margin:5px 0 0;font-size:12px;line-height:1.25}
@media(max-width:700px){.shirt-product-bar{border-radius:0;border:0;border-bottom:1px solid #ddd;padding:8px 12px}.shirt-product-fields{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:6px 10px}.shirt-product-fields label{font-size:11px;gap:2px}.shirt-product-fields select{min-height:38px;height:38px;padding:6px 24px 6px 8px}.shirt-product-fields .design-help-button{min-height:38px;padding:8px;font-size:11px}}

.shirt-preview-launch{flex:none;display:flex;justify-content:flex-end;padding:0 12px 8px}
.shirt-preview-launch button{min-height:40px;padding:8px 14px;font-size:13px;font-weight:700;border-radius:6px;background:#fff;color:#151515}
.shirt-design-preview{width:min(1200px,calc(100vw - 24px));height:calc(100dvh - 24px);max-width:none;max-height:none;margin:auto;padding:0;border:0;border-radius:12px;background:#fff;color:#151515;overflow:hidden}
.shirt-design-preview::backdrop{background:rgba(0,0,0,.72)}
.shirt-preview-content{height:100%;display:flex;flex-direction:column;padding:16px;box-sizing:border-box}
.shirt-preview-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:none}
.shirt-preview-heading h2{margin:0;font-size:18px;line-height:1.3}
.shirt-preview-heading button{flex:none;width:44px;height:44px;border:1px solid #ddd;border-radius:50%;background:#fff;font-size:30px;line-height:1;color:#151515}
.shirt-preview-heading button:focus-visible,.shirt-preview-sides button:focus-visible{outline:3px solid #e6ce00;outline-offset:2px}
.shirt-preview-sides{display:flex;justify-content:center;gap:8px;padding:8px 0;flex:none}
.shirt-preview-sides button{min-height:44px;padding:8px 18px;border:1px solid #ddd;border-radius:6px;background:#fff;color:#151515;font-weight:700}
.shirt-preview-sides button[aria-pressed=true]{background:#151515;color:#fff;border-color:#151515}
.shirt-preview-image{flex:1;min-height:0;min-width:0;display:grid;place-items:center;container-type:size}
.shirt-preview-image canvas{width:min(100cqw,100cqh);height:min(100cqw,100cqh);max-width:100%;max-height:100%;aspect-ratio:1;object-fit:contain}
@media(max-width:700px){.shirt-design-preview{width:100vw;height:100dvh;border-radius:0}.shirt-preview-content{padding:12px;padding-top:max(12px,env(safe-area-inset-top));padding-bottom:max(12px,env(safe-area-inset-bottom))}.shirt-preview-heading h2{font-size:15px}.shirt-preview-launch{padding:0 12px 6px}.shirt-preview-launch button{min-height:36px;font-size:12px}}

/* Mobile follows the sock editor: a full-size preview and page scrolling. */
@media(max-width:700px){
 html:has(.shirt-config-page){height:auto;overflow:visible}
 body.shirt-config-page{height:auto;min-height:100dvh;overflow:visible;display:block}
 .shirt-config-page .sock-config-wrap{display:block;min-height:0}
 .shirt-config-page .sock-workspace{display:flex;flex-direction:column;gap:0;overflow:visible}
 .shirt-config-page .sock-stage{flex:none;width:100%;min-height:0;overflow:hidden}
 .shirt-config-page .sock-canvas-box{flex:none;width:100%;height:min(540px,55dvh)!important;min-height:240px;aspect-ratio:auto;container-type:size}
 .shirt-config-page .sock-canvas-box canvas{width:min(100cqw,100cqh);height:min(100cqw,100cqh);max-width:100%;max-height:100%;aspect-ratio:1}
 .shirt-config-page .shirt-editor-home{flex:none;height:auto;min-height:0;max-height:none;overflow:visible}
 .shirt-config-page .sock-editor-controls{flex:none;min-height:0;overflow:visible;overscroll-behavior:auto}
 .shirt-config-page .sock-stage-top{padding:8px 12px;flex-wrap:wrap}
 .shirt-config-page .shirt-preview-launch{padding:0 12px 6px}
}
