.mobile-editor-back,.mobile-sheet-heading,.mobile-file-options,#mobileObjectActions,#mobileSheetBackdrop{display:none}
@media(max-width:680px){
body.mobile-editor-active{margin:0;overflow:hidden;overscroll-behavior:none;background:#edf0f4}
.mobile-editor-active>.topbar,.mobile-editor-active main>:not(.editor-shell),.mobile-editor-active #rivo-widget{display:none!important}
.mobile-editor-active main{padding:0!important;margin:0!important;max-width:none!important}
.mobile-editor-active .editor-shell{position:fixed;inset:0;z-index:50;display:flex;flex-direction:column;height:100dvh;max-height:100dvh;border:0;border-radius:0;overflow:hidden;background:#edf0f4;padding-top:env(safe-area-inset-top)}
.mobile-editor-active .document-bar{order:0;display:flex!important;align-items:center;flex:none;height:56px;padding:6px 10px;gap:8px;background:#fff;border-bottom:1px solid #e1e5eb}
.mobile-editor-active .mobile-editor-back{display:grid;place-items:center;width:40px;height:44px;flex:none;text-decoration:none;font-size:24px;color:#1d2939;border-radius:10px}
.mobile-editor-active .document-name{display:none}.mobile-editor-active .document-actions{display:flex;align-items:center;gap:6px;margin:0 0 0 auto;flex-wrap:nowrap}
.mobile-editor-active .document-actions button,.mobile-editor-active .document-actions label{min-height:42px;padding:8px 10px;font-size:12px;white-space:nowrap;border-radius:10px}
.mobile-editor-active #preview{display:none}.mobile-editor-active #download{background:#17212b;color:white}
.mobile-editor-active .toolbar{order:4;display:block;flex:none;position:relative;z-index:102;padding:5px 4px calc(5px + env(safe-area-inset-bottom));height:calc(80px + env(safe-area-inset-bottom));min-height:80px;background:#fff;border:0;border-top:1px solid #dce2ea;overflow:visible;box-shadow:0 -4px 18px #17212b08}
.mobile-editor-active .toolbar>.tool-group:not(.history){display:flex;gap:3px;align-items:stretch;overflow-x:auto;overflow-y:hidden;height:68px;padding:2px 3px;scrollbar-width:none}
.mobile-editor-active .toolbar button{min-width:52px;min-height:58px;flex:none;padding:5px 6px;border-radius:10px;gap:3px;display:flex;flex-direction:column;justify-content:center;font-size:20px;white-space:nowrap}
.mobile-editor-active .toolbar button span{font-size:10px;line-height:14px}.mobile-editor-active .toolbar button[aria-pressed=true]{background:#e7edf7;color:#173f9a;box-shadow:inset 0 0 0 1px #c8d6ee}
.mobile-editor-active .repeat-tool{display:none}.mobile-editor-active .toolbar .history{position:fixed;top:calc(6px + env(safe-area-inset-top));left:54px;z-index:104;display:flex;gap:2px;height:44px;background:#fff;padding:0;border:0}
.mobile-editor-active .toolbar .history button{min-width:38px;min-height:42px;height:42px;padding:4px}.mobile-editor-active .history button span{display:none}
.mobile-editor-active .shape-picker{flex:none;position:static}.mobile-editor-active .shape-menu{position:fixed!important;left:8px!important;right:8px;top:auto!important;bottom:calc(88px + env(safe-area-inset-bottom));width:auto!important;z-index:160;box-shadow:0 -8px 35px #17212b25;border-radius:16px;padding:10px}
.mobile-editor-active .shape-menu button{min-height:48px;min-width:0;flex-direction:row;gap:9px;font-size:13px}.mobile-editor-active .highlight-mode-name{display:none}
.mobile-editor-active .workspace-controls{order:1;flex:none;display:flex;flex-wrap:nowrap;justify-content:space-between;align-items:center;gap:4px;height:48px;padding:3px 8px;border-bottom:1px solid #dce2ea;background:#fff}
.mobile-editor-active .panel-switches{display:flex;gap:2px;flex:none}.mobile-editor-active .workspace-controls button{min-height:40px;padding:5px 7px;font-size:12px}.mobile-editor-active #toggleProperties{font-size:0}.mobile-editor-active #toggleProperties:after{content:'Settings';font-size:12px}
.mobile-editor-active .page-navigation{gap:3px!important}.mobile-editor-active .page-navigation label{font-size:0}.mobile-editor-active .page-navigation select{font-size:13px;min-height:36px;padding:3px;width:42px}.mobile-editor-active #totalPages{font-size:11px}.mobile-editor-active .zoom-controls{gap:2px!important}.mobile-editor-active #zoom{font-size:12px;min-height:36px;padding:3px;max-width:85px}.mobile-editor-active #zoomIn,.mobile-editor-active #zoomOut{display:none}
.mobile-editor-active .editor-grid{order:2;flex:1;min-height:0;max-height:none;height:auto!important;display:block;overflow:hidden}
.mobile-editor-active .work-area{display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden;isolation:isolate}
.mobile-editor-active .context-strip{flex:none;min-height:30px;height:auto;max-height:44px;padding:5px 10px;font-size:10px;background:#edf0f4;line-height:15px;overflow:hidden}.mobile-editor-active .context-strip .copy-chip{display:none}
.mobile-editor-active .stage{flex:1;min-height:0;height:auto;max-height:none;padding:18px 12px;overflow:auto;overscroll-behavior:contain;background:#e8ecf1}
.mobile-editor-active .stage-footer{flex:none;font-size:9px;min-height:22px;padding:3px 9px;gap:4px;background:#edf0f4}.mobile-editor-active #editInfo{display:none}
.mobile-editor-active #objectToolbar{display:none!important}
.mobile-editor-active #mobileObjectActions:not([hidden]){order:3;display:flex;align-items:center;gap:4px;flex:none;min-height:52px;padding:4px 8px;overflow:auto;background:#fff;border-top:1px solid #dce2ea;scrollbar-width:none}
#mobileObjectActions strong{font-size:11px;color:#64748b;padding-right:5px;white-space:nowrap}#mobileObjectActions button{min-height:42px;flex:none;font-size:12px;padding:6px 10px;background:#f2f5f9;border:1px solid #e1e6ed;color:#26374e}#mobileObjectActions button[data-mobile-action=delete]{color:#a12936}#mobileObjectActions button[aria-pressed=true]{background:#e1ecff;border-color:#9bb7e6}
.mobile-editor-active #propertiesPanel,.mobile-editor-active #pagesPanel{display:none;position:fixed;z-index:152;left:0;right:0;bottom:calc(80px + env(safe-area-inset-bottom));max-height:min(68dvh,640px);height:auto;width:auto;padding:0 16px 18px;background:#fff;border:1px solid #dce2ea;border-bottom:0;border-radius:20px 20px 0 0;box-shadow:0 -12px 45px #17212b26;overflow:auto;overscroll-behavior:contain}
.mobile-editor-active[data-mobile-sheet=format] #propertiesPanel:not([hidden]),.mobile-editor-active[data-mobile-sheet=pages] #pagesPanel:not([hidden]){display:block}
.mobile-editor-active #mobileSheetBackdrop:not([hidden]){display:block;position:fixed;inset:0;z-index:150;background:#17212b66;border:0;border-radius:0;padding:0}
.mobile-editor-active .mobile-sheet-heading{display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;z-index:3;background:#fff;padding:15px 0 10px;border-bottom:1px solid #edf0f4;margin-bottom:12px}.mobile-sheet-heading strong{font-size:16px}.mobile-sheet-heading button{min-height:44px;background:#17212b;color:#fff;border:0;padding:8px 17px}
.mobile-editor-active .mobile-file-options{display:flex;gap:10px;align-items:center;margin:10px 0 18px}.mobile-file-options p{flex:1;min-width:0;overflow-wrap:anywhere;font-size:12px;color:#64748b}.mobile-file-options button{font-size:12px;min-height:44px;border:1px solid #dce2ea;background:#f5f7fa;max-width:130px}
.mobile-editor-active .properties>.panel-heading{display:none}.mobile-editor-active #formatPainter{display:none}.mobile-editor-active .properties .property-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.mobile-editor-active .properties input,.mobile-editor-active .properties select{min-height:44px;font-size:16px}.mobile-editor-active #pages{display:flex;flex-wrap:wrap;overflow:visible}.mobile-editor-active .page-row{flex:1 0 105px;max-width:150px}
.mobile-editor-active #status{position:absolute;bottom:calc(84px + env(safe-area-inset-bottom));left:8px;right:8px;pointer-events:none;font-size:10px;line-height:14px;background:#edf0f4f5;border-radius:6px;margin:0;padding:3px 7px;max-height:30px;overflow:hidden;z-index:2}.mobile-editor-active.mobile-object-selected #status{display:none}
.mobile-editor-active #filerivo-analytics-choice{z-index:200;bottom:calc(84px + env(safe-area-inset-bottom))!important}
.mobile-editor-active .resize-frame .resize-grip{width:34px!important;height:34px!important}
}
@media(max-width:360px){.mobile-editor-active .workspace-controls{padding-inline:4px}.mobile-editor-active .workspace-controls button{padding-inline:5px}.mobile-editor-active #zoom{max-width:72px}.mobile-editor-active .toolbar .history{left:45px}.mobile-editor-active .document-actions label{font-size:10px;padding-inline:7px}}
@media(max-width:680px){
.mobile-editor-active .toolbar [data-tool=pan]{order:0}.mobile-editor-active .toolbar [data-tool=select]{order:1}.mobile-editor-active .toolbar [data-tool=text]{order:2}.mobile-editor-active .toolbar [data-tool=ink]{order:3}.mobile-editor-active .toolbar .shape-picker{order:4}.mobile-editor-active .toolbar .highlight-picker{order:5}.mobile-editor-active #insertImage{order:6}.mobile-editor-active .toolbar [data-tool=signature]{order:7}.mobile-editor-active #contentMode{order:8}
}

@media(max-width:680px){
.mobile-editor-active[data-mobile-sheet=format] #propertiesPanel:not([hidden]){display:flex;flex-direction:column}
.mobile-editor-active #propertiesPanel>*{flex-shrink:0;order:5}.mobile-editor-active #propertiesPanel>.mobile-sheet-heading{order:0}.mobile-editor-active #propertiesPanel>.mobile-file-options{order:1}.mobile-editor-active #propertiesPanel>#addedPanel,.mobile-editor-active #propertiesPanel>#contentPanel{order:2}.mobile-editor-active #propertiesPanel>#textFormatting{order:3}
.mobile-editor-active #status,.mobile-editor-active.mobile-object-selected #status{display:block;position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;padding:0;margin:0}
}

.mobile-extra-tools,.mobile-extra-trigger{display:none}
@media(max-width:680px){
.mobile-editor-active .toolbar>.tool-group:not(.history){display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:1px;overflow:visible;padding:2px 0;width:100%}
.mobile-editor-active .toolbar>.tool-group:not(.history)>button,.mobile-editor-active .toolbar .shape-picker{min-width:0;width:100%}
.mobile-editor-active .toolbar button{min-width:0;width:100%;padding:4px 2px}.mobile-editor-active .toolbar button span{font-size:9px}
.mobile-editor-active .toolbar [data-tool=select],.mobile-editor-active .toolbar [data-tool=signature],.mobile-editor-active .toolbar #contentMode{display:none}
.mobile-editor-active .toolbar [data-tool=pan]{order:0}.mobile-editor-active .toolbar [data-tool=text]{order:1}.mobile-editor-active .toolbar [data-tool=ink]{order:2}.mobile-editor-active .toolbar .shape-picker{order:3}.mobile-editor-active .toolbar .highlight-picker{order:4}.mobile-editor-active .toolbar #insertImage{order:5}.mobile-editor-active #mobileMoreTools{display:flex;order:6}
.mobile-editor-active .mobile-extra-tools{display:block;margin-bottom:18px;order:1!important}.mobile-extra-tools>strong{font-size:12px;color:#64748b}.mobile-extra-tools>div{display:flex;gap:6px;margin-top:8px}.mobile-extra-tools button{min-height:44px;font-size:12px;border:1px solid #dce2ea;background:#f5f7fa;padding:7px 10px}
.mobile-editor-active #mobileObjectActions [data-mobile-action=copy]{display:none}
}
.toolbar #mobileMoreTools{display:none}
@media(max-width:680px){.mobile-editor-active .toolbar #mobileMoreTools{display:flex}}
@media(max-width:680px){.mobile-editor-active .document-bar{min-height:56px!important}.mobile-editor-active .toolbar .history button{width:38px;flex:0 0 38px}}
@media(max-width:360px){.mobile-editor-active .workspace-controls .panel-switches{width:124px;flex:0 0 124px}.mobile-editor-active .workspace-controls .page-navigation{width:96px;flex:0 0 96px}.mobile-editor-active #totalPages{display:none}.mobile-editor-active .page-navigation button{width:24px;min-width:24px;padding:2px}.mobile-editor-active .zoom-controls{width:64px;flex:0 0 64px}.mobile-editor-active #zoom{width:64px;max-width:64px}}
.mobile-text-panel{display:none}
@media(max-width:680px){
.mobile-editor-active #mobileTextPanel:not([hidden]){display:block;position:fixed;z-index:155;left:0;right:0;bottom:calc(80px + env(safe-area-inset-bottom));max-height:70dvh;overflow:auto;padding:0 18px 18px;background:#fff;border:1px solid #dce2ea;border-radius:18px 18px 0 0;box-shadow:0 -8px 32px #17212b1a}
.mobile-editor-active #mobileTextPanel label{font-size:12px;font-weight:600;color:#52657b;display:block;margin:12px 0 7px}
.mobile-editor-active #mobileTextValue{width:100%;min-height:112px;resize:vertical;border:1px solid #cbd5e1;border-radius:10px;background:#fafbfc;padding:12px;font:16px/1.5 system-ui;color:#17212b;outline-offset:2px}
.mobile-editor-active #mobileTextPanel [type=submit]{min-height:44px;width:100%;border-radius:10px}.mobile-text-tip{font-size:11px;line-height:1.5;color:#6b7c90;margin-bottom:0}#mobileTextError{font-size:12px;color:#a12936}
.mobile-editor-active .resize-frame{border:1px solid #6b8db6;border-radius:2px;box-shadow:none}
.mobile-editor-active .resize-frame .resize-grip{width:34px!important;height:34px!important;background:transparent!important;border:0!important;box-shadow:none!important}
.mobile-editor-active .resize-grip svg{display:none}.mobile-editor-active .resize-grip:after{content:'';display:block;width:8px;height:8px;background:#fff;border:1px solid #577ca7;border-radius:50%;box-shadow:0 1px 2px #1b355b12;pointer-events:none}
.mobile-editor-active .grip-n:after,.mobile-editor-active .grip-s:after{width:12px;height:5px;border-radius:3px}.mobile-editor-active .grip-e:after,.mobile-editor-active .grip-w:after{width:5px;height:12px;border-radius:3px}
}
@media(max-width:680px){.mobile-editor-active .resize-frame[data-object-type=text] .grip-n,.mobile-editor-active .resize-frame[data-object-type=text] .grip-s{display:none!important}}
.mobile-shape-panel{display:none}
@media(max-width:680px){
.mobile-editor-active #mobileShapePanel:not([hidden]){display:block;position:fixed;z-index:155;left:0;right:0;bottom:calc(80px + env(safe-area-inset-bottom));max-height:72dvh;overflow:auto;padding:0 18px 18px;background:#fff;border:1px solid #dce2ea;border-radius:18px 18px 0 0;box-shadow:0 -8px 32px #17212b1a}
.mobile-shape-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.mobile-shape-fields label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:600;color:#52657b;min-width:0}.mobile-shape-fields input,.mobile-shape-fields select{width:100%;min-width:0;min-height:44px;border:1px solid #cbd5e1;border-radius:9px;background:#fafbfc;padding:7px 10px;font-size:16px;color:#17212b}.mobile-shape-fields input[type=color]{padding:5px}.mobile-shape-fields input[type=range]{padding:0;border:0;background:none}.mobile-shape-preview{display:grid;place-items:center;min-height:84px;margin-bottom:12px;background:#f7f9fc;border:1px solid #edf0f5;border-radius:10px}.mobile-shape-preview svg{width:136px;height:80px}
#mobileShapeError{font-size:12px;color:#a12936}.mobile-editor-active #mobileShapePanel [type=submit]{min-height:44px;width:100%;border-radius:10px}
}

.shape-quick-style{display:none}
@media(max-width:680px){
.mobile-editor-active .shape-menu{max-height:calc(100dvh - 150px);overflow-y:auto}
.mobile-editor-active .shape-quick-style{display:grid;grid-column:1/-1;grid-template-columns:1fr 1fr;gap:8px 12px;border-top:1px solid #dce3ed;margin-top:5px;padding-top:10px;color:#263c5e;font-size:12px}
.shape-quick-style strong,.shape-quick-opacity{grid-column:1/-1}.shape-quick-style label{display:flex;flex-wrap:wrap;align-items:center;gap:5px;min-width:0}.shape-quick-style select,.shape-quick-style input[type=color]{width:100%;height:38px;min-width:0;border:1px solid #cbd5e1;border-radius:7px;background:#fff;color:#17212b;font-size:16px;padding:4px}.shape-quick-style input[type=range]{width:100%;height:28px;margin:0}.shape-quick-style output{margin-left:auto}.shape-quick-style input:disabled{opacity:.45}
}
.recognize-text-dialog{width:min(680px,96vw);max-height:90dvh;overflow:auto;padding:20px;border:1px solid #d0d9e4;border-radius:14px;color:#24364b}.recognize-text-dialog::backdrop{background:#10203088}.recognize-text-dialog p{font-size:13px;line-height:1.6}.recognize-text-dialog label{display:block;font-size:13px;margin:8px 0}.recognize-text-dialog textarea{width:100%;font:16px sans-serif}.recognize-preview{position:relative;width:100%;max-width:420px;margin:auto;line-height:0}.recognize-preview canvas{width:100%;height:auto;touch-action:none;cursor:crosshair}.recognize-region{position:absolute;border:2px solid #2859cc;background:#2859cc20;pointer-events:none}.recognize-fields{display:flex;gap:12px;flex-wrap:wrap}.recognize-fields input{display:block;max-width:100px;min-height:36px}.recognize-text-dialog button{min-height:40px;margin:4px}.mobile-editor-active #recognizeText{display:none!important}

.mobile-editor-active #preview{display:inline-flex}.mobile-editor-active .document-actions{flex-wrap:wrap;gap:6px}.mobile-editor-active #applyResult,.mobile-editor-active #preview,.mobile-editor-active #download{min-height:40px;padding:8px 10px;font-size:12px}

.mobile-editor-active .document-bar{height:auto;min-height:56px}
