/* Scope all geometry to the mounted identity stage. No global overflow clamp. */
body.ix-active #app-header .row.sub,body.ix-active #app-header .odeen-header-inline-title,body.ix-active #bottom-nav{display:none!important}
body.ix-active #app-content{padding:0!important;overflow:hidden!important;display:flex!important;flex-direction:column!important}
body.ix-active #app-content>.ix-ready{width:100%!important;max-width:600px!important;margin:0 auto!important;padding:0!important;height:100%!important;min-height:0!important;flex:1 1 0!important;display:flex!important;flex-direction:column!important;background:#f7faf8!important;color:#0f2d4d!important;direction:inherit!important;overflow:visible!important}
.ix-ready [hidden]{display:none!important}
.ix-head{display:flex;align-items:center;gap:14px;min-height:48px;flex:none;padding:6px 20px;direction:inherit}
.ix-counter{white-space:nowrap;direction:ltr;font-size:14px;font-weight:600;color:#5c716b}
.ix-progress{appearance:none;width:100%;height:5px;flex:1;border:0;border-radius:4px;background:#dce7e2;overflow:hidden}
.ix-progress::-webkit-progress-bar{background:#dce7e2;border-radius:4px}.ix-progress::-webkit-progress-value{background:#15803d;border-radius:4px}.ix-progress::-moz-progress-bar{background:#15803d}
.ix-info,.ix-back{min-height:44px;flex:none;border:1px solid #dce7e2;border-radius:16px;background:#fff;color:#0f2d4d;padding:10px 15px;font:inherit;cursor:pointer}
.ix-stage{flex:1 1 0;min-height:0;padding:14px 24px 12px;display:flex;flex-direction:column;gap:10px;overflow:auto;overscroll-behavior:contain;scroll-padding:12px}
body.ix-active #app-content .ix-title{font-size:clamp(23px,5vw,29px)!important;line-height:1.22!important;margin:0!important;flex:none;font-weight:700!important;letter-spacing:-.025em!important;text-align:start!important}
body.ix-active #app-content .ix-help{font-size:15px!important;line-height:1.5!important;font-weight:400!important;color:#5c716b!important;margin:0 0 8px!important;flex:none;text-align:start!important}
.ix-status{font-size:13px;line-height:1.4;color:#36574b;margin:0;flex:none}
body.ix-active #app-content .ix-stage>:is(.cap-card,.cap-idcheck,.cap-signature-card){padding:0!important;margin:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;min-height:0!important;flex:1 1 0;display:flex;flex-direction:column;gap:10px}
.ix-ready :is(.cap-section-title,.cap-mobile-panel>strong,.cap-mobile-panel>p,.cap-profile-box){display:none!important}
.ix-ready #qualityBox,.ix-ready #ocrBox,.ix-ready #msg,.ix-ready .cap-idcheck>.cap-muted,.ix-ready .cap-signature-card>.cap-muted{display:none!important}
.ix-ready .cap-mobile-panel{background:transparent!important;border:0!important;padding:0!important}
.ix-ready:not(.ix-has-preview) .cap-mobile-panel:before{content:'';display:block;width:min(100%,320px);height:145px;border:2px dashed #b8d5c3;border-radius:20px;background:linear-gradient(90deg,transparent 16%,#dff3e6 16% 36%,transparent 36%),linear-gradient(0deg,transparent 36%,#e7f3ec 36% 40%,transparent 40% 56%,#e7f3ec 56% 60%,transparent 60%);margin:26px auto}
.ix-ready .cap-actions{flex:none;margin:0!important;gap:8px!important;overflow:visible!important;flex-wrap:wrap!important}
.ix-ready .cap-btn{font:inherit!important;font-size:14px!important;font-weight:600!important;min-height:44px!important;border-radius:14px!important;padding:9px 14px!important;box-shadow:none!important;white-space:normal!important}
.ix-ready #previewWrap{min-height:0;flex:1 1 0}
.ix-ready .cap-stage.preview{max-height:calc(var(--os2-height,100dvh) * .34);border:1px solid #dce7e2!important;border-radius:18px!important;background:#fff!important}
.ix-ready #previewImg{width:100%;height:auto;max-height:calc(var(--os2-height,100dvh) * .32);object-fit:contain}
.ix-ready #previewWrap>.cap-actions{margin-top:10px!important}
.ix-ready #cameraWrap .cap-stage video{height:clamp(120px,30vh,260px)!important}
.ix-ready #cameraWrap .cap-hint{font-size:13px;padding:6px;min-height:0}
.ix-ready #cameraWrap .cap-holdbar{height:5px;margin:4px 0}
.ix-report-link{display:block;align-self:center;flex:none;min-height:36px;padding:6px;background:none;border:0;color:#36574b;text-decoration:underline;font:inherit;font-size:13px;cursor:pointer}
.ix-ready .cap-id-row{display:flex!important;flex-direction:column;align-items:stretch;gap:8px!important;flex:none}
.ix-ready .cap-field label{font-size:14px!important;margin:0 0 6px!important;font-weight:600!important}
.ix-ready .cap-input{height:52px!important;padding:12px 14px!important;font:inherit!important;font-size:18px!important;font-weight:500!important;border:1px solid #ccdcd4!important;border-radius:16px!important;background:#fff!important;direction:ltr!important;text-align:left!important}
.ix-ready .cap-status-pill{font-size:13px!important;font-weight:600!important;padding:7px 10px!important;align-self:start;white-space:normal!important}
.ix-ready .cap-confirm-row{font-size:14px!important;line-height:1.5!important;font-weight:500!important;background:#fff!important;margin:4px 0 0!important;padding:13px!important;border:1px solid #dce7e2!important;border-radius:16px!important;flex:none}
.ix-ready .cap-confirm-row input{width:22px;height:22px;accent-color:#15803d!important;flex:none}
.ix-ready .cap-signature-card{justify-content:center}
.ix-ready #sigPadWrap{flex:none!important;width:100%;border:1px solid #ccdcd4;border-radius:18px!important;height:auto!important;aspect-ratio:1.7;max-height:280px;overflow:hidden;background:#fff;touch-action:none}
.ix-ready #sigCanvas{width:100%!important;height:100%!important;display:block;touch-action:none;background:#fff!important}
.ix-ready #sigExistingWrap{flex:0 1 auto!important;min-height:0;border:1px solid #ccdcd4;border-radius:18px;overflow:hidden}
.ix-ready #sigExistingImg{width:100%;max-height:260px;object-fit:contain;background:#fff}
.ix-footer{padding:10px 24px calc(10px + env(safe-area-inset-bottom,0px));flex:none;border-top:1px solid #e3ebe6;background:#f7faf8;display:flex;flex-direction:column;gap:6px}
.ix-actions{display:flex;gap:10px;align-items:stretch;flex:none}
.ix-actions .ix-back{order:0;flex:0 0 auto;min-width:64px;max-width:34%;font-size:15px}
body.ix-active #app-content .ix-actions>:is(.ix-next,#btnMobileCamera,#btnCapture,#btnApproveAll){order:1;flex:1!important;width:auto!important;min-width:0;min-height:50px!important;border:1px solid #15803d!important;border-radius:16px!important;padding:11px 14px!important;background:#15803d!important;background-image:none!important;color:#fff!important;box-shadow:none!important;font:inherit!important;font-size:16px!important;font-weight:600!important;white-space:normal!important;line-height:1.3!important}
.ix-actions>button:disabled{opacity:.42;cursor:not-allowed}
.ix-error:empty,.ix-ready #finalMsg:empty{display:none}
.ix-error,.ix-ready #finalMsg{margin:0!important;max-height:70px;overflow:auto;white-space:pre-line;font-size:13px!important;font-weight:500!important;line-height:1.4!important}
.ix-error{color:#b91c1c}.ix-ready #finalMsg{order:-1;color:#36574b}
.ix-compact .ix-head,.ix-compact .ix-help,.ix-compact .ix-status{display:none!important}
.ix-compact .ix-stage{padding:8px 18px;gap:6px}
body.ix-active #app-content .ix-compact .ix-title{font-size:21px!important}
.ix-compact .cap-confirm-row{font-size:13px!important;padding:8px!important}
.ix-compact .ix-footer{padding:7px 18px calc(7px + env(safe-area-inset-bottom,0px))}
.ix-compact #sigPadWrap{aspect-ratio:auto;max-height:145px;height:clamp(75px,calc(var(--os2-height,100dvh) - 220px),145px)!important}
.ix-compact #sigExistingImg{max-height:145px}
.ix-dialog{border:1px solid #dce7e2;border-radius:22px;background:#fff;color:#0f2d4d;width:calc(100% - 28px);max-width:540px;max-height:85dvh;padding:0;overflow:hidden;font:inherit}
.ix-dialog[open]{display:flex;flex-direction:column}.ix-dialog::backdrop{background:rgba(15,45,77,.35)}
.ix-dialog-head{padding:14px;display:flex;align-items:center;justify-content:space-between;gap:10px;border-bottom:1px solid #dce7e2;flex:none}.ix-dialog-head h2{font-size:18px;margin:0}
.ix-dialog-content{min-height:0;overflow:auto;padding:16px;font-size:15px;line-height:1.6;white-space:pre-line}
@media(max-height:650px){.ix-stage{padding:10px 20px;gap:8px}.ix-head{min-height:44px}.ix-ready:not(.ix-has-preview) .cap-mobile-panel:before{height:110px;margin:10px auto}.ix-ready #sigPadWrap{max-height:210px}.ix-ready .cap-confirm-row{font-size:13px!important}}
@media(max-height:400px){.ix-ready .cap-mobile-panel:before{display:none!important}.ix-ready #previewImg{max-height:90px}.ix-ready #cameraWrap .cap-stage video{height:90px!important}}
body.ix-active.os2-keyboard #app-header .row.top{height:44px!important;min-height:44px!important}

@media(max-height:650px){.ix-ready[data-ix-step="1"] .ix-help{display:none!important}.ix-ready .cap-stage.preview{max-height:150px}.ix-ready #previewImg{max-height:145px}}

/* Keep the signing surface at a constant aspect ratio, including landscape. */
.ix-ready #sigPadWrap{width:min(100%,476px)!important;align-self:center;aspect-ratio:1.7!important;height:auto!important;max-height:none!important}
@media(max-height:650px){.ix-ready #sigPadWrap{max-width:357px!important}}
.ix-ready.ix-compact #sigPadWrap{--ix-pad-h:clamp(75px,calc(var(--os2-height,100dvh) - 220px),145px);max-width:calc(var(--ix-pad-h) * 1.7)!important;aspect-ratio:1.7!important;height:auto!important;max-height:none!important}

/* Visible save failures and actionable retry: never hide the reason for a disabled next step. */
.ix-blocker{flex:none;margin:0 0 8px;padding:10px 12px;border:1px solid #e7cfaa;border-radius:12px;background:#fff8eb;color:#714619;font-size:14px;line-height:1.5;overflow-wrap:anywhere}
@media(max-height:650px){.ix-blocker{font-size:13px;padding:8px 10px;margin-bottom:4px}}
