html{-webkit-text-size-adjust:100%;text-size-adjust:100%;scroll-padding-top:16px}
body{line-height:1.5}
.brand,.intro>div:first-child,.card,.rosterInfo{min-width:0}
.outline,.primary,.quiet{min-height:44px;line-height:1.4;touch-action:manipulation}
input,select{width:100%;min-height:44px}
input[type=checkbox]{width:20px;min-height:20px;height:20px;padding:0;margin:0;flex:none}
.muted,.ocrname,.selectedInfo{overflow-wrap:anywhere}
.intro{gap:24px}.introActions{max-width:52%;flex:none}
.phaseBar select{width:110px;flex:none}.phaseBar{gap:12px}
.dateFields{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr)}
.record{padding:16px;margin-top:12px;border:1px solid var(--line);border-radius:12px;background:#fafcf8;min-width:0}
.recordHead{gap:10px}.recordHead>label:first-child{display:flex;align-items:center;gap:6px;white-space:nowrap}
.seq{width:70px;min-height:40px;padding:7px 8px}
.matchFields select{text-overflow:ellipsis}.selectedInfo{line-height:1.7}
.rowActions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.rowActions button{font-size:12px;padding:8px 12px}.rowDelete{color:#a14839;border-color:#eadbd6}.rowDelete:hover{background:#fff3ef}
.rosterImport{display:flex;gap:10px;align-items:center}#rosterFile{flex:1;min-width:0;padding:7px;font-size:12px}
#rosterFile::file-selector-button{font:inherit;padding:8px 10px;border:0;border-radius:6px;margin-right:8px;color:var(--green);background:#eef3e9}
.rosterEntry{align-items:center;min-width:0}.rosterInfo{display:grid;gap:5px}.rosterInfo strong{font-size:14px;overflow-wrap:anywhere}.rosterInfo span{font-size:12px;line-height:1.6;overflow-wrap:anywhere}.editEmployee{flex:none;font-size:12px;padding:8px 12px}
#message{bottom:max(20px,env(safe-area-inset-bottom));width:max-content;max-width:calc(100vw - 28px);overflow-wrap:anywhere}
#employeeDialog{max-height:90dvh;overscroll-behavior:contain}.dialogSubmit{position:sticky;bottom:-1px;background:#fff;padding:14px 0 2px;margin-top:6px}#saveNewEmployee{margin-top:0}
@media(max-width:1000px){.introActions{max-width:48%}.introActions button{font-size:13px;padding:10px 12px}}
@media(max-width:800px){
 header{padding:16px max(16px,env(safe-area-inset-right)) 16px max(16px,env(safe-area-inset-left));gap:12px}.mark{width:38px;height:38px;font-size:22px;flex:none}.brand strong{font-size:16px}.brand small{font-size:10px}#logout{font-size:12px;padding:9px 10px}
 main{padding:20px max(14px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left))}
 .intro{display:block;padding:0 0 18px}.intro h1{font-size:26px;line-height:1.4}.intro p.muted{font-size:13px;margin-top:8px}.eyebrow{margin-bottom:8px}
 .introActions{display:grid;grid-template-columns:1fr 1fr;max-width:none;width:100%;gap:8px;margin-top:18px}.introActions button{font-size:14px;padding:11px 8px;min-height:46px}#rosterToggle{grid-column:1/-1}
 .phaseBar{display:grid;grid-template-columns:auto minmax(0,1fr);gap:8px 12px;padding:12px 14px;margin-bottom:12px}.phaseBar select{width:100%;min-width:0}.phaseBar>label{font-size:13px}.phaseBar>.muted{grid-column:1/-1;font-size:12px}.phaseNote{display:none}
 .layout{grid-template-columns:minmax(0,1fr);gap:16px}.card{padding:18px;border-radius:16px}.sectionhead{margin-bottom:16px;gap:8px}h2{font-size:17px;line-height:1.5}.sectionhead>.muted{font-size:11px;max-width:50%;text-align:right}
 .steps{justify-content:space-between;gap:8px;padding:16px 0;font-size:12px}.steps b{margin-right:5px}
 input,select{font-size:16px;min-height:46px}label{font-size:13px}
 .upload{min-height:180px;padding:18px;gap:7px;text-align:center}.uploadIcon{width:44px;height:44px;font-size:27px;margin-bottom:2px}.upload strong{font-size:16px}
 #photoPreview{max-height:420px;max-height:min(55svh,420px)}#fullImage{display:inline-flex;align-items:center;min-height:40px;font-size:13px;margin-top:6px}.photoActions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:14px}.photoActions button{width:100%;font-size:14px;padding:11px 8px}.photoActions>.clickable{grid-column:1/-1;text-align:center;font-size:13px;padding:8px}
 .dateFields{gap:10px}.dateFields label{min-width:0}.dateFields input,.dateFields select{padding:10px 8px}.empty{padding:32px 4px;font-size:13px}
 .record{padding:14px;margin-top:12px}.recordHead{gap:8px}.recordHead label{font-size:12px}.seq{width:64px;font-size:16px;min-height:42px}.matchFields{grid-template-columns:minmax(0,1fr);gap:8px}.matchFields input,.matchFields select{font-size:16px}.ocrname,.selectedInfo{font-size:12px}
 .rowActions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.rowActions button{font-size:12px;padding:10px 6px;white-space:normal;margin:0}.rowActions .rowDelete{grid-column:1/-1}.reviewActions{display:grid;grid-template-columns:1fr;gap:8px}.reviewActions button{width:100%;font-size:14px;text-align:center;padding:11px}
 .check{font-size:13px}.exportBlock button{min-height:48px;font-size:15px}.exportBlock>p{font-size:12px}
 .rosterImport{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}#rosterFile{width:100%;font-size:13px}.rosterImport button{width:100%}
 .employeeFields{grid-template-columns:1fr 1fr}.employeeFields>label:nth-child(-n+3){grid-column:1/-1}.employeeFields>button{grid-column:1/-1;width:100%}#rosterSearch{width:100%;margin:0}#rosterResult{display:block;margin-top:10px;font-size:12px}#rosterList{grid-template-columns:minmax(0,1fr)}.rosterEntry{gap:10px}.editEmployee{min-width:58px;min-height:44px}
 .visionFields{grid-template-columns:minmax(0,1fr)}.visionSave{flex-direction:column;align-items:stretch;gap:10px}.visionSave button{width:100%}
 .notice{padding:12px 14px;font-size:12px;line-height:1.7}.small{font-size:12px}#safetyNotice{margin:10px 0 14px;line-height:1.7}footer{display:grid;gap:5px;padding:22px 0 10px}footer span{max-width:none;text-align:left}
 #employeeDialog{position:fixed;top:auto;bottom:0;left:0;right:0;margin:0 auto;width:100%;max-width:560px;max-height:96vh;max-height:96dvh;padding:20px 18px max(16px,env(safe-area-inset-bottom));border-radius:22px 22px 0 0;border-bottom:0}#employeeDialog .sectionhead{margin-bottom:8px}#employeeDialog .employeeFields{grid-template-columns:1fr 1fr;gap:10px}#employeeDialog .employeeFields>label:nth-child(-n+3){grid-column:1/-1}#newEmployeeSeqLabel{grid-column:1/-1}#employeeDialogHint{font-size:13px;margin:8px 0 14px}.dialogSubmit{padding:12px 0 max(2px,env(safe-area-inset-bottom))}#saveNewEmployee{min-height:48px;font-size:15px}
 .login{margin:18px auto;padding:24px 20px}.login h1{font-size:32px}.login form{margin-top:22px}
}
@media(max-width:359px){main{padding-left:12px;padding-right:12px}.card{padding:14px}.intro h1{font-size:24px}.introActions button{font-size:13px}.dateFields{grid-template-columns:minmax(0,1fr)}.steps{font-size:11px}.record{padding:12px}.rowActions button{font-size:11px}#employeeDialog{padding-left:16px;padding-right:16px}}
@media(max-height:500px) and (max-width:950px){#employeeDialog{top:0;bottom:0;margin:auto;width:calc(100vw - 24px);max-width:640px;max-height:calc(100dvh - 20px);border:1px solid var(--line);border-radius:16px;padding:16px 20px}#employeeDialog .employeeFields{grid-template-columns:1fr 1fr}#employeeDialog .employeeFields>label:nth-child(-n+3){grid-column:auto}#employeeDialog .employeeFields>label:nth-child(3){grid-column:1/-1}}

.identityHint{margin:12px 0 0;line-height:1.7}input[readonly],#employeeForm select:disabled,#newEmployeeForm select:disabled{background:#f2f6ee;color:var(--ink);opacity:1}
