:root{--paper:#f4f5f2;--surface:#fff;--ink:#202b29;--muted:#5e6c67;--line:#dce2dc;--accent:#176b56;--accent-soft:#e8f3ed;--stage:#171d1b;--warning:#8d5314;--danger:#a6312b;--radius:6px;color-scheme:light;font-family:"Segoe UI","Microsoft YaHei UI",sans-serif;font-size:14px;color:var(--ink);background:var(--paper)}
*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{min-height:36px;border:1px solid #c8d3ca;border-radius:5px;background:var(--surface);color:var(--ink);padding:7px 11px;cursor:pointer;font-weight:550;transition:background .15s,border-color .15s}button:hover:not(:disabled){background:#eef3ed;border-color:#9fb5a7}button.primary{background:var(--accent);color:white;border-color:var(--accent)}button.primary:hover:not(:disabled){background:#11523f}button:disabled{opacity:.45;cursor:not-allowed}input,select,textarea{border:1px solid #c8d3ca;border-radius:4px;padding:8px;background:white;color:var(--ink);min-height:36px;min-width:0;caret-color:var(--accent)}input[type=checkbox]{min-height:0;accent-color:var(--accent)}:focus-visible{outline:2px solid var(--accent);outline-offset:3px}::selection{background:#cce9db;color:#173e2c}*{scrollbar-color:#a5b7aa #edf0eb;scrollbar-width:thin}h1,h2,h3,p{margin:0}h1{font-size:19px;letter-spacing:-.025em;font-weight:650}h2{font-size:15px;font-weight:650}h3{font-size:13px;font-weight:650}p{line-height:1.65}kbd{font-family:inherit;font-size:11px;opacity:.8;font-weight:400;margin-left:4px}button kbd{white-space:nowrap}button svg{pointer-events:none}[hidden]{display:none!important}.app-header{height:66px;background:white;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:20px;padding:0 26px}.brand{display:flex;align-items:center;gap:10px}.brand>svg{width:27px;height:27px;fill:none;stroke:var(--accent);stroke-width:1.5}.brand-detail{font-size:12px;color:var(--muted);border-left:1px solid var(--line);padding-left:13px;margin-left:4px}.local{margin-left:auto;color:var(--muted);font-size:12px}main{padding:20px 24px 0;max-width:1900px;margin:auto}.import-bar{display:flex;gap:18px;align-items:center;margin-bottom:20px;flex-wrap:wrap}.source-actions{display:flex;gap:7px}.import-bar>p{font-size:12px;color:var(--muted)}.stats{margin-left:auto;color:var(--muted);font-size:12px;font-variant-numeric:tabular-nums}.workspace{display:grid;grid-template-columns:210px minmax(0,1fr) 310px;gap:20px;align-items:start}.queue-panel{min-width:0;position:sticky;top:16px}.panel-top{display:flex;gap:6px;align-items:center;margin-bottom:12px}.panel-top h2{white-space:nowrap}.panel-top h2 span{font-weight:400;color:var(--muted);font-size:12px;margin-left:3px}.panel-top select{margin-left:auto;max-width:91px;font-size:11px;padding:5px;min-height:30px}.queue-panel>input{width:100%;font-size:12px;margin-bottom:10px}.queue{max-height:calc(100vh - 280px);min-height:250px;overflow:auto}.queue-item{display:flex;align-items:center;text-align:left;gap:9px;width:100%;border:0;border-radius:4px;background:transparent;padding:9px 7px;margin-bottom:4px;min-height:64px}.queue-item img{width:58px;height:43px;object-fit:contain;background:#dfe5dd;border-radius:3px}.queue-item.active{background:#dfece3;outline:1px solid #a3bcac;outline-offset:-1px}.queue-text{min-width:0}.queue-text strong{display:block;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:550;max-width:119px}.queue-text span{display:block;color:var(--muted);font-size:11px;margin-top:5px}.queue-item.done .queue-text span{color:var(--accent)}.queue-empty{font-size:12px;color:var(--muted);padding:20px 5px;line-height:1.8}.queue-foot{font-size:11px;color:var(--muted);border-top:1px solid var(--line);padding-top:12px;margin-top:10px}.editor{min-width:0}.editor-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:13px}.editor-heading h2{font-size:16px;max-width:50ch;overflow-wrap:anywhere}.editor-heading p{font-size:11px;color:var(--muted);margin-top:5px}.save-state{font-size:11px;color:var(--muted);white-space:nowrap}.save-state.dirty{color:var(--warning)}.canvas-toolbar{display:flex;justify-content:space-between;gap:10px;margin-bottom:8px;flex-wrap:wrap}.tool-group{display:flex;gap:4px;align-items:center}.tool-group button{font-size:11px;min-height:30px;padding:5px 8px}.tool-group button[aria-pressed=true]{background:var(--accent-soft);color:var(--accent);border-color:#a0bdab}#zoom-value{font-size:11px;min-width:36px;text-align:center}.viewport{background:var(--stage);border-radius:6px;overflow:auto;min-height:350px;height:clamp(350px,44vw,610px);display:flex;align-items:flex-start;position:relative}.viewport canvas{display:block;width:100%;height:auto;flex-shrink:0;align-self:center;touch-action:none;cursor:default}.viewport canvas.drawing{cursor:crosshair}.viewport canvas:focus-visible{outline-offset:-3px}.empty{margin:auto;text-align:center;padding:40px 20px;color:#e5eee7;width:100%}.empty svg{width:100px;height:80px;fill:none;stroke:#8fa99a;stroke-width:1.4;margin-bottom:22px}.empty h3{font-size:18px;font-weight:550;margin-bottom:12px}.empty p{font-size:12px;color:#afc0b6;line-height:1.9}.empty button{margin-top:24px;background:#2a3d32;color:#e2eee5;border-color:#526a5b}.canvas-caption{display:flex;gap:12px;justify-content:space-between;font-size:11px;color:var(--muted);padding:9px 0 18px;line-height:1.5}.objects-heading{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:9px}.objects-heading span{font-size:11px;color:var(--muted);font-weight:400}.objects{display:flex;gap:6px;flex-wrap:wrap;padding-bottom:15px;border-bottom:1px solid var(--line);min-height:47px}.object-item{font-size:12px;padding:6px 9px;font-weight:400;display:flex;gap:7px;align-items:center}.object-item.active{border-color:var(--accent);background:var(--accent-soft);color:var(--accent)}.object-item.confirmed::after{content:"已确认";font-size:10px;color:var(--accent)}.object-item .swatch{width:9px;height:9px;display:inline-block;border:1px solid #8d9891}.sample-meta{display:grid;grid-template-columns:minmax(0,1fr) 150px;gap:12px;margin-top:17px}.field{display:flex;flex-direction:column;gap:7px}.field>label{font-size:12px}.sample-meta input,.sample-meta select{width:100%;font-size:12px}.sample-meta>p{grid-column:1/-1;font-size:11px;color:var(--muted)}.revision-panel{margin-top:17px;font-size:12px}.revision-panel summary,.box-details summary{cursor:pointer;color:var(--muted);padding:7px 0}.revision-panel label{display:block;margin:12px 0 6px}.revision-panel textarea{width:100%;resize:vertical;font-size:12px}.revision-panel>button{margin-top:8px;font-size:11px}.revision-row{display:flex;gap:9px;align-items:center;padding:8px 0;border-bottom:1px solid var(--line);font-size:11px}.revision-row button{margin-left:auto;min-height:28px;font-size:11px;padding:4px 7px}.save-bar{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;border-top:1px solid var(--line);margin-top:18px;padding:14px 0}.save-bar>div{display:flex;gap:7px;flex-wrap:wrap}.save-bar button{font-size:12px}.inspector{background:white;border:1px solid var(--line);border-radius:6px;overflow:hidden;min-width:0}.inspector-top{display:flex;justify-content:space-between;align-items:center;padding:15px 16px}.inspector-top span{font-size:11px;color:var(--muted)}#crop{display:block;width:100%;height:158px;object-fit:contain;background:#edf0eb}.inspector-body{padding:16px}fieldset{margin:0;padding:0;border:0;min-width:0}legend{font-size:13px;font-weight:600;width:100%;margin-bottom:11px}legend span{float:right;font-size:10px;font-weight:400;color:var(--muted);margin-top:2px}.colors{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px;margin-bottom:24px}.color-button{padding:7px 2px;font-size:10px;min-height:61px;display:flex;align-items:center;flex-direction:column;gap:5px;font-weight:400}.color-button .swatch{width:20px;height:14px;border:1px solid #8c9890;border-radius:2px}.color-button[aria-pressed=true],.shape-button[aria-pressed=true]{border-color:var(--accent);background:var(--accent-soft);color:var(--accent)}.white{background:#fff}.red{background:#db4944}.blue{background:#3185c5}.green{background:#5b9a61}.yellow{background:#ead250}.shapes{display:grid;grid-template-columns:1fr 1fr;gap:6px}.shape-button{display:flex;align-items:center;gap:9px;padding:9px 8px;font-size:12px;text-align:left;font-weight:400;min-height:47px}.shape-button svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.2;flex-shrink:0}.shape-button kbd{margin-left:auto;color:var(--muted)}.shape-button:last-child{grid-column:1/-1}.quality-field{border-top:1px solid var(--line);padding-top:18px;margin-top:20px}.quality-field select{font-size:12px;width:100%}.quality-field p{font-size:11px;color:var(--muted);line-height:1.75}.full{width:100%;margin-top:16px;font-size:12px}.box-details{margin-top:15px;font-size:11px}.bbox-fields{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;margin-top:9px}.bbox-fields label{display:flex;flex-direction:column;gap:5px;color:var(--muted)}.bbox-fields input{width:100%;font-size:11px;padding:6px 3px}#suggest-color{margin-top:10px;font-size:11px}.shortcuts{margin-top:23px;border-top:1px solid var(--line);padding-top:15px;color:var(--muted);font-size:11px}.shortcuts h3{font-size:12px;color:var(--ink);margin-bottom:9px}.shortcuts p{margin:7px 0;line-height:1.7}.shortcuts kbd{margin-left:0;font-size:11px;color:var(--ink);opacity:1}.notice{background:#fff5e7;color:#805019;border-radius:4px;padding:11px 14px;font-size:12px;margin-bottom:15px;line-height:1.7}.notice.error{background:#fff0ed;color:#8e302a}footer{display:flex;justify-content:space-between;gap:14px;flex-wrap:wrap;border-top:1px solid var(--line);margin-top:22px;padding:17px 0 23px;font-size:11px;color:var(--muted);line-height:1.8}dialog{width:min(860px,calc(100% - 32px));max-height:88vh;border:1px solid var(--line);border-radius:8px;padding:23px;background:var(--surface);color:var(--ink)}dialog::backdrop{background:#132b2066}.dialog-heading{display:flex;justify-content:space-between;gap:15px;margin-bottom:20px}.dialog-heading h2{font-size:18px}.dialog-heading p{font-size:12px;color:var(--muted);margin-top:8px}.dialog-heading button{font-size:12px;align-self:start}.library-search{display:flex;gap:8px}.library-search input{flex:1}.library-meta{display:flex;align-items:center;justify-content:space-between;font-size:12px;color:var(--muted);margin:15px 0}.library-list{max-height:48vh;overflow:auto;border-top:1px solid var(--line)}.library-row{display:flex;gap:10px;align-items:flex-start;padding:12px 5px;border-bottom:1px solid var(--line);cursor:pointer;font-size:12px;overflow-wrap:anywhere}.library-row input{margin-top:4px;flex-shrink:0}.library-row small{display:block;margin-top:5px;color:var(--muted);font-size:10px}.dialog-footer{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-top:20px}.dialog-footer p{font-size:12px;color:var(--muted)}.dialog-footer>div{display:flex;gap:6px}.camera-row{display:flex;gap:8px}.camera-row select{flex:1}video{display:block;width:100%;max-height:50vh;min-height:170px;background:var(--stage);margin:16px 0;object-fit:contain}#camera-status{font-size:12px;color:var(--muted);margin-bottom:15px}#camera-dialog>label{font-size:12px;display:block;margin-bottom:7px}#capture-group{width:100%}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);max-width:calc(100% - 32px);background:#233d30;color:white;padding:12px 18px;border-radius:5px;font-size:12px;z-index:10;box-shadow:0 6px 24px #16291c25}#toast.error{background:#84382e}
@media(min-width:1550px){.workspace{grid-template-columns:230px minmax(0,1fr) 332px;gap:24px}.queue-text strong{max-width:137px}.inspector-body{padding:20px}.shape-button{min-height:51px}}
@media(max-width:1150px){main{padding:18px 16px 0}.workspace{grid-template-columns:170px minmax(0,1fr) 270px;gap:13px}.queue-item{gap:6px}.queue-item img{width:43px;height:36px}.queue-text strong{max-width:102px}.queue-foot{font-size:10px}.panel-top{flex-wrap:wrap}.panel-top select{margin-left:0}.viewport{min-height:300px;height:440px}.inspector-body{padding:13px}.shape-button{padding:8px 5px;gap:5px;font-size:11px}.shape-button svg{width:20px}.save-bar kbd{display:none}.import-bar>p{display:none}.canvas-caption{padding-bottom:13px}.objects-heading{align-items:start}.objects-heading>span{max-width:145px;text-align:right}}
@media(max-width:870px){.workspace{grid-template-columns:minmax(0,1fr) 280px}.queue-panel{grid-column:1/-1;position:static}.panel-top{margin-bottom:8px;flex-wrap:nowrap}.panel-top select{margin-left:auto;max-width:110px}.queue-panel>input{max-width:300px}.queue{display:flex;gap:8px;min-height:0;max-height:93px;overflow:auto}.queue-item{min-width:180px;max-width:180px;min-height:66px}.queue-foot{display:none}.viewport{height:390px}.editor-heading h2{font-size:14px}.editor-heading{align-items:start}.editor-heading .save-state{max-width:75px;white-space:normal;text-align:right}.stats{margin-left:0}.app-header{padding:0 17px}.source-actions{flex-wrap:wrap}.sample-meta{grid-template-columns:minmax(0,1fr)}.sample-meta>p{grid-column:auto}}
.mobile-only{display:none}.sample-settings>summary{display:none}.image-management{display:flex;gap:8px;margin-top:16px}.image-management button{font-size:12px}#queue-body>input{width:100%;font-size:12px;margin-bottom:10px}.save-bar>div{margin-left:auto}
@media(max-width:640px),(max-width:1000px) and (max-height:500px) and (pointer:coarse){
  body{padding-bottom:calc(82px + env(safe-area-inset-bottom));padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}
  .mobile-only{display:initial}.desktop-label,kbd,.brand-detail,.local,.shortcuts{display:none}
  button,input,select,textarea{min-height:44px}input,select,textarea{font-size:16px}button,summary,label,canvas{-webkit-tap-highlight-color:transparent}button{touch-action:manipulation}button:active:not(:disabled){background:var(--accent-soft);border-color:var(--accent);color:var(--accent)}
  .app-header{height:58px;padding:0 12px;gap:10px}.app-header>button{margin-left:auto;font-size:12px;padding:8px}h1{font-size:17px}.brand{gap:7px}.brand>svg{width:24px;height:24px}
  main{padding:12px 12px 0}.import-bar{gap:8px;margin-bottom:12px}.source-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;width:100%}.source-actions button{font-size:14px;padding:8px 4px}.stats{font-size:12px;line-height:1.6}
  .workspace{display:block}.queue-panel,.editor,.inspector{width:100%}.queue-panel{position:static;margin-bottom:14px}#queue-toggle{display:flex;width:100%;justify-content:space-between;align-items:center;padding:8px 11px;font-size:14px}#queue-toggle-label,#mobile-queue-count{font-size:12px;color:var(--muted);margin-left:5px}
  #queue-body{display:none;padding:12px 0 3px}.queue-panel.expanded #queue-body{display:block}.panel-top{margin-bottom:8px}.panel-top select{font-size:16px;min-height:44px;padding:8px}.panel-top h2{font-size:14px}#queue-body>input{max-width:none;font-size:16px;min-height:44px}.queue{display:block;min-height:0;max-height:40dvh;overscroll-behavior:contain}.queue-item{min-width:0;max-width:none;min-height:64px}.queue-item img{width:64px;height:44px}.queue-text strong{max-width:none;font-size:13px}.queue-text span{font-size:12px}.queue-foot{display:none}
  .editor-heading{margin-bottom:10px;gap:10px}.editor-heading>div{min-width:0}.editor-heading h2{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:none}.editor-heading p{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:66vw}.save-state{font-size:12px}.editor-heading .save-state{max-width:82px;flex-shrink:0}
  .canvas-toolbar{gap:6px;margin-bottom:8px;flex-wrap:nowrap}.tool-group{gap:3px}.tool-group button{font-size:13px;padding:7px 5px;min-width:44px;min-height:44px}#remove-object{font-size:0}#remove-object::after{content:'删除';font-size:13px}#zoom-value{min-width:30px;font-size:11px}
  .viewport{height:auto;min-height:0;max-height:50dvh;overscroll-behavior:auto}.viewport canvas{touch-action:pan-x pan-y pinch-zoom}.viewport canvas.editing,.viewport canvas.drawing{touch-action:none}.empty{padding:26px 15px}.empty svg{width:56px;height:44px;margin-bottom:12px}.empty h3{font-size:16px}.empty p{font-size:13px}.empty button{margin-top:15px}
  .canvas-caption{font-size:11px;padding:7px 0 14px;gap:8px}.canvas-caption #dimensions{white-space:nowrap}.objects-heading{align-items:center;margin-bottom:8px}.objects-heading>span{max-width:none;font-size:12px;white-space:nowrap}.objects{flex-wrap:nowrap;overflow-x:auto;gap:6px;padding-bottom:12px;margin-bottom:14px;min-height:56px}.object-item{flex-shrink:0;font-size:13px;min-height:44px;padding:8px}.object-item.confirmed::after{font-size:11px}
  .inspector{display:grid;grid-template-columns:minmax(0,1fr) 84px;align-items:center;margin-bottom:16px}.inspector-top{grid-column:1;display:flex;flex-direction:column;align-items:start;gap:6px;padding:12px 14px}.inspector-top h2{font-size:16px}.inspector-top span{font-size:12px}#crop{grid-column:2;width:84px;height:68px;object-fit:contain;margin:8px 10px 8px 0;max-width:calc(100% - 10px);background:#edf0eb}.inspector-body{grid-column:1/-1;padding:4px 12px 12px}legend{font-size:14px;margin-bottom:8px}legend span{font-size:11px}#shape-fields legend span{display:none}
  .colors{gap:6px;margin-bottom:16px}.color-button{font-size:13px;min-height:52px;padding:7px 2px;gap:6px}.color-button .swatch{width:23px;height:13px}.color-button[aria-pressed=true]{border-width:2px;padding:6px 1px}
  .shapes{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.shape-button{flex-direction:column;justify-content:center;gap:5px;min-height:68px;padding:7px 2px;font-size:13px;text-align:center}.shape-button svg{width:23px;height:23px}.shape-button:last-child{grid-column:auto}.shape-button[aria-pressed=true]{border-width:2px;padding:6px 1px}
  .quality-field{margin-top:16px;padding-top:14px;gap:7px}.quality-field label{font-size:13px}.quality-field select{font-size:16px}.quality-field p{font-size:12px}.box-details{margin-top:10px;font-size:13px}.box-details summary,.revision-panel summary{min-height:44px;padding:12px 0}.bbox-fields{gap:8px;margin-top:10px}.bbox-fields input{font-size:16px;padding:8px 4px}#touch-edit{width:100%;margin-top:6px;font-size:14px}#touch-edit[aria-pressed=true]{color:var(--accent);border-color:var(--accent);background:var(--accent-soft)}#suggest-color{font-size:14px}
  .sample-settings{border-top:1px solid var(--line);margin-top:12px}.sample-settings>summary{display:list-item;min-height:48px;padding:14px 0;font-size:14px;color:var(--muted);cursor:pointer}.sample-meta{margin-top:6px;grid-template-columns:minmax(0,1fr) 126px}.sample-meta input,.sample-meta select{font-size:16px}.sample-meta>p{grid-column:1/-1;font-size:12px}.revision-panel{margin-top:8px;font-size:14px}.revision-panel textarea{font-size:16px}.revision-panel>button,.revision-row button{font-size:13px;min-height:44px}.image-management{margin:10px 0 15px;flex-wrap:wrap}.image-management button{font-size:14px}.save-bar{display:none}
  #mobile-dock{position:fixed;z-index:8;left:0;right:0;bottom:0;background:var(--surface);border-top:1px solid var(--line);display:grid;grid-template-columns:68px minmax(0,1fr) 100px;gap:8px;padding:10px max(12px,env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))}#mobile-dock button{width:100%;min-height:48px;margin:0;padding:8px 4px;font-size:14px;white-space:nowrap}#mobile-dock #save{font-size:13px}#mobile-dock #save-next{background:var(--surface);color:var(--accent);border-color:var(--accent)}#mobile-dock #save-next.ready{background:var(--accent);color:var(--surface)}#mobile-dock #confirm-object.all-confirmed{background:var(--accent-soft);color:var(--accent);border-color:var(--line)}
  #toast{bottom:calc(84px + env(safe-area-inset-bottom));font-size:13px;max-width:calc(100% - 24px);width:max-content}footer{font-size:11px;margin-top:16px;padding-bottom:16px}.notice{font-size:12px;overflow-wrap:anywhere}
  dialog{width:calc(100% - 20px);padding:16px;max-height:calc(100dvh - 32px - env(safe-area-inset-bottom));overscroll-behavior:contain}.dialog-heading{margin-bottom:14px;gap:8px}.dialog-heading h2{font-size:17px}.dialog-heading p{font-size:12px}.dialog-heading button{min-width:44px;min-height:44px}.library-search input{font-size:16px}.library-meta{gap:8px;align-items:start;font-size:12px;flex-wrap:wrap}.library-meta label{min-height:44px;display:flex;align-items:center;gap:5px}.library-meta input,.library-row input{width:20px;height:20px;min-height:20px}.library-meta>span{flex:1;min-width:150px;line-height:1.7}.library-list{max-height:45dvh;overscroll-behavior:contain}.library-row{font-size:13px;min-height:60px;padding:14px 4px}.library-row small{font-size:11px}.dialog-footer{position:sticky;bottom:-16px;background:var(--surface);padding:12px 0 3px;margin-top:8px;flex-wrap:wrap}.dialog-footer button{font-size:14px}.camera-row{flex-wrap:wrap}.camera-row select{font-size:16px;min-width:0}
}
@media(max-width:360px){#zoom-value{display:none}.tool-group{gap:2px}.canvas-toolbar{gap:4px}.tool-group button{padding:7px 3px}.shapes{gap:5px}.shape-button{font-size:12px}#mobile-dock{grid-template-columns:62px minmax(0,1fr) 92px;gap:6px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
