/* Contact library, side panel and touch layouts. */
.app{min-width:0}.app>main{max-width:none}header{position:relative;z-index:15}.heading-actions{flex-wrap:wrap}.page-heading{align-items:flex-start}.filterbar{flex-wrap:wrap}.filterbar select{max-width:100%}.filterbar .searchbox{flex:1 1 290px}.metrics .metric{min-width:0}footer{padding-bottom:90px}
.table-scroll{max-width:100%;overflow:auto;overscroll-behavior-x:contain}.library table{min-width:1500px;table-layout:fixed}.library th{width:auto}.library th:nth-child(1){width:44px}.library th:nth-child(2){width:290px}.library th:nth-child(3){width:160px}.library th:nth-child(4){width:265px}.library th:nth-child(5){width:270px}.library th:nth-child(6){width:170px}.library th:nth-child(7){width:145px}.library th:nth-child(8){width:125px}.library th:nth-child(9){width:32px}.library td{vertical-align:middle;overflow-wrap:anywhere}.library .check-col{padding:14px 12px;width:44px}.person-cell .real-thumb{width:100px;height:66px;flex-shrink:0}.person-info{flex:1;min-width:0}.person-info b{display:block;overflow-wrap:anywhere;white-space:normal}.contact-line{display:flex;gap:8px;align-items:flex-start;line-height:1.8;color:#34445d}.contact-line svg{width:15px;height:15px;margin-top:6px;color:#68758a}.contact-line span{min-width:0;overflow-wrap:anywhere}.address-text{font-size:13px;line-height:1.8;color:#40516b;margin-bottom:7px}.mobile-list-label{display:none}.opened-row{background:#fff5f6}.opened-row .identity-cell{box-shadow:inset 3px 0 #d83249}.library tr[data-contact]{cursor:pointer}.library tr[data-contact]:focus-visible{outline:3px solid #d7909c;outline-offset:-3px}.library .date-group td{position:static}
.contact-drawer{position:fixed;z-index:100;top:74px;right:0;bottom:0;width:min(510px,60vw);background:#fff;border-left:1px solid #dce2eb;box-shadow:-12px 0 35px #21345110;display:flex;flex-direction:column;min-width:0}.drawer-heading{display:flex;gap:15px;justify-content:space-between;align-items:flex-start;padding:24px 24px 18px;border-bottom:1px solid #e4e7ed;background:#fff;flex-shrink:0}.drawer-heading h1{font-size:23px;line-height:1.6;overflow-wrap:anywhere;margin:2px 0}.drawer-heading p{font-size:14px;line-height:1.8;margin:3px 0;color:#52627b;overflow-wrap:anywhere}.drawer-controls{display:flex;align-items:center;gap:5px;flex-shrink:0}.drawer-controls>button:not(.icon){padding:8px 13px}.drawer-content{padding:22px 22px 110px;overflow:auto;min-height:0;overscroll-behavior:contain;scrollbar-gutter:stable}.contact-drawer .panel{margin:0 0 18px;padding:21px 18px;border:1px solid #e3e7ee;border-radius:10px;box-shadow:none;min-width:0}.contact-drawer .section-head{flex-wrap:wrap;align-items:center;gap:10px}.contact-drawer h2{font-size:17px}.contact-drawer .section-head button{font-size:12px;padding:6px 9px;min-height:40px}.contact-drawer .info-row{display:grid;grid-template-columns:88px minmax(0,1fr) 36px;gap:9px;align-items:start;padding:13px 0}.contact-drawer .info-label{width:auto;font-size:12px;color:#647189;line-height:1.9}.contact-drawer .info-value{font-size:14px;color:#263b55;min-width:0;line-height:1.85;overflow-wrap:anywhere}.contact-drawer .copy-button{min-width:36px;min-height:36px;padding:5px;margin-top:-4px}.contact-drawer .card-stage{padding:12px;min-height:160px}.contact-drawer .card-stage img{max-height:350px}.contact-drawer .card-view-controls{flex-wrap:wrap;align-items:center}.contact-drawer .company-summary{white-space:pre-line;font-size:14px;line-height:1.95}.contact-drawer .source{overflow-wrap:anywhere}.contact-drawer .memo{font-size:14px;line-height:1.95;white-space:normal;overflow-wrap:anywhere}.contact-drawer .contact-actions{gap:8px}.wide-action{width:100%;margin-top:14px;font-size:13px}.button-link{display:inline-flex;justify-content:center;align-items:center;gap:8px;border:1px solid #dce2eb;border-radius:7px;background:#fff;padding:9px 13px;min-height:44px;font-size:14px;font-weight:600}.button-link:hover{background:#f5f7fb}.connection-settings{border-top:1px solid #e3e7ed;margin-top:24px;padding-top:12px}.connection-settings h3{font-size:16px}.connection-settings .info-row{gap:12px;justify-content:space-between;overflow-wrap:anywhere}
.nav-scrim{position:fixed;inset:0;z-index:700;border:0;border-radius:0;background:#17283e66;width:100%;height:100%;padding:0}.photo-controls{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0}.photo-controls button{flex:1;font-size:13px;min-height:46px}dialog input[type=file][hidden]{display:none}.photo-upload>label{font-size:15px;font-weight:600}.editor-layout>div,.form-fields label{min-width:0}#editor{max-height:92vh;max-height:92dvh}#editor .dialog-top{align-items:center}.form-fields textarea{max-width:100%}.form-fields input,.form-fields select,.form-fields textarea{font-size:16px}#ocrStatus{margin:0;line-height:1.9}#retryOcr{margin-top:12px}.chat-toggle{position:fixed;z-index:600;right:24px;bottom:calc(22px + env(safe-area-inset-bottom));min-height:50px;background:#fff;color:#a13c55;border:1px solid #e5c5ce;border-radius:28px;padding:12px 20px;box-shadow:0 5px 25px #26394f18;font-size:14px}.chat-toggle svg{width:20px;height:20px}.ai-chat{position:fixed;z-index:900;right:24px;bottom:calc(84px + env(safe-area-inset-bottom));width:430px;max-width:calc(100vw - 32px);height:min(710px,calc(100dvh - 110px));background:#fff;border:1px solid #dce2eb;border-radius:16px;box-shadow:0 12px 70px #172c4530;display:flex;flex-direction:column;overflow:hidden}.chat-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:15px 17px;border-bottom:1px solid #e4e7ed;flex-shrink:0}.chat-heading b{font-size:16px}.chat-heading small{display:block;font-size:11px;color:#68758a}.chat-heading>div:last-child{display:flex;gap:6px}.chat-heading button{font-size:12px;min-height:40px;padding:6px 10px}.chat-heading button.icon{font-size:24px}.chat-messages{flex:1;overflow:auto;min-height:0;overscroll-behavior:contain;padding:18px 15px;display:flex;flex-direction:column;gap:13px}.chat-bubble{max-width:95%;padding:12px 14px;border-radius:12px;background:#f1f4f8;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.9;font-size:14px;color:#30435d;flex-shrink:0}.chat-bubble.user{align-self:flex-end;background:#faedef;color:#5c293b}.chat-bubble.error{background:#fff2ee;color:#994b34}.chat-bubble.loading{color:#64758c}.chat-suggestions{display:flex;gap:7px;overflow:auto;padding:7px 13px;flex-shrink:0}.chat-suggestions button{font-size:11px;min-height:36px;padding:6px 10px;border-radius:18px;flex-shrink:0}.chat-form{display:flex;align-items:flex-end;gap:8px;padding:10px 13px 0;flex-shrink:0}.chat-form textarea{font-size:16px;min-height:62px;max-height:150px;resize:vertical;padding:10px 12px;line-height:1.6;min-width:0;flex:1}.chat-form button{min-height:46px;padding:8px 12px}.chat-note{font-size:10px;line-height:1.6;color:#69758a;margin:7px 14px 12px;flex-shrink:0}.chat-results{padding:12px;border:1px solid #dfe5ee;border-radius:10px;flex-shrink:0;max-height:330px;overflow:auto}.chat-results>strong{display:block;font-size:12px;margin-bottom:8px;color:#526680}.chat-contact{display:flex;flex-direction:column;align-items:flex-start;text-align:left;width:100%;white-space:normal;min-height:54px;border:0;border-bottom:1px solid #e8ecf2;border-radius:0;background:#fff;padding:9px 3px;gap:3px}.chat-contact b{font-size:14px}.chat-contact small{font-size:12px;line-height:1.8;color:#5f7189}.chat-plan{padding:15px;border:1px solid #e6c8d1;border-radius:10px;background:#fff8fa;flex-shrink:0}.chat-plan p{font-size:13px;white-space:pre-wrap;line-height:1.9;overflow-wrap:anywhere;margin:0 0 14px}.chat-plan button{width:100%}.chat-download{font-size:13px;flex-shrink:0}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
@media(min-width:1500px){.app.has-detail{margin-right:510px}.app.has-detail .page-heading{flex-direction:column}.app.has-detail .metrics{gap:10px}.app.has-detail .metric{padding:14px 10px}.app.has-detail .metric-icon{width:32px;height:32px}.app.has-detail .metric small{font-size:11px}}
@media(max-width:1100px){.contact-drawer{width:500px;max-width:70vw}.drawer-content{padding:18px 18px 100px}.drawer-heading{padding:20px}.sidebar.mobile-open{z-index:800}.page-heading{flex-direction:column}.heading-actions{width:100%}}
@media(max-width:960px){.editor-layout{grid-template-columns:1fr}#editor{width:min(680px,96vw)}.metrics{gap:8px}.metric{padding:14px 10px}.metric small{font-size:11px}.heading-actions button{font-size:13px}}
@media(max-width:800px){.sidebar.mobile-open{display:flex;z-index:800;max-width:calc(100vw - 55px)}.sidebar.mobile-open .brand,.sidebar.mobile-open .workspace,.sidebar.mobile-open .nav-label,.sidebar.mobile-open .side-bottom{display:flex}.sidebar.mobile-open .brand>span{display:block}.sidebar.mobile-open .nav-label{align-items:center}.sidebar.mobile-open #groups{display:block;overflow:auto;min-height:0}.sidebar.mobile-open .nav{font-size:14px;justify-content:flex-start;white-space:normal}.sidebar.mobile-open .side-bottom{flex-direction:column;align-items:stretch}.sidebar.mobile-open .nav span{display:inline-block}.app>main{padding:24px 18px}.filterbar select{font-size:16px}.searchbox input{font-size:16px}.metric-value{font-size:27px}}
@media(max-width:740px){
 body{overflow-x:hidden}.app>main{padding:20px 14px}.heading-actions{gap:7px}.heading-actions button{flex:1;padding:8px 10px;font-size:12px;min-height:46px}.page-heading{gap:15px;margin-bottom:20px}.page-heading h1{font-size:26px}.page-heading p{font-size:13px}.metrics{gap:7px}.metric{padding:12px 9px;display:block}.metric-icon{width:29px;height:29px;margin-bottom:6px}.metric small{font-size:10px;white-space:normal}.metric-value{font-size:25px}.filterbar{padding:15px 13px;gap:9px}.filterbar .searchbox{flex:1 1 100%;min-width:0}.filterbar select{flex:1 1 40%;width:40%;min-width:0;font-size:16px;padding:9px 8px}.result-line{padding:0 14px 13px}.result-line>span{font-size:11px}.library-head{padding:5px 14px 0}.tabs button:nth-child(2){display:inline-flex}.library .table-scroll{overflow:visible}.library table{min-width:0;width:100%;display:block}.library thead{display:none}.library tbody{display:block}.library tbody tr[data-contact]{display:grid;grid-template-columns:22px minmax(0,1fr) minmax(0,1fr);gap:9px 10px;position:relative;padding:17px 14px;border-top:1px solid #e4e7ed;min-height:0}.library tbody tr[data-contact]>td{border:0;height:auto;padding:0;margin:0;width:auto;position:static;min-width:0;font-size:13px}.library tr[data-contact] .check-col{grid-column:1;grid-row:1;align-self:start;padding-top:6px;width:22px}.library .identity-cell{grid-column:2/4;grid-row:1}.library .role-cell{display:block;grid-column:2/4;grid-row:2}.library .role-cell.no-value{display:none}.library .contact-cell{display:block;grid-column:2/4;grid-row:3}.library .location-cell{display:block;grid-column:2/4;grid-row:4}.library .group-cell{display:block;grid-column:2/4;grid-row:5}.library .owner-cell{display:block;grid-column:2;grid-row:6}.library .registered-cell{display:block;grid-column:3;grid-row:6}.library tr[data-contact]>td:last-child{position:absolute;right:10px;top:19px;font-size:20px}.person-cell{gap:12px;align-items:center;padding-right:9px}.person-cell .real-thumb{width:88px;height:58px}.person-info b{font-size:16px;line-height:1.7}.person-info small{font-size:13px}.mobile-list-label{display:block;font-size:10px;line-height:1.4;color:#6a778a;margin-bottom:4px;font-weight:500}.contact-line{font-size:14px;line-height:1.85;gap:7px}.address-text{font-size:13px;line-height:1.85;margin-bottom:5px}.library .date-group{display:block;padding:0;border:0}.library .date-group td{display:block;padding:11px 14px;height:auto;position:static}.opened-row .identity-cell{box-shadow:none}.library tr.opened-row{box-shadow:inset 3px 0 #d83249}.pagination{padding:14px 12px;gap:8px;flex-wrap:wrap}.pagination>div{max-width:100%}.pagination>span{font-size:11px}.bulk-bar{margin:0 12px 15px;padding:12px}.bulk-bar>div{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:7px}.bulk-bar button{font-size:12px;padding:7px 8px;min-height:44px;width:100%;white-space:normal}.bulk-bar b{font-size:14px}.contact-drawer{top:0;bottom:0;right:0;width:100%;max-width:none;border-left:0;z-index:500}.drawer-heading{padding:calc(15px + env(safe-area-inset-top)) 16px 15px;gap:10px}.drawer-heading h1{font-size:22px}.drawer-heading p{font-size:13px}.drawer-heading .eyebrow{font-size:9px}.drawer-controls button{min-height:44px;min-width:44px}.drawer-content{padding:15px 13px calc(110px + env(safe-area-inset-bottom));background:#f6f8fb}.contact-drawer .panel{padding:18px 15px;margin-bottom:14px}.contact-drawer .info-row{grid-template-columns:78px minmax(0,1fr) 34px;gap:8px;padding:13px 0}.contact-drawer .info-value{font-size:14px}.contact-drawer .info-label{font-size:12px}.contact-drawer .copy-button{min-width:36px;min-height:40px}.detail-open{overflow:hidden}.chat-toggle{right:14px;bottom:calc(15px + env(safe-area-inset-bottom));min-height:48px;padding:10px 15px;font-size:12px}.ai-chat{right:8px;bottom:calc(8px + env(safe-area-inset-bottom));width:calc(100vw - 16px);max-width:none;height:min(var(--available-chat-height,calc(100dvh - 16px)),calc(100dvh - 16px));border-radius:13px}.chat-heading{padding:12px 13px}.chat-form{padding:8px 11px 0;gap:7px}.chat-note{font-size:10px;margin-bottom:calc(9px + env(safe-area-inset-bottom))}.chat-messages{padding:15px 12px}.chat-bubble{font-size:14px;max-width:97%}.chat-suggestions button{font-size:11px;min-height:40px}.chat-form textarea{font-size:16px;min-height:62px;max-height:110px}.chat-form button{min-width:52px;min-height:46px}.chat-contact{min-height:58px}.chat-results{max-height:270px}.chat-plan button{min-height:46px}#editor{width:calc(100vw - 12px);max-width:none;padding:18px 14px;max-height:94vh;max-height:94dvh;border-radius:12px}#editor .dialog-top h2{font-size:22px}#editor .dialog-foot{bottom:-18px;gap:9px;padding:13px 0 calc(13px + env(safe-area-inset-bottom));flex-wrap:wrap}#saveStatus{max-width:100%;flex-basis:100%;font-size:12px}#editor .dialog-foot>button{min-height:46px;flex:1}.photo-upload{padding:15px;margin-top:16px}.photo-upload img{max-height:250px;object-fit:contain}#cropDialog{width:calc(100vw - 12px);padding:18px 14px;max-height:94vh;max-height:94dvh}#cropDialog .dialog-foot{gap:7px;flex-wrap:wrap}#cropDialog .dialog-foot button{flex:1;min-height:44px;font-size:12px;padding:8px 9px}#cropCanvas{max-height:58dvh}#actionDialog{width:calc(100vw - 12px);padding:20px 15px;max-height:94dvh}#actionDialog input,#actionDialog select,#actionDialog textarea{font-size:16px}#toast{max-width:calc(100vw - 24px);left:12px;right:12px;bottom:calc(78px + env(safe-area-inset-bottom));transform:none;font-size:13px;overflow-wrap:anywhere}footer{font-size:11px;line-height:1.9;padding-bottom:95px}
}

#cropCanvas{max-height:none!important;margin-inline:auto;object-fit:fill}
@media(max-width:740px){.contact-drawer .info-row{grid-template-columns:78px minmax(0,1fr) 44px}.contact-drawer .copy-button{min-width:44px;min-height:44px;margin-top:-6px}}

/* Capture and OCR comparison */
#cameraDialog{width:min(720px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;padding:22px}#cameraDialog p{font-size:15px;line-height:1.7;color:#374151}.camera-stage{position:relative;background:#15191d;aspect-ratio:4/3;border-radius:12px;overflow:hidden}.camera-stage video{width:100%;height:100%;object-fit:contain}.camera-guide{position:absolute;inset:18% 8%;border:3px dashed #fff;border-radius:10px;box-shadow:0 0 0 600px #0005;pointer-events:none}.camera-guide span{position:absolute;bottom:10px;left:0;right:0;text-align:center;background:#0008;color:white;padding:7px;font-size:15px}.camera-stage.portrait .camera-guide{inset:7% 27%}.photo-upload [data-photo-rotate]{margin-top:10px;min-height:44px}.ocr-reference{display:flex;gap:12px;overflow:auto;margin:18px 0}.ocr-reference img{max-width:260px;max-height:200px;object-fit:contain;border:1px solid #d9dce5;border-radius:8px}.ocr-change{display:flex;gap:12px;align-items:flex-start;border:1px solid #d9dce5;border-radius:10px;padding:16px;margin:10px 0;cursor:pointer}.ocr-change input{flex:none;width:20px;height:20px;margin-top:3px}.ocr-change span{min-width:0;overflow-wrap:anywhere}.ocr-change b,.ocr-change small,.ocr-change strong{display:block;line-height:1.7}.ocr-change small{color:#596273;font-size:14px;margin:5px 0}.ocr-change strong{color:#172b43;font-size:16px;font-weight:500}.ocr-warning{background:#fff6e4;padding:12px;color:#71500c}.ocr-comparison{max-height:45dvh;overflow:auto}@media(max-width:740px){#cameraDialog{padding:16px}.camera-stage{aspect-ratio:3/4}.camera-guide{inset:31% 5%}.camera-stage.portrait .camera-guide{inset:12% 14%}#cameraDialog .dialog-foot{flex-wrap:wrap}#cameraDialog button{min-height:44px}.ocr-change{padding:12px}.ocr-reference img{max-width:210px}}

.mail-generation-status{display:flex;align-items:flex-start;gap:10px;margin:12px 0 20px;padding:12px 14px;border:1px solid #d9dfe8;border-radius:9px;font-size:15px;line-height:1.7;color:#35455d;background:#f7f9fc;overflow-wrap:anywhere}.mail-generation-status.pending{color:#852139;background:#fff3f6;border-color:#edc4ce}.mail-generation-status.done{color:#215b47;background:#f0faf5;border-color:#b4d7c6}.mail-generation-status.error{color:#a21931;background:#fff2f3;border-color:#ebb5be}.generation-spinner{display:inline-block;flex:none;width:17px;height:17px;margin-top:4px;border:2px solid #dcb2bd;border-top-color:#b72c48;border-radius:50%;animation:generation-spin .9s linear infinite}#mailGeneratedPreview{padding:14px;border:1px solid #cbd5e1;border-radius:10px;margin:12px 0 20px}#mailGeneratedPreview button{min-height:44px}@keyframes generation-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.generation-spinner{animation:none}}

/* Compact library and viewport-contained capture */
.library table{min-width:1040px}.library th:nth-child(1){width:44px}.library th:nth-child(2){width:330px}.library th:nth-child(3){width:320px}.library th:nth-child(4){width:95px}.library th:nth-child(5){width:130px}.library th:nth-child(6){width:120px}.library th:nth-child(7){width:30px}.person-role{display:block;color:#53627a;font-size:14px;line-height:1.6;margin-top:3px}.person-info small{line-height:1.65}.contact-cell .address-text{margin-top:6px;margin-bottom:0}.contact-cell .contact-line{font-size:14px}
#cameraDialog[open],#cropDialog[open]{display:grid;gap:10px;overflow:hidden;height:min(760px,calc(100dvh - 24px));max-height:calc(100dvh - 24px);margin:auto;padding:16px}#cameraDialog[open]{grid-template-rows:auto auto minmax(0,1fr) auto auto}#cropDialog[open]{grid-template-rows:auto auto minmax(0,1fr) auto}#cameraDialog .dialog-top,#cropDialog .dialog-top{margin:0}#cameraDialog .dialog-top h2,#cropDialog .dialog-top h2{font-size:21px;margin:0}#cameraDialog p,#cropDialog p{margin:0;font-size:14px;line-height:1.55}#cameraDialog .camera-stage{min-height:0;height:100%;aspect-ratio:auto}#cameraDialog .camera-stage video{display:block;height:100%;object-fit:contain}#cameraDialog .dialog-foot,#cropDialog .dialog-foot{position:static;flex-shrink:0;margin:0;padding:8px 0 max(0px,env(safe-area-inset-bottom));background:#fff;border-top:1px solid #e4e7ed}#cameraDialog .dialog-foot{display:grid;grid-template-columns:1fr 1fr;gap:7px}#cameraDialog #capturePhoto{grid-column:1/-1;min-height:50px;font-size:17px}#cameraDialog button{white-space:normal;min-height:44px;padding:8px 10px}#cameraDialog #cameraStatus{font-size:12px;line-height:1.5}#cropCanvas{min-height:0;min-width:0;max-height:100%!important;align-self:center;justify-self:center}#cropDialog .dialog-foot{display:flex;gap:6px;flex-wrap:nowrap}#cropDialog .dialog-foot button{flex:1;min-height:46px;font-size:12px;padding:8px;white-space:normal}
@media(max-width:740px){.metrics,.page-heading .eyebrow,.page-heading p{display:none}.page-heading{margin-bottom:14px;gap:10px}.page-heading h1{font-size:23px}.heading-actions{flex-wrap:nowrap}.heading-actions button{min-height:42px;font-size:12px}.library table{min-width:0}.library tbody tr[data-contact]{grid-template-columns:20px minmax(0,1fr);height:118px;min-height:118px;padding:12px 12px;gap:9px}.library tr[data-contact] .check-col{grid-column:1;grid-row:1;align-self:center;padding:0;display:block;width:20px}.library tr[data-contact] .identity-cell{grid-column:2;grid-row:1;display:block}.library tr[data-contact] .contact-cell,.library tr[data-contact] .industry-cell,.library tr[data-contact] .group-cell,.library tr[data-contact] .owner-cell,.library tr[data-contact] .row-arrow{display:none!important}.library .person-cell{height:94px;display:flex;flex-direction:row-reverse;align-items:center;gap:10px;padding:0}.library .person-info{flex:1;min-width:0}.library .person-info b,.library .person-info small,.library .person-role{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block;margin:0;max-width:100%}.library .person-info b{font-size:16px;line-height:1.8}.library .person-info small,.library .person-role{font-size:13px;line-height:1.8}.library .person-cell .real-thumb,.library .person-cell .empty-thumb{width:88px;height:58px;flex:none}.library .date-group td{padding:9px 12px;font-size:13px}.library .date-group span{display:none}.filterbar{gap:7px;padding:12px}.filterbar select{font-size:14px;padding:8px 6px;min-height:40px}.result-line{padding-bottom:10px}.chat-toggle{font-size:0;padding:10px;min-width:48px;width:48px}.chat-toggle svg{width:22px;height:22px}.chat-toggle span{display:none}#cameraDialog[open],#cropDialog[open]{width:calc(100vw - 12px);height:calc(100dvh - 16px);max-height:calc(100dvh - 16px);padding:12px;gap:8px}#cameraDialog .dialog-top h2,#cropDialog .dialog-top h2{font-size:20px}#cameraDialog>p:first-of-type,#cropDialog>p{font-size:13px}#cameraDialog #capturePhoto{min-height:50px}#cameraDialog .camera-guide span{font-size:13px;padding:5px}}

.company-candidate{border:1px solid #d9e1e9;border-radius:10px;padding:16px;margin:12px 0;line-height:1.8}.company-candidate>b{display:block;font-size:17px}.company-candidate a,.company-sources a{display:block;color:#254f86;text-decoration:underline;overflow-wrap:anywhere;font-size:14px}.company-candidate p{font-size:14px;margin:9px 0}.company-candidate small{display:block;color:#68768a;margin-bottom:12px}.company-candidate button{min-height:44px}.company-sources{padding:12px 0;line-height:1.9}.company-sources b{display:block;font-size:14px}

/* Primary mobile workflow: list first, persistent navigation and registration. */
.mobile-bottom{display:none}.library-tools{background:#fff}.company-profile{font-size:15px;line-height:1.8;overflow-wrap:anywhere}.company-profile details{padding:12px 0;border-top:1px solid #e3e7ed}.company-profile summary{cursor:pointer;font-weight:600}.company-profile a{color:#235684;text-decoration:underline}.company-profile small{color:#53627a}.mobile-tool-actions{display:grid;gap:12px}.mobile-tool-actions button{min-height:48px}.scan-items{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:16px 0}.scan-item{border:1px solid #dbe1ea;border-radius:10px;padding:12px;min-width:0}.scan-item p{font-size:13px;overflow-wrap:anywhere}.scan-images{display:flex;gap:8px}.scan-images>div{width:50%;min-width:0}.scan-images small{display:block}.scan-images img{width:100%;height:95px;object-fit:contain;background:#f6f7f9}#scanRecent{display:grid;gap:8px;margin-top:20px}#scanContent label,#scanUpload label{display:block;margin:12px 0}#scanContent select,#scanContent input{display:block;width:100%;min-height:44px}
@media(max-width:740px){
 html{scroll-padding-top:205px}body{background:white}.app{margin-left:0!important}.app>header{position:fixed!important;top:0;left:0;right:0;height:56px;padding:0 14px;background:#fff;border-bottom:1px solid #e4e7ed;z-index:210}.app>header .crumb{font-size:0;gap:10px}.app>header .crumb>span{display:none}.app>header #crumb{font-size:17px;line-height:1.4;max-width:calc(100vw - 125px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.app>header .mobile-nav{font-size:24px;min-height:44px;min-width:44px;margin-left:-7px}.app>header .account-button{min-width:40px;min-height:40px}
 #listView{padding:56px 0 calc(90px + env(safe-area-inset-bottom))!important}.page-heading,.metrics,#listView>footer{display:none!important}.library{border:0!important;border-radius:0!important;box-shadow:none!important;overflow:visible!important}.library-tools{position:sticky;top:56px;z-index:150;border-bottom:1px solid #dbe1e9;box-shadow:0 3px 7px #172b4308}.library-head{padding:0 12px!important}.tabs button{height:40px;min-height:40px;padding:8px 12px;font-size:14px}.filterbar{padding:8px 12px!important;gap:7px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.filterbar .searchbox{grid-column:1/-1;height:40px;min-height:40px;width:100%;margin:0}.filterbar .searchbox input{font-size:16px;min-height:38px}.filterbar select{width:100%;height:36px;min-height:36px;margin:0;font-size:13px;padding:6px}.result-line{padding:0 12px 8px;font-size:12px}.library .date-group td{background:#f3f5f8;color:#49556a;padding:8px 14px}.library tbody tr[data-contact]{height:110px;min-height:110px;padding:8px 14px}.library .person-cell{height:94px}.library .person-info small,.library .person-role{font-size:14px}.library .person-info b{font-size:17px}.library tbody tr[data-contact]:nth-child(even){background:#fff}.library .real-thumb{border:1px solid #e3e7ed}
 .mobile-bottom{display:flex;align-items:center;gap:8px;position:fixed;left:0;right:0;bottom:0;z-index:220;background:#fffffffa;border-top:1px solid #dde3ec;padding:9px 76px calc(9px + env(safe-area-inset-bottom)) 12px;min-height:66px}.mobile-bottom .primary{flex:1;justify-content:center;font-size:16px;min-height:46px}.mobile-bottom>button{min-height:46px;padding:10px 12px}.mobile-bottom svg{height:19px;width:19px}.chat-toggle{z-index:225;bottom:calc(9px + env(safe-area-inset-bottom));right:12px;height:46px;min-height:46px;width:46px}.detail-open .mobile-bottom{display:none}.sidebar.mobile-open{position:fixed;top:0;bottom:0;max-height:100dvh;overflow:auto;padding-bottom:100px;z-index:600}.nav-scrim{z-index:550}.bulk-bar{margin:0;padding:8px 12px;border-radius:0;max-height:150px;overflow:auto}.bulk-bar>div{display:flex;flex-wrap:nowrap;overflow-x:auto}.bulk-bar button{flex:0 0 auto;width:auto;white-space:nowrap}.bulk-bar b{font-size:13px}.scan-items{grid-template-columns:1fr}.ai-chat{z-index:700}.contact-drawer{z-index:500}.drawer-heading{position:sticky;top:0;z-index:2;background:#fff}#actionDialog .dialog-foot{position:sticky;bottom:-20px;background:#fff;padding:12px 0;z-index:1}
}
@media(min-width:741px){.library .table-scroll{max-height:70dvh;overflow:auto}.library thead th{position:sticky;top:0;z-index:4;background:#f8f9fc}}
@media(max-width:800px){.nav-scrim{left:min(250px,calc(100vw - 55px));width:calc(100% - min(250px,calc(100vw - 55px)))}}
