/* v1.15.52: one framing rule for pixels, landmarks and manual point editing. */
#s-camera .cam-frame :is(video,#liveCanvas,#frozenImg){position:absolute!important;inset:0!important;width:100%!important;height:100%!important;object-fit:var(--camera-fit,cover)!important;object-position:center!important;transform:none!important}
body #s-report #reportPhoto{object-fit:contain!important;object-position:center!important}
body[data-app-role] #s-report #reportPhoto{object-fit:contain!important;object-position:center!important}
body.capture-screen{height:100dvh;min-height:0;padding:4px 8px max(4px,env(safe-area-inset-bottom));overflow:hidden;gap:4px}
body.capture-screen>.brand,body.capture-screen>.subtitle,body.capture-screen #accountIdentityBar,body.capture-screen #stepper,body.capture-screen .footer-note,body.capture-screen #portalReturnBar{display:none!important}
body.capture-screen #quickNav{margin:0!important;padding:0!important;flex:none;width:min(100%,540px);max-width:540px}
body.capture-screen #quickMember{display:none!important}
body.capture-screen #quickNav button{min-height:36px;padding:6px;font-size:13px}
body.capture-screen .phone,body.capture-screen.v113-scanner-mode .phone{flex:1!important;width:min(100%,540px)!important;max-width:540px!important;min-height:0!important;height:0!important;margin:0!important;padding:6px!important;border-radius:14px!important}
body.capture-screen #s-camera.active{display:grid!important;min-height:0;grid-template-rows:auto auto minmax(0,1fr) auto auto auto auto;grid-template-areas:'head' 'step' 'frame' 'status' 'controls' 'bottom' 'check';gap:4px;animation:none}
body.capture-screen #s-camera .topbar{grid-area:head;margin:0;min-height:34px;gap:8px}
body.capture-screen #s-camera .topbar .spacer{flex:1;width:auto}
body.capture-screen #s-camera .topbar .title{font-size:15px;white-space:nowrap}
body.capture-screen #s-camera .topbar .back{font-size:12px;white-space:nowrap}
body.capture-screen #s-camera .shooting-help{font-size:12px;min-height:32px;padding:5px 9px;white-space:nowrap;border:1px solid #bad7d3;border-radius:16px;background:#eef7f4;color:#174f4a}
body.capture-screen #s-camera .shooting-step{grid-area:step;margin:0;text-align:center;font-size:12px;line-height:1.4}
body.capture-screen #s-camera .cam-frame{grid-area:frame;width:100%!important;height:100%!important;min-height:0!important;max-height:none!important;aspect-ratio:auto!important;margin:0;border-radius:10px}
body.capture-screen #s-camera .portrait-guide{display:none}
body.capture-screen #s-camera .portrait-guide-label{font-size:11px;width:max-content;max-width:95%;white-space:normal;text-align:center;padding:3px 8px;bottom:5px}
body.capture-screen #s-camera .readiness{grid-area:status;margin:0;padding:3px 6px;border:0;background:transparent;font-size:11px}
body.capture-screen #s-camera #aiStatusMsg{display:none}
body.capture-screen #s-camera #readyMsg{font-size:11px;line-height:1.3}
body.capture-screen #s-camera .hold-bar{height:3px;margin-top:3px}
body.capture-screen #s-camera .capture-action-panel{grid-area:controls;margin:0;padding:2px;display:flex;justify-content:space-around;align-items:center;gap:8px}
body.capture-screen #s-camera .capture-side-btn{min-height:32px;padding:4px 10px;font-size:11px}
body.capture-screen #s-camera .capture-center .shutter{width:44px;height:44px}
body.capture-screen #s-camera .capture-label{font-size:10px;margin:1px 0}
body.capture-screen #s-camera .capture-bottom-row{grid-area:bottom;margin:0;display:flex;justify-content:center;gap:8px}
body.capture-screen #s-camera .shooting-fixed-check{grid-area:check;margin:0;padding:1px;font-size:10px;text-align:center;line-height:1.3}
body.capture-screen #s-camera :is(.portrait-tip,.cam-controls,.gallery-row,.gallery-hint,.bottom-nav){display:none!important}
/* Identical trailing controls on every result panel. */
#reportAccordion .single-panel-head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:6px!important;min-height:46px;flex-wrap:nowrap!important}
#reportAccordion .single-panel-title{flex:1;min-width:0;line-height:1.35}
#reportAccordion .panel-head-right{display:flex!important;align-items:center!important;justify-content:flex-end;gap:5px;flex:none;margin-left:auto}
#reportAccordion .panel-zoom-btn{display:inline-flex!important;justify-content:center;align-items:center;width:50px!important;min-width:50px!important;height:30px;min-height:30px;padding:0!important;margin:0!important;border-radius:15px;font-size:11px!important;white-space:nowrap}
#reportAccordion .acc-arrow{width:12px;text-align:center;flex:none;margin:0!important}
.metric-info{font:inherit;color:inherit;border:0;background:transparent;padding:6px 2px;min-height:34px;cursor:pointer;text-align:center;border-radius:6px;max-width:100%}
.metric-info .metric-info-icon{font-size:12px;color:#087f78;margin-left:3px}
.metric-info:focus-visible{outline:2px solid #087f78;outline-offset:2px}
.metric-help-dialog{color:#163e40;background:#fff;border:0;border-radius:20px;padding:22px;width:min(440px,calc(100vw - 24px));max-height:85dvh;overflow:auto;box-shadow:0 15px 70px #0006}
.metric-help-dialog::backdrop{background:#061d25aa}
.metric-help-dialog header{display:flex;align-items:center;justify-content:space-between;gap:12px}
.metric-help-dialog h2{font-size:19px;margin:0}
.metric-help-dialog header button{flex:none;min-height:40px;padding:7px 12px;border:0;border-radius:10px;background:#e9f4f1;color:#164a47;font:inherit;cursor:pointer}
.metric-help-dialog h3{font-size:14px;margin:20px 0 6px}
.metric-help-dialog p{font-size:14px;line-height:1.7;margin:0}
.metric-help-value{font-size:24px;font-weight:800;background:#eaf6f3;border-radius:12px;margin-top:16px;padding:14px}
.metric-help-dialog a{display:inline-block;margin-top:18px;font-size:12px;color:#087f78}
.metric-help-dialog a[hidden]{display:none}

/* Portrait viewport: keep source vertical extent while trimming lateral background. */
body.capture-screen #s-camera .cam-frame{width:min(100%,var(--camera-frame-width,100%))!important;justify-self:center}
body.capture-screen #s-camera .capture-side-btn{min-width:86px;min-height:48px;padding:9px 14px;font-size:15px;border-radius:15px}
body.capture-screen #s-camera .capture-center .shutter{width:52px;height:52px}
body.capture-screen #compactGalleryBtn,body.capture-screen #compactNextBtn{display:flex;gap:6px;align-items:center;justify-content:center}
#s-report #reportPhoto{max-width:100%;object-fit:contain!important}
.exercise-head{grid-template-columns:auto minmax(0,1fr)!important;cursor:default}
.curriculum-exercise .exercise-guide-btn{font-size:12px;padding:8px 10px;margin:6px 0}
#exerciseGuideModal:not(.open){display:none!important}
