:root{color:#1f2329;background:#fff;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Hiragino Sans GB,Microsoft YaHei,sans-serif;font-synthesis:none;text-rendering:optimizeLegibility}*{box-sizing:border-box}html,body,#app{min-width:320px;min-height:100vh;margin:0}button{font:inherit}.page{position:relative;min-height:100vh;background:#fff}.sign-page{display:flex;width:min(100%,480px);min-height:100vh;margin:0 auto;padding:18px 14px 20px;flex-direction:column;background:#fff}.desktop-qr{position:fixed;top:18px;left:max(24px,calc(50vw - 400px));display:flex;width:150px;min-height:198px;align-items:center;flex-direction:column;border:1px solid #d6dae4;border-radius:12px;padding:7px 7px 12px;background:#fff}.desktop-qr img{display:block;width:136px;height:136px}.desktop-qr p{margin:8px 0 0;color:#1f2329;font-size:14px;line-height:1.35;text-align:center}.page-header{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;padding:0 0 12px}.page-header h1{margin:0 0 7px;color:#1f2329;font-size:15px;font-weight:600;line-height:1.35}.page-header p{margin:0;color:#646a73;font-size:13px;font-weight:400;line-height:1.45}.header-actions{display:flex;align-items:center}.expand-button{display:inline-flex;min-width:auto;min-height:32px;align-items:center;justify-content:center;border:0;border-radius:4px;padding:0;background:transparent;color:#2b66d9;cursor:pointer;font-size:14px;font-weight:400;white-space:nowrap}.expand-button:before{margin-right:6px;content:"↗";font-size:16px;line-height:1}.canvas-panel{display:flex;flex:0 0 auto;min-height:277px}.canvas-wrap{position:relative;width:100%;height:clamp(240px,58vw,277px);border:1px solid #dee0e3;border-radius:6px;overflow:hidden;background:#f2f2f2;touch-action:none}.signature-preview,.status-panel{display:flex;width:100%;height:clamp(240px,58vw,277px);align-items:center;justify-content:center;border:1px solid #dee0e3;border-radius:6px;overflow:hidden;background:#f2f2f2}.signature-preview img{display:block;max-width:100%;max-height:100%;object-fit:contain}.status-panel{color:#646a73;font-size:14px}.status-panel[data-type=error]{color:#d93026}.sign-page.is-expanded{width:min(100%,960px);max-width:none;padding-inline:16px}.sign-page.is-expanded .canvas-panel{min-height:0;align-items:center;justify-content:center}.sign-page.is-expanded .canvas-wrap,.sign-page.is-expanded .signature-preview,.sign-page.is-expanded .status-panel{width:min(100%,920px);height:auto;aspect-ratio:480 / 277}.sign-page.is-expanded .toolbar{width:min(100%,920px);margin:0 auto;padding-top:8px}canvas{display:block;width:100%;height:100%;background:#f2f2f2;cursor:crosshair}.signature-hint{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:6px;color:#6b7280;pointer-events:none;text-align:center}.signature-hint-icon{position:relative;display:block;width:38px;height:38px;border:1px solid #d7dce5;border-radius:50%;background:#fff}.signature-hint-icon:before{position:absolute;top:11px;left:10px;width:18px;height:10px;border-bottom:2px solid #9ca3af;border-left:2px solid #9ca3af;border-radius:0 0 0 12px;content:"";transform:rotate(-18deg)}.signature-hint strong{color:#374151;font-size:16px;font-weight:600;line-height:1.2}.signature-hint small{color:#6b7280;font-size:13px;line-height:1.3}.toolbar{display:flex;flex-direction:column;gap:8px;padding-top:10px}.button-group{display:grid;width:100%;grid-template-columns:118px minmax(0,1fr);gap:10px}button{min-height:44px;border:1px solid transparent;border-radius:4px;padding:0 18px;cursor:pointer;font-size:14px;font-weight:400}button:disabled{cursor:not-allowed;opacity:.62}.primary-button{background:#9bb9f6;color:#fff}.primary-button:not(:disabled){background:#3370ff}.secondary-button{border-color:#d6d8df;background:#fff;color:#646a73}.message{min-height:20px;margin:0;color:#646a73;font-size:13px;line-height:1.45}.message[data-type=success]{color:#0f8f5f}.message[data-type=error]{color:#d93026}.confirm-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:20;display:flex;align-items:center;justify-content:center;padding:24px;background:#00000038}.confirm-dialog{width:min(100%,270px);overflow:hidden;border-radius:14px;background:#f8f8f8f5;box-shadow:0 18px 50px #0000002e;text-align:center;-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px)}.confirm-dialog h2{margin:0;padding:20px 18px 4px;color:#111;font-size:17px;font-weight:600;line-height:1.28}.confirm-dialog p{margin:0;padding:0 18px 18px;color:#3c3c43;font-size:13px;line-height:1.35}.confirm-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border-top:1px solid rgb(60 60 67 / 20%)}.confirm-actions button{min-height:44px;border:0;border-radius:0;background:transparent;color:#007aff;font-size:17px;font-weight:400}.confirm-actions button+button{border-left:1px solid rgb(60 60 67 / 20%)}.confirm-submit{font-weight:600}@media(min-width:768px){.page{background:#fff}.sign-page{min-height:720px}.sign-page.is-expanded{width:min(100%,calc(100vw - 368px),960px)}.page:has(.sign-page.is-expanded) .desktop-qr{left:max(24px,calc(50vw - 646px))}}@media(max-width:420px){.sign-page{padding:14px 12px 18px}.page-header{gap:12px}.button-group{grid-template-columns:106px minmax(0,1fr)}button{padding:0 12px}}@media(max-width:760px)and (orientation:landscape){.sign-page{height:100vh;min-height:0;padding:10px}.page-header{padding-top:0;padding-bottom:8px}.canvas-panel{min-height:0}.canvas-wrap,.signature-preview,.status-panel{flex:1;height:auto}.toolbar{padding-top:8px}}@media(max-width:767px){.page:has(.sign-page.is-expanded){height:100dvh;min-height:0;overflow:hidden}.desktop-qr{display:none}.page-header{padding-top:0}.sign-page.is-expanded{display:grid;width:100dvh;height:100dvw;min-height:0;grid-template-rows:auto minmax(0,1fr) auto;margin:0;padding:10px 12px;overflow:hidden;transform:rotate(90deg) translateY(-100%);transform-origin:top left}.sign-page.is-expanded .page-header{width:min(100%,calc((100dvw - 116px) * 480 / 277));margin:0 auto;align-items:center;padding-bottom:8px}.sign-page.is-expanded .page-header h1{margin-bottom:3px}.sign-page.is-expanded .page-header p{font-size:12px}.sign-page.is-expanded .canvas-panel{min-height:0;align-items:center;justify-content:center}.sign-page.is-expanded .canvas-wrap,.sign-page.is-expanded .signature-preview,.sign-page.is-expanded .status-panel{width:min(100%,calc((100dvw - 116px) * 480 / 277));max-height:none;aspect-ratio:480 / 277}.sign-page.is-expanded .toolbar{width:min(100%,calc((100dvw - 116px) * 480 / 277));margin:0 auto;padding-top:8px}.sign-page.is-expanded .message{min-height:0}.page:has(.sign-page.is-expanded) .confirm-backdrop{width:100dvh;height:100dvw;min-width:0;min-height:0;padding:18px;transform:rotate(90deg) translateY(-100%);transform-origin:top left}}@media(max-width:767px)and (orientation:landscape){.sign-page.is-expanded{width:100vw;height:100vh;transform:none}.sign-page.is-expanded .page-header,.sign-page.is-expanded .canvas-wrap,.sign-page.is-expanded .signature-preview,.sign-page.is-expanded .status-panel,.sign-page.is-expanded .toolbar{width:min(100%,calc((100vh - 116px) * 480 / 277))}.page:has(.sign-page.is-expanded) .confirm-backdrop{width:100vw;height:100vh;transform:none}}
