.document-capture-workspace{box-sizing:border-box;position:fixed;inset:0;width:100%;height:100vh;height:100dvh;max-width:none;max-height:none;margin:0;border:0;padding:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));background:var(--paper,#101715);color:var(--ink,#fff);overflow:hidden;overscroll-behavior:contain}
.document-capture-workspace[open]{display:flex;flex-direction:column;gap:10px}
.document-capture-workspace::backdrop{background:rgba(8,14,12,.9)}
.document-capture-workspace [hidden]{display:none!important}
.document-capture-workspace button{font:inherit}
.document-capture-workspace-toolbar{display:flex;align-items:center;gap:8px;min-width:0;min-height:var(--app-header-action-size,40px);flex:none}
.document-capture-workspace-heading{display:grid;gap:1px;min-width:0;flex:1}
.document-capture-workspace-heading strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:17px;line-height:1.2}
.document-capture-workspace-heading span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted,#6b7772);font-size:12px;line-height:1.35}
.document-capture-workspace-discard,.document-capture-workspace-close{flex:none}
.document-capture-workspace-discard svg,.document-capture-workspace-close svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.document-capture-workspace-body{display:flex;flex:1;min-width:0;min-height:0;overflow:hidden}
.document-capture-empty{display:grid;place-items:center;align-content:center;gap:10px;width:100%;min-width:0;text-align:center;padding:18px}
.document-capture-empty-icon{width:64px;height:64px;display:grid;place-items:center;color:var(--muted,#6b7772)}
.document-capture-empty-icon svg{width:54px;height:54px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.document-capture-empty p{max-width:32rem;margin:0;color:var(--muted,#6b7772);font-size:14px;line-height:1.45}
.document-capture-empty button{min-width:min(18rem,100%)}
.document-capture-session{display:flex;flex:1;flex-direction:column;gap:8px;min-width:0;min-height:0;width:100%}
.document-capture-preview{position:relative;display:grid;place-items:center;flex:1;min-width:0;min-height:0;overflow:hidden;border-radius:12px;background:var(--theme-surface-soft,rgba(128,128,128,.08))}
.document-capture-preview img{display:block;width:100%;height:100%;object-fit:contain;user-select:none;-webkit-user-drag:none}
.document-capture-pdf-preview{display:grid;place-items:center;gap:8px;min-height:9rem;color:var(--muted,#6b7772);text-align:center}
.document-capture-pdf-preview strong{font-size:28px;letter-spacing:.05em;color:var(--ink,#fff)}
.document-capture-selected-meta{min-height:1.35em;margin:0;color:var(--muted,#6b7772);font-size:12px;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.document-capture-selected-meta[data-state=error]{color:var(--theme-warning-text,#9b6100);font-weight:650}
.document-capture-selected-actions{display:flex;align-items:center;justify-content:center;gap:6px;flex:none}
.document-capture-selected-actions button{min-width:40px;min-height:40px;padding:7px 10px}
.document-capture-pages{display:flex;gap:8px;min-width:0;overflow-x:auto;overscroll-behavior-inline:contain;scroll-snap-type:x proximity;padding:2px 2px 4px;flex:none}
.document-capture-page-thumb{position:relative;box-sizing:border-box;display:grid;grid-template-rows:72px auto;gap:4px;flex:0 0 62px;width:62px;padding:3px;border:1px solid var(--theme-divider,#cad2ce);border-radius:9px;background:transparent;color:inherit;scroll-snap-align:center;text-align:center}
.document-capture-page-thumb[aria-current=true]{border:2px solid var(--theme-accent,#287459);padding:2px;background:var(--theme-selected,rgba(40,116,89,.1))}
.document-capture-page-thumb[data-state=error]{border-color:var(--theme-warning-border,#b67b18)}
.document-capture-page-thumb img{display:block;width:100%;height:72px;object-fit:cover;border-radius:5px}
.document-capture-page-thumb .document-capture-page-thumb-pdf{display:grid;place-items:center;height:72px;border-radius:5px;background:var(--theme-surface-soft,rgba(128,128,128,.08));font-size:11px;font-weight:800}
.document-capture-page-thumb span:last-child{font-size:11px;line-height:1.2;white-space:nowrap}
.document-capture-feedback{display:grid;gap:5px;flex:none;min-width:0}
.document-capture-feedback p{min-height:1.35em;margin:0;color:var(--muted,#6b7772);font-size:12px;line-height:1.35;text-align:center}
.document-capture-feedback p[data-state=error]{color:var(--theme-conflict-text,#a2332b);font-weight:650}
.document-capture-feedback p[data-state=warning]{color:var(--theme-warning-text,#9b6100);font-weight:650}
.document-capture-feedback p[data-state=success]{color:var(--theme-selected-text,#1d654d);font-weight:650}
.document-capture-feedback progress{display:block;width:100%;accent-color:var(--theme-accent,#287459)}
.document-capture-workspace-footer{display:flex;gap:7px;flex:none}
.document-capture-workspace-footer button{flex:1 1 0;min-width:0;min-height:44px;margin:0}
.document-capture-workspace-footer [data-capture-finish]{font-weight:750}
.document-capture-launch{display:grid;gap:6px;min-width:0}
.document-capture-launch button{width:100%}
.document-capture-workspace :focus-visible{outline:3px solid var(--theme-focus,#ffd277);outline-offset:2px}
@media(max-width:520px){
    .document-capture-workspace{padding:max(10px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left))}
    .document-capture-selected-actions{justify-content:stretch}
    .document-capture-selected-actions button{flex:1;min-width:0;padding-inline:7px}
}
