:root{color-scheme:light;--bg:#f5f8fb;--white:#fff;--ink:#14253a;--muted:#617287;--stroke:#dce5ed;--teal:#148d81;--teal-deep:#08776f;--pale:#e5f5f1;--focus:#218dcd;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-synthesis:none}
*{box-sizing:border-box}html,body{margin:0;width:100%;min-height:100%;background:var(--bg);color:var(--ink)}body{overflow:hidden}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.42}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,[tabindex]:focus-visible{outline:3px solid var(--focus);outline-offset:2px}a{color:inherit}.skip-link{position:absolute;top:-100px;left:12px;padding:8px;background:#fff;z-index:30}.skip-link:focus{top:10px}.app-shell{height:100dvh;min-height:420px;display:flex;flex-direction:column;min-width:0}.topbar{height:65px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 22px;border-bottom:1px solid var(--stroke);background:var(--white);flex-shrink:0}.brand{display:flex;align-items:center;gap:9px;text-decoration:none}.brand span{display:flex;flex-direction:column}.brand strong{font-size:15px;letter-spacing:-.03em}.brand em{font-style:normal;color:var(--teal)}.brand small{font-size:9px;letter-spacing:.15em;color:var(--muted);font-weight:850}.top-right{display:flex;gap:18px;align-items:center}.local-pill{font-size:11px;font-weight:650;color:#207166;white-space:nowrap}.local-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:#2fae89;margin-right:4px}.back-link{font-size:12px;font-weight:750;text-decoration:none;color:var(--muted)}.back-link:hover{color:var(--teal)}.workspace{flex:1;min-height:0;display:flex;flex-direction:column}.toolbar{background:#fff;display:flex;align-items:center;flex-wrap:wrap;gap:7px;padding:10px 16px;border-bottom:1px solid var(--stroke);flex-shrink:0}.toolbar-group{display:flex;gap:5px;align-items:center}.tool-separator{height:28px;width:1px;background:var(--stroke);margin:0 3px}.toolbar-fill{flex:1}.btn{border:1px solid #d5e0e8;background:#fff;color:var(--ink);border-radius:8px;min-height:34px;display:inline-flex;gap:5px;justify-content:center;align-items:center;padding:7px 10px;font-size:12px;font-weight:700;white-space:nowrap;transition:background .15s,border-color .15s}.btn:not(:disabled):hover{background:#eff6fa;border-color:#9cbbc5}.btn.primary{background:var(--teal);border-color:var(--teal);color:white}.btn.primary:not(:disabled):hover{background:var(--teal-deep)}.btn.danger{color:#a53b42}.btn.danger:not(:disabled):hover{background:#fff0f1;border-color:#e9b4b8}.btn.large{min-height:41px;padding:10px 17px;font-size:13px}.btn.full{width:100%}.main-layout{min-height:0;flex:1;display:grid;grid-template-columns:205px minmax(0,1fr)}.source-sidebar{border-right:1px solid var(--stroke);background:#fff;display:flex;flex-direction:column;min-height:0;padding:14px 10px;gap:11px}.pane-heading{display:flex;align-items:center;justify-content:space-between;padding:2px 6px;font-size:13px}.count{font-size:11px;color:var(--muted);background:var(--bg);padding:4px 7px;border-radius:5px}.source-list{flex:1;min-height:0;overflow:auto;display:flex;flex-direction:column;gap:6px}.source-item{display:flex;gap:8px;width:100%;text-align:left;align-items:center;padding:10px 8px;border-radius:8px;border:1px solid transparent;background:#f7fafc;color:var(--ink)}.source-item:hover{border-color:#badbd9;background:#eef8f6}.source-icon{font-size:19px;color:#4e8ea9}.source-item-text{min-width:0;flex:1}.source-item-name{display:block;font-size:11px;font-weight:800;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.source-item-sub{font-size:10px;color:var(--muted)}.side-hint{color:var(--muted);font-size:12px;padding:8px;line-height:1.6}.side-add{min-height:35px;border:1px dashed #a3cac6;border-radius:8px;color:#126b64;background:#f3fbf9;font-weight:750;font-size:11px}.side-bottom{font-size:11px;line-height:1.55;color:var(--muted);border-top:1px solid var(--stroke);padding:7px 4px}.side-bottom strong{color:var(--ink)}.side-bottom p{margin:6px 0}.editor-area{min-width:0;min-height:0;display:flex;flex-direction:column}.editor-info{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:46px;padding:7px 20px;border-bottom:1px solid var(--stroke);background:#fff}.editor-info-left,.editor-info-right{display:flex;align-items:center;gap:10px}.editor-info-left strong{font-size:13px}.editor-info-left>span{font-size:11px;color:var(--muted)}.editor-info-left .selected-label{color:#0a786c;font-weight:750}.subtle-btn{border:none;background:transparent;color:var(--muted);font-size:11px;font-weight:700;padding:7px}.subtle-btn:not(:disabled):hover{color:var(--teal)}.page-scroll{flex:1;min-height:0;overflow:auto;position:relative;padding:21px 24px}.empty-state{min-height:100%;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:12px;text-align:center}.empty-icon{width:74px;height:74px;display:grid;place-items:center;font-size:37px;color:var(--teal);background:#e4f5ef;border-radius:18px}.empty-state h1{font-size:23px;letter-spacing:-.04em;margin:3px 0 0}.empty-state p{font-size:13px;color:var(--muted);max-width:420px;line-height:1.55;margin:0}.empty-state small{color:var(--muted);font-size:11px}.page-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(164px,1fr));align-content:start;gap:20px 16px;max-width:1430px;margin:0 auto}.page-card{position:relative;min-width:0;display:flex;flex-direction:column;gap:6px;user-select:none}.page-card .thumb-frame{position:relative;background:#fff;border:2px solid var(--stroke);border-radius:8px;padding:7px;box-shadow:0 5px 13px #1d36450c;min-height:160px;display:flex;justify-content:center;align-items:center;overflow:visible}.page-card.selected .thumb-frame{border-color:var(--teal);box-shadow:0 0 0 2px #b8eee2}.page-card.drop-target .thumb-frame{border-color:#2369a3;box-shadow:0 0 0 3px #a7d9f6}.page-card.dragging{opacity:.5}.thumb-view{position:relative;display:flex;align-items:center;justify-content:center;width:100%;max-height:245px;overflow:hidden;min-height:125px}.thumb-view canvas{display:block;max-width:100%;max-height:233px;background:#fff;box-shadow:0 1px 5px #0002}.thumb-text-overlay{position:absolute;inset:0;pointer-events:none;overflow:hidden}.thumb-text{position:absolute;overflow:hidden;white-space:pre-wrap;word-break:break-word;line-height:1.2;font-family:Arial,sans-serif}.thumb-loading{background:#eff3f7;width:110px;height:155px;animation:pulse 1.1s infinite alternate}.page-checkbox{position:absolute;top:10px;left:11px;z-index:4;appearance:none;width:21px;height:21px;border:2px solid #a7bcca;border-radius:6px;background:#fff;cursor:pointer;margin:0}.page-checkbox:checked{background:var(--teal);border-color:var(--teal)}.page-checkbox:checked::after{content:'✓';color:white;position:absolute;left:3px;top:-3px;font-size:17px;font-weight:800}.grip{position:absolute;right:10px;top:10px;z-index:4;width:28px;height:27px;border:1px solid #d5e4ea;color:#537487;border-radius:6px;background:#fff;cursor:grab;touch-action:none;font-size:18px;line-height:1}.grip:active{cursor:grabbing}.page-info{display:flex;align-items:center;gap:5px;min-width:0;font-size:11px}.page-info .page-number{font-weight:850;white-space:nowrap}.page-info .page-origin{color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.page-preview-btn{margin-left:auto;border:none;background:transparent;color:#267973;font-size:15px;cursor:pointer;padding:3px 4px}.split-marker{position:absolute;top:-13px;left:0;right:0;height:3px;background:var(--teal);z-index:3;border-radius:3px}.split-marker::after{content:'✂ Split';position:absolute;top:-12px;left:8px;background:var(--pale);color:#0c645a;border:1px solid #a2d6ca;border-radius:5px;padding:2px 5px;font-size:10px;font-weight:800;white-space:nowrap}.statusbar{min-height:34px;padding:8px 18px;display:flex;gap:14px;align-items:center;background:#fff;border-top:1px solid var(--stroke);font-size:10px;color:var(--muted)}#statusText{max-width:54%;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.status-right{margin-left:auto}.dialog-backdrop,.working-layer{position:fixed;inset:0;background:#10263bc4;z-index:20;display:flex;align-items:center;justify-content:center;padding:14px}.dialog-backdrop[hidden],.working-layer[hidden],.toast[hidden],[hidden]{display:none!important}.preview-dialog{background:#f5f8fb;border-radius:13px;width:min(1240px,100%);height:min(900px,calc(100dvh - 28px));box-shadow:0 20px 80px #0006;display:flex;flex-direction:column;overflow:hidden}.preview-head{min-height:59px;display:flex;align-items:center;justify-content:space-between;gap:10px;background:#fff;border-bottom:1px solid var(--stroke);padding:9px 16px}.preview-head>div:first-child{display:flex;flex-direction:column;min-width:0}.preview-head strong{font-size:14px}.preview-head span{font-size:11px;color:var(--muted)}.preview-actions{display:flex;gap:6px}.preview-body{min-height:0;flex:1;display:grid;grid-template-columns:minmax(0,1fr) 246px}.preview-canvas-wrap{min-height:0;min-width:0;overflow:auto;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;padding:15px;background:repeating-conic-gradient(#ecf1f5 0% 25%,#f6f8fa 0% 50%) 50% / 24px 24px}.preview-stage{position:relative;flex-shrink:0;background:#fff;box-shadow:0 4px 28px #0003;max-width:100%;max-height:calc(100% - 32px);overflow:hidden;touch-action:pan-x pan-y}.preview-stage canvas{display:block;width:100%;height:100%}.text-layers{position:absolute;inset:0;pointer-events:none}.textbox{position:absolute;line-height:1.2;white-space:pre-wrap;word-break:break-word;overflow:hidden;font-family:Arial,sans-serif;cursor:move;touch-action:none;pointer-events:auto;border:1px dashed #28798b;background:#ccf0e81c;user-select:none}.textbox.active{border:2px solid #148d81;background:#d3f4ec30;box-shadow:0 0 0 2px #fff}.textbox .text-inner{width:100%;height:100%;overflow:hidden;pointer-events:none}.resize-handle{position:absolute;right:0;bottom:0;width:15px;height:15px;background:#148d81;border:2px solid white;cursor:nwse-resize;touch-action:none}.preview-hint{color:var(--muted);margin:0;text-align:center;font-size:10px}.text-panel{border-left:1px solid var(--stroke);background:#fff;padding:17px 14px;min-height:0;overflow:auto;display:flex;flex-direction:column;gap:11px}.text-panel>strong{font-size:14px}.text-controls{display:flex;flex-direction:column;gap:12px}.text-controls label{font-size:11px;font-weight:750;color:#485b6c;display:flex;flex-direction:column;gap:5px}.text-controls textarea,.text-controls input[type="number"],.text-controls select{width:100%;border:1px solid #cfdce6;border-radius:6px;padding:8px;background:#fff;color:var(--ink);font-size:12px}.text-controls textarea{min-height:96px;resize:vertical;line-height:1.5}.text-controls input[type="color"]{width:100%;height:35px;border:1px solid #d8e0e8;padding:3px;border-radius:6px}.control-row{display:flex;gap:8px}.control-row>label{flex:1;min-width:0}.control-row>button{min-width:0}.text-controls label.checkbox-wrap{flex-direction:row;align-items:center;justify-content:center;align-self:end;height:33px}.text-hint,.text-note{font-size:11px;color:var(--muted);line-height:1.55;margin:0}.text-note{margin-top:auto;border-top:1px solid var(--stroke);padding-top:12px}.working-layer{z-index:40}.working-card{background:white;border-radius:12px;padding:25px;display:flex;align-items:center;flex-direction:column;gap:10px;min-width:240px;text-align:center}.working-card strong{font-size:15px}.working-card p{margin:0;font-size:12px;color:var(--muted)}.spinner{width:28px;height:28px;border:3px solid #d7ebe7;border-top-color:var(--teal);border-radius:50%;animation:spin .7s linear infinite}.toast{position:fixed;z-index:50;left:50%;bottom:46px;transform:translateX(-50%);background:#152a3d;color:#fff;border-radius:8px;padding:11px 17px;box-shadow:0 8px 30px #0004;font-size:12px;max-width:min(540px,92vw);text-align:center}.page-scroll.drag-over{outline:3px dashed #148d81;outline-offset:-10px;background:#eef9f4}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{to{opacity:.3}}
@media(max-width:1250px){.toolbar{gap:5px;padding:8px 10px}.btn{padding:6px 7px}.toolbar-group{gap:3px}.tool-separator{margin:0 2px}.page-grid{grid-template-columns:repeat(auto-fill,minmax(145px,1fr))}}
@media(max-width:950px){.main-layout{grid-template-columns:165px minmax(0,1fr)}.page-grid{grid-template-columns:repeat(auto-fill,minmax(132px,1fr))}.toolbar-fill{flex-basis:100%;height:0}.tool-separator{display:none}.preview-body{grid-template-columns:minmax(0,1fr) 215px}}
@media(max-width:640px){.topbar{padding:0 12px;height:55px}.local-pill{display:none}.brand strong{font-size:13px}.source-sidebar{display:none}.main-layout{display:block;position:relative}.editor-area{height:100%}.editor-info{padding:5px 12px}.toolbar{gap:4px;max-height:122px;overflow:auto;flex-wrap:nowrap}.toolbar-group{flex-shrink:0}.toolbar-fill{display:none}.toolbar .btn{font-size:11px;min-height:36px}.toolbar .btn span{display:none}.page-scroll{padding:20px 12px}.page-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:15px 10px}.statusbar{padding:5px 10px}.status-right{display:none}.preview-dialog{height:calc(100dvh - 10px);width:100%;border-radius:9px}.dialog-backdrop{padding:5px}.preview-body{display:flex;flex-direction:column}.preview-canvas-wrap{flex:1;min-height:180px;padding:9px;justify-content:center}.preview-stage{max-height:calc(100% - 28px)}.text-panel{border-left:0;border-top:1px solid var(--stroke);height:223px;flex-shrink:0;display:block;overflow-y:auto;padding:9px 13px}.text-panel>strong{margin-right:12px}.text-panel>button{width:auto!important;margin-top:7px}.text-controls{gap:8px;margin-top:9px}.text-controls textarea{min-height:50px;max-height:80px}.text-note,.text-hint{display:none}.preview-head{min-height:47px;padding:5px 10px}.preview-head .btn{padding:5px 7px}}
@media(max-width:370px){.page-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.preview-actions{gap:2px}.preview-actions .btn{font-size:11px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}
.toolbar .btn.selected-action{background:#e4f5f1;border-color:#79c8b8;color:#075e54}

/* Standalone test release status chip */
.test-pill{font-size:11px;font-weight:800;padding:6px 10px;border:1px solid #99d4c9;background:#e5f5f1;color:#126a60;border-radius:999px;white-space:nowrap}
@media(max-width:400px){.test-pill{font-size:10px;padding:5px 7px}}
/* Standalone offline PDF rendering: native PDF viewer embedded from a local Blob URL. */
.native-thumb-slot{position:relative;overflow:hidden;flex-shrink:0;background:#fff;box-shadow:0 1px 5px #0002}
.native-pdf{border:0;background:#fff;pointer-events:none;display:block;overflow:hidden}
.native-thumb-slot>.native-pdf{z-index:0}
.preview-stage>.native-pdf{z-index:0}
.preview-stage>.text-layers{z-index:2}

/* v2026.10.18.4: distinct tool rows ensure that Export and page actions stay visible. */
.toolbar{display:flex;flex-direction:column;flex-wrap:nowrap;gap:0;padding:0;background:#fff;align-items:stretch}
.tool-row{display:flex;align-items:center;gap:7px;padding:6px 14px;min-width:0}
.tool-primary{border-bottom:1px solid #e8eef3}
.tool-secondary{background:#fbfdff;overflow-x:auto;scrollbar-width:thin}
.tool-row .toolbar-group{flex-shrink:0}
.tool-primary .export-main{margin-left:auto;flex-shrink:0}
.tool-row .toolbar-fill{flex:1}
.page-render{display:block;width:100%;height:100%;background:#fff}
.brand-mark{display:block;flex-shrink:0}
.native-thumb-slot{display:flex;justify-content:center;align-items:center}
.native-thumb-slot iframe{width:100%;height:100%}
.preview-stage>canvas{display:block;max-width:none;max-height:none}
@media(max-width:1000px){.tool-primary{overflow-x:auto;scrollbar-width:thin}.tool-secondary{overflow-x:auto}.tool-row{padding:6px 10px}}
@media(max-width:640px){.toolbar{max-height:none;overflow:visible;flex-direction:column;flex-wrap:nowrap;gap:0;padding:0}.tool-row{gap:5px;padding:5px 9px;overflow-x:auto}.tool-primary .export-main{order:-1;position:sticky;left:0;box-shadow:8px 0 12px #fff;background:#168e82;z-index:3;margin-left:0}.tool-row .btn span{display:inline}.tool-row .btn{min-height:36px;font-size:11px}.tool-primary .tool-separator{display:none}.tool-secondary .tool-separator{display:none}}

/* v2026.10.18.5 — tactile page dragging, insertion boundaries, and image overlays */
.page-card .thumb-frame{cursor:grab;touch-action:none}
.page-card .thumb-frame:active{cursor:grabbing}
.page-card.dragging{opacity:.31}
/* Marker occupies the actual inter-page gap, never the page itself. */
.split-boundary{position:absolute;top:2px;bottom:26px;left:-13px;width:16px;border:0;padding:0;background:transparent;z-index:5;cursor:crosshair;display:block;color:#08796d}
.split-boundary::before{content:"";position:absolute;left:7px;top:0;bottom:0;width:3px;border-radius:4px;background:transparent;transition:background .12s}
.split-boundary:hover::before,.split-boundary:focus-visible::before{background:#91c9bf}
.split-boundary.has-split::before{background:#149687}
.split-boundary.has-split::after{content:'✂';position:absolute;top:0;left:-3px;background:#e5f5f1;border:1px solid #a0d4c9;border-radius:5px;padding:2px 3px;font-size:13px;line-height:1.2}
/* At row wraps the between-page boundary is horizontal, above the next row. */
.page-card.boundary-wrap .split-boundary{left:0;right:0;top:-16px;bottom:auto;width:100%;height:15px}
.page-card.boundary-wrap .split-boundary::before{left:0;right:0;top:6px;height:3px;width:auto;bottom:auto}
.page-card.boundary-wrap .split-boundary.has-split::after{top:-6px;left:7px}
.page-card.drop-before .thumb-frame,.page-card.drop-after .thumb-frame{border-color:#b3e4db}
.page-card.drop-before::before,.page-card.drop-after::after{content:'';position:absolute;top:0;bottom:26px;width:4px;border-radius:3px;background:#078d83;z-index:9;box-shadow:0 0 0 2px #def8f2;pointer-events:none}
.page-card.drop-before::before{left:-11px}.page-card.drop-after::after{right:-11px}
.page-card.boundary-wrap.drop-before::before{left:0;right:0;top:-12px;height:4px;width:auto;bottom:auto}
.page-drag-ghost{position:fixed;z-index:90;top:0;left:0;pointer-events:none;width:118px;height:155px;padding:5px;background:#fff;border:2px solid #168e82;border-radius:9px;box-shadow:0 12px 30px #19384b45;transform:translate(-500px,-500px)}
.page-drag-ghost canvas{width:100%;height:100%;object-fit:contain}
.page-drag-ghost.multi::before,.page-drag-ghost.multi::after{content:'';position:absolute;inset:5px -5px -5px 5px;border:1px solid #83c8bc;background:#fff;border-radius:9px;z-index:-1}
.page-drag-ghost.multi::after{inset:10px -10px -10px 10px;z-index:-2}
.drag-stack-count{position:absolute;top:-9px;right:-13px;background:#08786f;color:#fff;border-radius:20px;padding:5px 9px;font-size:11px;font-weight:800;box-shadow:0 2px 5px #0003}
.drag-face-fallback{height:100%;display:grid;place-items:center;background:#f3f8fa;color:#168e82;font-size:42px}
.thumb-image{position:absolute;object-fit:fill;pointer-events:none}
.image-layers{position:absolute;inset:0;pointer-events:none;z-index:2}
.preview-stage>.text-layers{z-index:3}
.imagebox{position:absolute;pointer-events:auto;cursor:move;touch-action:none;border:1px dashed #198c84;background:#e3f6ee17;user-select:none}
.imagebox.active{border:2px solid #168e82;box-shadow:0 0 0 2px #fff}
.imagebox img{display:block;width:100%;height:100%;object-fit:fill;pointer-events:none;user-select:none}
.imagebox .resize-handle{z-index:2}
.overlay-add-actions{display:flex;gap:6px}.overlay-add-actions>.btn{flex:1;min-width:0}
.image-controls{display:flex;flex-direction:column;gap:9px;border-top:1px solid var(--stroke);padding-top:11px}
.image-controls>strong{font-size:12px}.image-controls p{margin:0;color:var(--muted);font-size:11px;line-height:1.4;overflow-wrap:anywhere}
.image-controls .control-row .btn{font-size:11px;flex:1}
@media(max-width:640px){.page-card.drop-before::before{left:-6px}.page-card.drop-after::after{right:-6px}.split-boundary{left:-9px;width:11px}.split-boundary::before{left:4px}.overlay-add-actions{margin-top:6px}.text-panel{height:235px}.image-controls .control-row{margin-top:5px}}
.page-drag-ghost .ghost-pdf-preview{display:block;width:100%;height:100%;border:0;pointer-events:none}

/* v2026.10.18.6 — local PDF page crop + image crop + proportional resizing */
.page-crop-rect{position:absolute;z-index:8;border:2px solid #087e72;background:rgba(22,142,130,.075);box-shadow:0 0 0 5000px rgba(9,21,33,.48);cursor:move;touch-action:none;pointer-events:auto}
.page-crop-grip{position:absolute;width:18px;height:18px;background:#fff;border:3px solid #128a80;border-radius:4px;touch-action:none}
.page-crop-grip.nw{left:-9px;top:-9px;cursor:nwse-resize}.page-crop-grip.ne{right:-9px;top:-9px;cursor:nesw-resize}.page-crop-grip.sw{left:-9px;bottom:-9px;cursor:nesw-resize}.page-crop-grip.se{right:-9px;bottom:-9px;cursor:nwse-resize}
.page-crop-controls{display:flex;flex-direction:column;gap:7px;padding:10px;background:#e6f5f1;border:1px solid #b1d8ce;border-radius:9px;margin-bottom:12px}
.page-crop-controls p{font-size:11px;line-height:1.4;margin:0;color:#245c55}
.page-crop-controls .btn{min-width:0;flex:1}.page-crop-controls>.btn{width:100%}
.preview-stage{overflow:hidden}
.imagebox{overflow:hidden}
.imagebox img{display:block;object-fit:fill;pointer-events:none;user-select:none}
.imagebox .crop-edge{position:absolute;z-index:4;width:23px;height:23px;border:3px solid #fff;background:#128d7e;border-radius:6px;box-shadow:0 1px 4px #0004;touch-action:none}
.imagebox .crop-n{top:-8px;left:calc(50% - 12px);cursor:ns-resize}.imagebox .crop-s{bottom:-8px;left:calc(50% - 12px);cursor:ns-resize}.imagebox .crop-e{right:-8px;top:calc(50% - 12px);cursor:ew-resize}.imagebox .crop-w{left:-8px;top:calc(50% - 12px);cursor:ew-resize}
.image-mode-controls{display:flex;gap:6px}.image-mode-controls .btn{flex:1;min-width:0}.image-mode-controls .active-mode{background:#e4f5f1;border-color:#58b5a7;color:#08776f;font-weight:750}
.image-aspect-lock{display:flex;gap:7px;align-items:center;font-size:11px;color:var(--ink);font-weight:650}
.thumb-cropped-image{position:absolute;overflow:hidden;pointer-events:none}.thumb-cropped-image img{display:block;pointer-events:none}
@media(max-width:640px){.text-panel{height:255px}.page-crop-controls{padding:7px}.imagebox .crop-edge{width:25px;height:25px}}

/* v2026.10.18.8: correct embedded one-page PDF viewer sizing and layering.
   A native <iframe> otherwise defaults to 300×150 px inside the page-sized stage. */
.preview-stage>.native-pdf {
  position:absolute!important;inset:0!important;display:block;
  width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;
  min-width:0!important;min-height:0!important;border:0!important;margin:0!important;
  overflow:hidden!important;pointer-events:none;z-index:0;
}
.native-thumb-slot>.native-pdf {
  position:absolute!important;inset:0!important;width:100%!important;height:100%!important;
  border:0!important;margin:0!important;
}
.preview-stage {isolation:isolate}
.preview-stage>.page-render {position:relative;z-index:1}
.preview-stage>.image-layers {z-index:2}
.preview-stage>.text-layers {z-index:3}
.preview-stage>.page-crop-rect {z-index:8}
.preview-stage[aria-busy="true"]::after {content:"Loading preview…";position:absolute;inset:0;
 display:flex;align-items:center;justify-content:center;color:#52687c;background:#fff;z-index:7;font-size:12px;pointer-events:none}
.preview-rotate {flex-shrink:0;white-space:nowrap}
@media(max-width:640px){.preview-rotate{padding:5px 6px!important;font-size:11px!important}}
