.mobile-nav,.mobile-project,.mobile-drawer-close,.mobile-backdrop{display:none}
@media(max-width:1024px){
 body.mobile-layout{height:100dvh!important;min-height:100dvh!important;overflow:hidden!important;display:flex;flex-direction:column}
 body.mobile-layout header{flex:0 0 auto;min-height:54px;padding:8px 12px;gap:8px;flex-wrap:nowrap}
 body.mobile-layout header .brand{min-width:0;gap:5px;flex:1 1 auto}
 body.mobile-layout header .brand h1{font-size:17px;white-space:nowrap;line-height:1.2}
 body.mobile-layout header .brand .eyebrow{font-size:8px;letter-spacing:.5px}
 body.mobile-layout header .brand .logo{width:32px;height:32px}
 body.mobile-layout header .brand .logo img{width:42px;height:42px;margin:-5px}
 body.mobile-layout .headerextra{display:none}
 body.mobile-layout .headeractions{display:flex;flex:0 0 auto;gap:6px;flex-wrap:nowrap}
 body.mobile-layout .headeractions button:not(#exportBtn){display:none}
 body.mobile-layout .headeractions #exportBtn,body.mobile-layout .mobile-project{display:block;min-width:0;width:auto;min-height:40px;height:40px;padding:8px 10px;font-size:13px;white-space:nowrap;flex:0 0 auto}
 body.mobile-layout .mobile-project{background:#233249;color:#e6edf8;border:1px solid #425168;border-radius:7px;padding-right:25px;max-width:105px}
 body.mobile-layout .layout,body.mobile-layout.hide-pages .layout,body.mobile-layout.hide-settings .layout,body.mobile-layout.focus-mode .layout{display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr)!important;min-height:0!important;height:auto!important;flex:1 1 0!important;overflow:hidden!important}
 body.mobile-layout .workspace{grid-column:1!important;grid-row:1!important;min-width:0;min-height:0!important;max-height:none!important;display:flex;flex-direction:column}
 body.mobile-layout .panel-splitter{display:none!important}
 body.mobile-layout .sidebar,body.mobile-layout .inspector{display:none!important}
 body.mobile-layout .mobile-backdrop{display:none;position:fixed;inset:0;z-index:30;background:#101b2e80;backdrop-filter:blur(2px)}
 body.mobile-layout.mobile-drawer-pages .mobile-backdrop,body.mobile-layout.mobile-drawer-settings .mobile-backdrop{display:block}
 body.mobile-layout.mobile-drawer-pages .sidebar,body.mobile-layout.mobile-drawer-settings .inspector{display:flex!important;flex-direction:column;position:fixed;inset:auto 0 0;z-index:31;width:100%;height:min(76dvh,760px);min-height:0!important;max-height:76dvh!important;overflow:hidden;background:#f5f7fb;border:0;border-radius:18px 18px 0 0;box-shadow:0 -12px 40px #13243c40;padding-bottom:env(safe-area-inset-bottom,0px)}
 body.mobile-layout.mobile-drawer-settings .inspector{overflow:auto;overscroll-behavior:contain}
 body.mobile-layout .sidebar .sidehead{position:sticky;top:0;z-index:4;background:white;flex:0 0 auto;padding:12px 14px}
 body.mobile-layout .sidebar .pages{flex:1 1 0;min-height:0;overflow-y:auto;padding:10px;overscroll-behavior:contain}
 body.mobile-layout .sidebar .sidefoot{flex:0 0 auto;padding:10px 14px;background:white;border-top:1px solid #dce2ec}
 body.mobile-layout .sidehead>.row{flex-wrap:nowrap!important;align-items:center}
 body.mobile-layout .sidehead>.row b{font-size:16px}
 body.mobile-layout .sidehead #addBtn{min-height:42px;font-size:14px;width:auto}
 body.mobile-layout #pagesHeaderMenu{height:42px;width:40px;flex-basis:40px}
 body.mobile-layout .searchbox input{font-size:16px;min-width:0}
 body.mobile-layout .sidebar-selection #compactSelection,body.mobile-layout .sidebar-selection #bulkActions,body.mobile-layout .sidefoot .compact-footer select{min-height:44px;font-size:15px}
 body.mobile-layout .thumb{min-height:84px;padding:10px 7px;gap:10px}
 body.mobile-layout .thumb img{width:53px;height:68px}
 body.mobile-layout .thumb .num{font-size:16px}
 body.mobile-layout .thumb .name,body.mobile-layout .thumb .thumbmeta{font-size:13px}
 body.mobile-layout .thumb .draghandle{display:grid;place-items:center;min-width:28px;min-height:46px;font-size:21px;touch-action:none;cursor:grab}
 body.mobile-layout .page-more{width:42px;height:42px;min-height:42px;right:8px}
 body.mobile-layout .page-checkbox{width:24px;height:24px;accent-color:#4059df}
 body.mobile-layout .mobile-reorder-target-before{box-shadow:inset 0 3px #4059df}
 body.mobile-layout .mobile-reorder-target-after{box-shadow:inset 0 -3px #4059df}
 body.mobile-layout .mobile-drawer-close{display:inline-grid;place-items:center;min-width:44px;height:44px;padding:0;font-size:23px;border-radius:8px}
 body.mobile-layout .inspector-head{position:sticky;top:0;z-index:4;padding:11px 14px 0;background:white;flex:0 0 auto}
 body.mobile-layout .inspector-head h2{font-size:19px;margin:3px 48px 9px 0}
 body.mobile-layout .inspector-head>.mobile-drawer-close{position:absolute;right:12px;top:9px}
 body.mobile-layout .inspector-head .tabs button{min-height:44px;font-size:16px}
 body.mobile-layout .inspector .panel{padding:12px 14px 22px}
 body.mobile-layout .section label{font-size:15px}
 body.mobile-layout .section select,body.mobile-layout .section input:not([type=checkbox]):not([type=range]),body.mobile-layout .section button,body.mobile-layout .page-copy-controls button{min-height:44px;font-size:15px}
 body.mobile-layout .section input[type=checkbox]{width:22px;height:22px}
 body.mobile-layout .section input[type=range]{min-height:34px;touch-action:pan-y}
 body.mobile-layout .canvas-toolbar{flex:0 0 auto;min-height:47px;padding:5px 8px!important;gap:7px!important;overflow-x:auto;overflow-y:hidden;scrollbar-width:none}
 body.mobile-layout .canvas-toolbar::-webkit-scrollbar{display:none}
 body.mobile-layout .canvas-toolbar button,body.mobile-layout .canvas-toolbar .compact-select{min-height:38px;height:38px;font-size:13px!important}
 body.mobile-layout .canvas-toolbar .compact-select{appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23283d60' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")!important;background-repeat:no-repeat!important;background-position:right 5px center!important;background-size:13px!important}
 body.mobile-layout .canvas-toolbar #togglePages,body.mobile-layout .canvas-toolbar #toggleSettings,body.mobile-layout .canvas-toolbar .toolbar-space,body.mobile-layout .canvas-toolbar #zoomIn,body.mobile-layout .canvas-toolbar #zoomOut,body.mobile-layout .canvas-toolbar #focusBtn{display:none!important}
 body.mobile-layout .canvas-toolbar .compact-group:empty{display:none}
 body.mobile-layout .canvas-toolbar #compactView{width:111px;padding:5px 19px 5px 6px!important}
 body.mobile-layout .canvas-toolbar #compactLayout{width:80px;padding:5px 18px 5px 7px!important}
 body.mobile-layout .canvas-toolbar #compactZoom{width:96px;padding:5px 19px 5px 6px!important}
 body.mobile-layout .stage{padding:10px!important;min-height:0;flex:1 1 0;overscroll-behavior:contain;scrollbar-gutter:auto}
 body.mobile-layout .empty{width:min(100%,400px);padding:20px 16px;margin:auto}
 body.mobile-layout .empty h2{font-size:21px}
 body.mobile-layout .empty p{font-size:14px}
 body.mobile-layout .empty button{min-height:44px;font-size:14px}
 body.mobile-layout .page-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 body.mobile-layout .page-grid[data-size=small]{grid-template-columns:repeat(3,minmax(0,1fr))}
 body.mobile-layout .page-grid[data-size=large]{grid-template-columns:repeat(1,minmax(0,1fr))}
 body.mobile-layout .previewfoot{min-height:48px;flex:0 0 auto;gap:8px;justify-content:space-between;padding:5px 12px!important;font-size:13px}
 body.mobile-layout .previewfoot .row{gap:6px}
 body.mobile-layout .previewfoot button{width:40px;height:40px;min-height:40px;font-size:23px}
 body.mobile-layout .previewfoot input[type=number]{width:44px;height:38px;font-size:16px}
 body.mobile-layout .previewfoot input[type=checkbox]{width:20px;height:20px}
 body.mobile-layout .previewfoot #sideLabel{display:none}
 body.mobile-layout .mobile-nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));flex:0 0 auto;gap:6px;padding:7px 8px calc(7px + env(safe-area-inset-bottom,0px));background:#fff;border-top:1px solid #dce2ec}
 body.mobile-layout .mobile-nav button{min-height:48px;white-space:nowrap;padding:7px 3px;border:1px solid #d4deed;font-size:13px;font-weight:700;background:#f8faff;color:#283d60}
 body.mobile-layout .mobile-nav button[aria-expanded=true]{background:#e8eeff;color:#3451d0;border-color:#8298f4}
 body.mobile-layout.focus-mode .mobile-nav{display:none}
 body.mobile-layout .statusbar{min-height:22px;padding:4px 8px!important;gap:4px;font-size:10px;flex-wrap:nowrap;overflow:hidden}
 body.mobile-layout #status{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}
 body.mobile-layout .status-details,body.mobile-layout #saveStatus{display:none}
 body.mobile-layout .recovery{padding:7px 10px;gap:5px;flex-wrap:wrap;font-size:12px}
 body.mobile-layout .recovery button{min-height:36px;font-size:13px}
 body.mobile-layout .page-context{width:min(310px,calc(100vw - 16px));max-height:72dvh}
 body.mobile-layout .page-context button{min-height:46px;font-size:15px}
 body.mobile-layout .modal{padding:8px}
 body.mobile-layout .modalbox{width:min(100%,600px)!important;max-height:94dvh!important;padding:15px!important;overflow:auto}
 body.mobile-layout .modalbox button,body.mobile-layout dialog button{min-height:44px;font-size:14px}
 body.mobile-layout #cropModal{padding:0}
 body.mobile-layout #cropModal .modalbox{width:100%!important;max-width:100%;height:100dvh;max-height:100dvh!important;border-radius:0;padding:12px!important;overflow:auto}
 body.mobile-layout #cropModal .crop-tools{gap:8px;flex-wrap:wrap}
 body.mobile-layout #cropModal .crop-tools select,body.mobile-layout #cropModal .crop-exact input,body.mobile-layout #cropModal .crop-exact select{min-height:42px;font-size:16px}
 body.mobile-layout #cropModal .crop-tools input[type=range]{min-height:36px}
 body.mobile-layout #cropModal .crop-exact{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 body.mobile-layout #cropModal .crop-exact label,body.mobile-layout #cropModal .crop-exact input,body.mobile-layout #cropModal .crop-exact select{min-width:0;width:100%;max-width:100%}
 body.mobile-layout #cropSurface{max-height:48dvh;padding:14px;touch-action:none}
 body.mobile-layout #cropSurface .crop-handle{width:17px;height:17px}
 body.mobile-layout #cropSurface .crop-handle::before{content:"";position:absolute;inset:-11px}
 body.mobile-layout #cropModal .modalbox>.row:last-child{position:sticky;bottom:0;z-index:5;background:#fff;padding:8px 0 calc(8px + env(safe-area-inset-bottom,0px))}
}
@media(max-width:420px){
 body.mobile-layout header .brand h1{font-size:15px}
 body.mobile-layout header .brand .eyebrow{display:none}
 body.mobile-layout .headeractions #exportBtn,body.mobile-layout .mobile-project{font-size:12px;padding:7px 8px}
 body.mobile-layout .mobile-project{width:92px;max-width:92px;padding-right:18px}
 body.mobile-layout .previewfoot{padding-inline:7px!important}
 body.mobile-layout .previewfoot .row{gap:3px}
 body.mobile-layout .previewfoot button{width:35px}
 body.mobile-layout .previewfoot input[type=number]{width:37px}
}
@media(max-width:360px){
 body.mobile-layout header{padding-inline:7px}
 body.mobile-layout header .brand h1{font-size:14px}
 body.mobile-layout header .brand .logo{width:27px;height:27px}
 body.mobile-layout header .brand .logo img{width:35px;height:35px;margin:-4px}
 body.mobile-layout .mobile-project{width:77px;max-width:77px;font-size:11px;padding-left:5px;padding-right:15px}
 body.mobile-layout .headeractions #exportBtn{font-size:11px;padding:6px}
 body.mobile-layout .canvas-toolbar{gap:4px!important;padding-inline:4px!important}
 body.mobile-layout .canvas-toolbar .compact-group{gap:3px}
 body.mobile-layout .canvas-toolbar #compactView{width:90px}
 body.mobile-layout .canvas-toolbar #compactLayout{width:64px}
 body.mobile-layout .canvas-toolbar #compactZoom{width:82px}
 body.mobile-layout .sidehead>.row{gap:5px}
 body.mobile-layout .sidehead #addBtn{font-size:12px;padding:5px 7px}
 body.mobile-layout .sidehead>.row b{font-size:14px}
 body.mobile-layout #pagesHeaderMenu,body.mobile-layout .mobile-drawer-close{min-width:38px;width:38px;flex-basis:38px}
}
