:root{font-family:"Segoe UI",Inter,system-ui,-apple-system,sans-serif;color:#29283b;background:#f7f6fb;font-size:13px;font-synthesis:none;--purple:#6750ce;--muted:#7d768e;--border:#e4dfef;--soft:#f0ebfc}
*{box-sizing:border-box}body{margin:0;height:100dvh;display:flex;flex-direction:column;overflow:hidden}button,input,select{font:inherit}button{display:inline-flex;align-items:center;justify-content:center;gap:7px;background:#fff;color:inherit;border:1px solid #ded8eb;border-radius:7px;padding:9px 13px;font-weight:550;cursor:pointer;white-space:nowrap;transition:background .13s,border-color .13s,box-shadow .13s}button:hover:not(:disabled){background:#f1edfc;border-color:#b5a5e9}button:active:not(:disabled){background:#e8e1fa}button:disabled{cursor:default;color:#b1a8c1;background:#f7f5fa;border-color:#e8e3ef}button:focus-visible,select:focus-visible,input:focus-visible,.file-card:focus-visible,.page-card:focus-visible,.preview-scroll:focus-visible{outline:3px solid #b8a7f0;outline-offset:3px}button.primary{background:var(--purple);border-color:var(--purple);color:white;padding:12px 21px}button.primary:hover:not(:disabled){background:#5740b9;border-color:#5740b9}button.primary:disabled{background:#c9c0e8;border-color:#c9c0e8;color:#fff}button.quiet{border-color:transparent;background:transparent;color:#776b8c;padding:7px 9px}button.quiet:disabled{color:#b5adc3}button.square{width:36px;min-width:36px;height:36px;padding:8px}button svg,.dialog-icon svg{width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.muted{color:var(--muted)}p,h1,h2,h3{margin:0}h1{font-size:23px;letter-spacing:-.6px;font-weight:720}h2{font-size:28px;letter-spacing:-.8px;font-weight:700}h3{font-size:15px;font-weight:650}h3>span{margin-right:9px}.spacer{flex:1}.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}[hidden]{display:none!important}
.app-header{display:flex;align-items:center;justify-content:space-between;padding:20px 28px;background:#fff;gap:20px;flex:none}.brand{display:flex;align-items:center;gap:11px}.brand p{font-size:12px;color:#817394;margin-top:2px}.brand-icon{height:50px;width:50px;border-radius:12px;background:var(--purple);display:grid;place-items:center}.brand-icon svg{width:34px;fill:#fff}.brand-icon path{fill:none;stroke:#6750ce;stroke-width:1.5;stroke-linecap:round}.header-actions{display:flex;align-items:center;gap:12px}.privacy-badge{display:inline-flex;align-items:center;gap:7px;color:#60816e;background:#edf7f0;border-radius:18px;padding:9px 13px;font-size:12px;white-space:nowrap}.privacy-badge span{font-size:8px}
main{display:flex;flex-direction:column;padding:24px 28px 22px;gap:22px;min-height:0;flex:1}.intro{display:flex;align-items:center;justify-content:space-between;gap:22px;flex:none}.eyebrow{font-size:10px;font-weight:750;color:var(--purple);letter-spacing:1.2px;margin-bottom:7px}.intro .muted{margin-top:5px}.history-toolbar{display:flex;align-items:center;gap:10px}.workspace{display:grid;grid-template-columns:230px minmax(335px,1.1fr) minmax(330px,1fr);gap:12px;flex:1;min-height:0}.panel{background:#fff;border:1px solid var(--border);border-radius:12px;display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden}.panel-heading{padding:18px 15px 12px;flex:none}.panel-heading>.muted{margin-top:9px;font-size:12px}.heading-row{display:flex;justify-content:space-between;align-items:center;gap:8px}.hint-row{margin-top:9px;font-size:12px;gap:12px}.hint-row>span{white-space:nowrap}.hint-row>p{min-width:0}.scroll-area{overflow:auto;min-height:0;scrollbar-width:thin;scrollbar-color:#d0c6e3 transparent;overscroll-behavior:contain}.scroll-area::-webkit-scrollbar{width:9px;height:9px}.scroll-area::-webkit-scrollbar-thumb{background:#d0c6e3;border-radius:9px;border:2px solid transparent;background-clip:padding-box}.scroll-area::-webkit-scrollbar-track{background:transparent}.panel-tools{display:flex;align-items:center;gap:4px;padding:10px 14px 12px;flex:none;min-height:55px}.panel-tools>button.quiet{font-size:12px}.select-wrap{display:inline-block;position:relative;flex:none}.select-wrap:after{content:"";position:absolute;right:11px;top:45%;width:5px;height:5px;border:solid #81758f;border-width:0 1.5px 1.5px 0;transform:rotate(45deg);pointer-events:none}select{appearance:none;cursor:pointer;background:#fff;color:#51475f;border:1px solid #ded8eb;border-radius:6px;padding:7px 27px 7px 9px;font-size:12px;max-width:100%}select:disabled{color:#aaa0b8;background:#faf9fc;cursor:default}#pageView{width:108px}
.file-list{flex:1;padding:0 12px;outline:none}.file-card{display:flex;align-items:center;gap:8px;min-height:68px;padding:11px 8px;border-radius:8px;margin:3px 0;border:1px solid transparent;cursor:grab;user-select:none;position:relative}.file-card:hover{background:#f7f4fc}.file-card.selected{background:#eee8fc;color:#5339b4}.file-number{font-size:11px;color:#847297;align-self:flex-start;line-height:19px;min-width:17px}.file-copy{min-width:0;flex:1}.file-name{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;font-size:12px}.file-meta{display:block;color:#82778e;margin-top:5px;font-size:11px}.grip{border:none;padding:3px;width:18px;min-width:18px;height:28px;background:transparent!important;color:#aaa1b8;cursor:grab;opacity:0;touch-action:none}.grip svg{width:15px;height:15px}.file-card:hover .grip,.page-card:hover .grip,.file-card:focus-within .grip,.page-card:focus-within .grip{opacity:1}.file-empty{text-align:center;font-size:12px;line-height:1.65;padding:20px 12px 4px}.files-panel>.panel-tools{margin-top:auto}
.page-area{flex:1;position:relative;margin:0 12px;overflow-y:scroll}.page-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(138px,1fr));align-content:start;gap:12px;padding:3px 8px 12px 3px}.page-card{position:relative;display:flex;flex-direction:column;height:212px;padding:10px 10px 9px;border:1px solid var(--border);border-radius:9px;background:#fff;cursor:grab;user-select:none;min-width:0;outline:none;transition:background .13s,border-color .13s}.page-card:hover{border-color:#c8bce7;background:#fcfaff}.page-card.selected{border:2px solid #795de0;background:#f0eaff;padding:9px 9px 8px;color:#5339b4}.thumb-box{display:grid;place-items:center;position:relative;height:145px;min-height:0;margin-bottom:9px}.thumb-box canvas{width:100%;height:100%;object-fit:contain;display:block}.thumb-box.loading:before{content:"";position:absolute;width:72%;height:95%;background:linear-gradient(110deg,#f3f0f8 35%,#faf8ff 50%,#f3f0f8 65%);background-size:220% 100%;border-radius:1px;animation:shimmer 1.6s infinite}.page-title{font-size:12px;font-weight:700;white-space:nowrap}.page-title .output-index{margin-right:9px}.page-filename{font-size:10px;color:#8c7b9d;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;margin-top:5px}.page-card .grip{position:absolute;top:7px;right:4px;background:#fff9!important;border-radius:4px}.page-list.large{grid-template-columns:repeat(auto-fill,minmax(196px,1fr))}.large .page-card{height:282px}.large .thumb-box{height:212px}.page-list.list{display:flex;flex-direction:column;gap:9px}.list .page-card{height:82px;flex:none;padding:8px 13px;display:grid;grid-template-columns:49px minmax(0,1fr);grid-template-rows:1fr 1fr;column-gap:15px;align-items:end}.list .page-card.selected{padding:7px 12px}.list .thumb-box{grid-column:1;grid-row:1/3;width:49px;height:64px;margin:0;align-self:center}.list .page-title{grid-column:2;grid-row:1;align-self:end;margin-bottom:4px}.list .page-filename{grid-column:2;grid-row:2;align-self:start;margin-top:2px;padding-right:15px;font-size:11px}.empty-add{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:10px;min-height:100%;width:100%;border:2px dashed transparent;border-radius:10px;background:transparent;color:#84788f;padding:25px 15px;white-space:normal;text-align:center;font-weight:400;line-height:1.65}.empty-add:hover:not(:disabled){background:#f8f5ff;border-color:#c6b7ef}.empty-add strong{font-size:15px;color:#393046;line-height:1.2}.empty-plus{font-size:46px;font-weight:300;color:#b19bdf;line-height:1.1}.empty-add>span:last-child{font-size:12px}.selection-count{font-size:11px;white-space:nowrap}
.zoom-tools{display:flex;align-items:center;gap:0}.zoom-tools button.square{width:28px;min-width:28px;height:30px;padding:6px}.zoom-tools select{width:92px}.preview-panel .panel-heading{padding-bottom:10px}.preview-scroll{margin:0 14px;flex:1;background:#eeecf3;overflow-y:scroll;position:relative;border-radius:7px;scroll-behavior:auto;scrollbar-gutter:stable}.preview-empty{position:absolute;inset:0;display:grid;place-content:center;text-align:center;font-size:12px;line-height:1.6;pointer-events:none}.preview-pages{min-width:100%}#previewPages{padding:7px 20px 24px;min-width:100%;width:max-content}.preview-page{margin:0 auto 24px;scroll-margin-top:7px}.preview-caption{font-size:11px;line-height:26px;height:26px;color:#897993;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.page-paper{position:relative;background:#fff;box-shadow:2px 3px 0 #dcd7e6;width:100%;overflow:hidden}.preview-page.current .page-paper{outline:1px solid #b4a0e4}.page-paper canvas{width:100%;height:100%;object-fit:contain;display:block}.page-paper.loading:after{content:"Loading page…";position:absolute;inset:0;display:grid;place-content:center;color:#a096ad;font-size:12px}.render-error{display:grid;place-content:center;text-align:center;color:#95849e;font-size:12px;position:absolute;inset:0;padding:12px}.page-jump{display:flex;align-items:center;gap:3px;border:1px solid #ded8eb;border-radius:6px;color:#6f627e;padding:5px 5px 5px 9px;font-size:12px}.page-jump input{width:45px;min-width:0;border:0;background:transparent;color:inherit;padding:1px 0;outline:none}.preview-tools{font-size:12px}.app-footer{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 28px;background:#fff;flex:none}.app-footer .muted{font-size:12px;margin-top:5px}.step{font-size:11px;opacity:.8;margin-right:6px}.app-footer .primary{min-height:43px}.mobile-tabs{display:none}
.drop-overlay{position:fixed;inset:10px;border:3px dashed #9981df;border-radius:16px;background:#f7f3fff5;z-index:80;display:grid;place-content:center;text-align:center;pointer-events:none}.drop-overlay span{font-size:70px;color:#aa90e2}.drop-overlay h2{margin:5px 0 10px}.drop-overlay p{color:#8d7e9b}.drop-marker{position:fixed;background:#7952de;box-shadow:0 0 0 2px #fff7;border-radius:4px;z-index:100;pointer-events:none}.drag-ghost{position:fixed;z-index:120;pointer-events:none;width:150px!important;height:200px!important;opacity:.9;box-shadow:0 12px 30px #3e28553b;transform:rotate(2deg)}.dragging{opacity:.42}.busy-bar{position:fixed;left:0;right:0;bottom:77px;height:3px;z-index:60;background:#ece6fb;overflow:hidden}.busy-bar>div{width:30%;height:100%;background:#9b83e1;animation:progress 1.2s infinite ease-in-out}.noscript{position:fixed;inset:0;background:#fff;z-index:200;padding:30px;display:grid;place-content:center}.error-status{color:#a74362}dialog{border:1px solid #e3dced;border-radius:17px;padding:28px;width:min(470px,calc(100% - 32px));max-height:calc(100dvh - 50px);color:inherit;background:#fff;box-shadow:0 22px 100px #29203330;overflow:auto}dialog::backdrop{background:#30243c55;backdrop-filter:blur(3px)}dialog h2{font-size:23px;margin:14px 0 10px}dialog p{line-height:1.65}dialog .muted{font-size:13px}.dialog-icon{width:42px;height:42px;display:grid;place-items:center;background:#f0eafa;color:#7a5cc8;border-radius:12px}.dialog-icon svg{width:22px;height:22px}.dialog-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:24px}.field-label{display:block;margin:22px 0 8px;font-weight:600;font-size:12px}.filename-input{border:1px solid #d9cfe8;border-radius:7px;padding:11px 12px;width:100%;font-size:14px;color:#44354f;background:#fcfbff}.inline-error{color:#a84565;min-height:19px;margin-top:6px;font-size:12px}.dialog-note{font-size:12px!important;margin-top:12px}.message-text{white-space:pre-wrap;color:#7d7088}#helpDialog{width:min(550px,calc(100% - 32px))}#helpDialog ul{padding-left:20px;line-height:1.65;color:#7d7088}#helpDialog li{margin-bottom:9px}details{margin-top:18px;border-top:1px solid #ece6f2;padding-top:14px}summary{cursor:pointer;font-weight:600}details p{margin-top:9px;font-size:12px;color:#82728f}.reduced-motion *{scroll-behavior:auto!important}@keyframes shimmer{to{background-position:-220% 0}}@keyframes progress{from{transform:translateX(-110%)}to{transform:translateX(440%)}}
.thumb-box canvas,.page-paper canvas{position:absolute;inset:0}
.thumb-box{overflow:hidden;flex-shrink:0}
.thumb-box.loading canvas,.page-paper.loading canvas{visibility:hidden}
@media(min-width:1600px){.workspace{grid-template-columns:240px minmax(400px,1.15fr) minmax(380px,1fr)}.page-list{grid-template-columns:repeat(auto-fill,minmax(145px,1fr))}}
@media(max-width:1150px) and (min-width:901px){main{padding:20px 18px 18px}.workspace{grid-template-columns:190px minmax(300px,1fr) minmax(300px,1fr)}.app-header{padding:16px 20px}.panel-heading{padding-left:12px;padding-right:12px}.heading-row h3{font-size:14px}.preview-panel .heading-row{gap:3px}.zoom-tools select{width:83px}.hint-row p{font-size:11px}.header-actions{gap:4px}.page-list{grid-template-columns:repeat(auto-fill,minmax(128px,1fr));gap:9px}.selection-count{display:none}.panel-tools{padding-left:10px;padding-right:10px}.panel-tools button{padding-left:7px;padding-right:7px}.panel-tools button svg{width:15px}.file-list{padding:0 7px}.page-area{margin:0 8px}.page-list.large{grid-template-columns:1fr}.large .page-card{height:300px}.large .thumb-box{height:230px}.brand h1{font-size:22px}}
@media(max-width:900px){body{overflow:auto;min-height:100dvh;height:100dvh}.app-header{padding:16px 20px}.header-actions #helpButton{font-size:0;padding:8px}.header-actions #helpButton svg{width:18px}.header-actions{gap:5px}.privacy-badge{font-size:11px;padding:7px 10px}.brand-icon{height:43px;width:43px}.brand h1{font-size:21px}.brand p{font-size:11px}main{padding:18px 18px 14px;gap:16px}.intro h2{font-size:25px}.intro .muted{font-size:12px}.eyebrow{font-size:9px}.history-toolbar{gap:6px}.history-toolbar>button{font-size:0;padding:10px}.history-toolbar>#addButton{font-size:12px;padding:10px 14px}.mobile-tabs{display:flex;gap:5px;background:#eae5f4;border-radius:9px;padding:4px;flex:none}.mobile-tabs>button{flex:1;background:transparent;border:0;color:#86738e;font-size:12px;padding:8px 7px}.mobile-tabs>button.active{background:white;color:#5e41ae;box-shadow:0 2px 4px #4731530c}.mobile-tabs span{margin-left:5px;opacity:.7}.workspace{display:block;min-height:0}.workspace>.panel{height:100%;display:none}.workspace[data-panel="files"]>.files-panel,.workspace[data-panel="pages"]>.pages-panel,.workspace[data-panel="preview"]>.preview-panel{display:flex}.page-list{grid-template-columns:repeat(auto-fill,minmax(140px,1fr))}.page-list.large{grid-template-columns:repeat(auto-fill,minmax(200px,1fr))}.file-card{min-height:70px}.file-name{font-size:13px}.file-list{padding:0 16px}.file-number{font-size:12px}.grip{opacity:1}.app-footer{padding:14px 19px}.app-footer .muted{font-size:10px}.app-footer #status{font-size:12px}.app-footer .primary{padding:11px 16px;font-size:12px}.app-footer .step{display:none}.busy-bar{bottom:72px}.preview-panel .panel-heading{padding-top:15px}.preview-scroll{margin:0 12px}}
@media(max-width:540px){.app-header{padding:13px 16px;gap:8px}.brand-icon{height:39px;width:39px;border-radius:10px}.brand-icon svg{width:29px}.brand h1{font-size:20px}.brand p{display:none}.header-actions{gap:0}.privacy-badge{font-size:0;background:transparent;padding:7px}.privacy-badge span{font-size:10px}.header-actions #newButton{font-size:11px;padding:8px}.intro{align-items:flex-start;gap:12px;flex-direction:column}.intro h2{font-size:24px}.intro .muted{font-size:11px}.history-toolbar{width:100%;justify-content:flex-end}.history-toolbar>button{font-size:12px;padding:8px 10px}.history-toolbar>#addButton{margin-left:auto;padding:10px 15px}.eyebrow{margin-bottom:5px}main{padding:15px 12px 12px;gap:13px}.page-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.page-list.large{grid-template-columns:1fr}.page-list.large .page-card{height:320px}.large .thumb-box{height:250px}.page-card{height:209px}.thumb-box{height:143px}.page-filename{font-size:9px}.page-title{font-size:11px}.page-title .output-index{margin-right:5px}.page-card .grip{right:0;top:3px}.hint-row{font-size:11px}.panel-heading{padding:14px 13px 11px}.panel-tools{padding:8px 11px 10px}.panel-tools button.quiet{padding:8px 7px}.selection-count{display:none}.app-footer{padding:11px 13px;gap:8px}.app-footer .muted{max-width:165px;font-size:9px;line-height:1.35}.app-footer .primary{padding:11px 12px;min-height:40px}.app-footer #status{font-size:10px;line-height:1.4;max-width:175px}.busy-bar{bottom:67px}.list .page-card{height:80px}.list .page-title{font-size:12px}.list .page-filename{font-size:10px}.preview-tools{font-size:11px}.preview-scroll{margin:0 10px}.panel-heading h3{font-size:14px}.zoom-tools select{width:89px}.zoom-tools button.square{min-width:26px;width:26px}#previewPages{padding-left:14px;padding-right:14px}dialog{padding:24px}dialog h2{font-size:21px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
