:root{--purple:#6262ed;--purple-hover:#5353d9;--ink:#313547;--muted:#818798;--line:#e6e8ee;--canvas:#eef0f4;--pale:#f3f2ff;--danger:#ce4a5a;--green:#299873;--font:Arial,"Noto Sans TC","Microsoft JhengHei",sans-serif}*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:var(--font);font-size:14px;color:var(--ink);background:var(--canvas)}button,input,select,textarea{font:inherit}button,a{touch-action:manipulation}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.48}a{color:var(--purple);text-decoration:none}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #b4b4ff;outline-offset:2px}button{border:0;background:none;color:inherit}h1,h2,h3,p{margin-top:0}h1{font-size:24px;font-weight:500;line-height:1.45}h2{font-size:18px;font-weight:500}h3{font-size:15px;font-weight:600}p{line-height:1.8}small,.muted{color:var(--muted)}.small{font-size:12px;line-height:1.7}.btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:38px;border:1px solid #d8dce6;border-radius:4px;padding:8px 17px;background:white;font-weight:500;white-space:nowrap}.btn:hover{background:#f8f8fb}.btn.primary{color:white;background:var(--purple);border-color:var(--purple)}.btn.primary:hover{background:var(--purple-hover)}.btn.danger{color:var(--danger);border-color:#efc9ce}.btn.ghost{border-color:transparent;background:transparent}.btn.small{min-height:30px;padding:5px 10px;font-size:12px}.iconbtn{min-width:34px;min-height:34px;display:inline-flex;align-items:center;justify-content:center;border-radius:4px;font-size:18px}.iconbtn:hover{background:#f3f4f8}.input{width:100%;border:1px solid #d9dce5;border-radius:4px;padding:11px 12px;background:white;min-height:42px;color:var(--ink)}textarea.input{min-height:90px;resize:vertical}.label{display:block;font-size:13px;margin:15px 0 7px}.row{display:flex;gap:12px;align-items:center}.spread{display:flex;align-items:center;justify-content:space-between;gap:15px}.stack{display:flex;flex-direction:column;gap:12px}.wrap{flex-wrap:wrap}.grow{flex:1;min-width:0}.check{display:flex;align-items:flex-start;gap:8px;line-height:1.6}.check input{accent-color:var(--purple);margin-top:4px}.divider{border:0;border-top:1px solid var(--line);margin:24px 0}.notice{padding:13px 16px;border-radius:4px;font-size:12px;line-height:1.8;background:#f6f6ff;color:#6f7294;border:1px solid #e7e7f9}.notice.warning{background:#fff8ea;border-color:#f2e4c0;color:#9b743c}.notice.error{background:#fff2f3;border-color:#f2d5d9;color:#a44856}.notice.success{background:#eef8f3;border-color:#d8ece3;color:#3c8066}.badge{display:inline-block;border-radius:3px;padding:4px 8px;background:var(--pale);color:var(--purple);font-size:11px;line-height:1.3}.badge.gray{background:#f1f2f6;color:#828899}.badge.green{background:#e8f6ef;color:var(--green)}.badge.red{background:#fcebed;color:#c35765}.header{height:60px;background:white;border-bottom:1px solid var(--line);display:flex;align-items:center;padding:0 26px;gap:24px;position:relative;z-index:10}.brand{font-size:19px;font-weight:700;letter-spacing:.6px;color:var(--purple);display:flex;gap:9px;align-items:center}.brand-mark{width:21px;height:23px;border:2px solid var(--purple);border-radius:4px;transform:rotate(-8deg);display:inline-flex;align-items:center;justify-content:center;font-size:13px}.nav{display:flex;gap:30px;position:absolute;left:50%;transform:translateX(-50%);height:100%;align-items:center}.nav button{height:100%;color:#8b90a0;font-size:14px;border-bottom:3px solid transparent;padding-top:3px}.nav button.active{color:var(--purple);border-bottom-color:var(--purple)}.header-right{margin-left:auto;display:flex;align-items:center;gap:12px}.workspace-label{background:#fff2bf;color:#8a773f;border-radius:3px;padding:7px 12px;font-size:12px}.avatar{height:30px;width:30px;border-radius:50%;background:#eeedff;color:var(--purple);display:grid;place-items:center}.dev-strip{min-height:32px;background:#f8f5e9;color:#968152;font-size:11px;text-align:center;padding:8px 20px}.page{padding:38px 6%;max-width:1450px;margin:auto}.page.narrow{max-width:900px}.page-title{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:24px;gap:16px}.page-title h1{margin-bottom:8px}.card{background:white;border:1px solid var(--line);border-radius:5px;padding:26px;margin-bottom:20px}.card h2{margin-bottom:18px}.empty{padding:65px 20px;text-align:center;color:var(--muted);line-height:1.8}.loading{padding:100px 20px;text-align:center;color:var(--muted)}.statusbar{display:flex;align-items:stretch;justify-content:center;gap:40px;background:white;height:85px;border-bottom:1px solid var(--line);position:relative}.status-item{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;min-width:90px;border-bottom:3px solid transparent;color:#8c92a2;font-size:12px}.status-item b{font-size:21px;font-weight:500}.status-item.active{color:var(--purple);border-bottom-color:var(--purple)}.fab{width:48px;height:48px;border-radius:50%;background:var(--purple);color:white;box-shadow:0 3px 8px #6262ed33;font-size:31px;position:absolute;right:5.4%;bottom:-24px;z-index:2}.task-tools{display:flex;justify-content:space-between;align-items:center;margin:9px 0 24px}.task-list{background:white;border:1px solid var(--line);border-radius:5px;overflow:hidden}.task-row{width:100%;text-align:left;display:grid;grid-template-columns:minmax(200px,1fr) 130px 140px 155px;align-items:center;gap:20px;padding:22px 24px;border-bottom:1px solid var(--line);font-size:13px}.task-row:last-child{border-bottom:0}.task-row:hover{background:#fcfcff}.task-name{display:flex;gap:15px;align-items:center}.file-icon{font-size:25px;color:var(--purple)}.task-name strong{display:block;font-weight:500;font-size:14px;margin-bottom:6px}.stepbar{display:flex;gap:45px;justify-content:center;padding:23px;background:white;border-bottom:1px solid var(--line);color:#9b9fad;font-size:13px}.stepbar .active{color:var(--purple)}.step-dot{display:inline-grid;place-items:center;width:22px;height:22px;border:1px solid currentColor;border-radius:50%;margin-right:8px;font-size:11px}.upload-drop{border:1px dashed #c6c7e2;background:#fcfcff;border-radius:6px;padding:48px 20px;text-align:center;cursor:pointer}.upload-drop:hover{border-color:var(--purple)}.upload-drop .large{font-size:40px;color:#aaa9e8;margin-bottom:15px}.recipient-row{display:grid;grid-template-columns:30px 1fr 1.2fr 120px 32px;gap:12px;align-items:center;border-top:1px solid var(--line);padding:20px 0}.recipient-row:first-child{border-top:0}.person-dot{width:25px;height:25px;border-radius:50%;display:grid;place-items:center;font-size:12px;background:#efedff;color:var(--purple)}.requirement-row{display:grid;grid-template-columns:1fr 170px 80px 30px;gap:10px;align-items:center;margin-top:12px}.editor-header{height:60px;background:white;border-bottom:1px solid var(--line);display:flex;align-items:center;padding:0 22px;gap:15px;position:relative;z-index:10}.editor-header strong{font-size:14px;font-weight:500}.editor-shell{display:grid;grid-template-columns:267px minmax(0,1fr) 210px;height:calc(100vh - 60px);overflow:hidden}.tools{background:white;border-right:1px solid var(--line);overflow:auto}.tools-title{height:56px;display:flex;align-items:center;padding:0 26px;background:#f6f7fa;border-bottom:1px solid var(--line);font-size:13px}.tools-section{padding:18px 23px 8px;font-size:11px;color:#9b9fae}.tool{display:flex;gap:16px;align-items:center;height:45px;width:100%;padding:0 26px;text-align:left;font-size:13px;color:#707687;border-left:3px solid transparent}.tool:hover,.tool.active{color:var(--purple);background:#f5f5ff;border-left-color:var(--purple)}.tool-icon{width:22px;font-size:21px;text-align:center}.tool-panel{padding:20px 23px;border-top:1px solid var(--line);margin-top:12px}.tool-panel .label{font-size:11px;margin-top:10px}.tool-panel .input{font-size:12px;padding:8px}.tool-panel .check{font-size:11px}.viewer{overflow:auto;padding:38px 45px 80px;background:var(--canvas);position:relative}.paper{position:relative;margin:0 auto;background:white;box-shadow:0 2px 9px #24273c17;touch-action:none;user-select:none;width:min(100%,720px);min-height:100px}.paper img.page-image{width:100%;height:100%;position:absolute;inset:0;display:block;pointer-events:none}.paper-loading{position:absolute;inset:0;display:grid;place-items:center;font-size:12px;color:var(--muted)}.field{position:absolute;border:1px solid var(--field-color,#8a87f2);background:color-mix(in srgb,var(--field-color,#8a87f2) 12%,transparent);display:flex;align-items:center;justify-content:center;color:var(--field-color,#7773de);font-size:12px;cursor:move;overflow:visible;touch-action:none}.field span{padding:3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none}.field.selected{border:2px solid var(--field-color,#7773de);z-index:3}.field-delete{position:absolute;left:-9px;top:-9px;border-radius:50%;background:#8c90a0;color:white;width:18px;height:18px;display:grid;place-items:center;font-size:13px;padding:0}.resize-handle,.field .resize-handle{position:absolute;right:-3px;bottom:-3px;width:16px;height:16px;padding:0;border-right:3px solid #85899b;border-bottom:3px solid #85899b;cursor:nwse-resize;touch-action:none;pointer-events:auto}.draw-preview{position:absolute;border:1px dashed var(--purple);background:#6262ed18;pointer-events:none}.thumbnails{background:white;border-left:1px solid var(--line);padding:21px 24px;overflow:auto}.thumbnail{display:block;width:100%;padding:8px;border:1px solid #e1e3e9;border-radius:3px;margin-bottom:18px;background:#f8f9fb}.thumbnail.active{border:2px solid var(--purple);padding:7px}.thumbnail img{display:block;width:100%;background:white}.thumbnail span{display:block;text-align:center;font-size:11px;color:#9a9eab;margin-top:9px}.editor-tip{font-size:11px;line-height:1.8;color:#9b9eaa;padding:18px 24px}.detail-grid{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:23px}.person-progress{display:flex;align-items:center;gap:14px;padding:16px 0;border-top:1px solid var(--line)}.person-progress:first-of-type{border:0}.person-progress p{margin:0;line-height:1.6}.person-progress .badge{margin-left:auto}.event{display:flex;gap:22px;font-size:12px;line-height:1.8;border-top:1px solid var(--line);padding:12px 0}.event time{color:#9b9fad;min-width:130px}.settings-shell{display:grid;grid-template-columns:239px 1fr;min-height:calc(100vh - 60px)}.settings-nav{background:white;border-right:1px solid var(--line);padding-top:3px}.settings-nav button{display:block;text-align:left;padding:0 30px;width:100%;height:45px;color:#7b8294;border-right:3px solid transparent;font-size:13px}.settings-nav button.active{border-right-color:var(--purple);color:var(--purple);background:#fcfcff}.settings-main{padding:38px 45px;max-width:1160px;width:100%}.asset-grid{display:flex;gap:15px;flex-wrap:wrap}.asset-card{width:280px;border:1px solid #e0e3eb;border-radius:4px;background:white;padding:14px}.asset-image{height:90px;display:grid;place-items:center;background:#fafbfc;margin-bottom:12px}.asset-image img{max-width:100%;max-height:85px;object-fit:contain}.asset-caption{display:flex;align-items:center;justify-content:space-between;font-size:12px;gap:8px}.member-table{width:100%;border-collapse:collapse;font-size:13px}.member-table th,.member-table td{padding:13px 9px;text-align:left;border-bottom:1px solid var(--line)}.member-table th{color:var(--muted);font-weight:400}.mail-grid{display:grid;grid-template-columns:310px 1fr;gap:22px}.mail-list{background:white;border:1px solid var(--line);border-radius:4px;overflow:auto;max-height:72vh}.mail-item{padding:18px;text-align:left;border-bottom:1px solid var(--line);width:100%;font-size:12px;line-height:1.8}.mail-item.active{background:#f2f2ff;border-left:3px solid var(--purple)}.mail-item strong{display:block;font-size:13px;font-weight:500}.mail-letter{background:white;border:1px solid var(--line);border-radius:4px;padding:28px;min-height:350px}.mail-letter pre{white-space:pre-wrap;word-break:break-word;font:13px/1.9 var(--font);margin-top:25px}.auth-shell{min-height:100vh;display:grid;place-items:center;padding:35px}.auth-card{background:white;border:1px solid var(--line);border-radius:7px;padding:38px 44px;width:440px;max-width:100%;box-shadow:0 7px 26px #42456408}.auth-card .brand{justify-content:center;margin-bottom:30px}.auth-card h1{text-align:center;font-size:22px}.auth-card .btn{width:100%;margin-top:24px}.auth-card p{text-align:center;font-size:12px;color:var(--muted)}.guest-header{height:60px;background:white;border-bottom:1px solid var(--line);padding:0 30px;display:flex;align-items:center;justify-content:space-between}.guest-header strong{font-size:17px;color:var(--purple)}.guest-header span{font-size:12px;color:var(--muted)}.guest-shell{max-width:650px;margin:45px auto;padding:0 20px}.guest-card{padding:36px 38px;background:white;border:1px solid var(--line);border-radius:5px}.guest-kicker{font-size:12px;color:var(--purple);margin-bottom:18px}.guest-card h1{font-size:24px;margin-bottom:15px}.guest-card p{font-size:13px;color:#83899a}.guest-facts{background:#f8f9fb;padding:18px 20px;margin:24px 0;font-size:13px}.guest-facts div{display:flex;justify-content:space-between;gap:18px;padding:7px 0;line-height:1.6}.guest-facts dt{color:#969bab}.guest-facts dd{margin:0;text-align:right;overflow-wrap:anywhere}.wide{width:100%}.otp-input{letter-spacing:12px;text-align:center;font-size:27px;max-width:320px;display:block;margin:17px auto}.guest-note{font-size:11px;line-height:1.9;color:#959bad;margin-top:22px}.guest-doc-shell{display:grid;grid-template-columns:minmax(0,1fr) 350px;max-width:1440px;margin:auto;height:calc(100vh - 60px)}.guest-document{overflow:auto;padding:25px 45px 70px;position:relative}.guest-doc-tools{display:flex;justify-content:space-between;align-items:center;max-width:720px;margin:0 auto 20px;gap:15px}.guest-sidebar{background:white;border-left:1px solid var(--line);padding:26px;overflow:auto}.guest-field{position:absolute;display:flex;align-items:center;justify-content:center;border:1px solid #9693ed;background:#efedffcc;color:#7570d4;font-size:12px;overflow:hidden;padding:3px;cursor:pointer}.guest-field.filled{background:#ffffffc7;border-color:#8a87e1}.guest-field img{width:100%;height:100%;object-fit:contain}.guest-field.other{border:1px dashed #bfc3ce;background:#fafafa99;color:#a8adba;pointer-events:none}.guest-form-field{padding:18px 0;border-top:1px solid var(--line)}.guest-form-field:first-of-type{border-top:0}.form-title{font-size:12px;display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.required{font-size:10px;color:var(--purple)}.guest-sign-preview{height:60px;border:1px solid var(--line);margin-bottom:8px;background:#fcfcfd;display:grid;place-items:center}.guest-sign-preview img{max-width:100%;max-height:56px}.attach-name{font-size:11px;line-height:1.8;overflow-wrap:anywhere;color:var(--muted);margin:8px 0}.result-icon{width:58px;height:58px;margin-bottom:22px;border-radius:50%;background:#eaf6ef;color:var(--green);display:grid;place-items:center;font-size:28px}.download-item{padding:17px 0;border-top:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;gap:15px}.download-item strong{font-size:13px}.download-item p{font-size:11px;margin:5px 0 0}.modal-backdrop{position:fixed;inset:0;background:#22273566;z-index:100;overflow:auto;padding:35px 20px;display:flex;align-items:flex-start;justify-content:center}.modal{width:580px;max-width:100%;background:white;border-radius:5px;box-shadow:0 10px 70px #22273522;position:relative;margin-top:max(0px,calc(45vh - 260px));max-height:calc(100vh - 70px);overflow:auto}.modal.small-modal{width:450px}.modal-head{display:flex;align-items:center;justify-content:space-between;padding:20px 26px;border-bottom:1px solid var(--line)}.modal-head h2{margin:0;font-size:17px}.modal-content{padding:25px 28px}.modal-footer{display:flex;gap:12px;justify-content:flex-end;padding:18px 28px;border-top:1px solid var(--line)}.tabs{display:flex;gap:28px;border-bottom:1px solid var(--line);margin-bottom:20px}.tabs button{padding:12px 4px;color:#9b9fad;border-bottom:2px solid transparent}.tabs button.active{color:var(--purple);border-color:var(--purple)}.signature-canvas-wrap{position:relative;border:1px solid #e0e2e9;background:#fcfcfd;height:210px}.signature-canvas-wrap canvas{display:block;width:100%;height:100%;touch-action:none}.signature-canvas-wrap:after{content:"";position:absolute;left:20px;right:20px;bottom:55px;border-top:1px dashed #e1e3eb;pointer-events:none}.signature-colors{display:flex;gap:9px;align-items:center}.signature-colors button{width:18px;height:18px;border-radius:50%;padding:0;border:3px solid white;box-shadow:0 0 0 1px #ddd}.signature-colors button.active{box-shadow:0 0 0 2px #bbb}.signature-preview{height:130px;border:1px solid var(--line);display:grid;place-items:center;background:#fcfcfd;margin-top:15px;overflow:hidden}.signature-preview canvas{width:100%;height:100%;object-fit:contain}.signature-upload{border:1px dashed #bbb;padding:20px;text-align:center}.modal-error{color:var(--danger);font-size:12px;line-height:1.7;margin-top:12px}.progress-overlay{position:fixed;inset:0;background:#fff9;z-index:200;display:grid;place-items:center;color:var(--purple)}#toasts{position:fixed;right:25px;bottom:25px;z-index:300;display:flex;flex-direction:column;gap:10px;max-width:440px}.toast{padding:13px 20px;background:#42475d;color:white;border-radius:4px;box-shadow:0 3px 15px #0002;font-size:12px;line-height:1.7}.toast.error{background:#a84557}.mobile-only{display:none}.footer-note{font-size:11px;color:#9da1af;text-align:center;padding:20px}.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}@media(max-width:1100px){.header{padding:0 18px}.nav{position:static;transform:none;margin-left:auto;gap:20px}.header-right{margin-left:0}.workspace-label{display:none}.editor-shell{grid-template-columns:225px minmax(0,1fr) 135px}.viewer{padding:28px 25px}.thumbnails{padding:20px 15px}.statusbar{gap:15px}.status-item{min-width:80px}.detail-grid{grid-template-columns:1fr 260px}.guest-doc-shell{grid-template-columns:minmax(0,1fr) 320px}.guest-document{padding:24px}.settings-main{padding:30px}.task-row{grid-template-columns:minmax(180px,1fr) 100px 110px}.task-date{display:none}}@media(max-width:760px){.header{height:auto;min-height:60px;flex-wrap:wrap;gap:10px;padding:13px 17px}.brand{font-size:17px}.header-right{margin-left:auto}.nav{order:3;width:100%;justify-content:center;height:38px;gap:30px}.nav button{font-size:12px}.dev-strip{padding:7px 12px}.page{padding:28px 18px}.page-title{align-items:flex-start}.page-title h1{font-size:21px}.statusbar{height:74px;gap:0;justify-content:flex-start;overflow-x:auto;padding:0 12px}.status-item{min-width:88px;font-size:11px}.status-item b{font-size:18px}.fab{position:fixed;right:22px;bottom:25px;z-index:20}.task-row{padding:18px 16px;grid-template-columns:1fr 90px;gap:12px}.task-row .task-people{display:none}.task-name strong{font-size:13px}.card{padding:21px 18px}.stepbar{gap:15px;padding:16px 8px;font-size:11px}.step-dot{width:19px;height:19px;margin-right:5px}.recipient-row{grid-template-columns:23px 1fr 32px;gap:10px}.recipient-row .email-field{grid-column:2}.recipient-row .kind-field{grid-column:2}.recipient-row .remove-person{grid-column:3;grid-row:1}.requirement-row{grid-template-columns:1fr 30px}.requirement-row select{grid-column:1}.requirement-row button{grid-column:2;grid-row:1}.editor-header{padding:0 12px;gap:8px}.editor-header strong{font-size:12px}.editor-header .btn{padding:7px 10px;font-size:12px}.editor-shell{display:flex;flex-direction:column;height:calc(100dvh - 60px);overflow:hidden}.tools{height:auto;flex-shrink:0;border-right:0;border-bottom:1px solid var(--line);display:flex;flex-wrap:wrap;padding:10px;gap:4px;overflow:visible}.tools-title,.tools-section,.editor-tip{display:none}.tool{width:auto;height:37px;padding:0 10px;border:1px solid #eee;border-radius:4px;font-size:11px;gap:6px}.tool-icon{font-size:17px;width:auto}.tool-panel{padding:0;margin:0;border:0;display:flex;gap:8px;flex:1 1 100%;align-items:center}.tool-panel .label{display:none}.tool-panel .input{width:145px;min-height:32px;padding:5px}.tool-panel .check{font-size:10px;align-items:center}.tool-panel .check input{margin:0}.tool-panel .properties{display:none}.viewer{flex:1;padding:20px 15px;min-height:0}.thumbnails{height:85px;flex-shrink:0;border-left:0;border-top:1px solid var(--line);display:flex;gap:10px;padding:8px 15px}.thumbnail{width:52px;min-width:52px;margin:0;padding:3px}.thumbnail.active{padding:2px}.thumbnail img{height:47px;object-fit:contain}.thumbnail span{font-size:9px;margin-top:3px}.field,.guest-field{font-size:8px}.detail-grid,.mail-grid{grid-template-columns:1fr}.mail-list{max-height:240px}.mail-letter{padding:20px}.settings-shell{display:block}.settings-nav{display:flex;overflow:auto;padding:0;border-bottom:1px solid var(--line)}.settings-nav button{flex:0 0 auto;width:auto;padding:0 18px;font-size:12px;border-right:0;border-bottom:3px solid transparent}.settings-nav button.active{border-bottom-color:var(--purple)}.settings-main{padding:25px 18px}.asset-card{width:100%}.member-table{font-size:11px}.member-table td,.member-table th{padding:10px 5px}.guest-header{padding:0 18px}.guest-header span{font-size:11px;max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.guest-shell{margin:25px auto}.guest-card{padding:28px 23px}.guest-doc-shell{display:block;height:auto}.guest-document{overflow:visible;padding:22px 15px}.guest-sidebar{border-left:0;border-top:1px solid var(--line);padding:24px}.guest-doc-tools{font-size:11px}.guest-doc-tools h2{font-size:15px}.modal-backdrop{padding:15px}.modal{max-height:calc(100dvh - 30px);margin-top:30px}.modal-head{padding:17px 20px}.modal-content{padding:20px}.modal-footer{padding:16px 20px}.signature-canvas-wrap{height:190px}.auth-shell{padding:20px}.auth-card{padding:30px 25px}.event{gap:12px}.event time{min-width:90px;font-size:10px}.mobile-only{display:block}#toasts{left:18px;right:18px;bottom:18px;max-width:none}}
/* v0.6 workflow parity: image geometry and additional recipient policies. */
.field-image{width:100%;height:100%;object-fit:contain;object-position:center;pointer-events:none;display:block}.recipient-policy{grid-column:2/-1;display:flex;gap:22px;align-items:end;font-size:11px;color:var(--muted)}.recipient-policy>label:first-child{flex:1;max-width:320px}.recipient-policy .input{margin-top:5px;font-size:12px;padding:8px}.create-mode-card{display:flex;width:100%;gap:16px;align-items:center;text-align:left;border:1px solid var(--line);border-radius:5px;padding:22px;margin:10px 0;background:white}.create-mode-card:hover{border-color:var(--purple);background:#fafaff}.create-mode-card strong{display:block;font-size:15px;margin-bottom:7px}.create-mode-card span{font-size:12px;color:var(--muted)}.create-mode-icon{font-size:27px;color:var(--purple);min-width:35px}.settings-mini-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:13px}.statusbar{gap:20px}.status-item{min-width:83px}.template-edit-notice{font-size:11px;padding:10px 18px;background:#f3f2ff;color:#7773bd}.guest-field.image-field{padding:0}.conflict-note{margin-top:12px}.recipient-actions{display:flex;gap:6px;margin-left:auto}.person-progress .recipient-actions+.badge{margin-left:0}@media(max-width:760px){.recipient-policy{grid-column:2/-1;flex-direction:column;align-items:stretch;gap:12px}.statusbar{gap:0}.editor-header>.btn.ghost{display:none}.recipient-actions{flex-wrap:wrap}.person-progress{flex-wrap:wrap}.create-mode-card{padding:18px}}
.history-bar{position:sticky;bottom:0;z-index:4;display:flex;gap:12px;padding:12px 23px;background:white;border-top:1px solid var(--line)}@media(max-width:760px){.history-bar{position:static;padding:0;border:0;background:transparent;flex:0 0 auto}}@media(pointer:coarse){.field .resize-handle{overflow:visible}.field .resize-handle::after{content:"";position:absolute;right:-12px;bottom:-12px;width:32px;height:32px;background:transparent}}
/* B1-C: customer pages scroll inside #app, which ends above a "toast lane" while a toast is shown (--toast-lane is set by syncToastLane in app.js), so a toast never covers a control. */
body.guest-ui{height:100vh;height:100dvh;overflow:hidden}body.guest-ui #app{height:calc(100vh - var(--toast-lane,0px));height:calc(100dvh - var(--toast-lane,0px));overflow:auto;display:flex;flex-direction:column}body.guest-ui #app>*{flex:none;width:100%}body.guest-ui #app>.guest-doc-shell{flex:1 1 auto;min-height:0;height:auto;grid-template-rows:minmax(0,1fr)}body.guest-ui #toasts{bottom:12px}body.guest-ui .modal-backdrop{bottom:var(--toast-lane,0px)}@media(max-width:760px){body.guest-ui #app>.guest-doc-shell{flex:none;grid-template-rows:none}body.guest-ui #toasts{bottom:12px}}
/* B1-C (section C, 390x844 check): the login card and the task detail no longer force the page wider than a phone screen. */
.auth-shell{grid-template-columns:minmax(0,1fr)}@media(max-width:760px){.detail-grid{grid-template-columns:minmax(0,1fr)}.detail-grid .btn{white-space:normal;text-align:center}.detail-grid .event span,.detail-grid .download-item>div{min-width:0;overflow-wrap:anywhere}}

/* B3-WP03: attachment scan states. Colour supports the words; the words carry the meaning. */
.scan-state{font-weight:600}
.scan-state.scan-ok{color:#1f7a45}
.scan-state.scan-wait,.scan-state.scan-warn{color:#8a5a00}
.scan-state.scan-bad{color:#b42318}
.scan-next{margin:8px 0;font-size:13px}

/* B4-WP11: delivery state of a notification (derived from provider events). */
.delivery-state{display:inline-block;margin-top:3px;color:var(--ink)}.delivery-state.delivery-problem{color:var(--danger);font-weight:600}.delivery-state[data-delivery-state="delivered"]{color:var(--green)}
/* Batch 10: staff invitations, password reset and own password (docs/STAFF_ACCOUNTS.md). */
.auth-card .btn.auth-link{margin-top:10px;color:var(--purple)}.auth-card .notice{margin:18px 0 0;text-align:left;font-size:13px}.staff-facts{display:grid;grid-template-columns:auto minmax(0,1fr);gap:6px 14px;margin:18px 0 6px;font-size:13px}.staff-facts dt{color:var(--muted)}.staff-facts dd{margin:0;overflow-wrap:anywhere}.table-scroll{max-width:100%;overflow-x:auto}.invite-table{width:100%;border-collapse:collapse;font-size:13px}.invite-table th,.invite-table td{padding:13px 9px;text-align:left;border-bottom:1px solid var(--line)}.invite-table th{color:var(--muted);font-weight:400}.row-actions{white-space:nowrap}.row-actions .btn+.btn{margin-left:8px}.invite-form{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.4fr) 120px auto;gap:12px;align-items:end;font-size:12px}.invite-form label{display:grid;gap:6px}.card h3{margin:22px 0 8px;font-size:14px}.account-card{max-width:520px}@media(max-width:760px){.invite-table{font-size:11px}.invite-table td,.invite-table th{padding:10px 5px}.invite-form{grid-template-columns:minmax(0,1fr)}.invite-form .btn{width:100%}.row-actions{white-space:normal}.row-actions .btn{margin:4px 4px 0 0}.row-actions .btn+.btn{margin-left:0}}
/* WP12b task search and paging (docs/TASK_SEARCH.md) */
.task-search{display:flex;gap:8px;align-items:center;flex:1;max-width:380px;margin:0 16px}
.task-search .input{min-height:36px;padding:7px 10px;font-size:13px}
.task-list-state{margin:-12px 0 12px}
.notice.task-list-state{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:-12px 0 12px}
.task-more{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:14px;margin-top:16px}
@media(max-width:760px){.task-tools{flex-wrap:wrap;gap:10px}.task-search{order:3;flex-basis:100%;max-width:none;margin:0}}
/* B19 operation log: plain-language label, the raw event code as secondary text, technical details collapsed */
.event .event-label{color:var(--ink)}
.event .event-code{margin-left:6px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11px;color:#9b9fad}
.event .event-tech{margin-top:2px}
.event .event-tech summary{cursor:pointer;color:var(--muted);font-size:11px;width:max-content}
.event .event-tech small{display:block;overflow-wrap:anywhere}
/* B23 phone width (max-width:760px; checked with 390x844 Chrome emulation, not a real phone).
   Customer page: zoom controls and a "next required item" bar (hidden on wider screens); the document zooms inside its
   own scroll box and, unlike the editor's .paper, lets the finger pan and pinch-zoom. Fields keep their % geometry.
   Task detail: the DOM order is progress, artifact, actions, attachments, notifications, log (so Tab order equals the
   visible order on a phone); on wider screens grid placement keeps the two-column layout exactly as before. */
.guest-zoom,.guest-next-bar{display:none}
.detail-grid{grid-template-rows:auto 1fr;row-gap:0}.detail-main{grid-column:1;grid-row:1}.detail-side{grid-column:2;grid-row:1/3}.detail-rest{grid-column:1;grid-row:2}
/* B46 (all widths): on the customer signing page a finger on the document scrolls and pinch-zooms (a touch screen wider
   than 760px used to get the editor's touch-action:none). The editor's .paper, fields and signature pad keep none. */
.guest-paper-scroll .paper{touch-action:pan-x pan-y pinch-zoom}
@media(max-width:760px){.guest-doc-tools{flex-wrap:wrap}.guest-zoom{display:flex;flex:1 1 100%;align-items:center;gap:6px}.guest-zoom-level{flex:1;text-align:center;font-size:11px;color:var(--muted);white-space:nowrap}.guest-paper-scroll{overflow:auto;max-height:72vh;max-height:72dvh}.guest-paper-scroll .paper{width:calc(min(100%,720px) * var(--guest-zoom,1))}.guest-paper-scroll .guest-field{font-size:calc(8px * var(--guest-zoom,1))}body.guest-ui #app{scroll-padding-bottom:64px}.guest-next-bar{display:flex;position:sticky;bottom:0;z-index:5;align-items:center;justify-content:space-between;gap:10px;padding:10px 15px;background:white;border-top:1px solid var(--line);box-shadow:0 -2px 8px #24273c14}.guest-next-bar .btn{flex:none}
.detail-grid{grid-template-rows:none}.detail-main,.detail-side,.detail-rest{grid-column:1;grid-row:auto}}
/* B23 (all widths, coordinator decision): the task-detail status badge stays on one line; a long title wraps by itself and
   the badge and the refresh button are never squeezed. With a short title nothing moves (measured against e790d8d). */
.detail-title>div:first-child{min-width:0;overflow-wrap:anywhere}.detail-title>.row{flex:none}.detail-title .badge{white-space:nowrap}
/* B25 M1: toasts. Each has a close button (the "×" is drawn by CSS, so the toast's own text is only its message). Company
   pages: while a toast is shown (body.staff-toast-lane, set by syncStaffToastLane in app.js) the page scrolls inside #app,
   which ends above the toasts, so a toast never covers a control; with no toast the page scrolls exactly as before. */
.toast{display:flex;align-items:flex-start;gap:12px}
.toast-close{flex:none;width:22px;height:22px;margin:-1px -10px -1px 0;padding:0;border-radius:3px;color:inherit;opacity:.8;font-size:17px;line-height:22px;text-align:center}
.toast-close::before{content:"×"}
.toast-close:hover{opacity:1;background:#ffffff26}
.toast-close:focus-visible{outline:2px solid white;outline-offset:1px}
body.staff-toast-lane{height:100vh;height:100dvh;overflow:hidden}
body.staff-toast-lane #app{height:calc(100vh - var(--staff-toast-lane,0px));height:calc(100dvh - var(--staff-toast-lane,0px));overflow:auto}
body.staff-toast-lane #toasts{bottom:12px}
body.staff-toast-lane .modal-backdrop{bottom:var(--staff-toast-lane,0px)}
@media(max-width:760px){body.staff-toast-lane #toasts{bottom:12px}body.staff-toast-lane .fab{bottom:calc(25px + var(--staff-toast-lane,0px))}}
/* B25 M1 (review round 2): company pages sized from the window height are sized to the shorter #app while the lane is
   on, so the editor still fits exactly (no outer scroll, its bottom bar stays in view) and short pages grow no scroll. */
body.staff-toast-lane .editor-shell{height:calc(100vh - 60px - var(--staff-toast-lane,0px))}
body.staff-toast-lane .settings-shell{min-height:calc(100vh - 60px - var(--staff-toast-lane,0px))}
body.staff-toast-lane .auth-shell{min-height:calc(100vh - var(--staff-toast-lane,0px))}
@media(max-width:760px){body.staff-toast-lane .editor-shell{height:calc(100dvh - 60px - var(--staff-toast-lane,0px))}}
/* B25 M3: checkbox / radio boxes show an icon instead of a squeezed name; the review page reminds the sender to name
   default-named text and checkbox fields (a reminder only). */
.field .field-icon{padding:0;font-size:1.3em;line-height:1.1;text-overflow:clip}
.guest-field.icon-field{padding:0;line-height:1;font-size:18px}
@media(max-width:760px){.guest-field.icon-field{font-size:12px}.guest-paper-scroll .guest-field.icon-field{font-size:calc(12px * var(--guest-zoom,1))}}
.name-reminder{margin-top:12px}.name-reminder p{margin:6px 0;font-size:12px;color:inherit;line-height:1.8}.name-reminder ul{margin:4px 0;padding-left:20px}.name-reminder li{line-height:1.8}
/* B25 M8 (phone width only, max-width:760px; checked with 390x844 Chrome emulation, not a real phone): the seven list
   categories sit in two rows (4 + 3) instead of a sideways-scrolling strip, each with its number and name, the current
   one marked; every row shows its date in the small line under the title. Wider screens are unchanged. */
.task-row-date{display:none}
@media(max-width:760px){.statusbar{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));height:auto;overflow:visible;padding:6px 8px;gap:2px 0}.status-item{min-width:0;padding:7px 2px 6px;gap:3px}.status-item span{white-space:nowrap}.status-item.active{background:var(--pale);border-radius:4px 4px 0 0}.task-row-date{display:inline}}
/* B48 (docs/UI_WORDING.md section 16; engineering defaults pending the user's confirmation).
   No.15: wider than 900px the ＋ button sits vertically centred inside the category bar instead of on the line between
   the bar and the list (761-900px keeps the old place: there the categories reach the button, see the batch notes);
   on phones the list keeps room under its last row, so the fixed ＋ button never covers it when scrolled to the end.
   No.18: the declined page's round icon is grey and neutral. No.19: 「連結有效至…」 is left-aligned, 15px under its input
   (the gap between an input and the next label of the same form). */
@media(min-width:901px){.fab{bottom:calc(50% - 24px)}}
@media(max-width:760px){#task-results{padding-bottom:56px}}
.result-icon.neutral{background:var(--canvas);color:var(--muted)}
.auth-card p.staff-expiry{text-align:left;margin-top:15px}
/* B50 (docs/UI_WORDING.md section 17): an ordinary member names an internal signer by e-mail; the hint and the
   matched / not-found line sit under the row, across the name and e-mail columns, and wrap instead of widening it. */
.member-match{grid-column:2/-1;display:flex;flex-direction:column;gap:2px;font-size:12px;line-height:1.6;min-width:0;overflow-wrap:anywhere}.member-match-ok{color:var(--green)}.member-match-error{color:var(--danger)}
/* B48 No.21 (docs/UI_WORDING.md section 16.8; contract section 7; engineering default pending the user's confirmation).
   With a field selected (wider than 760px), the 欄位屬性 block sticks to the bottom of the left column's visible part,
   just above the sticky 復原／重做 bar, so it is whole without scrolling; the column's scrollTop is never changed and
   the block keeps its place in the flow (scrolled to the end it is back where it always was). A sticky box cannot leave
   its parent, and inside .tool-panel it could rise only 119px (141-471px are needed), so with a field selected the panel
   box itself steps aside (display:contents) and its border and padding move onto its children: the same layout.
   max-height (100% is the column's own height, so a toast lane is already taken off) keeps the column's top (title,
   建立欄位, the first tool: 145px) uncovered in short windows; a taller block scrolls inside itself.
   Only in windows at least 860px tall (coordinator's decision, 2026-12-03): in shorter ones the block would cover
   nearly every tool while an empty-paper click does not deselect, so below 860px nothing changes (the block stays in
   its place and the column is scrolled to see it, as before). */
@media(min-width:761px) and (min-height:860px){.tool-panel:has(#field-label){display:contents}.tool-panel:has(#field-label)>.grow{margin-top:12px;border-top:1px solid var(--line);padding:20px 23px 0}.tool-panel:has(#field-label)>.check{margin-left:23px;margin-right:23px}.tool-panel:has(#field-label)>.properties{position:sticky;bottom:58px;z-index:3;background:white;padding:0 23px 20px;box-shadow:0 -1px 0 var(--line),0 -10px 12px -10px rgba(49,53,71,.28);max-height:calc(100% - 58px - 145px);overflow-y:auto}}
