/* Edit PDF – Photoshop-style shell (2026-11-22) */
#pe-work.pe-shell{display:flex;flex-direction:column;height:86vh;min-height:520px;border:1px solid #cbd5e1;border-radius:12px;overflow:hidden;background:#3a3f47}
#pe-work.pe-shell[hidden]{display:none}
#pe-app .pe-shell .pe-top{flex:0 0 auto;display:flex;align-items:center;gap:4px;padding:6px 8px;border:0;border-bottom:1px solid #1f2329;border-radius:0;background:#2b2f36;color:#e5e7eb;overflow-x:auto;scrollbar-width:thin}
#pe-app .pe-shell .pe-top button,#pe-app .pe-shell .pe-top .pe-zoom>*{min-height:36px;padding:4px 9px;border:1px solid transparent;border-radius:6px;background:transparent;color:#e5e7eb;font:600 .82rem system-ui,sans-serif;white-space:nowrap;cursor:pointer;display:inline-flex;align-items:center;gap:5px}
#pe-app .pe-shell .pe-top button:hover:not(:disabled){background:#3d434c;border-color:#4b525c}
#pe-app .pe-shell .pe-top button:disabled{opacity:.4;cursor:default}
#pe-app .pe-shell .pe-top button[aria-pressed=true],#pe-app .pe-shell .pe-top button.pe-has{background:#0e7c70;border-color:#14b8a6}
#pe-app .pe-shell .pe-top .pe-sep{width:1px;align-self:stretch;margin:4px 4px;background:#4b525c}
#pe-app .pe-shell .pe-top .pe-grow{flex:1 1 auto}
#pe-app .pe-shell .pe-right{display:inline-flex;gap:4px;align-items:center;position:sticky;right:-8px;margin-left:auto;padding:0 8px 0 6px;background:#2b2f36;box-shadow:-8px 0 10px -6px #000a}
#pe-app .pe-shell .pe-sidehd b,#pe-app .pe-shell #pe-props label,#pe-app .pe-shell #pe-props{color:#e5e7eb}
#pe-app .pe-shell .pe-zoom{display:inline-flex;align-items:center;gap:2px;background:#22262c;border-radius:8px;padding:0 2px}
#pe-app .pe-shell #pe-zoomv{min-width:44px;justify-content:center;color:#cbd5e1!important}
#pe-app .pe-shell .pe-top #pe-save{flex:none;background:#16a34a;border-color:#22c55e;color:#fff;padding:4px 16px;font-size:.9rem;width:auto;min-height:36px}
#pe-app .pe-shell .pe-top #pe-save:hover{background:#15803d}
#pe-app .pe-shell .pe-top #pe-exit{border-color:#4b525c}
#pe-app .pe-shell .pe-main{flex:1 1 auto;min-height:0;display:flex;flex-direction:row;gap:0;margin:0;align-items:stretch}
#pe-app .pe-shell .pe-rail{flex:0 0 66px;display:flex;flex-direction:column;gap:2px;padding:6px 5px;background:#2b2f36;border-right:1px solid #1f2329;overflow-y:auto;scrollbar-width:none}
#pe-app .pe-shell .pe-rail>button,#pe-app .pe-shell .pe-rail>label{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;width:56px;min-height:48px;padding:3px 2px;border:1px solid transparent;border-radius:8px;background:transparent;color:#e5e7eb;cursor:pointer;font:500 9.5px/1.1 system-ui,sans-serif;text-align:center;box-sizing:border-box}
#pe-app .pe-shell .pe-rail>label input{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%}
#pe-app .pe-shell .pe-rail .pe-ic{font-size:18px;line-height:1}
#pe-app .pe-shell .pe-rail>*:hover{background:#3d434c}
#pe-app .pe-shell .pe-rail>[aria-pressed=true]{background:#0e7c70;border-color:#14b8a6;color:#fff}
#pe-app .pe-shell #pe-pages{flex:0 0 118px;max-height:none;height:auto;border:0;border-right:1px solid #1f2329;border-radius:0;background:#30353c;overflow-y:auto;color:#e5e7eb}
#pe-app .pe-shell.pe-nopages #pe-pages{display:none}
#pe-app .pe-shell #pe-view{flex:1 1 auto;max-height:none;height:auto;border-radius:0;background:#5b616a;padding:18px 8px 60px;align-items:safe center;overflow:auto}
#pe-app .pe-shell .pe-page{box-shadow:0 4px 18px #0007,0 0 0 1px #0002}
#pe-app .pe-shell .pe-side{flex:0 0 232px;display:flex;flex-direction:column;background:#2b2f36;border-left:1px solid #1f2329;color:#e5e7eb;overflow-y:auto}
#pe-app .pe-shell.pe-noside .pe-side{flex-basis:38px}
#pe-app .pe-shell.pe-noside .pe-side>:not(.pe-sidehd),#pe-app .pe-shell.pe-noside .pe-sidehd b{display:none!important}
#pe-app .pe-shell .pe-sidehd{display:flex;align-items:center;justify-content:space-between;padding:6px 6px 6px 10px;border-bottom:1px solid #1f2329;font-size:.8rem;text-transform:uppercase;letter-spacing:.04em}
#pe-app .pe-shell .pe-ib{min-width:30px;min-height:30px;border:1px solid #4b525c;border-radius:6px;background:transparent;color:#e5e7eb;cursor:pointer}
#pe-app .pe-shell .pe-sidehint{margin:10px;color:#9ca3af}
#pe-app .pe-shell #pe-props:not([hidden])+.pe-sidehint,#pe-app .pe-shell .pe-side:has(#pe-props:not([hidden])) .pe-sidehint{display:none}
#pe-app .pe-shell #pe-props{flex-direction:column;align-items:stretch;gap:10px;margin:0;padding:10px;border:0;border-radius:0;background:transparent;color:#e5e7eb;font-size:.85rem}
#pe-app .pe-shell #pe-props label{display:flex;justify-content:space-between;align-items:center;gap:8px}
#pe-app .pe-shell #pe-props select,#pe-app .pe-shell #pe-props input[type=number]{width:110px;min-height:32px;background:#1f2329;color:#fff;border:1px solid #4b525c;border-radius:6px}
#pe-app .pe-shell #pe-props input[type=color]{width:52px;height:32px;border:1px solid #4b525c;background:#1f2329}
#pe-app .pe-shell #pe-props button{min-height:34px;border:1px solid #4b525c;border-radius:6px;background:#3a3f47;color:#e5e7eb;cursor:pointer}
#pe-app .pe-shell #pe-props button[aria-pressed=true]{background:#0e7c70}
#pe-app .pe-shell #pe-props [hidden]{display:none!important}
#pe-app .pe-shell #pe-find,#pe-app .pe-shell #pe-form{margin:0;border-radius:0;background:#f1f5f9;flex:0 0 auto}
#pe-app .pe-shell #pe-clipchip{margin:0;border-radius:0;border-width:0 0 1px}
#pe-app .pe-shell~.small,#pe-app .pe-shell>.small{display:none}
#pe-app .pe-shell .pe-dlbox{display:none}
/* full-screen editor overlay */
html.pe-fs-on,html.pe-fs-on body{overflow:hidden!important}
.pe-fs-anc{transform:none!important;filter:none!important;contain:none!important;will-change:auto!important;animation:none!important;backdrop-filter:none!important}
#pe-work.pe-shell.pe-fs{position:fixed;inset:0;z-index:2000;height:auto;min-height:0;border:0;border-radius:0}
html.pe-fs-on #pe-status{position:fixed;left:50%;bottom:10px;transform:translateX(-50%);z-index:2002;max-width:min(680px,92vw);margin:0;padding:6px 12px;border-radius:999px;background:#111827e6;color:#f9fafb;font-size:.8rem;box-shadow:0 4px 14px #0006;pointer-events:none}
html.pe-fs-on #pe-status:empty{display:none}
html.pe-fs-on #pe-sig{z-index:2100}
html.pe-fs-on #pe-pastefab{z-index:2050;bottom:70px}
html.pe-fs-on .cd-toast,html.pe-fs-on [class*=toast]{z-index:2100}
/* mobile: tool rail at the bottom, properties as a bottom sheet */
@media (max-width:760px){
 #pe-app .pe-shell .pe-main{flex-direction:column;position:relative}
 #pe-app .pe-shell .pe-rail{order:9;flex:0 0 auto;flex-direction:row;overflow-x:auto;overflow-y:hidden;border-right:0;border-top:1px solid #1f2329;padding:4px;padding-bottom:max(4px,env(safe-area-inset-bottom))}
 #pe-app .pe-shell .pe-rail>button,#pe-app .pe-shell .pe-rail>label{flex:0 0 auto;width:54px}
 #pe-app .pe-shell #pe-pages{order:0;flex:0 0 auto;flex-direction:row;max-height:96px;overflow-x:auto;border-right:0;border-bottom:1px solid #1f2329;width:auto}
 #pe-app .pe-shell #pe-view{order:1;flex:1 1 auto;min-height:0;padding:10px 6px 70px}
 #pe-app .pe-shell .pe-side{order:2;position:absolute;left:0;right:0;bottom:62px;max-height:45vh;flex:none;border:0;border-top:1px solid #4b525c;border-radius:14px 14px 0 0;box-shadow:0 -6px 20px #0006;z-index:5}
 #pe-app .pe-shell.pe-noside .pe-side{max-height:none;left:auto;right:8px;bottom:70px;width:auto;border-radius:10px}
 #pe-app .pe-shell.pe-noside .pe-sidehd b{display:inline!important;margin-right:6px}
 #pe-app .pe-shell .pe-top .pe-zoom #pe-fitw,#pe-app .pe-shell .pe-top .pe-zoom #pe-fitp{font-size:0;padding:4px 8px}#pe-app .pe-shell .pe-top .pe-zoom #pe-fitw::first-letter,#pe-app .pe-shell .pe-top .pe-zoom #pe-fitp::first-letter{font-size:15px}
 #pe-app .pe-shell .pe-top #pe-save{padding:4px 10px;font-size:.82rem}
 #pe-app .pe-shell .pe-side:not(:has(#pe-props:not([hidden]))){display:none}
 #pe-app .pe-shell .pe-top .pe-lbl{display:none}
 #pe-app .pe-shell .pe-top #pe-fitp .pe-lbl,#pe-app .pe-shell .pe-top #pe-exit{font-size:.78rem}
 html.pe-fs-on #pe-pastefab{bottom:130px}
 html.pe-fs-on #pe-status{bottom:72px}
}

#pe-addimg{white-space:nowrap}
#pe-app .pe-shell .pe-rail #pe-tablebtn{flex:0 0 auto}
