@layer attendance-polish {
.learningProgressCell { display:none; }
.mobileFeedbackPreview { display:none!important; }
#attendanceLearningView { min-height:44px; max-width:180px; font-size:16px; }
html body #workspace #attendanceView #btnGradeOnly:not(.hidden) { display:none!important; }
#attendanceClassStrip > #attendanceLearningView { margin:6px 8px; }
.learningProgressEditor { text-align:left; font-size:16px; min-width:0; color:var(--text,#172033); }
.learningProgressEditor summary { min-height:44px; padding:10px 0; cursor:pointer; font-weight:600; }
.learningProgressEditor label { display:grid; gap:6px; margin:10px 0; font-size:16px; }
.learningProgressEditor textarea { width:100%; min-height:76px; box-sizing:border-box; resize:vertical; text-align:left; font-size:16px; line-height:1.5; padding:10px; }
.learningProgressEditor input { min-height:44px; width:110px; font-size:16px; }
html body #workspace .learningProgressEditor input { min-height:44px!important; width:110px!important; font-size:16px!important; }
html body #workspace .learningProgressEditor button { min-height:44px!important; padding:8px 12px!important; border:1px solid #cbd5e1; border-radius:8px; background:#f8fafc; color:#334155; }
.learningProgressEditor small { font-size:12px; }
.extraSessionRow .learningProgressEditor { grid-column:1 / -1; }
.learningProgressScore button { width:100%; min-height:44px; border:0; background:transparent; color:inherit; font-size:16px; font-weight:700; cursor:pointer; }
.learningProgressScore small { display:block; font-size:11px; }
.learning-blue { background:#b3c9f5!important; color:#172c57!important; }
.learning-yellow { background:#f0f7af!important; color:#343b14!important; }
.learning-red { background:#e79b9e!important; color:#541a20!important; }
#learningProgressDialog { width:min(580px,calc(100vw - 24px)); max-height:calc(100dvh - 24px); overflow:auto; box-sizing:border-box; padding:16px; }
#learningProgressDialog header { display:flex; justify-content:space-between; gap:12px; }
#learningProgressDialog button { min-height:44px; min-width:44px; }
#learningProgressDialog footer { display:flex; justify-content:flex-end; }
#attendanceLearningModes { display:none; }
.learningProgressEditor .attendanceEntryInput { border:1px solid #94a3b8; border-radius:8px; background:#fff; color:var(--text,#172033); padding:10px; box-sizing:border-box; font-family:inherit; }
.learningProgressEditor .attendanceEntryInput:focus-visible { outline:2px solid #0c8696; outline-offset:2px; }
.learningProgressEditor .attendanceEntryInput[readonly] { background:#f1f5f9; color:#334155; cursor:default; }
.learningProgressNotice { padding:10px; border:1px solid #cbd5e1; border-radius:8px; background:#f1f5f9; color:#334155; line-height:1.5; }
#learningProgressDialog button { border:1px solid #94a3b8; border-radius:8px; background:#f8fafc; color:#172033; padding:8px 14px; font:inherit; cursor:pointer; }
@media(min-width:921px) {
 html body #workspace #attendanceLearningView { display:none!important; }
 html body #workspace #attendanceLearningModes { display:none!important; }
 html body #workspace #attendanceLearningModes button { width:44px!important; min-width:44px!important; height:44px!important; padding:0!important; }
 html body #workspace #attendanceLearningModes button[aria-pressed="true"] { background:#dceeff!important; border-color:#2476bc!important; color:#174b79!important; }
 html body #workspace #attendanceClassStripControls { width:auto!important; flex:0 1 auto!important; }
 html body #workspace #attendanceTopControls { flex-wrap:nowrap!important; gap:6px!important; }
 html body #workspace #attendanceTopControls :is(#btnEditAttendanceConfig,#btnSaveAttendance,#btnAddAssessment,#btnAddStudent,#btnBulkAddStudent) { width:44px!important; min-width:44px!important; height:44px!important; padding:0!important; }
 html body #workspace #attendanceTopControls :is(#btnEditAttendanceConfig,#btnSaveAttendance,#btnAddAssessment,#btnAddStudent,#btnBulkAddStudent) span { display:none!important; }
 html body #workspace #attendanceView.learningProgressView .trackerTable :is(.receiptCell,.amountCell,.promotionCell,.paidDateCell,.paymentMethodCell,.payCell,.assessmentScoreCell,.assessmentRankCell) { display:none!important; }
 html body #workspace #attendanceView.learningProgressView .trackerTable { width:100%!important; min-width:900px!important; }
 html body #workspace #attendanceView.learningProgressView .trackerTable :is(.tuitionTitle,.receiptCol,.amountCol,.promotionCol,.paidDateCol,.paymentMethodCol,.payCol,.receiptColumn,.amountColumn,.promotionColumn,.paidDateColumn,.paymentMethodColumn,.payColumn,.feedbackTitle,.feedbackCol,.feedbackCell,.feedbackColumn,.academicCol,.academicCell,.academicColumn,.assessmentGroupTitle,.assessmentHead,.assessmentCell,.assessmentSummaryCell,.assessmentColumn,.noteTitle,.noteCol,.noteCell,.noteColumn,.tuitionFollowTitle,.tuitionFollowCol,.tuitionFollowCell,.tuitionFollowColumn) { display:none!important; }
}
@media(max-width:920px) {
 html body #workspace #attendanceView #attendanceClassStrip > #attendanceLearningView { display:none!important; }
 html body #workspace #attendanceView:not(.editMode) #attendanceRows .mobileAttendanceSettled .mobileTuitionBadge { top:40px!important; bottom:auto!important; }
 html body #workspace #attendanceView #attendanceRows .learningProgressCell { display:block!important; grid-column:1 / -1!important; grid-row:auto!important; width:100%!important; min-width:0!important; padding:0!important; background:transparent!important; }
 html body #workspace #attendanceView[data-mobile-mode="feedback"] #attendanceRows .learningProgressCell { display:none!important; }
 html body #workspace #attendanceView #attendanceRows .learningProgressEditor label { display:grid!important; }
 html body #workspace #attendanceView #attendanceRows .learningProgressEditor textarea { font-size:16px!important; width:100%!important; }
 html body #workspace #attendanceView #attendanceRows .learningProgressCell::before { display:none!important; }
 html body #workspace #attendanceView #attendanceRows .attendancePending .nameCell { min-height:30px!important; }
}
}

/* 100: compact mobile controls/card; completion color is not the score band. */
@layer attendance-polish {
 .learningProgressEditor summary[data-entered="false"] { color:#b42336; }
 .learningProgressEditor summary[data-entered="true"] { color:#087c49; }
 #attendanceTaskMenu { width:min(420px,calc(100vw - 24px)); box-sizing:border-box; padding:16px; }
 #attendanceTaskMenu header { display:flex; align-items:center; justify-content:space-between; gap:8px; }
 #attendanceTaskMenu button { min-height:44px; padding:8px 12px; font-size:16px; }
 #attendanceTaskMenu [data-task] { display:block; width:100%; margin:8px 0; text-align:left; }
 @media(max-width:920px) {
  html body #workspace[data-view="attendance"] #workspaceTopbar { grid-template-columns:minmax(0,1fr) auto max-content!important; grid-template-rows:auto!important; min-height:56px!important; padding:6px max(6px,env(safe-area-inset-right)) 6px 56px!important; gap:4px!important; align-items:center!important; }
  html body #workspace[data-view="attendance"] #viewTitle { font-size:12px!important; line-height:18px!important; margin:0!important; overflow-wrap:anywhere; }
  html body #workspace[data-view="attendance"] #attendanceMobileTabs { grid-column:2!important; grid-row:1!important; gap:3px!important; }
  html body #workspace #attendanceMobileTabs button { font-size:11px!important; min-height:44px!important; padding:4px 6px!important; }
  html body #workspace #attendanceMobileTabs button::after { display:none!important; }
  html body #workspace #attendanceMobileHeaderActions { grid-column:3!important; grid-row:1!important; gap:4px!important; }
  html body #workspace #attendanceMobileHeaderActions button { width:38px!important; min-width:38px!important; min-height:44px!important; padding:6px!important; }
  html body #workspace #attendanceMobileHeaderActions button span { display:none!important; }
  html body #workspace #attendanceMobileHeaderActions button i { font-size:20px!important; }
  html body #workspace #attendanceView #attendanceClassStrip { padding:4px!important; }
  html body #workspace #attendanceView #attendanceMobileSelectorRow { display:grid!important; grid-template-columns:minmax(44px,.8fr) minmax(48px,1fr) minmax(58px,1.3fr) 94px 44px!important; gap:4px!important; margin:0!important; width:100%!important; }
  html body #workspace #attendanceView #attendanceMobileSelectorRow :is(button,select,label) { min-width:0!important; width:100%!important; box-sizing:border-box!important; min-height:44px!important; height:44px!important; margin:0!important; border-radius:8px!important; }
  html body #workspace #attendanceView #attendanceMobileSelectorRow select { appearance:none!important; background-image:none!important; font-size:16px!important; padding:2px!important; text-align:center!important; }
  html body #workspace #attendanceView #attendanceMobileSelectorRow #attendanceClassPickerTrigger { font-size:12px!important; padding:2px!important; white-space:normal!important; }
  html body #workspace #attendanceView #attendanceMobileSelectorRow #attendanceClassPickerTrigger i { display:none!important; }
  html body #workspace #attendanceView #attendanceMobileDateField { padding:2px!important; font-size:13px!important; justify-content:center!important; }
  html body #workspace #attendanceView #attendanceMobileDateField i { display:none!important; }
  html body #workspace #attendanceView #attendanceMobileDateLabel { font-size:13px!important; white-space:nowrap!important; }
  html body #workspace #attendanceView #attendanceMobileSelectorRow #attendanceLearningView { max-width:none!important; margin:0!important; }
  html body #workspace #attendanceView #attendanceMobileSelectorRow > :is(#attendanceClassPickerTrigger,#attendanceSession,#attendanceMobileDateField,#attendanceLearningView,#attendanceMobileTasks) { grid-column:auto!important; grid-row:1!important; }
  html body #workspace #attendanceView #attendanceMobileTasks { font-size:26px!important; padding:0!important; }
  html body #workspace #attendanceView #attendanceTopControls :is(#btnAddAssessment,#btnAddStudent,#btnBulkAddStudent) { display:none!important; }
  html body #workspace #attendanceView #attendanceRows tr.attendanceCompactRow .sttCell { background:var(--accent,#0b8387)!important; }
  html body #workspace #attendanceView #attendanceRows tr.attendanceCompactRow { min-height:0!important; grid-template-columns:62px minmax(0,1fr)!important; grid-template-rows:none!important; gap:2px 6px!important; padding:6px!important; }
  html body #workspace #attendanceView #attendanceRows tr.attendanceCompactRow .attendanceAvatar { left:6px!important; top:6px!important; height:72px!important; }
  html body #workspace #attendanceView #attendanceRows tr.attendanceCompactRow .sttCell { left:6px!important; top:6px!important; }
  html body #workspace #attendanceView #attendanceRows tr.attendanceCompactRow .nameCell { min-height:0!important; }
  html body #workspace #attendanceView #attendanceRows tr.attendanceCompactRow .studentNameMain { display:flex!important; flex-wrap:wrap!important; align-items:center!important; gap:2px 4px!important; }
  html body #workspace #attendanceView #attendanceRows tr.attendanceCompactRow .studentNameMain strong { flex:1 1 130px!important; padding-right:0!important; }
  html body #workspace #attendanceView #attendanceRows tr.attendanceCompactRow .studentNameBox { grid-template-columns:62px minmax(0,1fr)!important; gap:6px!important; min-height:0!important; }
  html body #workspace #attendanceView #attendanceRows tr.attendanceCompactRow .studentNameMain strong { font-size:15px!important; }
  html body #workspace #attendanceView #attendanceRows tr.attendanceCompactRow .mobileTuitionBadge { position:static!important; float:none!important; display:inline-flex!important; margin:2px 0 0 auto!important; padding:1px 6px!important; font-size:12px!important; line-height:18px!important; white-space:nowrap!important; }
  html body #workspace #attendanceView #attendanceRows .mobileAttendanceStatus[data-action="setQuickStatus"] span { font-size:12px!important; white-space:nowrap!important; }
  html body #workspace #attendanceView[data-mobile-mode="feedback"] #attendanceRows .mobileDetailsToggle { width:44px!important; min-width:44px!important; height:44px!important; min-height:44px!important; right:0!important; }
  html body #workspace #attendanceView[data-mobile-mode="feedback"] #attendanceRows .mobileDetailsExpanded .mobileDetailsToggle { position:static!important; margin:4px 0 0 auto!important; flex:0 0 44px!important; }
  html body #workspace #attendanceView[data-mobile-mode="feedback"] #attendanceRows tr.attendanceCompactRow.mobileAttendanceSettled .mobileTuitionBadge { position:static!important; margin:2px 0 0 auto!important; }
  html body #workspace #attendanceView[data-mobile-mode="feedback"] #attendanceRows .mobileFeedbackSummary { padding-right:44px!important; }
  html body #workspace #attendanceView #attendanceRows tr.attendanceCompactRow .mobileAttendanceStatus span { white-space:nowrap!important; }
  html body #workspace #attendanceView #attendanceRows tr.attendanceCompactRow .activeSessionCell { grid-column:2!important; grid-row:2!important; }
  html body #workspace #attendanceView:not(.editMode) #attendanceRows tr.mobileAttendanceSettled .mobileAttendanceLatest { flex-direction:row!important; gap:4px!important; width:auto!important; flex:0 0 auto!important; padding:4px 8px!important; }
  html body #workspace #attendanceView #attendanceRows tr.attendanceCompactRow .learningProgressCell { grid-column:2!important; }
  html body #workspace #attendanceView #attendanceRows tr.attendanceCompactRow .learningProgressEditor summary { font-size:13px!important; min-height:32px!important; padding:4px 0!important; line-height:24px!important; }
  html body #workspace #attendanceView #attendanceRows tr.attendanceCompactRow:has(.learningProgressEditor[open]) .learningProgressCell { grid-column:1 / -1!important; }
  html body #workspace #attendanceView #attendanceRows tr.attendanceCompactRow .learningProgressEditor summary[data-entered="false"] { color:#b42336!important; }
  html body #workspace #attendanceView #attendanceRows tr.attendanceCompactRow .learningProgressEditor summary[data-entered="true"] { color:#087c49!important; }
  /* 104: keep the pending card/header as the base for every saved state. */
  html body #workspace #attendanceView:not(.editMode) #attendanceRows tr.attendanceCompactRow.mobileAttendanceSettled .mobileTuitionBadge { position:static!important; margin:2px 0 0 auto!important; }
  html body #workspace #attendanceView:not(.editMode) #attendanceRows tr.attendanceCompactRow.mobileAttendanceSettled:not(:has(.learningProgressEditor[open])) .activeSessionCell { width:calc(100% - 112px)!important; }
  html body #workspace #attendanceView:not(.editMode) #attendanceRows tr.attendanceCompactRow.mobileAttendanceSettled:not(:has(.learningProgressEditor[open])) .learningProgressCell { grid-row:2!important; width:106px!important; justify-self:end!important; align-self:center!important; }
  html body #workspace #attendanceView #attendanceRows tr.attendanceCompactRow .mobileAttendanceStatus[data-action="setQuickStatus"] { transition:none!important; transform:none!important; }
  html body #workspace #attendanceView[data-mobile-mode="feedback"] #attendanceRows tr.attendanceCompactRow .studentNameMain { display:flex!important; }
  html body #workspace #attendanceView[data-mobile-mode="feedback"] #attendanceRows tr.attendanceCompactRow .studentNameMain strong { padding-right:0!important; }
  html body #workspace #attendanceView[data-mobile-mode="feedback"] #attendanceRows tr.attendanceCompactRow .academicCell { position:static!important; grid-column:2!important; grid-row:2!important; width:100%!important; min-width:0!important; min-height:44px!important; padding:0!important; }
  html body #workspace #attendanceView[data-mobile-mode="feedback"] #attendanceRows tr.attendanceCompactRow .academicSelect { width:auto!important; max-width:100%!important; min-height:44px!important; height:44px!important; font-size:13px!important; padding:4px 8px!important; }
  html body #workspace #attendanceView[data-mobile-mode="feedback"] #attendanceRows tr.attendanceCompactRow .mobileFeedbackPreview { display:grid!important; grid-column:2!important; grid-row:3!important; grid-template-columns:minmax(0,1fr) 44px!important; align-items:center!important; min-width:0!important; padding:0!important; }
  html body #workspace #attendanceView[data-mobile-mode="feedback"] #attendanceRows tr.attendanceCompactRow .mobileFeedbackSummary { margin:0!important; padding:0!important; }
  html body #workspace #attendanceView[data-mobile-mode="feedback"] #attendanceRows tr.attendanceCompactRow .mobileDetailsToggle { position:static!important; grid-column:2!important; margin:0!important; width:44px!important; height:44px!important; min-height:44px!important; }
  html body #workspace #attendanceView[data-mobile-mode="feedback"] #attendanceRows tr.attendanceCompactRow.mobileDetailsExpanded .mobileFeedbackPreview { grid-template-columns:minmax(0,1fr) 44px!important; }
 }
 @media(max-width:360px) {
  html body #workspace #attendanceView #attendanceRows .mobileAttendanceStatus[data-action="setQuickStatus"] span { font-size:11px!important; }
 }
}

/* 105: one disclosure per learner, same right edge in both mobile modes. */
@layer attendance-polish {
 @media(max-width:920px) {
  html body #workspace #attendanceView #attendanceClassStripControls { display:none!important; }
  html body #workspace #attendanceView #attendanceMobileSelectorRow #attendanceClassPickerTrigger { justify-content:center!important; text-align:center!important; }
  html body #workspace #attendanceView #attendanceMobileSelectorRow :is(button,select,label) { border:1px solid #94a3b8!important; }
  html body #workspace #attendanceView #attendanceRows tr.attendanceCompactRow .learningProgressEditor summary { text-align:right!important; list-style:none!important; }
  html body #workspace #attendanceView #attendanceRows tr.attendanceCompactRow .learningProgressEditor summary::-webkit-details-marker { display:none; }
  html body #workspace #attendanceView #attendanceRows tr.attendanceCompactRow .learningProgressEditor summary::before { content:'▸ '; }
  html body #workspace #attendanceView #attendanceRows tr.attendanceCompactRow .learningProgressEditor[open] summary::before { content:'▾ '; }
  html body #workspace #attendanceView #attendanceRows tr.attendanceCompactRow .learningProgressCell { justify-self:end!important; }
  html body #workspace #attendanceView #attendanceRows tr.attendanceCompactRow .mobileAttendanceStatus[data-action="setQuickStatus"] { opacity:1!important; -webkit-tap-highlight-color:transparent; }
  html body #workspace #attendanceView #attendanceRows tr.attendanceCompactRow .mobileAttendanceStatus[data-action="setQuickStatus"]:focus:not(:focus-visible) { outline:none!important; box-shadow:none!important; }
  html body #workspace #attendanceView #attendanceRows tr.attendanceCompactRow .mobileAttendanceStatus[data-action="setQuickStatus"].active { box-shadow:inset 0 0 0 2px currentColor!important; }
  html body #workspace #attendanceView[data-mobile-mode="feedback"] #attendanceRows tr.attendanceCompactRow .academicCell { min-height:36px!important; }
  html body #workspace #attendanceView[data-mobile-mode="feedback"] #attendanceRows tr.attendanceCompactRow .academicSelect { width:100%!important; height:36px!important; min-height:36px!important; border-radius:8px!important; padding:2px 8px!important; }
  html body #workspace #attendanceView[data-mobile-mode="feedback"] #attendanceRows tr.attendanceCompactRow .mobileFeedbackPreview { display:flex!important; justify-content:flex-end!important; }
  html body #workspace #attendanceView[data-mobile-mode="feedback"] #attendanceRows tr.attendanceCompactRow .mobileFeedbackSummary { display:none!important; }
  html body #workspace #attendanceView[data-mobile-mode="feedback"] #attendanceRows tr.attendanceCompactRow .mobileDetailsToggle { width:auto!important; min-width:106px!important; padding:4px 0!important; gap:4px!important; height:44px!important; color:#b42336!important; }
  html body #workspace #attendanceView[data-mobile-mode="feedback"] #attendanceRows tr.attendanceCompactRow .mobileDetailsToggle.hasFeedback { color:#087c49!important; }
  html body #workspace #attendanceView[data-mobile-mode="feedback"] #attendanceRows tr.attendanceCompactRow .mobileDetailsToggle span { display:inline!important; font-size:13px!important; }
  html body #workspace #attendanceView[data-mobile-mode="feedback"] #attendanceRows tr.attendanceCompactRow .mobileDetailsToggle i::before { content:'▸'!important; font-size:13px!important; }
  html body #workspace #attendanceView[data-mobile-mode="feedback"] #attendanceRows tr.attendanceCompactRow.mobileDetailsExpanded .mobileDetailsToggle i { transform:none!important; }
  html body #workspace #attendanceView[data-mobile-mode="feedback"] #attendanceRows tr.attendanceCompactRow.mobileDetailsExpanded .mobileDetailsToggle i::before { content:'▾'!important; }
 }
}
