#mobile-photos,#mobile-sheet-toggle,.panel-tabs button svg{display:none}
@media(max-width:760px){
 :root{--app-height:100dvh;--mobile-top:calc(56px + env(safe-area-inset-top));--mobile-dock:calc(60px + env(safe-area-inset-bottom))}
 body{height:var(--app-height);overflow:hidden}.topbar{height:var(--mobile-top);padding:env(safe-area-inset-top) 12px 0;gap:8px}.brand{font-size:20px}.brand svg{width:24px}.topbar nav{gap:6px;min-width:0}.topbar .button{min-height:44px;font-size:11px;padding:9px 11px}.topbar #import{width:44px}.topbar #install{font-size:10px;max-width:60px}
 body:not(.has-photo) .studio{height:calc(var(--app-height) - var(--mobile-top));display:block;min-height:0}body:not(.has-photo) .library,body:not(.has-photo) .adjustments{display:none}body:not(.has-photo) .workbench{height:100%}body:not(.has-photo) .canvas-toolbar{display:none}body:not(.has-photo) .viewport{height:auto;min-height:0;flex:1}body:not(.has-photo) .empty{padding:16px 0}.empty h1{font-size:36px}.empty .frame-mark{width:64px;height:56px;margin-bottom:20px}.empty .eyebrow{font-size:8px}.empty-copy{font-size:12px;margin-bottom:20px}.empty .text-button{min-height:44px;margin:4px auto 12px}
 body.has-photo .studio{height:calc(var(--app-height) - var(--mobile-top) - var(--mobile-dock));min-height:0;display:flex;flex-direction:column}
 body.has-photo #mobile-photos{display:inline-flex;min-width:50px}
 body.has-photo .workbench{order:0;flex:1;min-height:125px;overflow:hidden}
 body.has-photo .canvas-toolbar{min-height:44px;height:44px;padding:0 8px;flex-shrink:0;flex-wrap:nowrap}body.has-photo #filename{display:none}.toolbar-actions{width:100%;justify-content:space-between;gap:0}.toolbar-actions button{min-height:44px;min-width:44px;padding:0 8px;font-size:11px}.toolbar-actions .divider{margin:0 2px}
 body.has-photo .viewport,body.has-photo .viewport:has(.empty:not([hidden])){height:auto;min-height:0;flex:1;padding:10px}
 body.has-photo .bottom-toolbar{height:24px;min-height:24px;padding:3px 10px;flex-wrap:nowrap;font-size:8px;gap:8px;flex-shrink:0}body.has-photo #dimensions{max-width:60%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:8px}body.has-photo #status{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:8px}body.has-photo #compare-control{display:none!important}
 body.has-photo .adjustments{order:1;display:block;flex-shrink:0;height:clamp(210px,calc(var(--app-height)*.40),360px);overflow-y:auto;overscroll-behavior:contain;padding:0 0 12px;border-top:1px solid var(--edge);border-radius:15px 15px 0 0;background:var(--panel)}
 body.has-photo.panel-expanded .adjustments{height:clamp(210px,calc(var(--app-height)*.65),650px)}
 #mobile-sheet-toggle{display:flex;align-items:center;justify-content:center;gap:8px;position:sticky;top:0;z-index:9;min-height:24px;height:24px;width:100%;border-radius:14px 14px 0 0;background:var(--panel);color:var(--muted);font-size:9px}#mobile-sheet-toggle i{display:block;width:30px;height:3px;background:#697787;border-radius:3px}
 body.has-photo .adjustments-heading{position:sticky;top:24px;z-index:8;background:var(--panel);padding:0 16px;height:40px;min-height:40px;border-bottom:1px solid var(--edge)}body.has-photo .adjustments-heading h2{font-size:19px}body.has-photo .adjustments-heading .eyebrow{display:none}body.has-photo .adjustments-heading .text-button{min-height:40px}
 body.has-photo .adjustments .panel-tabs{position:fixed;left:0;right:0;top:auto;bottom:0;z-index:45;display:flex;align-items:stretch;justify-content:space-around;height:var(--mobile-dock);padding:0 4px env(safe-area-inset-bottom);background:#20262f;border-top:1px solid #3a4451;box-shadow:0 -6px 20px #0003;gap:0}
 .panel-tabs button{flex:1;min-width:48px;max-width:100px;min-height:58px;padding:6px 2px 3px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;border-bottom:0!important;border-top:2px solid transparent;font-size:10px;color:var(--muted)}.panel-tabs button svg{display:block;width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.panel-tabs button[aria-selected=true]{background:#82b4ff0c;border-top-color:var(--accent);color:var(--accent)}
 .control-section{padding:16px}.control-section h3{margin-bottom:16px}.range-row{margin-bottom:23px}.range-label{font-size:12px}input[type=range]{margin:16px 0 7px;height:7px}
 body.has-photo .library{display:none;position:fixed;top:calc(var(--mobile-top) + 8px);left:10px;right:10px;z-index:40;max-height:260px;padding:12px;flex-direction:column;gap:10px;align-items:stretch;background:#252d38;border:1px solid #53647a;border-radius:10px;box-shadow:0 18px 50px #0009}
 body.has-photo.library-open .library{display:flex}.library .section-title{display:flex;justify-content:space-between}.library .thumbnails{display:flex;flex-direction:row;gap:10px;width:100%;overflow-x:auto;flex-shrink:0;margin:0;padding:4px 2px;overscroll-behavior-x:contain}.library .thumb{width:80px;flex-shrink:0}.library .thumb img{height:56px}.library .add-photo,.library .session-note,.library .library-intro{display:none}.library .sync-bar{padding:0;background:none;border:0;width:100%;display:flex}.library .sync-bar button{min-height:44px;font-size:10px;padding:6px}.library #install{min-height:44px;border:1px solid var(--edge);width:100%}
 body.has-photo .panel-footnote{display:none}
 .filters-intro{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:12px}.filters-intro>h3{order:0;width:100%;margin:0 0 3px;font-size:11px}.filters-intro>.hint,.filters-intro>.sr-only{display:none}.filters-intro #filter-search,.filters-intro #filter-category{order:1;flex:1;width:calc(50% - 4px);min-width:0;font-size:11px;min-height:42px;margin:0;padding:8px}.filters-intro #filter-gallery{order:2;width:100%}.filters-intro #filter-empty{order:2}.filters-intro .selected-filter{order:3;width:100%;margin:0}.filters-intro #filter-intensity{order:4;width:100%;margin:0}.filters-intro #filterAmount{margin:10px 0}.filters-intro:has(#filterAmount:disabled) .selected-filter,.filters-intro:has(#filterAmount:disabled) #filter-intensity{display:none}
 .filter-gallery{display:grid;grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:112px;gap:10px;overflow-x:auto;overflow-y:hidden;padding:4px 0 8px;max-height:162px;overscroll-behavior-x:contain;scroll-snap-type:x proximity}.filter-card{scroll-snap-align:start}.filter-card canvas{height:100px}.filter-card span{font-size:10px;padding:8px 2px 5px}.filter-card>button:first-child{min-height:135px}.favorite-filter{width:44px;height:44px;min-height:44px;top:4px;right:4px;font-size:22px;background:#17202ba8}.inspect-filter{width:44px;height:44px;min-height:44px;top:60px;right:4px;background:#17202ba8}
 body.panel-expanded .filter-gallery{grid-auto-flow:row;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-columns:auto;max-height:none;overflow:visible;gap:12px}body.panel-expanded .filter-card canvas{height:128px}body.panel-expanded .inspect-filter{top:88px}
 .mask-handle,.mask-center{width:48px;height:48px;min-height:48px}.mask-handle i{width:14px;height:14px}#compare-handle{width:44px;height:44px;min-height:44px;left:0}
 #filter-preview-dialog{width:calc(100vw - 16px);max-height:calc(var(--app-height) - 20px);padding:14px}#filter-preview-dialog .dialog-heading{margin-bottom:14px}#filter-preview-dialog h2{font-size:23px}#filter-preview-stage{height:calc(var(--app-height)*.50);min-height:130px}.filter-preview-actions .button{min-height:48px}
}
@media(max-width:760px){
 body.has-photo .adjustments{height:220px}
 body.has-photo.tools-minimized .adjustments{height:44px;overflow:hidden}
 body.has-photo .workbench{position:relative}
 body.has-photo .canvas-toolbar{position:absolute;top:0;left:0;right:0;z-index:5;background:linear-gradient(#171b21e8,#171b2100);border:0}
 body.has-photo .bottom-toolbar{position:absolute;left:0;right:0;bottom:0;z-index:4;background:linear-gradient(#171b2100,#171b21d9);pointer-events:none}
 #mobile-sheet-toggle{height:44px;min-height:44px;width:calc(100% - 96px);justify-content:center;align-items:flex-start;padding-top:5px;background:transparent!important;touch-action:none}
 #mobile-sheet-toggle span{display:none}#mobile-sheet-toggle i{height:3px;position:absolute;left:calc(50vw - 15px)}
 body.has-photo .adjustments-heading{height:44px;min-height:44px;top:0;margin-top:-44px;pointer-events:none;padding-top:5px}
 body.has-photo .adjustments-heading #reset{position:relative;z-index:11;pointer-events:auto;min-height:44px}
 .filters-intro>h3{display:none}.filters-intro{padding:8px 12px;gap:6px}
 .filter-gallery{padding:2px 0 4px;max-height:156px}.filter-card canvas{height:90px}.filter-card>button:first-child{min-height:124px}.inspect-filter{top:50px}.favorite-filter{top:3px}
 body.panel-expanded .filter-card canvas{height:128px}body.panel-expanded .filter-card>button:first-child{min-height:162px}body.panel-expanded .inspect-filter{top:88px}
 input[type=range]{height:44px;padding:0;margin:0}
 body.tracks-ready input[type=range]{background:transparent!important}
 body.tracks-ready input[type=range]::-webkit-slider-runnable-track{height:6px;background:var(--range-track);border-radius:4px}
 body.tracks-ready input[type=range]::-webkit-slider-thumb{margin-top:-7.5px}
 body.tracks-ready input[type=range]::-moz-range-track{height:6px;background:var(--range-track);border-radius:4px}
 .filters-intro #filterAmount{margin:0}.range-row{margin-bottom:12px}.range-label{margin-bottom:0}
 body.has-photo #compare-line>span{font-size:8px;padding:0 5px}
}

.workbench{position:relative}.save-state{position:absolute;top:57px;right:14px;z-index:7;background:#18202cdb;color:#a7bad0;border:1px solid #3c4c60;border-radius:4px;padding:4px 7px;font-size:9px;pointer-events:none}.save-state[data-state=error]{color:#ffb3a9;border-color:#d47868}.library .session-note button{min-height:44px;font-size:10px}@media(max-width:760px){.save-state{top:45px;right:10px;padding:3px 5px;font-size:8px}.library .session-note{display:block!important;margin:0;font-size:10px}.library .session-note button{min-height:44px}body:not(.has-photo) .save-state{top:8px}}
