/* All rules belong to Crop PDF only. Other tools keep their existing layouts. */
body.crop-editing{overflow:hidden;height:100dvh}
.crop-editing .tools-main{padding:0;max-width:none;min-height:0}
.crop-editing .crop-workspace{position:fixed;inset:var(--crop-top,64px) 0 0;display:flex;flex-direction:column;min-height:0;max-width:none;width:auto;overflow:hidden;padding:0;margin:0}
.crop-editing .crop-workspace>:is(.tool-heading,.tool-assurance),.crop-editing :is(.tools-footer,#tools-guide,.next-tools){display:none}
body.document-tools.crop-editing .crop-workspace .editor-stage{display:grid;grid-template-columns:minmax(0,1fr) clamp(300px,29vw,370px);flex:1;min-height:0;height:100%;gap:0;margin:0;padding:0;border:0;border-radius:0;background:transparent;overflow:hidden;align-items:stretch}
.crop-workspace .crop-heading{display:none}
body.document-tools.crop-editing .crop-workspace .file-area{display:flex;flex-direction:column;min-width:0;min-height:0;padding:10px 16px 0;overflow:hidden}
body.document-tools.crop-editing .crop-workspace .file-toolbar{display:flex;align-items:center;justify-content:space-between;flex:none;min-height:44px;margin:0 0 8px;gap:8px}
.crop-workspace :is(.crop-history,.focused-toolbar-actions){display:flex;align-items:center;gap:6px}
.crop-workspace :is(.crop-history,.crop-heading,.crop-page-nav,.crop-zoom) button{display:grid;place-items:center;min-width:44px;min-height:44px;padding:8px;border:0;border-radius:8px;background:transparent;color:#274b80;font:inherit;cursor:pointer}
.crop-workspace :is(.crop-history,.crop-heading) svg{width:25px;height:25px}
.crop-workspace button:disabled{opacity:.4;cursor:default}
.crop-workspace [data-workspace-help]{display:flex;align-items:center;min-height:44px;padding:8px 12px;border:0;background:transparent;color:#244e94;font:inherit;cursor:pointer}
.crop-workspace [data-workspace-help] svg{display:none}
.crop-workspace .compress-settings-summary{display:none!important}
body.document-tools.crop-editing .crop-workspace .crop-preview{display:flex;flex-direction:column;flex:1;min-height:0;min-width:0;padding:0;gap:0;overflow:hidden}
.crop-workspace .crop-viewport{display:block;position:relative;flex:1;min-height:0;min-width:0;overflow:auto;overscroll-behavior:contain;background:#e5e8ef;border-radius:10px;outline:none;padding:0}
.crop-workspace .crop-sheet{position:relative;flex:none;margin:18px auto;background:white;box-shadow:0 1px 6px #0005;isolation:isolate}
.crop-workspace .crop-sheet canvas{display:block;width:100%;height:100%;background:white}
.crop-workspace .crop-mask{position:absolute;inset:0;background:#0009;pointer-events:none;z-index:1}
.crop-workspace .crop-box{position:absolute;box-sizing:border-box;border:2px solid #197c83;z-index:2;cursor:move;touch-action:none;outline:none}
.crop-workspace .crop-box:focus-visible{outline:2px solid #315fa3;outline-offset:3px}
body.document-tools .crop-workspace .crop-handle{position:absolute;display:block;width:32px;height:32px;min-height:0;min-width:0;padding:0;border:0;border-radius:50%;background:transparent;touch-action:none;transform:translate(-50%,-50%);cursor:crosshair}
.crop-workspace .crop-handle:after{content:'';position:absolute;width:13px;height:13px;top:50%;left:50%;transform:translate(-50%,-50%);border:2px solid white;border-radius:50%;background:#197c83;box-shadow:0 0 3px #0008}
.crop-workspace .crop-nw{left:0;top:0}.crop-workspace .crop-n{left:50%;top:0}.crop-workspace .crop-ne{left:100%;top:0}.crop-workspace .crop-e{left:100%;top:50%}.crop-workspace .crop-se{left:100%;top:100%}.crop-workspace .crop-s{left:50%;top:100%}.crop-workspace .crop-sw{left:0;top:100%}.crop-workspace .crop-w{left:0;top:50%}
.crop-workspace .crop-preview-controls{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:6px 14px;flex:none;padding:6px 0 0}
.crop-workspace :is(.crop-page-nav,.crop-zoom){display:flex;align-items:center;justify-content:center;gap:3px;font-size:14px;color:#365472}
.crop-workspace .crop-page-nav label{margin:0;padding:0}
body.document-tools .crop-workspace .crop-page-nav input{width:64px;min-height:40px;padding:6px;border:1px solid #cbd6e5;border-radius:8px;background:white;color:#20396d;text-align:center;font-size:16px;margin:0}
.crop-workspace .crop-preview-hint{flex:none;margin:3px 0 7px;text-align:center;color:#60718a;font-size:12px;line-height:1.5}
body.document-tools.crop-editing .crop-workspace .settings{display:flex;flex-direction:column;min-height:0;max-height:none;height:100%;position:static;overflow:hidden;background:white;border:0;border-left:1px solid #dce2ec;border-radius:0;padding:16px}
.crop-workspace .settings>h2{margin:0 0 10px;padding:0 0 14px;border-bottom:1px solid #dce2ec;font-size:21px}
.crop-workspace .crop-sidebar-source,.crop-workspace [data-crop-source]{margin:0 0 10px;font-size:13px;line-height:1.5;text-align:center;color:#536579}
body.document-tools.crop-editing .crop-workspace .settings>[data-settings]{display:block;flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:0 5px 12px 0}
.crop-workspace .crop-instruction,.crop-workspace .crop-note{font-size:13px;line-height:1.6;color:#60718a;margin:12px 0}
.crop-workspace .crop-fields{display:grid;grid-template-columns:1fr 1fr;gap:8px 14px}
body.document-tools .crop-workspace [data-settings] label{display:block;margin:14px 0 6px;padding:0;border:0;box-shadow:none;outline:none;font-size:14px;font-weight:600}
body.document-tools .crop-workspace [data-settings] :is(input,select){display:block;width:100%;min-width:0;min-height:46px;font-size:16px;color:#364258;background:white;border:1px solid #ccd3e0;border-radius:8px;padding:10px;box-sizing:border-box;margin:0}
.crop-workspace [data-settings] :is(input,select):focus-visible{outline:2px solid #6589c6;outline-offset:1px;box-shadow:none}
.crop-workspace [data-crop-reset]{display:block;width:100%;min-height:44px;margin:16px 0 6px}
.crop-workspace [data-crop-replace]{display:block;min-height:40px;margin:0 auto}
.crop-workspace .crop-caution{padding:10px;border-radius:8px;background:#edf3f9;font-size:12px;line-height:1.6;color:#536579;margin:12px 0 0}
.crop-workspace .crop-validation{padding:10px;border-radius:8px;background:#fff0eb;color:#91372c;font-size:14px;line-height:1.5}
.crop-workspace .crop-dock{flex:none;padding-top:10px}
.crop-workspace .crop-dock [data-crop-source]{display:none}
body.document-tools .crop-workspace .crop-dock [data-process]{display:block;position:static;width:100%;min-height:54px;border-radius:10px;padding:12px;font-size:18px;margin:0;box-shadow:none}
.crop-workspace .crop-dock [data-reset]{display:block;margin:4px auto 0;min-height:34px;padding:5px}
.crop-editing .crop-workspace>.tool-error{flex:none;margin:0;padding:8px 16px;max-height:75px;overflow:auto;background:#fff3f0;z-index:3}
.crop-workspace .result-metrics{justify-content:center;text-align:center}
.crop-workspace .result-file{width:100%;min-width:0;text-align:center;overflow-wrap:anywhere}
.crop-workspace .result-download-status{padding:10px 16px;margin:12px auto;max-width:640px;background:#eaf2fa;color:#20396d;border-radius:10px;font-size:14px;line-height:1.5;text-align:center;overflow-wrap:anywhere}
.crop-workspace .result-download-status:empty{display:none}
.crop-workspace .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:760px),(pointer:coarse) and (max-width:1000px){
 .crop-mobile-editing .tools-header{display:none}
 body.document-tools.crop-editing .crop-workspace .editor-stage{display:flex;flex-direction:column}
 .crop-workspace .crop-heading{display:flex;align-items:center;gap:6px;flex:none;min-height:54px;padding:5px 10px;background:white;color:#20396d}
 .crop-workspace [data-crop-name]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:17px;font-weight:600}
 body.document-tools.crop-editing .crop-workspace .file-area{display:contents}
 body.document-tools.crop-editing .crop-workspace .file-toolbar{flex:none;min-height:48px;padding:0 12px 7px;margin:0;background:white;border-bottom:1px solid #dce2ec}
 .crop-workspace [data-workspace-help]{width:44px;padding:10px}
 .crop-workspace [data-workspace-help] span{display:none}
 .crop-workspace [data-workspace-help] svg{display:block;width:24px;height:24px}
 body.document-tools.crop-editing .crop-workspace .crop-preview{padding:10px 10px 0}
 body.document-tools.crop-editing .crop-workspace .settings{flex:none;height:auto;overflow:visible;border:0;border-top:1px solid #dce2ec;padding:7px 12px calc(8px + env(safe-area-inset-bottom))}
 .crop-workspace .settings>:is(h2,.crop-sidebar-source,[data-settings]){display:none!important}
 .crop-workspace .crop-dock{padding:0}
 .crop-workspace .crop-dock [data-crop-source]{display:block;margin:0 0 6px}
 .crop-workspace .crop-dock [data-reset]{display:none}
 .crop-workspace .crop-preview-controls{gap:0 5px;padding:3px 0 0}
 .crop-workspace .crop-preview-controls button{min-width:36px;min-height:38px;padding:6px}
 .crop-workspace .crop-preview-hint{font-size:11px;margin:2px 0 5px}
 .crop-workspace .compress-settings-dialog>header{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:6px}
 .crop-workspace .compress-settings-dialog>header h2{grid-column:2;grid-row:1;text-align:center}
 .crop-workspace .compress-settings-dialog>header [data-settings-close]{grid-column:3;grid-row:1}
 .crop-workspace .compress-settings-dialog [data-settings]{display:block}
 .crop-workspace .crop-instruction{text-align:center}
}
