.roster-help-entry { padding:6px 12px; display:flex; justify-content:flex-end; }
.roster-help-entry > button { font-size:13px; padding:6px 10px; }
dialog.roster-dialog { position:fixed; inset:0; box-sizing:border-box; margin:auto; width:min(480px,calc(100vw - 24px)); max-height:calc(100dvh - 24px); overflow:auto; border:1.5px solid var(--control-outline); border-radius:16px; background:var(--surface); color:var(--ink); padding:20px; box-shadow:0 20px 70px #0004; }
dialog.roster-dialog::backdrop { background:#0007; }
#rosterAddDialog, #rosterEditDialog { width:min(400px,calc(100vw - 24px)); }
#rosterAddDialog footer, #rosterEditDialog footer { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
#rosterAddDialog footer > button, #rosterEditDialog footer > button { width:100%; }
.roster-dialog h3 { margin:0; font-size:16px; font-weight:650; }
.roster-dialog p { line-height:1.6; font-size:14px; }
.roster-dialog header { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.roster-dialog header > h3 { flex:1 1 auto; min-width:0; }
.roster-dialog header > button { flex:0 0 auto; width:auto; min-width:0; padding:6px 10px; white-space:nowrap; }
.roster-dialog footer { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; margin-top:18px; }
.roster-dialog footer > button { flex:0 0 auto; width:auto; min-width:0; white-space:nowrap; }
.roster-dialog label { display:grid; gap:6px; font-size:14px; margin:12px 0; }
.roster-dialog input { width:100%; box-sizing:border-box; min-height:40px; }
.roster-dialog .roster-example { padding:14px; margin:12px 0; border:1px dashed var(--control-outline); border-radius:10px; background:var(--surface-muted,var(--surface)); }
.roster-dialog .roster-example > span { display:block; margin-bottom:12px; }
.roster-tour-record { display:grid; gap:10px; }
.roster-demo-note { color:var(--muted); }
#rosterAddError { color:var(--danger,#c33); min-height:1.5em; }
#rosterEditError { color:var(--danger,#c33); min-height:1.5em; }
.roster-empty-actions { display:flex; justify-content:center; flex-wrap:wrap; gap:8px; }
.roster-empty-actions > button { width:auto; min-width:0; flex:0 0 auto; }
#homeWorkspace .roster-record-actions { grid-column:1 / -1; display:flex; justify-content:flex-end; gap:6px; }
#homeWorkspace .roster-record-actions > button { width:30px; height:30px; min-width:30px; min-height:30px; padding:6px; border:var(--control-stroke,1.5px) solid var(--control-outline); border-radius:50%; }
.roster-recovery { display:flex; align-items:center; flex-wrap:wrap; gap:6px 10px; padding:8px 12px; font-size:13px; }
.roster-recovery > button { width:auto; min-width:0; padding:6px 10px; }
.roster-recovery > small { flex-basis:100%; color:var(--muted); font-size:12px; line-height:1.5; }
@media(max-width:760px) { dialog.roster-dialog { padding:16px; } #homeWorkspace .home-student-directory-head { grid-template-columns:minmax(0,1fr); grid-template-areas:"title" "summary" "actions"; gap:6px; } #homeWorkspace .home-student-directory-actions { flex-wrap:wrap; justify-content:flex-start; } }
/* Student cards are the edit target; actions live inside the dialog. */
#homeWorkspace button.student-directory-item { width:100%; min-width:0; color:var(--ink); text-align:left; font:inherit; cursor:pointer; }
#homeWorkspace button.student-directory-item:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
#homeWorkspace .student-directory-add { min-height:48px; border-radius:8px; }
#rosterEditDelete { margin:0; color:var(--danger,#c73545); width:40px; height:40px; min-height:40px; padding:10px; border-radius:50%; }
#rosterAddDialog select, #rosterEditDialog select { width:100%; min-height:40px; }
#homeWorkspace .roster-login-guide[hidden] { display:none; }
#homeWorkspace .roster-login-guide { display:grid; grid-template-columns:1fr 1fr auto; gap:12px; align-items:center; margin:10px 12px; padding:12px; border:1px solid var(--control-outline); border-radius:10px; background:var(--surface-soft,var(--surface)); font-size:13px; }
#homeWorkspace .roster-login-guide p { margin:4px 0 0; color:var(--muted); font-size:12px; line-height:1.5; }
#homeWorkspace .roster-login-guide > button { width:auto; min-width:0; padding:6px 10px; white-space:nowrap; }
#homeWorkspace [data-roster-guide-step] { position:relative; overflow:visible; outline:2px solid var(--accent); outline-offset:2px; }
#homeWorkspace [data-roster-guide-step]::after { content:attr(data-roster-guide-step); position:absolute; top:-5px; right:-3px; display:grid; place-items:center; width:17px; height:17px; border-radius:50%; background:var(--accent); color:#fff; font-size:10px; font-weight:700; }
@media(max-width:760px) {
 #rosterEditDelete { width:38px; height:38px; min-height:38px; padding:9px; }
 #homeWorkspace .roster-login-guide { grid-template-columns:1fr; gap:10px; }
 #homeWorkspace .roster-login-guide > button { justify-self:end; }
 #homeWorkspace .home-student-directory-head { grid-template-columns:minmax(0,1fr) auto; grid-template-areas:"title actions" "summary summary"; }
 #homeWorkspace .home-student-directory-actions { justify-content:flex-end; }
}
@media(max-width:380px) {
 #homeWorkspace .home-student-directory-head { grid-template-columns:auto minmax(0,1fr); grid-template-areas:"title summary" "actions actions"; }
}
