[hidden]{display:none!important}
#shell-header{flex-wrap:wrap;gap:12px}.shell-actions{flex-wrap:wrap;gap:6px}#open-profile{display:flex;align-items:center;gap:6px}#shell-avatar{width:24px;height:25px;object-fit:contain;border-radius:5px}
.tool-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr))}.mini-attendance{display:grid;gap:14px;padding:26px 0;border-block:1px solid #A9AEB2}.studio-banner{padding:16px;border:1px solid #A9AEB2;margin:18px 0;background:#EAE7E0}.studio-banner button{margin-left:12px}.version-chip{border:1px solid #A9AEB2;padding:6px 12px;border-radius:20px;font-size:12px}
#students-page{max-width:1600px;margin:auto;padding:24px 28px 60px;background:#F2F2F2;color:#191A1B;min-height:calc(100vh - var(--shell-height,80px))}.students-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.students-header h1{font-size:28px;margin:8px 0}.students-header p{color:#5c6064;font-size:13px}.students-controls,.students-tools{display:flex;gap:10px;align-items:center;flex-wrap:wrap;padding:14px 0;border-bottom:1px solid #A9AEB2}.students-tools label{display:flex;align-items:center;gap:8px;font-size:12px}.students-controls button,.students-tools button{font-size:12px}#students-active-name{margin-right:auto;max-width:400px;overflow-wrap:anywhere}
#students-browser{position:relative}#students-browser summary{cursor:pointer;border:1px solid #A9AEB2;padding:10px 14px;border-radius:6px;background:#EAE7E0;font-size:13px}.students-browser-panel{position:absolute;top:100%;left:0;width:min(400px,calc(100vw - 40px));padding:16px;background:#F2F2F2;border:1px solid #A9AEB2;box-shadow:0 12px 24px #191a1b20;z-index:5;display:grid;gap:10px}#students-class-select,#admin-user{width:100%;min-height:180px}.students-browser-panel label{display:grid;gap:5px;font-size:12px}
.students-table-scroll{overflow:auto;border:1px solid #A9AEB2;border-radius:8px;background:white;max-height:70vh}.students-table-scroll table{border-collapse:separate;border-spacing:0;width:100%;font-size:13px}.students-table-scroll th{position:sticky;top:0;z-index:1;background:#191A1B;color:#F2F2F2;white-space:nowrap;text-align:left;font-size:12px}.students-table-scroll th,.students-table-scroll td{padding:13px 16px;border-right:1px solid #d6d8d9;border-bottom:1px solid #d6d8d9;vertical-align:middle}.students-table-scroll td:nth-child(2){min-width:190px}.students-table-scroll tr:nth-child(even) td{background:#F2F2F2}.students-table-scroll td:last-child{min-width:210px}.photo-check{width:34px;height:34px;padding:0;border:2px solid #A9AEB2;border-radius:50%;background:white;color:#fff;display:inline-grid;place-items:center;font-size:19px;line-height:1}.photo-check.checked{background:var(--photographer-color);border-color:var(--photographer-color)}.photo-check.checked:disabled{opacity:1;cursor:default}.photo-check:not(.checked):disabled{opacity:.45}.photo-check:focus-visible{outline:3px solid #191A1B;outline-offset:3px}.students-legend{display:flex;flex-wrap:wrap;gap:10px;margin:10px 0}.photographer-chip{display:inline-flex;align-items:center;gap:6px;font-size:12px}.photographer-chip:before{content:'';width:12px;height:12px;border-radius:50%;background:var(--photographer-color)}.photographer-credit{display:block;border-left:3px solid var(--photographer-color);padding-left:8px;margin:5px 0;white-space:normal}.row-actions{white-space:nowrap}.row-actions button{font-size:11px;padding:6px 9px;margin-right:5px}#students-status{font-size:13px;min-height:20px;overflow-wrap:anywhere}
#profile-dialog{max-width:650px}#profile-form{display:grid;gap:16px}#profile-form label,#student-fields label,#column-add-form label{display:grid;gap:6px;font-size:13px}#profile-form details{border-top:1px solid #A9AEB2;padding-top:12px}#profile-form details label{margin:10px 0}.profile-image-row{display:flex;gap:20px;align-items:center}.profile-image-row img{background:#EAE7E0;object-fit:contain;border-radius:10px}#profile-form input[type=file]{width:100%}#profile-status,#admin-status,#columns-status,#student-edit-status,#student-import-status{font-size:13px;overflow-wrap:anywhere}
#admin-dialog{max-width:1000px}.admin-layout{display:grid;grid-template-columns:minmax(200px,1fr) 2fr;gap:24px}.admin-layout aside{display:grid;gap:12px;align-content:start}.admin-layout aside label{display:grid;gap:6px}#admin-grants fieldset{border:1px solid #A9AEB2;margin-bottom:14px;padding:12px}#admin-grants legend{font-size:14px;font-weight:600}#admin-grants label{display:flex;align-items:center;gap:8px;margin:8px 0;font-size:13px}#admin-grants input[type=checkbox]{width:18px;height:18px;accent-color:#191A1B}#admin-dialog details{margin-top:24px}#student-fields{display:grid;gap:14px;margin-bottom:20px}#student-import-text{width:100%;padding:12px;resize:vertical}#student-import-save{margin-top:12px}.column-row{display:flex;gap:8px;margin-bottom:12px}.column-row input{min-width:0;flex:1}.column-row button{font-size:12px;flex-shrink:0}#column-add-form{display:grid;gap:12px;border-top:1px solid #A9AEB2;padding-top:20px;margin-top:20px}
@media(max-width:760px){#students-page{padding:16px 12px 40px}.students-header h1{font-size:24px}.students-controls{gap:7px}.students-tools label{flex:1;min-width:145px;display:grid}.students-tools input{width:100%}.students-table-scroll th,.students-table-scroll td{padding:10px}.admin-layout{grid-template-columns:1fr}.admin-layout #admin-user{min-height:120px}.profile-image-row{align-items:flex-start;gap:12px}.profile-image-row img{width:90px;height:92px}.profile-image-row>div{min-width:0}.shell-actions #local-status{display:none}.column-row{flex-wrap:wrap}.column-row input{flex-basis:100%}}

/* Size actions to their buttons; keep Photographer independent of last-child. */
.students-table-scroll th.row-actions-heading,.students-table-scroll td.row-actions{width:1%;min-width:0;white-space:nowrap;text-align:right;padding-left:8px;padding-right:10px}
.students-table-scroll td.row-actions button{margin-right:0;margin-left:5px;padding:5px 8px}

/* Keep the comparison table on phones; wrap content instead of clipping columns. */
@media (max-width:600px){
 #students-page{min-width:0;padding-left:4px;padding-right:4px}
 .students-tools label,.students-tools input,.students-tools select{min-width:0;max-width:100%;box-sizing:border-box}
 #students-table{width:100%;min-width:0;table-layout:fixed;font-size:clamp(10px,2.7vw,13px);line-height:1.45}
 #students-table th,#students-table td{min-width:0;padding:8px 4px;white-space:normal;overflow-wrap:anywhere;box-sizing:border-box}
 #students-table th{width:var(--mobile-column-width);font-size:clamp(9px,2.6vw,12px);line-height:1.3}
 #students-table .student-cell-number{text-align:center}
 #students-table .student-cell-photo{text-align:center;padding-left:1px;padding-right:1px}
 #students-table .photo-check{width:min(34px,100%);max-width:100%;height:auto;aspect-ratio:1;font-size:18px;vertical-align:middle}
 #students-table .photographer-credit{padding-left:5px;margin:6px 0;line-height:1.5}
 #students-table td.row-actions{width:auto;padding:4px 2px;text-align:right}
 #students-table td.row-actions button{display:block;width:100%;min-height:36px;margin:4px 0;padding:4px 1px;font-size:10px;white-space:normal;overflow-wrap:anywhere}
}

/* Groups share a line when they fit, otherwise wrap as complete toolbars. */
.students-tools{display:flex;flex-wrap:wrap;align-items:flex-end;gap:12px}
.students-filter-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);flex:1 1 360px;gap:10px;min-width:0;max-width:100%}
.students-filter-row label{display:grid;gap:6px;margin:0;min-width:0}
.students-filter-row input,.students-filter-row select{width:100%;min-width:0;box-sizing:border-box}
.students-action-row,.students-class-actions{display:flex;flex-wrap:wrap;gap:8px;min-width:0;max-width:100%}
.students-action-row{flex:1 1 340px}
.students-class-actions{flex:0 1 auto;margin-left:auto}
.students-action-row button{flex:1 1 90px;min-width:0;white-space:normal}
.students-class-actions button{white-space:normal}
.students-table-scroll{overflow-anchor:none}
