#mobile-studio{display:none}
@media(max-width:820px){
 body.mobile-editing{overflow:hidden;overscroll-behavior:none}
 body.mobile-editing>header,body.mobile-editing>.preview-notice,body.mobile-editing>footer{display:none}
 body.mobile-editing #app{position:fixed;inset:auto;top:var(--studio-top,0px);left:var(--studio-left,0px);width:var(--studio-width,100%);height:var(--studio-height,100dvh);min-height:0;max-width:none;padding:0;margin:0;overflow:hidden}
 .mobile-editing #app>.project-bar,.mobile-editing #app>.steps,.mobile-editing #app>.title-row,.mobile-editing #app>.editor{display:none}
 .mobile-editing #mobile-studio{height:100%;display:grid;grid-template-rows:52px minmax(110px,1fr) auto auto;background:#f5f7ef;overflow:hidden}
 #mobile-studio .mobile-topbar{position:static;height:52px;min-width:0;margin:0;padding:4px 8px;display:flex;gap:4px;align-items:center;background:white;border-bottom:1px solid var(--line)}
 .mobile-topbar button{min-width:36px;min-height:42px;padding:5px;border:0;border-radius:7px;background:white;color:var(--ink);font-size:22px}
 .mobile-topbar .mobile-brand{min-width:0;flex:1;padding-left:4px;line-height:1.2}.mobile-brand strong{font-size:12px}.mobile-brand small{display:block;font-size:9px;color:#68735e;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;max-width:130px;margin-top:3px}
 #mobile-history{display:flex;gap:0}#mobile-review{font-size:12px;background:var(--green);color:white;padding:8px 10px;white-space:nowrap}
 .mobile-stage{min-height:0;overflow:hidden;display:flex}
 .mobile-editing .mobile-stage>.preview,.mobile-editing .mobile-stage>.preview:has(#view-information){position:static;top:auto;min-height:0;min-width:0;height:100%;width:100%;padding:5px 8px 0;border:0;border-radius:0;display:grid;grid-template-rows:22px minmax(0,1fr) 42px 28px;align-items:stretch;justify-content:stretch;overflow:hidden}
 .mobile-stage .canvas-toolbar{display:none}.mobile-stage .preview-top{position:static;inset:auto;display:flex;align-items:center;justify-content:space-between;font-size:10px;padding:0 8px;overflow:hidden;white-space:nowrap}.mobile-stage #preview-title{overflow:hidden;text-overflow:ellipsis;padding-right:8px}
 .mobile-editing .mobile-stage #garment-view{width:100%;height:100%;min-height:0;overflow:hidden;touch-action:none}.mobile-editing .mobile-stage #garment-view>svg{width:100%;height:100%;max-width:100%;max-height:100%;filter:none}
 .mobile-editing .mobile-stage .view-picker{margin:0!important;padding:3px 0!important;width:100%;display:flex;justify-content:center;gap:5px}
 .mobile-stage .view-picker button{flex:1;min-width:0;width:auto;max-width:100px;min-height:36px;padding:5px;font-size:11px;border:1px solid #ccd6c0;background:#f8faf3}.mobile-stage .view-picker svg,.mobile-stage .view-picker img{display:none!important}
 #mobile-placement-info{font-size:10px;line-height:1.2;padding:5px;background:transparent;border:0;color:#4f6041}
 #mobile-tool-sheet{min-height:0;max-height:calc(var(--studio-height,100dvh)*.42);display:flex;flex-direction:column;border-top:1px solid #cad6be;border-radius:16px 16px 0 0;background:white;box-shadow:0 -5px 16px #2530210a;overflow:hidden}
 #mobile-tool-sheet[hidden]{display:none}.mobile-sheet-heading{display:flex;align-items:center;justify-content:space-between;padding:7px 15px;border-bottom:1px solid #edf0e7;flex:none;min-height:42px}.mobile-sheet-heading h2{font-size:14px;letter-spacing:0;margin:0}.mobile-sheet-heading button{min-height:32px;border:0;border-radius:5px;color:var(--green);background:#eef3e4;padding:5px 12px;font-size:12px;font-weight:600}
 .mobile-sheet-scroll{overflow-y:auto;overscroll-behavior:contain;min-height:0;padding:10px 14px 16px;scroll-padding:12px}
 [data-mobile-group][hidden]{display:none!important}.mobile-sheet-scroll input,.mobile-sheet-scroll textarea,.mobile-sheet-scroll select{font-size:16px!important}.mobile-sheet-scroll label{margin-top:10px;font-size:12px}.mobile-sheet-scroll .text-settings{margin-top:0}.mobile-sheet-scroll textarea{min-height:70px;max-height:130px}.mobile-sheet-scroll .layer-panel{border-top:0;margin-top:0;padding-top:0}.mobile-sheet-scroll .image-settings{margin-top:12px}.mobile-sheet-scroll .art-inspector{display:none}
 .mobile-sheet-scroll .garment-colour-controls{width:100%;margin:8px 0;padding:10px}.mobile-sheet-scroll .catalogue-selected-product{margin:0 0 10px;padding-bottom:10px}.mobile-sheet-scroll .catalogue-selected-product h2{font-size:14px}.mobile-sheet-scroll .catalogue-selected-product p:not(.eyebrow){font-size:11px}.mobile-sheet-scroll .garment-settings{margin:0}.mobile-sheet-scroll .canvas-background-settings{width:100%;margin:12px 0 0}.mobile-sheet-scroll #view-information{width:100%}
 .mobile-sheet-scroll .upload{padding:15px 10px}.mobile-sheet-scroll .add-text{margin:0 0 10px;min-height:44px}.mobile-hint{margin:8px 0;font-size:12px}.mobile-sheet-scroll .font-options{max-height:175px}.mobile-sheet-scroll .text-advanced{margin-top:12px}.mobile-sheet-scroll .layer-actions button{min-height:40px}.mobile-sheet-scroll .transform-controls{gap:10px}.mobile-sheet-scroll .text-settings .row{gap:10px}
 .mobile-tool-nav{display:grid;grid-template-columns:repeat(4,1fr);padding:4px 5px max(5px,env(safe-area-inset-bottom));background:white;border-top:1px solid var(--line);gap:4px}.mobile-tool-nav button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-height:50px;background:white;border:0;border-radius:8px;color:#536047;font-size:11px}.mobile-tool-nav button>span{font-size:21px;line-height:24px}.mobile-tool-nav button[aria-expanded=true]{background:#edf3e3;color:#365d19;font-weight:700}
 #mobile-info-dialog{max-width:420px;width:calc(100% - 32px);padding:22px;border:1px solid var(--line);border-radius:14px}#mobile-info-dialog p{font-size:14px;line-height:1.6}#mobile-info-dialog .primary{margin-left:auto}
 .mobile-editing #studio-status{bottom:65px;max-width:90%;font-size:11px}
 #catalogue-dialog{max-height:calc(var(--studio-height,100dvh) - 24px);overflow-y:auto}
}

@media(max-width:820px){
.mobile-text-tabs{display:flex;gap:5px;overflow-x:auto;padding:0 0 9px;margin:0 0 3px;border-bottom:1px solid #edf0e7;flex:none}.mobile-text-tabs button{flex:1;white-space:nowrap;min-height:36px;padding:5px 7px;border:1px solid #dfe6d7;border-radius:7px;background:white;color:#57674a;font-size:12px}.mobile-text-tabs button[aria-pressed=true]{background:#edf3e3;border-color:#6d8b4c;color:#365d19;font-weight:600}
[data-text-pane][hidden]{display:none!important}[data-text-pane]>.transform-controls{margin:0}[data-text-pane]>.add-text{margin:10px 0 0;min-height:40px;font-size:12px}[data-text-pane]>.add-text span{font-size:18px}.mobile-sheet-scroll .font-options{max-height:150px}[data-text-pane="curve"] label{margin-top:5px}[data-text-pane="curve"] input[type=range]{min-height:30px}[data-text-pane="more"] .text-advanced{margin-top:0}.mobile-stage .preview-top{gap:6px}#mobile-studio{min-width:0}
}

@media(max-width:820px){
.mobile-editing.mobile-short #mobile-studio{grid-template-rows:44px minmax(150px,1fr) auto 44px}.mobile-short #mobile-studio .mobile-topbar{height:44px}.mobile-short .mobile-topbar button{min-height:36px}.mobile-short #mobile-tool-sheet{max-height:calc(var(--studio-height,100dvh) - 238px)}.mobile-short .mobile-stage>.preview{grid-template-rows:18px minmax(0,1fr) 32px!important}.mobile-short #mobile-placement-info{display:none}.mobile-short .mobile-stage .view-picker button{min-height:28px;font-size:10px}.mobile-short .mobile-tool-nav{padding:0 5px}.mobile-short .mobile-tool-nav button{min-height:42px;font-size:10px;gap:0}.mobile-short .mobile-tool-nav button>span{font-size:16px;line-height:20px}.mobile-short .mobile-sheet-heading{min-height:34px;padding-top:3px;padding-bottom:3px}.mobile-short .mobile-sheet-heading button{min-height:28px}.mobile-short .mobile-text-tabs{padding-bottom:5px}.mobile-short .mobile-text-tabs button{min-height:30px}
}

@media(max-width:820px){.mobile-stage{position:relative}.mobile-stage>.mobile-error{position:absolute;bottom:70px;left:10px;right:10px;z-index:5;margin:0;padding:10px;background:#fff2ee;color:#8b241c;border:1px solid #e4a89a;border-radius:8px;font-size:13px}.mobile-stage>.mobile-error:empty{display:none}}
@media(max-width:820px){
 /* Fixed panel height prevents canvas zoom jumps when changing views or layers. */
 #mobile-tool-sheet{height:calc(var(--studio-height,100dvh)*.42);flex-shrink:0}
 .mobile-short #mobile-tool-sheet{height:calc(var(--studio-height,100dvh) - 238px)}
 .mobile-sheet-scroll .layer-panel>.layer-actions{position:sticky;top:-10px;background:white;padding:8px 0;z-index:2}
 .canvas-selection-tools button{min-height:36px;font-size:11px}.canvas-selection-tools span{font-size:10px}
 #projects-dialog .project-rename input{width:100%;font-size:16px}#projects-dialog .projects-heading h2{font-size:24px}
}
