/* One frame, one scroller: titles/close controls never scroll with worker forms. */
#modal.worker-dialog{width:min(640px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:var(--worker-modal-max-height,calc(100vh - 24px));overflow:hidden}
#modal.worker-dialog #modalBody{min-width:0;max-width:100%}
#modal.worker-dialog .modal-form.worker-modal-frame{display:flex;flex-direction:column;gap:0;padding:0;min-width:0;max-width:100%;max-height:var(--worker-modal-max-height,calc(100vh - 24px));overflow:hidden;scrollbar-gutter:auto}
#modal.worker-dialog .worker-modal-frame>.modal-sticky-header{position:relative;top:auto;flex:0 0 auto;align-self:stretch;width:100%;max-width:100%;margin:0;padding:18px 16px 16px 24px;z-index:80}
#modal.worker-dialog .worker-modal-frame>.modal-sticky-header .modal-close{flex-shrink:0;align-self:flex-start;min-width:40px;min-height:40px}
#modal.worker-dialog .worker-modal-body{flex:1 1 auto;min-height:0;min-width:0;display:grid;align-content:start;gap:15px;padding:18px 24px 26px;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-gutter:stable;-webkit-overflow-scrolling:touch}
#modal.worker-dialog .worker-modal-body>*{min-width:0;max-width:100%}
#modal.worker-dialog .worker-modal-body::after{content:"";display:block;height:var(--worker-message-clearance,68px);pointer-events:none}
#modal.worker-dialog .worker-modal-body .photo-fields{grid-template-columns:1fr}
#modal.worker-dialog .worker-modal-body .table-wrap{max-width:100%;overflow:auto}
#modal.worker-dialog .worker-modal-frame>.material-browser{position:absolute;inset:0;transform:none;width:100%;height:100%;max-height:100%;border:0;border-radius:inherit;z-index:90}
#modal.worker-dialog .material-browser footer{padding-bottom:max(14px,var(--worker-message-clearance,80px))}
.material-browser header>div{min-width:0;flex:1}
.material-browser header .material-browser-close{display:grid;place-items:center;flex:0 0 40px;width:40px;height:40px;padding:0;font-size:24px;line-height:1;margin-left:auto}
/* iOS/WeCom may zoom the page on focus when editable text is smaller than 16px.
   Use readable control text, not a viewport zoom lock; pinch-to-zoom stays available.
   Include landscape touch devices and the public worker application/login form. */
@media(max-width:900px),(pointer:coarse){
 #modal.worker-dialog :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),select,textarea,[contenteditable="true"]),
 #workerApplicationForm :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),select,textarea,[contenteditable="true"]){font-size:16px!important;line-height:1.5}
}
@media(max-width:600px){
 #modal.worker-dialog .worker-modal-frame>.modal-sticky-header{padding:14px 12px 12px 16px}
 #modal.worker-dialog .worker-modal-body{padding:16px 16px max(22px,env(safe-area-inset-bottom))}
 #modal.worker-dialog .worker-modal-body .form-two{grid-template-columns:1fr}
 #modal.worker-dialog .material-browser header{padding:12px;gap:9px}
 #modal.worker-dialog .material-browser header p{font-size:10px}
}
