:root{font:16px/1.5 system-ui,sans-serif;color:#17263a;background:#fff;accent-color:#245edc}
*{box-sizing:border-box} [hidden]{display:none!important}
body{margin:0} main{max-width:38rem;margin:auto;padding:1rem 1rem 2rem}
header,.toolbar,#manual{display:flex;align-items:center;justify-content:space-between;gap:.75rem}
h1{font-size:1.4rem;margin:.25rem 0}h2{margin:.25rem 0 .75rem}
label{display:grid;gap:.2rem;font-weight:600;margin:.55rem 0;min-width:0}
input,select,button{font:inherit;min-height:44px;padding:.5rem .75rem;border:1px solid #ccdbef;border-radius:.55rem;color:inherit;background:#fff}
input,select{width:100%}button{cursor:pointer;color:#163b83}button:disabled{opacity:.55}
.primary{background:#245edc;border-color:#245edc;color:#fff;font-weight:700;width:100%}
#students,#numbers{list-style:none;margin:.55rem 0;padding:0}#students li{border-bottom:1px solid #e0e8f4}
#students button{width:100%;border:0;border-radius:0;display:flex;justify-content:space-between;text-align:left}
#numbers{display:flex;flex-wrap:wrap;gap:.35rem}#preview{position:relative;aspect-ratio:4/3;overflow:hidden;border-radius:.65rem;background:#102030}
video{width:100%;height:100%;object-fit:cover}#guide{position:absolute;width:52%;aspect-ratio:1;top:50%;left:50%;transform:translate(-50%,-50%);border:2px solid #fff;border-radius:.45rem;box-shadow:0 0 0 999px #0004;pointer-events:none}
#message,#feedback{overflow-wrap:anywhere;margin:.4rem 0}.bad{color:#ae1837}.good{color:#18743c}
#manual label{flex:1}#manual button{align-self:end;margin-bottom:.55rem}

:root{background:#f4f6fa}
main{background:#fff}
.primary,.choices button[aria-pressed="true"]{background:#1e3b66;border-color:#1e3b66;color:#fff}
#login{max-width:25rem;margin:2rem auto}
#login .primary{margin-top:.6rem}
.filters label{margin:.3rem 0}
.filters select{padding-block:.3rem}
#progress{display:block;margin-top:.6rem}
#progress-bar{width:100%;height:.6rem;accent-color:#28784e}
.roster-search label{flex:1}
.roster-search button{align-self:end;margin-bottom:.55rem}
.choices{display:flex;gap:.35rem}
.choices button{flex:1;min-width:0;background:#f3f5f8;padding-inline:.25rem}
.roster-head,#students button{display:grid;grid-template-columns:minmax(0,1fr) 1.5rem 3.4rem 3.4rem;align-items:center;gap:.25rem;padding-inline:.4rem}
#students button span{text-align:center}
.pending{color:#616c7c}
#student,#selection{text-align:center}
#homework-grade{margin-bottom:.5rem}
#numbers{max-height:7rem;overflow:auto}
#guide[data-result="good"]{border-color:#53d386}
#guide[data-result="duplicate"]{border-color:#a4acb7}
#guide[data-result="bad"]{border-color:#ff626a}
.save-bar{position:sticky;bottom:0;background:#fff;padding:.35rem 0 max(.35rem,env(safe-area-inset-bottom))}

.roster-head{margin-top:.6rem;font-size:.8rem;color:#4c596d;font-weight:700;text-align:center}
.roster-head span:first-child{text-align:left}

main:has(#scan:not([hidden]))>header{display:none}
