@font-face{font-family:'DM Sans';src:url('vendor/fonts/dm-sans-400.woff2') format('woff2');font-weight:400;font-style:normal;font-display:swap}@font-face{font-family:'DM Sans';src:url('vendor/fonts/dm-sans-600.woff2') format('woff2');font-weight:600 700;font-style:normal;font-display:swap}:root{--ink:#1f2937;--muted:#7b8492;--line:#e7e9ed;--accent:#e8754f;--bg:#f5f6f8}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:'DM Sans','PingFang SC','Microsoft YaHei','Noto Sans CJK SC',sans-serif}.app-shell{height:100vh;display:flex;flex-direction:column}.topbar{height:68px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;padding:0 28px;gap:46px}.brand{display:flex;align-items:center;gap:10px;font-weight:700;font-size:18px}.brand em{font-style:normal;color:#a0a7b2;font-size:12px;font-weight:500;border-left:1px solid #ddd;padding-left:10px}.brand-mark{width:30px;height:30px;border-radius:50%;background:var(--accent);color:#fff;display:grid;place-items:center;font-weight:700}.doc-name{display:flex;align-items:center;gap:8px;color:#596273;font-size:13px}.doc-name svg{width:14px}.status-dot{width:7px;height:7px;background:#55b88a;border-radius:50%}.top-actions{margin-left:auto;display:flex;align-items:center;gap:9px}.icon-btn,.ghost-btn,.primary-btn,.mini-btn,.outline-btn,.tool,.format,.layer-btn{border:0;background:none;cursor:pointer;color:#687181;display:flex;align-items:center;justify-content:center;gap:7px;border-radius:7px}.icon-btn{width:32px;height:32px}.icon-btn:hover,.tool:hover{background:#f1f2f4}.ghost-btn{padding:9px 13px}.primary-btn{background:var(--accent);color:#fff;padding:10px 15px;font-weight:600;box-shadow:0 4px 12px #e8754f35}.avatar{width:32px;height:32px;background:#23354d;color:#fff;border-radius:50%;display:grid;place-items:center;font-size:13px}.workspace{display:flex;flex:1;min-height:0}.sidebar{width:218px;background:#fff;border-right:1px solid var(--line);padding:22px 16px;display:flex;flex-direction:column}.side-head,.inspector-head{display:flex;align-items:center;justify-content:space-between}.side-head h3,.inspector h3{margin:0;font-size:14px}.mini-btn{width:28px;height:28px;background:#f4f5f7}.thumb-list{margin-top:22px;display:flex;flex-direction:column;gap:18px}.thumb{position:relative;padding-left:14px}.page-num{position:absolute;left:0;top:50%;transform:translateY(-50%);font-size:11px;color:#9da4ae}.thumb-paper{width:150px;height:194px;background:#fff;border:1px solid #e1e3e7;border-radius:3px;padding:20px 14px;box-shadow:0 2px 5px #1f293708}.thumb.active .thumb-paper{border:2px solid var(--accent)}.t-line{height:3px;background:#d8dce2;margin:7px 0}.w80{width:80%}.w90{width:90%}.w65{width:65%}.w75{width:75%}.t-title{height:18px;width:75%;background:#354052;margin:14px 0 10px}.t-box{height:60px;background:#f0b29a;margin-top:15px}.sidebar-bottom{margin-top:auto}.outline-btn{width:100%;border:1px dashed #c8cdd5;padding:10px;color:#747d8c;font-size:12px}.editor-area{flex:1;display:flex;flex-direction:column;min-width:0}.toolbar{height:60px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 28px}.tool-group{display:flex;gap:4px}.tool{padding:8px 12px;font-size:12px}.tool svg{width:16px}.tool.active{background:#fff0eb;color:var(--accent);font-weight:600}.zoom-controls{display:flex;align-items:center;gap:5px;font-size:12px;color:#687181}.zoom-controls .icon-btn{width:28px}.canvas-wrap{flex:1;overflow:auto;display:flex;justify-content:center;align-items:flex-start;padding:42px}.paper{width:620px;min-height:800px;background:#fff;box-shadow:0 8px 28px #1f293414;padding:52px 58px;position:relative;transform-origin:top center}.paper-header{display:flex;justify-content:space-between;color:#a1a7b0;font-size:10px;letter-spacing:.12em}.paper-logo{font-weight:700;color:#263348;line-height:1.05}.paper-logo small{font-size:6px;letter-spacing:.2em}.paper-meta{letter-spacing:.08em}.editable{outline:none;cursor:text}.selected{position:relative;border:1px solid #ed9a7d;padding:4px;margin:-4px}.selected .handle,.photo-placeholder .handle{position:absolute;width:8px;height:8px;background:var(--accent);right:-5px;bottom:-5px;border-radius:2px}.selected{font-size:48px;line-height:1.08;font-weight:600;letter-spacing:-.04em;margin-top:120px}.subtitle{font-size:13px;color:#8a929d;margin-top:18px}.divider{height:1px;background:#e5e7eb;margin:34px 0 18px}.body-copy{font-size:14px;line-height:1.8;color:#536071;width:86%}.photo-placeholder{height:230px;background:#e89b7e;margin-top:42px;display:flex;align-items:center;justify-content:center;flex-direction:column;color:#fff;gap:8px;font-size:12px;position:relative}.photo-icon svg{width:38px;height:38px;stroke-width:1.2}.paper-footer{position:absolute;bottom:30px;left:58px;right:58px;display:flex;justify-content:space-between;font-size:10px;color:#a1a7b0}.canvas-hint{text-align:center;font-size:11px;color:#a1a7b0;padding:10px}.inspector{width:255px;background:#fff;border-left:1px solid var(--line);padding:22px 20px}.inspector-head{margin-bottom:24px}.inspector-section{border-top:1px solid #eef0f2;padding:18px 0}.inspector-section label{display:block;font-size:11px;color:#8b93a0;margin-bottom:10px}.select-row,.number-row,.color-row{height:34px;border:1px solid #e1e4e8;border-radius:6px;display:flex;align-items:center;padding:0 9px;font-size:12px}.select-row select{border:0;outline:0;flex:1;color:#4b5563;background:#fff}.number-row input{border:0;outline:0;width:100%;font-size:12px}.number-row span{color:#9aa1ab}.format-row{display:flex;gap:5px;margin-top:12px}.format{width:31px;height:30px;border:1px solid #e1e4e8;font-weight:600}.format.active{background:#fff0eb;color:var(--accent);border-color:#f2c1b1}.italic{font-style:italic}.color-row{gap:8px}.color-row svg{margin-left:auto;width:14px}.color-swatch{width:18px;height:18px;background:#1f2937;border-radius:4px}.grid-input{display:grid;grid-template-columns:1fr 1fr;gap:8px}.grid-input div{border:1px solid #e1e4e8;border-radius:5px;display:flex;align-items:center;padding:0 7px;gap:5px}.grid-input span{font-size:10px;color:#a1a7b0}.grid-input input{border:0;outline:0;width:100%;font-size:12px;padding:8px 0}.layer{display:flex;gap:7px;flex-wrap:wrap}.layer label{width:100%}.layer-btn{border:1px solid #e1e4e8;padding:7px 9px;font-size:11px}.layer-btn svg{width:13px}
:root{--unused:0}
.brand-mark{object-fit:cover;display:block;border-radius:50%}
.ai-notice{height:36px;display:flex;align-items:center;justify-content:center;gap:8px;background:#fff8e8;border-bottom:1px solid #f2dfb5;color:#85621b;font-size:12px;position:relative;transition:height .18s ease,opacity .18s ease,padding .18s ease;overflow:hidden}.ai-notice.is-dismissed{height:0;opacity:0;border:0;padding-top:0;padding-bottom:0}.ai-notice-close{position:absolute;right:18px;width:26px;height:26px;border:0;background:transparent;color:inherit;display:grid;place-items:center;border-radius:5px;cursor:pointer}.ai-notice-close:hover{background:#f2dfb5}.ai-notice-close svg{width:14px;height:14px}.ai-notice svg{width:15px;height:15px;stroke-width:2}
.ai-notice svg{width:15px;height:15px;stroke-width:2}
.pdf-cn-overlay{position:absolute;left:8%;top:16%;background:#fff;padding:10px 14px;border:1px solid var(--accent);color:#1f2937;font-size:18px;box-shadow:0 3px 10px #0001;outline:none}
.text-layer{position:absolute;inset:0;pointer-events:none}.text-layer span{position:absolute;white-space:pre;pointer-events:auto;color:transparent;outline:none;cursor:text}.text-layer span:focus,.text-layer span:hover{color:#1f2937;background:#fff8;border:1px solid var(--accent)}

/* Empty and loading states: keep the workspace quiet until a PDF is opened. */
.canvas-wrap{position:relative}
.paper.is-empty:empty{background:#fff;box-shadow:0 8px 28px #1f293408;min-height:800px;}
.paper.is-loading{opacity:.35}
.loading-state{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:12px;color:#8b93a0;font-size:12px;opacity:0;pointer-events:none;transition:opacity .2s ease}
.loading-state.visible{opacity:1}
.loading-spinner{width:28px;height:28px;border:3px solid #e8eaee;border-top-color:var(--accent);border-radius:50%;animation:pdf-spin .8s linear infinite}
.thumb-list.is-loading{position:relative;min-height:80px}
.thumb-list.is-loading::before{content:'';position:absolute;left:50%;top:18px;width:20px;height:20px;margin-left:-10px;border:2px solid #e8eaee;border-top-color:var(--accent);border-radius:50%;animation:pdf-spin .8s linear infinite}
@keyframes pdf-spin{to{transform:rotate(360deg)}}
.empty-pdf-state{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:#687181;z-index:2;pointer-events:none}.empty-pdf-state h2{margin:14px 0 6px;font-size:20px;color:#354052}.empty-pdf-state p{margin:0 0 18px;font-size:12px;color:#9aa1ab}.empty-pdf-state button{pointer-events:auto}.empty-pdf-icon{width:54px;height:64px;border:2px solid #e8754f;border-radius:8px;color:#e8754f;display:grid;place-items:center;font-size:13px;font-weight:700;position:relative;background:#fff}.empty-pdf-icon:after{content:'';position:absolute;right:-2px;top:-2px;border-left:14px solid transparent;border-bottom:14px solid #fff0eb}.empty-pdf-state.hidden{display:none}
.inspector.is-hidden{visibility:hidden;pointer-events:none}.inspector-color-input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}

/* Friendly link in the top bar. */
.friend-link{display:flex;align-items:center;gap:6px;margin-right:8px;padding:7px 10px;border-radius:7px;color:#687181;font-size:12px;text-decoration:none;white-space:nowrap;transition:background-color .15s ease,color .15s ease}.friend-link:hover{background:#fff0eb;color:var(--accent)}.friend-link svg{width:14px;height:14px}.friend-link small{padding-left:7px;border-left:1px solid #e1e4e8;color:#a0a7b2;font-size:11px}
.export-dropdown{position:relative;display:flex;border-radius:7px}.export-dropdown:hover{background:#f1f2f4}.export-main{border-radius:7px 0 0 7px;padding-right:9px}.export-toggle{width:28px;padding:0;border-left:1px solid #e1e4e8;border-radius:0 7px 7px 0}.export-toggle svg{width:14px}.export-menu{position:absolute;right:0;top:calc(100% + 8px);z-index:20;width:238px;padding:6px;background:#fff;border:1px solid var(--line);border-radius:9px;box-shadow:0 12px 32px #1f293726;display:none}.export-dropdown.is-open .export-menu{display:block}.export-menu button{width:100%;border:0;background:transparent;display:flex;align-items:flex-start;gap:10px;padding:10px;border-radius:7px;color:var(--ink);text-align:left;cursor:pointer}.export-menu button:hover,.export-menu button:focus{background:#f5f6f8;outline:none}.export-menu button svg{width:17px;height:17px;margin-top:2px;color:#687181}.export-menu button span{display:flex;flex-direction:column;gap:3px}.export-menu strong{font-size:12px;font-weight:600}.export-menu small{font-size:11px;color:#8b93a0}
@media (max-width:900px){.topbar{gap:20px;padding:0 18px}.friend-link small{display:none}}

/* PDF pages and thumbnails keep their source dimensions instead of being
   forced into the original A4-shaped placeholders. */
.paper{flex:0 0 auto;min-width:0;min-height:0}
.thumb-paper{display:block;width:auto;height:auto;max-width:150px;max-height:194px;padding:0}

/* The page rail owns its scrolling. Keeping fixed thumbnail slots prevents a
   long document from stretching the whole workspace or shifting pages while
   their canvases render asynchronously. */
.sidebar{min-height:0;overflow:hidden}
.thumb-list{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;align-items:stretch;padding:2px 4px 18px 0;scrollbar-gutter:stable}
.thumb{flex:0 0 auto;min-height:198px;padding-left:18px;display:flex;align-items:center;justify-content:center}
.thumb-frame{width:150px;height:194px;display:flex;align-items:center;justify-content:center;background:#f7f8fa;border-radius:3px;overflow:hidden}
.thumb-frame .thumb-paper{background:#fff}
.thumb.active .thumb-frame{outline:2px solid var(--accent);outline-offset:0}
.thumb.active .thumb-paper{border-width:1px}
.sidebar-bottom{flex:0 0 auto;padding-top:14px;background:#fff}

/* Page changes are a single, modal interaction: the outgoing sheet leaves,
   the next one is rendered, and the incoming sheet settles into place. */
.canvas-wrap{position:relative}
.app-shell.is-page-switching{cursor:wait}
.app-shell.is-page-switching .topbar,.app-shell.is-page-switching .ai-notice,.app-shell.is-page-switching .workspace{pointer-events:none;user-select:none}
.app-shell.is-page-switching .top-actions,.app-shell.is-page-switching .sidebar,.app-shell.is-page-switching .toolbar,.app-shell.is-page-switching .inspector{opacity:.62;transition:opacity .16s ease}
.app-shell.is-page-switching .canvas-wrap::after{content:'正在切换页面…';position:fixed;left:50%;top:50%;z-index:50;transform:translate(-50%,-50%);padding:9px 14px 9px 34px;border:1px solid #e4e7eb;border-radius:999px;background:#fffffff2;color:#687181;font-size:12px;box-shadow:0 8px 24px #1f293720;animation:page-status-in .16s ease both}
.app-shell.is-page-switching .canvas-wrap::before{content:'';position:fixed;left:calc(50% - 57px);top:calc(50% - 7px);z-index:51;width:14px;height:14px;border:2px solid #e1e4e8;border-top-color:var(--accent);border-radius:50%;animation:pdf-spin .7s linear infinite}
.paper.page-exit-next{animation:page-exit-next .18s cubic-bezier(.4,0,1,1) both}
.paper.page-exit-previous{animation:page-exit-previous .18s cubic-bezier(.4,0,1,1) both}
.paper.page-enter-next{animation:page-enter-next .22s cubic-bezier(0,0,.2,1) both}
.paper.page-enter-previous{animation:page-enter-previous .22s cubic-bezier(0,0,.2,1) both}
@keyframes page-exit-next{to{opacity:0;translate:0 -18px}}
@keyframes page-exit-previous{to{opacity:0;translate:0 18px}}
@keyframes page-enter-next{from{opacity:0;translate:0 18px}to{opacity:1;translate:0 0}}
@keyframes page-enter-previous{from{opacity:0;translate:0 -18px}to{opacity:1;translate:0 0}}
@keyframes page-status-in{from{opacity:0;scale:.96}to{opacity:1;scale:1}}
@media (prefers-reduced-motion:reduce){.paper.page-exit-next,.paper.page-exit-previous,.paper.page-enter-next,.paper.page-enter-previous{animation:none}.app-shell.is-page-switching .canvas-wrap::after{animation:none}}

/* PDF generation is modal. The veil prevents edits and repeated exports while
   the current document is being assembled, and the centered card gives clear
   feedback even when exporting a large multi-page file. */
.app-shell.is-exporting{cursor:wait;user-select:none}
.app-shell.is-exporting>.topbar,.app-shell.is-exporting>.ai-notice,.app-shell.is-exporting>.workspace{pointer-events:none}
.app-shell.is-exporting>.topbar,.app-shell.is-exporting>.ai-notice,.app-shell.is-exporting>.workspace{filter:saturate(.8);transition:filter .16s ease}
.export-busy-overlay{position:fixed;inset:0;z-index:100;display:flex;align-items:center;justify-content:center;background:#f5f6f8b8;backdrop-filter:blur(2px);opacity:0;visibility:hidden;pointer-events:none;transition:opacity .16s ease,visibility 0s linear .16s}
.export-busy-overlay.visible{opacity:1;visibility:visible;pointer-events:auto;transition:opacity .16s ease}
.export-busy-card{min-width:230px;padding:24px 28px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:10px;border:1px solid #e4e7eb;border-radius:14px;background:#fffffff5;box-shadow:0 16px 44px #1f293726;animation:export-status-in .2s cubic-bezier(0,0,.2,1) both}
.export-busy-card strong{font-size:14px;font-weight:600;color:#354052}
.export-busy-card small{font-size:11px;color:#929aa6}
.export-busy-spinner{width:32px;height:32px;margin-bottom:3px;border:3px solid #eceef1;border-top-color:var(--accent);border-radius:50%;animation:pdf-spin .75s linear infinite}
@keyframes export-status-in{from{opacity:0;transform:translateY(5px) scale(.97)}to{opacity:1;transform:translateY(0) scale(1)}}
@media (prefers-reduced-motion:reduce){.export-busy-card{animation:none}.export-busy-spinner{animation-duration:1.4s}}
