:root{font-family:system-ui,-apple-system,"Segoe UI",sans-serif;color:#162034;background:#e8edf3;color-scheme:light;font-size:16px}
body{background:#e8edf3}button,input,select{font:inherit}button{touch-action:manipulation}button:focus-visible{outline:3px solid #54b9ff;outline-offset:3px}button:disabled{opacity:.5;cursor:wait}.app{max-width:760px;background:#f5f7fa;margin:0 auto;min-height:100dvh;box-shadow:0 0 40px #14233816}.topbar{background:#151b26;color:white;min-height:82px;padding:14px 22px}.brand{font-size:22px;gap:12px}.brand-logo{width:44px;height:50px;background:#fff;border-radius:11px}.brand-caption{display:block;font-size:14px;font-weight:500;color:#b6c0d0;margin-top:3px}.private-badge{font-size:12px;letter-spacing:0;color:#cad6e5;background:#ffffff0d;padding:7px 10px}.workspace-tabs{display:flex;padding:0 22px;background:#151b26;gap:20px}.workspace-tabs button{background:none;border:0;border-bottom:3px solid transparent;border-radius:0;color:#a7b3c5;padding:14px 5px;font-size:16px;min-height:52px;font-weight:700}.workspace-tabs button.active{border-bottom-color:#e2b756;color:#f4ce7d}.workbench{padding:22px 20px 36px}h1{font-size:23px}h2,.section-heading h2{font-size:19px}.small-label{font-size:12px;color:#65748a}.scan-button{margin-top:22px;min-height:152px;border-radius:22px;background:#17263c;color:white;box-shadow:none;font-size:23px;gap:20px;text-align:right}.scan-button svg{width:46px;height:46px;stroke:#edc879;margin:0}.scan-button small{display:block;font-size:14px;font-weight:400;color:#bbcadf;margin-top:8px}.scan-button:active{transform:scale(.99);box-shadow:none}.import-button{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:52px;margin-top:12px;background:white;border:1px solid #d7dfe9;border-radius:14px;color:#273953;font-weight:700}.import-button svg{width:22px;height:22px;margin:0}.scan-help{font-size:14px;color:#64728a;margin:16px 2px;line-height:1.8}.flow-steps{display:flex;justify-content:space-between;gap:8px;border-top:1px solid #dde4ed;padding:20px 0 6px;color:#596a82;font-size:14px}.flow-steps span{display:flex;gap:6px;align-items:center}.flow-steps b{background:#e4eaf2;width:24px;height:24px;display:grid;place-items:center;font-size:12px;border-radius:8px;color:#354a65}.preview-area{margin-top:6px}.pages{grid-template-columns:1fr;gap:16px}.page{border:1px solid #d6deea;border-radius:16px;background:white;box-shadow:none;overflow:hidden;padding-top:0}.page img{height:min(50vh,420px);background:#dde4ec;object-fit:contain;padding:12px}.page .page-label{font-size:14px;color:#566881;padding:10px 14px}.page .strength-label{font-size:12px;color:#65748a;margin:8px 14px}.page input[type=range]{accent-color:#1a826f;height:25px}.page .filter-title{font-size:14px;padding:12px 14px 0;color:#425773}.page .filter-chips button{font-size:14px;min-height:44px;border-color:#dae2ed;color:#445875}.page .filter-chips button.active{background:#203854;color:white;border-color:#203854}.page .page-tools{padding:6px;background:#f8fafc;gap:4px;border-top:1px solid #e1e7ef}.page .page-tools button{flex:1 1 30%;font-size:14px;color:#405873;border:0!important;background:none;min-height:46px;white-space:normal}.page .page-tools svg{width:17px;height:17px}.text-button{color:#236e96;font-size:14px;min-height:44px;padding:8px 10px}.review-card{border:1px solid #d7e0ec;border-radius:18px;background:white;padding:20px;margin-top:20px}.status-badge{color:#197c69;font-size:12px}.review-card label{font-size:14px;color:#415575;margin-top:15px}input:not([type=file]):not([type=checkbox]):not([type=range]){font-size:18px;border:1px solid #c8d3e1;border-radius:10px;background:#fff;color:#1a2c45;height:52px;padding:10px 12px}input:focus{outline-color:#a2d1f0;border-color:#4681a5}.field-row{display:flex;gap:12px;align-items:stretch}.field-row>div{flex:1;min-width:0}.field-row>button{flex:1;font-size:14px;margin:12px 0 0!important}select,#outputFormat,#saveFolder,.archive-card select{font:inherit;color:#263952;border:1px solid #c8d3e1;background:white;border-radius:10px;width:100%;height:52px;padding:10px;margin:0}.filename{background:#eef4fa;color:#254263;border:1px dashed #b6c8dc;padding:14px;font-size:14px;margin:18px 0;overflow-wrap:anywhere}.save-options{margin-bottom:18px;color:#5a6e8a;font-size:14px}.save-options summary{cursor:pointer;padding:6px}.primary-button{background:#157f68;color:white;border:0;min-height:56px;border-radius:12px;font-size:17px}.secondary-button{background:white;color:#3a526e;border:1px solid #c9d5e4;min-height:52px;font-size:16px;border-radius:12px}.share-note{color:#69788d;font-size:12px;line-height:1.8;margin-bottom:0}.status{color:#62758e;font-size:14px;line-height:1.8;margin:20px 4px}.archive-card{background:transparent;border:0;padding:0;margin:0}.library-heading span{color:#677f95;font-size:12px}.folder-create{display:flex;gap:6px;margin:20px 0}.folder-create input{flex:1;min-width:0}.folder-create button{flex:none}#archiveList{grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:12px}.document-card{border-color:#d7dfeb;background:white}.document-card strong{font-size:14px}.document-card small{font-size:12px;color:#6e7d92}.document-card input[type=checkbox]{accent-color:#207966}.document-preview{background:#e2e8f0}.document-actions button{color:#3d5b78;border-color:#d1dce9;min-height:44px;font-size:14px}.crop-dialog{max-height:92dvh;padding:16px;border-radius:18px;background:white;color:#233b56}.crop-dialog h2{font-size:18px}.crop-dialog p{font-size:14px}.corner-canvas{max-height:60dvh;width:auto;max-width:100%;object-fit:contain}.camera-dialog{border:0;padding:0;margin:0;width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;background:#080d14;color:white;overflow:hidden}.camera-dialog[open]{display:flex;flex-direction:column}.camera-dialog::backdrop{background:#080d14}.camera-top{height:64px;flex:none;display:flex;align-items:center;justify-content:space-between;padding:calc(8px + env(safe-area-inset-top)) 16px 8px;background:#101824;z-index:1}.camera-top strong{font-size:17px}.icon-button{border:0;border-radius:50%;width:44px;height:44px;background:#ffffff12;color:white;font-size:21px}.viewfinder{position:relative;flex:1;min-height:0;background:#080d14;overflow:hidden}#cameraVideo,#cameraOverlay{position:absolute;width:100%;height:100%;inset:0;object-fit:contain}#cameraOverlay{pointer-events:none}.camera-loading{position:absolute;inset:0;display:grid;place-content:center;padding:25px;text-align:center;font-size:16px;line-height:1.8;background:#080d1480}.camera-bottom{background:#101824;flex:none;padding:10px 20px calc(20px + env(safe-area-inset-bottom))}.camera-bottom p{text-align:center;font-size:14px;color:#d1dcec;min-height:24px;margin:6px 0 12px}.camera-bottom p.detected{color:#68e1ad}.capture-options{display:flex;align-items:center;justify-content:space-between;font-size:13px;color:#b3c0d1}.auto-label{font-size:14px;display:flex;gap:8px;align-items:center;margin:0;font-weight:500}.auto-label input{width:20px!important;height:20px!important;accent-color:#39b68c}.camera-controls{display:flex;align-items:center;justify-content:space-between;padding-top:14px}.camera-text-button{min-width:72px;min-height:48px;border:0;background:transparent;color:#d6e1ef;font-size:16px}.shutter{width:74px;height:74px;border:3px solid white;border-radius:50%;background:transparent;padding:5px;display:grid;place-items:center}.shutter span{display:block;border-radius:50%;background:white;width:100%;height:100%}.shutter:active span{transform:scale(.91)}.shutter:disabled{opacity:.3}
.page-advanced{padding:10px 14px;background:#f8fafc;border-top:1px solid #e1e7ef;font-size:14px;color:#536983}.page-advanced summary{cursor:pointer;min-height:28px}.page .page-advanced button{min-height:44px;padding:8px;border-radius:8px;border:1px solid #dae2ed;margin:4px}.page .page-advanced input[type=range]{width:100%;margin:0}.page .page-tools button{flex:1 1 40%}
@media(min-width:620px){.app{margin:24px auto;border-radius:22px;overflow:hidden;min-height:calc(100dvh - 48px)}.workbench{padding:28px 32px}.pages{grid-template-columns:repeat(auto-fit,minmax(280px,1fr))}.camera-dialog{max-width:760px;left:50%;transform:translateX(-50%)}.scan-button{min-height:170px}.scan-button svg{width:54px;height:54px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}[hidden]{display:none!important}
