/* A câmera ocupa uma superfície própria e preserva todo o quadro do sensor. */
.camera-overlay{position:fixed;inset:0;z-index:10050;display:flex;align-items:center;justify-content:center;background:rgba(12,20,31,.76);padding:24px;overscroll-behavior:contain}
.camera-dialog{display:grid;grid-template-rows:auto minmax(120px,1fr) auto auto;width:min(100%,1050px);height:min(900px,calc(100dvh - 48px));min-width:0;overflow:hidden;border-radius:20px;background:#fff;color:var(--text,#163042);box-shadow:0 24px 80px #0007}
.camera-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 24px;border-bottom:1px solid var(--border,#dce4e8)}
.camera-header h2{font-size:1.25rem;margin:0;line-height:1.25}.camera-header h2:focus{outline:none}.camera-eyebrow{font-size:.65rem;letter-spacing:.14em;font-weight:700;color:var(--muted,#627580);margin:0 0 5px}.camera-close{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;border:1px solid var(--border,#dce4e8);border-radius:12px;background:#fff;font-size:28px;color:inherit;cursor:pointer}
.camera-stage{position:relative;min-height:0;min-width:0;overflow:hidden;background:#12181f;display:flex;align-items:center;justify-content:center}.camera-stage video,.camera-stage img{display:block;width:100%;height:100%;object-fit:contain;max-width:none;max-height:none}.camera-stage video{transform:none}.camera-guide{pointer-events:none;position:absolute;width:80%;height:74%;max-width:760px;border-radius:12px;border:1px solid #ffffff55}.camera-guide i{position:absolute;width:22px;height:22px;border-color:#fff;border-style:solid}.camera-guide i:nth-child(1){top:-1px;left:-1px;border-width:3px 0 0 3px;border-radius:12px 0 0}.camera-guide i:nth-child(2){top:-1px;right:-1px;border-width:3px 3px 0 0;border-radius:0 12px 0 0}.camera-guide i:nth-child(3){bottom:-1px;left:-1px;border-width:0 0 3px 3px;border-radius:0 0 0 12px}.camera-guide i:nth-child(4){bottom:-1px;right:-1px;border-width:0 3px 3px 0;border-radius:0 0 12px}.camera-guide-person{width:44%;height:78%;max-width:340px;border-radius:45%;border:2px dashed #ffffffcc}.camera-guide-person i{display:none}.camera-resolution{position:absolute;bottom:10px;right:12px;border-radius:6px;background:#0009;color:#fff;padding:4px 8px;font-size:.7rem;font-variant-numeric:tabular-nums}.camera-stage-status{position:absolute;color:#fff;font-size:1rem}.camera-error{position:absolute;max-width:440px;width:calc(100% - 32px);padding:20px;text-align:center;background:#fff;border-radius:14px;color:var(--text,#163042);box-shadow:0 12px 40px #0005}.camera-error p{font-size:.9rem;line-height:1.5;margin:8px 0 14px}.camera-instructions{padding:10px 24px;text-align:center;border-bottom:1px solid var(--border,#dce4e8)}.camera-instructions p{margin:0;font-size:.85rem;line-height:1.4;color:var(--muted,#627580)}.camera-instructions small{display:block;color:var(--warning,#946500);margin-top:4px}
.camera-controls{display:flex;align-items:center;justify-content:center;gap:14px;padding:16px 24px;flex-wrap:wrap;background:#fff;min-width:0}.camera-controls-live{display:grid;grid-template-columns:minmax(0,1fr) 68px minmax(0,1fr)}.camera-controls-live>.camera-file{justify-self:end;width:100%}.camera-controls-live .camera-zoom{grid-column:1/-1}.camera-controls .btn{min-height:44px;white-space:normal;text-align:center}.camera-options{display:flex;align-items:center;gap:10px;flex:1;min-width:0}.camera-controls>.camera-file{flex:1;max-width:180px;margin:0;display:flex;align-items:center;justify-content:center;position:relative;overflow:hidden;cursor:pointer}.camera-file input{position:absolute;width:1px;height:1px;opacity:0;left:8px;bottom:8px}.camera-file:focus-within{outline:3px solid var(--primary,#007d83);outline-offset:3px}.camera-shutter{flex:0 0 68px;display:grid;place-items:center;width:68px;height:68px;border-radius:50%;border:3px solid var(--primary,#006d77);padding:5px;background:#fff;cursor:pointer}.camera-shutter span{width:100%;height:100%;border-radius:50%;background:var(--primary,#006d77)}.camera-shutter:disabled{opacity:.35;cursor:default}.camera-device{font-size:.7rem;color:var(--muted,#627580);min-width:0;max-width:190px}.camera-device select{display:block;width:100%;min-width:0;height:36px;font-size:.8rem}.camera-zoom{display:flex;gap:12px;align-items:center;flex-basis:100%;justify-content:center;font-size:.75rem;color:var(--muted,#627580)}.camera-zoom input{max-width:240px;width:50%;accent-color:var(--primary,#006d77)}
@media(max-width:640px){.camera-overlay{padding:0}.camera-dialog{width:100%;height:100dvh;max-height:none;border-radius:0;grid-template-rows:auto minmax(100px,1fr) auto auto}.camera-header{padding:calc(12px + env(safe-area-inset-top)) 16px 12px}.camera-header h2{font-size:1.1rem}.camera-controls{padding:12px 12px calc(12px + env(safe-area-inset-bottom));gap:9px}.camera-controls .btn{font-size:.8rem;padding:10px 12px}.camera-controls-live{grid-template-columns:minmax(0,1fr) 62px minmax(0,1fr)}.camera-shutter{width:62px;height:62px;flex-basis:62px}.camera-options{flex:1}.camera-device{display:none}.camera-controls>.camera-file{flex:1;max-width:none}.camera-guide{width:90%;height:62%}.camera-guide-person{width:65%;height:65%}.camera-instructions{padding:10px 16px}.camera-instructions p{font-size:.78rem}.camera-error{padding:16px}.camera-error p{font-size:.8rem}}
@media(max-height:520px) and (orientation:landscape){.camera-overlay{padding:0}.camera-dialog{width:100%;height:100dvh;border-radius:0;grid-template-columns:minmax(0,1fr) 190px;grid-template-rows:60px minmax(0,1fr) 44px}.camera-header{grid-column:1/-1;padding:7px 16px}.camera-header h2{font-size:1rem}.camera-eyebrow{display:none}.camera-stage{grid-column:1;grid-row:2}.camera-instructions{grid-column:1;grid-row:3;padding:5px 10px;align-self:center;border:0}.camera-instructions p{font-size:.7rem;line-height:1.2}.camera-controls{display:flex;grid-column:2;grid-row:2/4;flex-direction:column;justify-content:center;gap:9px;padding:10px calc(12px + env(safe-area-inset-right)) 10px 12px;border-left:1px solid var(--border,#dce4e8);flex-wrap:nowrap}.camera-options{flex:0;flex-wrap:wrap;justify-content:center}.camera-controls>.camera-file{flex:0;width:100%;max-width:none}.camera-device{display:none}.camera-controls .btn{padding:8px 12px;font-size:.8rem;width:100%}.camera-shutter{width:60px;height:60px;flex-basis:60px}.camera-guide{height:80%;width:80%}.camera-guide-person{height:82%;width:45%}.camera-zoom{flex-basis:auto;display:block;text-align:center}.camera-zoom input{display:block;width:100%;margin-top:4px}.camera-error{padding:10px}.camera-error p{margin:5px 0;font-size:.75rem}.camera-error strong{font-size:.85rem}.camera-error .btn{min-height:32px;padding:5px 12px}}
@media(prefers-reduced-motion:reduce){.camera-dialog *{transition:none!important}}
