:root{color:#17211b;background:#f4f6f1;font-family:Inter,PingFang SC,Microsoft YaHei,system-ui,sans-serif;font-synthesis:none;text-rendering:optimizeLegibility}*{box-sizing:border-box}body{margin:0;min-width:320px}button,input{font:inherit}button:disabled{cursor:not-allowed;opacity:.55}.app-shell{min-height:100vh;padding:24px;background:linear-gradient(180deg,rgba(35,90,75,.08),transparent 300px),#f4f6f1}.workspace{display:grid;grid-template-columns:minmax(320px,390px) minmax(520px,1fr);gap:18px;max-width:1340px;margin:0 auto}.panel{background:#fffffff0;border:1px solid #d9ded4;border-radius:8px;box-shadow:0 16px 40px #2a372d14}.controls-panel{align-self:start;padding:22px}.brand-row{display:flex;align-items:center;gap:12px;margin-bottom:22px}.brand-mark{display:grid;place-items:center;width:44px;height:44px;border-radius:8px;color:#fff;background:#a4312b}h1,h2,p{margin:0}h1{font-size:24px;line-height:1.2}h2{font-size:18px;line-height:1.3}p,small{color:#697267}.form-stack{display:flex;flex-direction:column;gap:14px}.file-drop{position:relative;display:flex;align-items:center;gap:12px;min-height:72px;padding:14px;border:1px dashed #b9c2b2;border-radius:8px;background:#fbfcf8;cursor:pointer}.file-drop svg{flex:0 0 auto;color:#a4312b}.file-drop span{display:grid;min-width:0;gap:3px}.file-drop strong,.file-drop small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file-drop input{position:absolute;top:0;right:0;bottom:0;left:0;opacity:0;cursor:pointer}.page-row{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:8px;padding:4px;border-radius:8px;background:#eef1e9}.page-row button,.secondary-button{min-height:36px;border:0;border-radius:6px;color:#4d574e;background:transparent;cursor:pointer}.page-row span{min-width:56px;text-align:center;color:#384139;font-weight:600}.field-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.field-grid label{display:grid;min-width:0;gap:8px;overflow:hidden}.field-grid span{font-size:13px;color:#586159}.field-grid b{font-size:13px;font-weight:600}input[type=range]{width:calc(100% - 4px);max-width:100%;min-width:0;margin-inline:2px;accent-color:#a4312b}.alert{padding:10px 12px;border:1px solid #e0aaa6;border-radius:8px;color:#8e241e;background:#fff3f1}.primary-button,.download-button,.secondary-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px;padding:0 16px;border-radius:8px;text-decoration:none}.primary-button{width:100%;border:0;color:#fff;background:#a4312b;cursor:pointer}.primary-button:disabled{background:#b98682}.download-button{border:0;color:#fff;background:#235a4b;cursor:pointer}.secondary-button{border:1px solid #ccd4c7;background:#fff}.result-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.preview-panel{display:flex;min-height:calc(100vh - 48px);overflow:hidden;flex-direction:column}.preview-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px;border-bottom:1px solid #d9ded4}.preview-body{flex:1;min-height:620px;overflow:auto;background:#dfe4da}.pdf-stage{display:flex;min-height:100%;justify-content:center;padding:22px}.pdf-page{position:relative;flex:0 0 auto;background:#fff;box-shadow:0 10px 28px #2a372d29}.pdf-page canvas{display:block}.stamp-overlay{position:absolute;display:grid;place-items:center;touch-action:none;cursor:move;-webkit-user-select:none;user-select:none;border:1px dashed rgba(164,49,43,.9);background:#ffffff05}.stamp-overlay img{width:100%;height:100%;object-fit:contain;pointer-events:none}.empty-state{display:grid;place-items:center;align-content:center;gap:14px;min-height:620px;color:#697267}.spin{animation:spin 1s linear infinite}.auth-check{display:grid;min-height:100vh;place-items:center;align-content:center;gap:14px;color:#12243a;background:linear-gradient(180deg,#f4f7fa,#fafbfc)}.auth-check button{min-height:38px;padding:0 16px;border:1px solid #255f89;border-radius:8px;color:#255f89;background:#fff;cursor:pointer}.user-badge{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:38px;margin:-6px 0 6px;padding:0 10px;border:1px solid #d9ded4;border-radius:8px;color:#384139;background:#fff;cursor:pointer}.user-badge img,.user-badge span{width:24px;height:24px;border-radius:999px}.user-badge span{display:grid;place-items:center;color:#fff;background:#255f89;font-size:12px}.user-badge b{max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}@keyframes spin{to{transform:rotate(360deg)}}@media(max-width:900px){.app-shell{padding:14px}.workspace{grid-template-columns:1fr}.preview-panel{min-height:640px}}@media(max-width:560px){.field-grid,.result-actions{grid-template-columns:1fr}}
