:root{font-family:-apple-system,BlinkMacSystemFont,SF Pro Display,PingFang SC,Microsoft YaHei,sans-serif;color:#202124;background:#fafafa;font-synthesis:none;-webkit-font-smoothing:antialiased}*{box-sizing:border-box}html,body,#root{height:100%;margin:0;overflow:hidden}button{font:inherit;cursor:pointer;touch-action:manipulation}button:focus-visible,.prose-editor:focus-visible{outline:2px solid #1f1f1f;outline-offset:3px}button:disabled{cursor:not-allowed}.app-outer{height:100dvh;overflow:hidden;background:#fafafa}.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}.unlock-screen{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:32px;padding:24px}.unlock-form{width:min(100%,350px);display:flex;flex-direction:column}.unlock-form h1{margin:0 0 28px;font-size:25px;font-weight:650;text-align:center}.unlock-form label{margin-bottom:9px;font-size:13px;color:#666}.unlock-form input{height:52px;border:1px solid #d5d5d5;border-radius:8px;background:#fff;padding:0 15px;font:inherit;font-size:16px;color:#222;outline:none}.unlock-form input:focus{border-color:#222;box-shadow:0 0 0 3px #2222}.unlock-form button{height:52px;margin-top:18px;border:0;border-radius:8px;background:#202124;color:#fff;display:flex;align-items:center;justify-content:center;gap:10px;font-size:15px;font-weight:600}.unlock-error{color:#a4423a;font-size:13px}.app-frame{height:100%;max-width:920px;margin:0 auto;display:flex;flex-direction:column;position:relative}.app-header{height:70px;flex:0 0 70px;display:flex;align-items:center;justify-content:space-between;padding:0 42px}.wordmark{display:flex;align-items:center;gap:8px;font-size:22px;font-weight:720;line-height:1;color:#171717}.mark{width:30px;height:30px;object-fit:contain;margin-right:2px}.header-action{width:44px;height:44px;border:0;border-radius:50%;background:transparent;color:#747474;display:grid;place-items:center;transition:background .18s,color .18s}.header-action:not(:disabled):hover{background:#ececec;color:#252525}.view-switch{height:47px;flex:0 0 47px;display:flex;align-items:stretch;gap:26px;margin:0 42px;border-bottom:1px solid #e8e8e8}.view-switch button{height:47px;display:flex;align-items:center;gap:7px;padding:0 2px;background:none;border:0;border-bottom:2px solid transparent;color:#646464;font-size:14px;font-weight:600}.view-switch button.selected{border-bottom-color:#202124;color:#202124}.view-switch button:disabled{opacity:.42}.view-switch span:not(.ready-indicator){color:#666;font-weight:450;font-variant-numeric:tabular-nums}.ready-indicator{width:5px;height:5px;border-radius:50%;background:#202124}.main-stage{min-height:0;flex:1;position:relative;overflow:hidden;display:flex;justify-content:center}.main-stage.is-empty{align-items:center}.welcome{text-align:center;width:100%;padding:0 24px 30px}.welcome h1{font-size:clamp(24px,3vw,33px);font-weight:660;line-height:1.25;margin:0 0 12px;letter-spacing:0}.welcome p{font-size:14px;color:#666;margin:0;line-height:1.5}.welcome-art{width:172px;height:178px;position:relative;margin:0 auto 30px}.sheet{position:absolute;width:103px;height:137px;background:#fff;border:1px solid #ddd;border-radius:8px;box-shadow:0 12px 28px #0000000a;display:flex;flex-direction:column;gap:10px;padding:24px 15px}.sheet span{height:6px;width:75%;border-radius:4px;background:#dedede}.sheet span:nth-child(2){width:90%}.sheet span:nth-child(3){width:64%}.sheet span:nth-child(4){width:82%}.sheet-back{top:8px;left:25px;transform:rotate(-14deg);background:#f5f5f5}.sheet-front{top:16px;left:53px;transform:rotate(8deg)}.art-focus{position:absolute;left:7px;bottom:8px;width:56px;height:56px;border-radius:18px;display:grid;place-items:center;background:#222;box-shadow:0 12px 24px #0002;transform:rotate(-8deg)}.art-focus img{width:29px;height:29px;filter:invert(1)}.photo-gallery,.photo-viewer{width:min(100%,760px);min-height:0;display:flex;flex-direction:column;padding:8px 26px 0}.gallery-heading{flex:0 0 48px;display:flex;align-items:center;justify-content:space-between;font-size:13px;font-weight:550;color:#595959}.gallery-mode{min-width:44px;min-height:44px;padding:0 0 0 12px;border:0;background:none;color:#454545;display:flex;align-items:center;justify-content:center;gap:7px;font-size:13px}.gallery-grid{min-height:0;flex:1;display:grid;grid-template-columns:repeat(var(--columns),minmax(0,1fr));grid-template-rows:repeat(var(--rows),minmax(0,1fr));gap:8px}.gallery-tile{position:relative;min-width:0;min-height:0;padding:0;border:0;border-radius:5px;background:#efefef;overflow:hidden;touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;cursor:pointer}.gallery-tile img{width:100%;height:100%;display:block;object-fit:contain;pointer-events:none}.gallery-tile.is-lifted{opacity:.22}.photo-number,.photo-badge{position:absolute;left:6px;bottom:6px;min-width:22px;height:22px;padding:0 5px;border-radius:5px;background:#252525;color:#fff;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:600;font-variant-numeric:tabular-nums}.photo-badge{left:auto;right:6px}.photo-failed{background:#a13e34}.gallery-tools{position:relative;flex:0 0 70px;padding:19px 0 7px}.gallery-edit-bar{display:flex;align-items:center;gap:8px;height:44px;opacity:0;pointer-events:none;transform:translateY(5px);transition:opacity .15s,transform .15s}.gallery-edit-bar.is-visible{opacity:1;pointer-events:auto;transform:none}.gallery-delete{flex:1;height:44px;border:1px dashed #aaa;background:#f0f0f0;color:#444;border-radius:8px;display:flex;align-items:center;justify-content:center;gap:8px;font-size:13px;transition:background .15s,color .15s}.gallery-delete.is-over{background:#252525;color:#fff;border-color:#252525}.gallery-drag-preview{width:100%;height:100%;overflow:hidden;background:#eee;border-radius:5px;box-shadow:0 12px 36px #0003;transform:scale(1.035);pointer-events:none}.gallery-drag-preview img{width:100%;height:100%;display:block;object-fit:contain}.gallery-position{color:#333;font-variant-numeric:tabular-nums}.gallery-position span{color:#717171}.gallery-scroller{flex:1;min-height:0;display:flex;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scrollbar-width:none;overscroll-behavior-x:contain;touch-action:pan-x pinch-zoom;border-radius:3px;background:#efefef;cursor:grab}.gallery-scroller::-webkit-scrollbar{display:none}.gallery-scroller.is-dragging{cursor:grabbing}.gallery-slide{flex:0 0 100%;width:100%;height:100%;min-width:0;margin:0;padding:0 3px;scroll-snap-align:center;scroll-snap-stop:always;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}.gallery-slide img{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none}.gallery-filmstrip{position:relative;flex:0 0 70px;display:flex;align-items:center;gap:8px;overflow-x:auto;scrollbar-width:none;padding:7px 2px}.gallery-filmstrip button{flex:0 0 44px;height:48px;padding:2px;border:1px solid transparent;border-radius:4px;background:#eee;opacity:.55;transition:opacity .18s}.gallery-filmstrip button.is-current{opacity:1;border-color:#222}.gallery-filmstrip img{width:100%;height:100%;object-fit:cover;display:block;border-radius:2px}.document-stage{width:min(100%,730px);min-height:0;display:flex;flex-direction:column;padding:18px 38px 0}.document-count{display:block;text-align:right;color:#666;font-size:12px;line-height:24px}.editor-wrap{min-height:0;flex:1;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}.prose-editor{min-height:100%;padding:22px 0 32px;font-size:16px;line-height:1.9;color:#303030;outline:none;overflow-wrap:anywhere}.prose-editor p{margin:0 0 1em}.prose-editor p:last-child{margin-bottom:0}.prose-editor:focus{outline:none}.document-empty{margin:auto;display:flex;align-items:center;flex-direction:column;gap:16px;color:#a2a2a2;font-size:13px}.document-empty svg{color:#bcbcbc}.bottom-dock{flex:0 0 auto;width:min(100% - 52px,760px);margin:0 auto;padding:13px 0 calc(22px + env(safe-area-inset-bottom));border-top:1px solid #ededed;display:flex;flex-direction:column;gap:12px;background:#fafafa}.capture-actions{display:flex;justify-content:center;align-items:center;gap:12px}.sync-state{height:44px;display:flex;align-items:center;justify-content:center;gap:9px;color:#555;font-size:13px}.capture-actions button{height:44px;min-width:100px;padding:0 13px;border:0;background:transparent;color:#444;border-radius:10px;display:flex;align-items:center;justify-content:center;gap:10px;font-size:14px;font-weight:570;transition:background .16s}.capture-actions button:not(:disabled):hover{background:#ededed}.capture-actions button:disabled{opacity:.35}.dock-divider{height:21px;width:1px;background:#ddd}.scan-action,.dock-primary{height:52px;background:#202124;color:#fff;border:1px solid #202124;border-radius:14px;display:flex;justify-content:center;align-items:center;gap:10px;font-size:14px;font-weight:620;transition:transform .16s,background .16s}.scan-action:not(:disabled):active,.dock-primary:active{transform:scale(.987)}.scan-action:not(:disabled):hover,.dock-primary:hover{background:#363638}.scan-action:disabled{opacity:.48}.scan-action span{font-size:12px;color:#c5c5c5}.scan-arrow{margin-left:auto;position:absolute;right:18px}.scan-action{position:relative}.dock-actions{display:flex;gap:11px}.dock-actions button{flex:1;height:52px;border-radius:14px;display:flex;align-items:center;justify-content:center;gap:10px;font-size:14px;font-weight:620}.dock-secondary{border:1px solid #dedede;background:#fff;color:#343434}.dock-secondary:hover{background:#f1f1f1}.file-input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.dialog-overlay{position:fixed;inset:0;background:#1119;z-index:10;animation:fade-in .18s ease-out}.dialog-content{position:fixed;z-index:11;left:50%;top:50%;transform:translate(-50%,-50%);width:min(90vw,390px);padding:25px;background:#fff;border-radius:18px;box-shadow:0 25px 80px #0003}.dialog-content h2{font-size:19px;margin:0 0 8px}.dialog-content p{color:#777;font-size:14px;margin:0 0 26px}.dialog-actions{display:flex;gap:10px}.dialog-actions button{min-height:44px;flex:1;border-radius:10px;border:1px solid #ddd;background:#fff}.dialog-actions button:last-child{background:#252525;color:#fff;border-color:#252525}.toast{position:fixed;z-index:12;left:50%;bottom:calc(112px + env(safe-area-inset-bottom));transform:translate(-50%);width:max-content;max-width:min(90vw,520px);padding:10px 10px 10px 16px;border-radius:11px;background:#282828;color:#fff;box-shadow:0 10px 30px #0002;display:flex;align-items:center;gap:12px;font-size:13px;line-height:1.4}.toast button{width:30px;height:30px;display:grid;place-items:center;color:#fff;background:none;border:0}.spinning{animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@media(max-width:600px){.app-header{height:58px;flex-basis:58px;padding:0 20px}.wordmark{font-size:21px}.view-switch{margin:0 20px;gap:26px;height:43px;flex-basis:43px}.view-switch button{height:43px}.welcome{padding-bottom:12px}.welcome-art{transform:scale(.88);margin-bottom:14px}.welcome h1{font-size:24px}.welcome p{font-size:13px}.photo-gallery,.photo-viewer{padding:2px 20px 0}.document-stage{padding:14px 25px 0}.prose-editor{padding-top:15px;font-size:16px}.bottom-dock{width:calc(100% - 40px);padding-top:9px;padding-bottom:calc(13px + env(safe-area-inset-bottom));gap:8px}.capture-actions button{min-width:90px}.toast{bottom:calc(120px + env(safe-area-inset-bottom))}}@media(max-height:650px){.welcome-art{transform:scale(.7);height:132px;margin-bottom:12px}.welcome h1{font-size:21px}.welcome p{font-size:12px}.gallery-heading{flex-basis:44px}.gallery-tools,.gallery-filmstrip{flex-basis:62px}.bottom-dock{padding-top:5px;gap:3px;padding-bottom:calc(7px + env(safe-area-inset-bottom))}.capture-actions button{height:39px}.scan-action,.dock-actions button{height:46px}}@media(orientation:landscape)and (max-height:500px)and (max-width:1000px){.app-header{height:44px;flex-basis:44px}.view-switch,.view-switch button{height:38px}.view-switch{flex-basis:38px}.bottom-dock{flex-direction:row;align-items:center;gap:16px}.capture-actions,.sync-state,.scan-action{flex:1}.dock-actions{width:100%}.gallery-tools{flex-basis:52px;padding:8px 0 0}.gallery-filmstrip{flex-basis:52px;padding-top:4px;padding-bottom:4px}.gallery-filmstrip button{height:44px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
