:root{font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Microsoft YaHei,sans-serif;color:#17201e;background:#f3f5f4;font-synthesis:none;text-rendering:optimizeLegibility;letter-spacing:0;--green: #176b5b;--green-dark: #0d574a;--green-soft: #e8f3f0;--ink: #17201e;--muted: #66716e;--line: #dfe4e2;--surface: #ffffff;--soft: #f7f8f8;--amber: #9b650e;--amber-soft: #fff3d6;--red: #aa3939;--red-soft: #fff0ef}*{box-sizing:border-box}html,body,#root{margin:0;width:100%;min-width:320px;min-height:100%}body{min-height:100vh;min-height:100dvh;overflow:hidden}button,input,select{font:inherit;letter-spacing:0}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.45}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid rgba(23,107,91,.25);outline-offset:2px}.app-shell{min-height:100vh;min-height:100dvh;background:var(--soft)}.topbar{height:64px;display:flex;align-items:center;justify-content:space-between;padding:0 20px;border-bottom:1px solid var(--line);background:#fffffff5;position:relative;z-index:20}.brand,.brand>div,.top-actions,.local-state,.save-state,.project-row,.project-row>div,.page-meta,.tool-row,.primary-button,.secondary-button,.tool-button,.confirm-button,.dialog-icon,.export-dialog header>div,.export-progress,.privacy-line{display:flex;align-items:center}.brand{gap:10px}.brand>div{gap:12px}.brand-mark{width:38px;height:38px;display:grid;place-items:center;border-radius:7px;background:var(--green);color:#fff}.brand strong{font-size:18px;line-height:1}.local-state{gap:4px;color:var(--green-dark);font-size:12px;font-weight:600;background:var(--green-soft);border-radius:999px;padding:5px 8px}.top-actions{gap:10px}.save-state{gap:5px;color:var(--muted);font-size:12px}.save-state.saving{opacity:.65}.save-state.error{color:var(--red);opacity:1}.icon-button{width:34px;height:34px;display:inline-grid;place-items:center;padding:0;border:0;border-radius:6px;color:#56615f;background:transparent}.icon-button:hover{background:#eef1f0}.icon-button.danger:hover{color:var(--red);background:var(--red-soft)}.desktop-export-button{min-height:36px;display:inline-flex;align-items:center;gap:7px;padding:0 13px;border:1px solid var(--green);border-radius:6px;color:#fff;background:var(--green);font-size:13px;font-weight:700}.desktop-export-button:hover{border-color:var(--green-dark);background:var(--green-dark)}.workspace{height:calc(100vh - 64px);height:calc(100dvh - 64px);display:grid;grid-template-columns:264px minmax(0,1fr);overflow:hidden}.page-rail{min-width:0;display:flex;flex-direction:column;padding:16px 12px;border-right:1px solid var(--line);background:#fafbfb}.rail-heading{display:flex;justify-content:space-between;align-items:center;height:30px;padding:0 7px;color:var(--muted);font-size:12px;font-weight:700;text-transform:uppercase}.page-list{min-height:0;overflow:auto;display:flex;flex-direction:column;gap:7px;padding:4px 2px 12px}.page-item{position:relative;min-height:76px;display:grid;grid-template-columns:minmax(0,1fr) 34px;align-items:center;border:1px solid transparent;border-radius:7px;background:transparent;transition:border-color .12s ease,background .12s ease,opacity .12s ease}.page-item:hover{background:#f0f3f2}.page-item.active{border-color:#7eafa5;background:#eaf3f1}.page-item.dragging{opacity:.48;z-index:10}.page-main{min-width:0;height:74px;display:grid;grid-template-columns:28px 52px minmax(0,1fr);align-items:center;gap:8px;border:0;padding:5px 2px 5px 7px;color:inherit;background:transparent;text-align:left}.page-number{color:#53605d;font-size:12px;font-variant-numeric:tabular-nums}.thumb-wrap{width:52px;height:62px;overflow:hidden;display:grid;place-items:center;border:1px solid #d7dcda;border-radius:3px;background:#e8ebea}.thumb-wrap img{width:100%;height:100%;object-fit:cover}.status-dot{justify-self:start;width:8px;height:8px;border-radius:50%;background:#98a29f}.status-dot.needs_review{background:#d48b19;box-shadow:0 0 0 4px #fff0cf}.status-dot.confirmed{background:#2f8976}.page-actions{display:flex;flex-direction:column;align-items:center}.page-actions .icon-button{width:28px;height:28px}.mobile-reorder{display:none}.drag-handle{touch-action:none;cursor:grab}.add-page-button{min-height:40px;display:flex;align-items:center;justify-content:center;gap:7px;border:1px dashed #b9c2bf;border-radius:6px;color:#3f504c;background:transparent}.add-page-button:hover{border-color:var(--green);color:var(--green);background:var(--green-soft)}.review-pane{min-width:0;height:100%;display:grid;grid-template-rows:68px minmax(0,1fr) auto;background:#ecefee;overflow:hidden}.project-row{min-width:0;justify-content:space-between;padding:10px 22px;border-bottom:1px solid var(--line);background:#fff}.project-row>div:first-child{min-width:0;flex-direction:column;align-items:flex-start;gap:2px}.eyebrow{color:var(--muted);font-size:10px;font-weight:700;text-transform:uppercase}.project-row input{width:min(420px,45vw);padding:2px 0;border:0;border-bottom:1px solid transparent;background:transparent;color:var(--ink);font-size:16px;font-weight:680}.project-row input:hover,.project-row input:focus{border-bottom-color:#9da9a6;outline:0}.page-meta{gap:12px;color:var(--muted);font-size:12px}.review-badge{min-height:26px;display:inline-flex;align-items:center;padding:4px 9px;border-radius:999px;color:#52605d;background:#eef1f0;font-weight:650}.review-badge.needs_review{color:var(--amber);background:var(--amber-soft)}.review-badge.confirmed{color:var(--green-dark);background:var(--green-soft)}.canvas-area{min-height:0;display:grid;place-items:center;padding:18px 24px;overflow:hidden;background-color:#dfe3e1;background-image:linear-gradient(45deg,#d9dddb 25%,transparent 25%),linear-gradient(-45deg,#d9dddb 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#d9dddb 75%),linear-gradient(-45deg,transparent 75%,#d9dddb 75%);background-size:18px 18px;background-position:0 0,0 9px,9px -9px,-9px 0}.page-preview{width:100%;height:100%;min-height:180px;display:grid;place-items:center;overflow:hidden}.rendered-page{display:block;max-width:100%;max-height:100%;width:auto;height:auto;background:#fff;box-shadow:0 4px 18px #13201d2b}.preview-state{grid-area:1 / 1;min-width:130px;min-height:72px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;border:1px solid rgba(255,255,255,.7);border-radius:6px;color:#56615e;background:#ffffffd4;font-size:12px}.error-text{color:var(--red)}.corner-editor{position:relative;max-width:100%;max-height:100%;overflow:hidden;background:#222;box-shadow:0 4px 18px #13201d30;touch-action:none}.corner-editor img{display:block;width:100%;height:100%;object-fit:fill;-webkit-user-select:none;user-select:none}.corner-overlay{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;overflow:visible;pointer-events:none}.corner-overlay polygon{fill:#176b5b14;stroke:#16a88a;stroke-width:7;vector-effect:non-scaling-stroke}.corner-overlay .corner-hit{fill:transparent;pointer-events:all;cursor:grab}.corner-overlay .corner-dot{fill:#fff;stroke:var(--green);stroke-width:8;pointer-events:none;vector-effect:non-scaling-stroke}.corner-overlay text{fill:var(--green-dark);font-size:23px;font-weight:800;pointer-events:none}.editor-controls{display:flex;flex-direction:column;align-items:center;gap:10px;padding:12px 18px 14px;border-top:1px solid var(--line);background:#fff}.segmented{display:grid;border:1px solid #d6dcda;border-radius:7px;overflow:hidden;background:#f4f6f5}.segmented button{min-width:76px;min-height:34px;border:0;border-right:1px solid #d6dcda;color:#56615f;background:transparent;font-size:13px}.segmented button:last-child{border-right:0}.segmented button:hover{background:#fff}.segmented button.selected{color:#fff;background:var(--green)}.preset-control{grid-template-columns:repeat(5,1fr)}.tool-row{flex-wrap:wrap;justify-content:center;gap:7px}.tool-button,.icon-tool,.confirm-button,.primary-button,.secondary-button{min-height:38px;justify-content:center;gap:7px;padding:0 13px;border-radius:6px;font-weight:650}.tool-button,.icon-tool,.secondary-button{border:1px solid #d4dad8;color:#3f4b48;background:#fff}.tool-button:hover,.icon-tool:hover,.secondary-button:hover{border-color:#9eaaa7;background:#f6f8f7}.tool-button.active{border-color:var(--green);color:var(--green-dark);background:var(--green-soft)}.icon-tool{width:38px;padding:0}.primary-button,.confirm-button{border:1px solid var(--green);color:#fff;background:var(--green)}.primary-button:hover,.confirm-button:hover{border-color:var(--green-dark);background:var(--green-dark)}.primary-button.large,.secondary-button.large{min-width:146px;min-height:48px;font-size:15px}.bottom-actions{display:none}.empty-workspace{height:calc(100vh - 64px);height:calc(100dvh - 64px);display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;background:#fff}.empty-visual{width:138px;height:154px;display:grid;place-items:center;position:relative;border:1px solid #ccd4d1;border-radius:7px;color:#8e9a97;background:#f8faf9}.empty-visual:before,.empty-visual:after{content:"";position:absolute;z-index:-1;width:100%;height:100%;border:1px solid #dce2e0;border-radius:7px;background:#fff}.empty-visual:before{transform:translate(-8px,8px) rotate(-3deg)}.empty-visual:after{transform:translate(8px,8px) rotate(3deg)}.empty-visual span{position:absolute;right:-14px;bottom:14px;width:50px;height:50px;display:grid;place-items:center;border:4px solid white;border-radius:50%;color:#fff;background:var(--green)}.empty-workspace h1{margin:32px 0 18px;font-size:22px;line-height:1.3}.empty-actions{display:flex;gap:10px}.privacy-line{gap:6px;margin-top:18px;color:var(--muted);font-size:12px}.import-status,.toast,.undo-bar{position:fixed;left:50%;z-index:60;transform:translate(-50%);border-radius:7px;box-shadow:0 8px 28px #0a191633}.persistent-alerts{position:fixed;top:76px;left:50%;z-index:65;width:min(620px,calc(100vw - 24px));display:grid;gap:8px;transform:translate(-50%)}.update-guard{position:fixed;top:0;right:0;bottom:0;left:0;z-index:64;cursor:wait}.issue-bar,.update-bar{min-width:0;display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:7px;box-shadow:0 8px 28px #0a191633;font-size:13px}.issue-bar>span{min-width:0;flex:1;overflow-wrap:anywhere}.issue-bar.error{color:#7f2424;background:var(--red-soft);border:1px solid #edc7c4}.issue-bar.warning{color:#6b4608;background:var(--amber-soft);border:1px solid #ead29d}.issue-bar button,.update-bar button{min-height:34px;flex:0 0 auto;border:0;border-radius:5px;padding:0 10px;color:inherit;background:#ffffffb8;font-weight:700}.issue-bar .dismiss-alert{width:32px;padding:0}.update-bar{justify-content:space-between;color:#fff;background:#25322f}.update-bar button{display:inline-flex;align-items:center;gap:6px;color:#17352f;background:#8de2cd}.fatal-state{min-height:100vh;min-height:100dvh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;padding:24px;color:var(--ink);background:#fff;text-align:center}.fatal-state h1,.fatal-state p{margin:0}.fatal-state p{max-width:420px;color:var(--muted);line-height:1.6}.import-status{top:76px;min-width:230px;overflow:hidden;padding:13px 18px 11px;color:#fff;background:#25322f;text-align:center;font-size:13px}.progress-line{position:absolute;inset:auto auto 0 0;height:3px;background:#65cdb5;transition:width .18s ease}.toast{bottom:24px;max-width:min(520px,calc(100vw - 32px));padding:12px 16px;color:#fff;background:#25322f;font-size:13px}.undo-bar{bottom:22px;min-width:260px;display:flex;align-items:center;justify-content:space-between;gap:22px;padding:10px 12px 10px 16px;color:#fff;background:#25322f;font-size:13px}.undo-bar button{min-height:32px;border:0;border-radius:5px;color:#8de2cd;background:transparent;font-weight:750}.drop-overlay{position:fixed;top:72px;right:14px;bottom:14px;left:14px;z-index:80;display:flex;align-items:center;justify-content:center;gap:12px;border:2px dashed var(--green);border-radius:8px;color:var(--green-dark);background:#e8f3f0f0;font-size:17px;font-weight:750;pointer-events:none}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:100;display:grid;place-items:center;padding:18px;background:#121b197a}.export-dialog{width:min(480px,100%);max-height:calc(100dvh - 36px);overflow-y:auto;overscroll-behavior:contain;border:1px solid rgba(255,255,255,.25);border-radius:8px;background:#fff;box-shadow:0 18px 48px #09161338}.privacy-dialog{width:min(480px,100%);max-height:calc(100dvh - 36px);overflow-y:auto;overscroll-behavior:contain;border-radius:8px;background:#fff;box-shadow:0 18px 48px #09161338}.privacy-dialog header{position:sticky;top:0;z-index:1;min-height:72px;display:flex;align-items:center;justify-content:space-between;padding:14px 18px;border-bottom:1px solid var(--line);background:#fff}.privacy-dialog header>div{display:flex;align-items:center;gap:11px}.privacy-dialog h2,.privacy-dialog p{margin:0}.privacy-dialog h2{font-size:17px}.privacy-dialog header p{margin-top:3px;color:var(--muted);font-size:12px}.privacy-content{display:grid;gap:12px;padding:20px 18px;color:#3f4b48;font-size:14px;line-height:1.65}.privacy-dialog footer{position:sticky;bottom:0;z-index:1;display:flex;justify-content:flex-end;padding:14px 18px;border-top:1px solid var(--line);background:#fafbfb}.export-dialog header{min-height:72px;display:flex;align-items:center;justify-content:space-between;padding:14px 18px;border-bottom:1px solid var(--line);background:#fff}.export-dialog header>div{gap:11px}.dialog-icon{width:38px;height:38px;justify-content:center;border-radius:6px;color:var(--green-dark);background:var(--green-soft)}.export-dialog h2,.export-dialog p{margin:0}.export-dialog h2{font-size:17px}.export-dialog p{margin-top:3px;color:var(--muted);font-size:12px}.dialog-fields{display:grid;gap:18px;padding:20px 18px}.dialog-fields label,.dialog-fields fieldset,.page-order-field{min-width:0;display:grid;gap:8px;margin:0;padding:0;border:0}.dialog-fields label>span,.dialog-fields legend,.page-order-field>span{color:#495552;font-size:12px;font-weight:700}.page-order-summary{display:flex;gap:6px;overflow-x:auto;padding-bottom:2px}.page-order-summary>span{flex:0 0 40px;height:36px;display:inline-flex;align-items:center;justify-content:center;gap:3px;border:1px solid #d4dad8;border-radius:5px;color:#3f4b48;background:#f7f8f8;font-size:12px;font-weight:700}.page-order-summary small{color:var(--muted);font-size:10px;font-weight:600}.filename-input{height:42px;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;overflow:hidden;border:1px solid #cad2cf;border-radius:6px}.filename-input:focus-within{border-color:var(--green);box-shadow:0 0 0 3px #176b5b1f}.filename-input input{min-width:0;height:100%;padding:0 11px;border:0;outline:0}.filename-input span{height:100%;display:flex;align-items:center;padding:0 11px;color:var(--muted);background:#f2f4f3}.dialog-fields .segmented.two{grid-template-columns:1fr 1fr}.dialog-fields select{height:42px;padding:0 10px;border:1px solid #cad2cf;border-radius:6px;color:var(--ink);background:#fff}.dialog-error{margin:0 18px 14px;padding:10px 12px;border:1px solid #edc7c4;border-radius:6px;color:var(--red);background:var(--red-soft);font-size:13px}.export-progress{justify-content:center;gap:8px;margin:0 18px 14px;padding:10px;color:var(--green-dark);background:var(--green-soft);font-size:13px}.export-dialog footer{position:sticky;bottom:0;z-index:1;display:flex;justify-content:flex-end;gap:8px;padding:14px 18px;border-top:1px solid var(--line);background:#fafbfb}.spin{animation:spin .9s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}@media(max-width:760px){body{overflow:hidden}.topbar{height:56px;padding:0 12px}.brand-mark{width:34px;height:34px}.brand strong{font-size:16px}.brand>div{gap:8px}.save-state{display:none}.save-state.error{display:flex;font-size:11px}.persistent-alerts{top:64px}.issue-bar{align-items:flex-start;flex-wrap:wrap}.issue-bar>span{flex-basis:calc(100% - 30px);max-height:74px;overflow-y:auto}.desktop-export-button{display:none}.workspace{height:calc(100vh - 124px - env(safe-area-inset-bottom));height:calc(100dvh - 124px - env(safe-area-inset-bottom));display:grid;grid-template-columns:1fr;grid-template-rows:94px minmax(0,1fr)}.page-rail{display:grid;grid-template-columns:minmax(0,1fr) 44px;grid-template-rows:1fr;gap:7px;padding:8px;border-right:0;border-bottom:1px solid var(--line)}.rail-heading{display:none}.page-list{flex-direction:row;gap:7px;padding:0;overflow-x:auto;overflow-y:hidden}.page-item{flex:0 0 108px;width:108px;min-height:76px;grid-template-columns:minmax(0,1fr) 28px}.page-main{height:76px;grid-template-columns:18px 47px 8px;gap:4px;padding-left:4px}.page-number{font-size:10px}.thumb-wrap{width:47px;height:64px}.page-actions{justify-content:center}.page-actions .icon-button{width:26px;height:24px}.drag-handle{display:none}.mobile-reorder{display:inline-grid}.add-page-button{width:44px;height:76px;min-height:0;padding:0;font-size:0}.add-page-button svg{width:20px;height:20px}.review-pane{grid-template-rows:54px minmax(0,1fr) auto}.project-row{padding:7px 12px}.project-row input{width:min(52vw,320px);font-size:14px}.page-meta{gap:6px}.review-badge{min-height:23px;padding:3px 7px;font-size:10px}.canvas-area{padding:10px}.editor-controls{gap:8px;padding:9px 8px 10px}.segmented{width:100%}.segmented button{min-width:0;min-height:32px;padding:0 4px;font-size:12px}.tool-row{width:100%;flex-wrap:nowrap;overflow-x:auto;justify-content:flex-start;padding-bottom:1px}.tool-button,.confirm-button{flex:0 0 auto;min-height:36px;padding:0 10px;font-size:12px}.icon-tool{flex:0 0 36px;min-height:36px}.confirm-button{order:-2}.compare-button{order:-1}.bottom-actions{position:fixed;left:0;right:0;bottom:0;z-index:30;height:calc(68px + env(safe-area-inset-bottom));display:grid;grid-template-columns:1fr 1fr 1.25fr;padding:6px 8px env(safe-area-inset-bottom);border-top:1px solid var(--line);background:#fffffff7}.bottom-actions button{min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;border:0;border-radius:6px;color:#495552;background:transparent;font-size:11px}.bottom-actions button:hover{background:#f0f3f2}.bottom-actions .export-action{margin:4px 0;color:#fff;background:var(--green);flex-direction:row;gap:6px;font-size:12px;font-weight:700}.empty-workspace{height:calc(100vh - 56px);height:calc(100dvh - 56px)}.empty-actions{width:100%;max-width:340px;flex-direction:column}.primary-button.large,.secondary-button.large{width:100%}.toast,.undo-bar,.update-bar{bottom:calc(78px + env(safe-area-inset-bottom));top:auto}.toast{text-align:center}.modal-backdrop{align-items:end;padding:0}.export-dialog{width:100%;max-height:92vh;max-height:92dvh;border-radius:8px 8px 0 0;scroll-padding-bottom:calc(76px + env(safe-area-inset-bottom))}}@media(max-width:410px){.local-state{padding:4px 6px;font-size:10px}.top-actions .icon-button{width:30px}.page-meta>span:first-child{display:none}.review-badge{max-width:112px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}
