/* R99.9: scoped role-oriented monthly assessment controls; no print rules. */
:is(.msv2-board,.monthly-manager-legacy-board){--monthly-blue:#155eaa;--monthly-green:#166534;--monthly-orange:#9a4b0b;min-width:0}
.msv2-board .msv2-help{margin:5px 0;font-size:.86rem;line-height:1.6}
:is(.msv2-board,.monthly-manager-legacy-board) .msv2-subject-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:7px;margin:10px 0}
:is(.msv2-board,.monthly-manager-legacy-board) .msv2-subject{min-height:66px;padding:8px 10px;gap:3px;box-sizing:border-box;width:100%}
:is(.msv2-board,.monthly-manager-legacy-board) .msv2-subject.active{background:var(--monthly-blue);color:white;border-color:var(--monthly-blue)}
:is(.msv2-board,.monthly-manager-legacy-board) .msv2-subject.active :is(small,span){color:white}
.monthly-review-strip{display:flex;flex-wrap:wrap;gap:8px 18px;align-items:center;padding:10px;background:#eaf2fb;color:#173d64;border-radius:9px}
.monthly-review-table{width:100%;border-collapse:collapse;font-size:.87rem;table-layout:auto}
.monthly-review-table th,.monthly-review-table td{padding:9px 7px;text-align:start;border-bottom:1px solid #d5deea;overflow-wrap:anywhere}
.monthly-review-table thead{background:#f1f5f9;color:#263b52}
.monthly-row-actions{display:flex;gap:5px;flex-wrap:wrap}
.monthly-row-actions button{min-height:36px;padding:5px 8px;font-size:.8rem}
.monthly-status.saved{color:#166534;background:#edf9f0}.monthly-status.attention{color:#91430a;background:#fff3e2}
.monthly-status{display:inline-block;padding:4px 7px;border-radius:5px}
.monthly-extra-tools{border:1px solid #cbd5e1;border-radius:9px;padding:9px 12px;margin-top:12px}
.monthly-extra-tools>summary{cursor:pointer;font-weight:700;min-height:32px}
.monthly-next-subject{position:sticky;bottom:10px;z-index:3;min-height:42px;margin:10px 0;background:#155eaa;color:white;border:0;border-radius:8px;padding:9px 16px}
:is(.msv2-board,.monthly-subject-first) .monthly-combined .mc-head h3{font-size:1rem}
:is(.msv2-board,.monthly-subject-first) .monthly-combined .mc-help{margin:4px 0;font-size:.83rem}
:is(.msv2-board,.monthly-subject-first) .monthly-combined .mc-row{display:grid;grid-template-columns:minmax(145px,1.1fr) minmax(260px,2fr) minmax(120px,.8fr);align-items:center;gap:8px;padding:8px 10px;border-radius:8px}
:is(.msv2-board,.monthly-subject-first) .monthly-combined .mc-row-title{margin:0;display:flex;flex-wrap:wrap;gap:4px}
:is(.msv2-board,.monthly-subject-first) .monthly-combined .mc-ratings button{min-height:40px;font-size:.8rem}
:is(.msv2-board,.monthly-subject-first) .monthly-combined .mc-ratings button[aria-pressed=true]{background:#155eaa;border-color:#155eaa}
:is(.msv2-board,.monthly-subject-first) .monthly-combined .mc-status{margin:0;font-size:.78rem}
:is(.msv2-board,.monthly-subject-first) .monthly-combined .mc-list{gap:6px}
:is(.msv2-board,.monthly-subject-first) .monthly-combined .mc-footer{position:sticky;bottom:60px;z-index:4;background:white;border:1px solid #cbd5e1;border-radius:9px;padding:9px;box-shadow:0 3px 12px #1e293b18}
:is(.msv2-board,.monthly-subject-first) .monthly-combined .mc-bulk{padding:9px;border-radius:8px}
:is(.msv2-board,.monthly-subject-first) .monthly-combined .mc-bulk-title small{display:none}
:is(.msv2-board,.monthly-subject-first) .monthly-combined .mc-bulk-form{display:flex;align-items:end;flex-wrap:wrap;gap:8px}
:is(.msv2-board,.monthly-subject-first) .monthly-combined .mc-bulk-form label{flex:1;min-width:130px}
.msv2-board button:focus-visible,.msv2-board summary:focus-visible{outline:3px solid #2563eb;outline-offset:3px}
.monthly-parent-preview{max-width:900px;width:calc(100% - 24px);max-height:90vh;overflow:auto;border:1px solid #cbd5e1;border-radius:12px}
@media(max-width:900px){:is(.msv2-board,.monthly-subject-first) .monthly-combined .mc-row{grid-template-columns:1fr 1fr}:is(.msv2-board,.monthly-subject-first) .monthly-combined .mc-ratings{grid-column:1/-1;grid-row:2}:is(.msv2-board,.monthly-subject-first) .monthly-combined .mc-status{justify-self:end}}
@media(max-width:600px){.msv2-board{padding:10px!important}:is(.msv2-board,.monthly-manager-legacy-board) .msv2-subject-list{grid-template-columns:repeat(2,minmax(0,1fr))}.monthly-review-table,.monthly-review-table tbody{display:block}.monthly-review-table thead{display:none}.monthly-review-table tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border:1px solid #cbd5e1;border-radius:9px;margin:8px 0;padding:7px;gap:5px}.monthly-review-table th{grid-column:1/-1}.monthly-review-table td{border:0;padding:3px;font-size:.83rem}.monthly-review-table td[data-label]:before{content:attr(data-label)'：';font-weight:700}.monthly-review-table .monthly-row-actions{grid-column:1/-1}.monthly-review-strip{gap:5px 10px;padding:8px}.monthly-next-subject{width:100%;bottom:5px}:is(.msv2-board,.monthly-subject-first) .monthly-combined .mc-footer{bottom:53px}:is(.msv2-board,.monthly-subject-first) .monthly-combined .mc-row{padding:7px}:is(.msv2-board,.monthly-subject-first) .monthly-combined .mc-ratings{gap:4px}:is(.msv2-board,.monthly-subject-first) .monthly-combined .mc-ratings button{font-size:.76rem;padding:5px 3px;min-height:44px}:is(.msv2-board,.monthly-subject-first) .monthly-combined .mc-row-title{font-size:.86rem}:is(.msv2-board,.monthly-subject-first) .monthly-combined .mc-status{max-width:140px}.msv2-board :is(input,select,textarea){max-width:100%;box-sizing:border-box}}

:is(.msv2-board,.monthly-subject-first) .monthly-combined .mc-ratings{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))} .mc-special{font-size:.78rem;align-self:start}.mc-special>summary{cursor:pointer;min-height:28px}.monthly-manager-legacy-details{padding:12px;border:1px solid #cbd5e1;border-radius:9px}.monthly-manager-legacy-details>summary{cursor:pointer;font-weight:700}.monthly-subject-first .ms-lesson-header{padding:8px!important}.monthly-subject-first .ms-lesson-tab{padding:7px!important;min-height:62px!important}.monthly-next-subject{top:8px;bottom:auto}.monthly-subject-first .ms-lesson-tabs{grid-template-columns:repeat(auto-fit,minmax(120px,1fr))}@media(max-width:600px){.monthly-subject-first .ms-lesson-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}}

.msv2-board .msv2-bulk-submit{padding:8px;margin:7px 0}.msv2-board .msv2-bulk-submit>summary{cursor:pointer;min-height:30px;font-weight:700}.msv2-board>h3{font-size:1.05rem;margin:5px 0}.msv2-board #msv2-detail{padding:6px 0;border:0}.msv2-board #msv2-combined{padding:0;border:0;box-shadow:none}.msv2-board .monthly-combined{padding:0}.mc-special label{display:block}.mc-special select{min-height:32px;padding:3px}.mc-special:not([open]){max-height:32px} .monthly-extra-tools>details{margin:8px 0}@media(max-width:600px){.msv2-board .monthly-combined .mc-head{gap:5px}.msv2-board .monthly-combined .mc-help{font-size:.8rem}.msv2-board .msv2-actions{gap:6px}.monthly-next-subject{margin:4px 0}.msv2-board .monthly-combined .mc-row-title{min-width:0}}

.msv2-board .msv2-subject-head+.msv2-help{display:none}:is(.msv2-board,.monthly-subject-first) .monthly-combined .mc-help{padding:4px 6px;margin:4px 0!important;line-height:1.5}:is(.msv2-board,.monthly-subject-first) .monthly-combined .mc-bulk-title{margin:0!important}:is(.msv2-board,.monthly-subject-first) .monthly-combined .mc-bulk-title small{display:none}:is(.msv2-board,.monthly-subject-first) .monthly-combined .mc-bulk-form{gap:5px}:is(.msv2-board,.monthly-subject-first) .monthly-combined .mc-bulk-form label{min-width:110px}:is(.msv2-board,.monthly-subject-first) .monthly-combined .mc-bulk select{min-height:36px;width:100%;font:inherit}:is(.msv2-board,.monthly-subject-first) .monthly-combined .mc-bulk-undo-row{font-size:.74rem;margin-top:5px}.monthly-role-page>.page-head{margin-bottom:8px}.monthly-role-page>.page-head h2{font-size:1.2rem;margin:4px 0}.monthly-role-page>.page-head p{margin:0}.monthly-role-page>.card .monthly-periods{display:flex;flex-wrap:wrap;gap:6px}.monthly-role-page>.card .monthly-periods-head{margin:6px 0}.monthly-role-page>.card{padding:12px}.monthly-role-page .monthly-period{padding:6px 12px;min-height:50px}

.monthly-combined .mc-row[data-saved=true] [data-mc-state]{color:#166534;background:#edf9f0}.monthly-combined .mc-row[data-dirty=true] [data-mc-state]{color:#91430a;background:#fff3e2}#monthly-editor .monthly-subject-first .ms-lesson-tab[aria-pressed=true]{background:#155eaa;border-color:#155eaa;color:white}#monthly-editor .monthly-subject-first .ms-lesson-tab[aria-pressed=true] small{color:white}

/* Narrow-screen compatibility and a focused, short teacher workflow. */
#monthly-editor,#monthly-editor *,#monthly-editor *::before,#monthly-editor *::after,
.monthly-ux-focus,.monthly-ux-focus *,.monthly-manager-inbox,.monthly-manager-inbox *{box-sizing:border-box;min-width:0}
.monthly-ux-focus>.page-head{display:none}
.monthly-ux-context{margin:0 0 8px;border:1px solid #c4d8e0;border-radius:12px;background:#f6fafc;overflow:hidden}
.monthly-ux-context>summary{padding:10px 14px;font-size:.9rem;font-weight:800;color:#285b70;cursor:pointer}
.monthly-ux-context>section.card{margin:0;border:0;padding:10px}
.monthly-ux-focus #monthly-teacher-progress{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:4px 0 8px;padding:9px 13px;border-radius:11px}
.monthly-ux-focus #monthly-teacher-progress h3{font-size:1rem;margin:0}
.monthly-ux-focus #monthly-teacher-progress p{display:none}
.monthly-ux-focus #monthly-teacher-progress strong{font-size:.86rem;white-space:normal}
.monthly-ux-focus .ms-lesson-header{margin-bottom:5px;padding:8px 12px}
.monthly-ux-focus .ms-lesson-header h3{font-size:1rem;margin:0}
.monthly-ux-focus .ms-lesson-header p{display:none}
.monthly-ux-focus .ms-lesson-tabs{gap:5px;margin:6px 0}
.monthly-ux-focus .ms-lesson-tab{min-height:47px;padding:7px 9px;gap:1px}
.monthly-ux-focus .ms-lesson-tab small{font-size:.7rem}
.monthly-ux-focus .ms-lesson-summary{padding:8px 10px;margin:4px 0}
.monthly-ux-focus #monthly-quick{padding:10px}
.monthly-ux-focus .monthly-combined .mc-head{margin:0 0 3px}
.monthly-ux-focus .monthly-combined .mc-help{display:none}
.monthly-ux-focus .monthly-combined .mc-search{margin:7px 0;min-height:38px}
.monthly-ux-focus .monthly-combined .mc-row{padding:8px 10px;border-radius:11px}
.monthly-ux-focus .monthly-combined .mc-list{gap:5px}
.monthly-ux-focus .monthly-combined .mc-row-title{margin-bottom:4px}
.monthly-ux-focus .monthly-combined .mc-ratings button{min-height:41px}
.monthly-ux-focus .msv2-board>p.msv2-help{display:none}
.monthly-ux-focus .msv2-board>h3{font-size:1.04rem;margin:0 0 8px}
.monthly-ux-focus .msv2-subject-list{gap:6px}
.monthly-ux-focus .msv2-subject{min-height:56px;padding:8px}
.monthly-ux-focus .msv2-detail>p.msv2-help{display:none}
.monthly-ux-focus .msv2-bulk-submit{padding:9px 12px;gap:7px}
.monthly-ux-focus .msv2-bulk-submit p.msv2-help{display:none}
.monthly-ux-focus .mc-bulk .mc-bulk-title small{display:none}
.monthly-ux-focus .mc-bulk .mc-bulk-form{gap:6px}
.monthly-ux-focus .mc-bulk .mc-bulk-form label{min-width:0}
.monthly-ux-focus .mc-bulk .mc-bulk-form select{max-width:100%}
.monthly-ux-focus #monthly-editor .card{max-width:100%}
.monthly-ux-focus #monthly-editor button{max-width:100%}
.monthly-ux-focus #monthly-editor .mc-footer{position:sticky;bottom:64px;z-index:5;margin:7px 0 3px;padding:8px 10px}
.monthly-manager-inbox{border:1px solid #b8d6e1;border-radius:14px;background:#f7fafc;margin:0 0 14px;padding:12px}
.mmi-heading{display:flex;align-items:center;justify-content:space-between;gap:9px;flex-wrap:wrap;margin-bottom:8px}
.mmi-heading h3{margin:0;font-size:1.07rem;color:#164d66}
.mmi-count{border-radius:50px;background:#fff3dc;color:#8a5014;font-size:.82rem;font-weight:750;padding:5px 9px}
.mmi-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,360px),1fr));gap:8px}
.mmi-item{background:#fff;border:1px solid #c9dce4;border-radius:10px;padding:10px}
.mmi-item-top{display:flex;align-items:center;justify-content:space-between;gap:10px}
.mmi-item-top>div{display:flex;flex-direction:column;gap:3px;min-width:0}
.mmi-item-top strong{color:#164e69}.mmi-item-top small{color:#567487}
.mmi-open{border-radius:9px;background:#0b6c84;color:#fff;font:inherit;font-weight:750;padding:8px 12px;white-space:nowrap;min-height:41px;border:1px solid #0b6c84;cursor:pointer}
.mmi-item details{margin-top:7px;border-top:1px solid #e0ebee;padding-top:8px}
.mmi-item details>summary{font-size:.84rem;color:#216277;cursor:pointer}
.mmi-detail-host{padding-top:8px;font-size:.87rem}
.mmi-students{display:grid;gap:5px}
.mmi-student{padding:7px 0;border-top:1px dashed #d8e4e9}
.mmi-student>div{display:flex;gap:5px;flex-wrap:wrap;margin-top:4px}
.mmi-rating{font-size:.76rem;padding:4px 7px;background:#ecf6f8;border:1px solid #c6dfe5;border-radius:8px}
.mmi-empty,.mmi-warning{font-size:.88rem;margin:7px 0;color:#8b4e20}
@media(max-width:620px){
.monthly-ux-focus .ms-lesson-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}
.monthly-ux-focus .ms-lesson-tab{padding:6px 8px;min-height:48px}
.monthly-ux-focus .monthly-combined .mc-footer{bottom:65px}
.monthly-ux-focus .monthly-combined .mc-footer button{min-height:42px}
.mmi-item-top{align-items:flex-start}
.mmi-open{font-size:.83rem}
}

/* Collapsed optional panels: teacher uses the core workflow without scrolling through utilities. */
.monthly-ux-focus .monthly-ux-extras{border:1px solid #bfd3dc;background:#fff;border-radius:12px;overflow:hidden;margin:8px 0}
.monthly-ux-focus .monthly-ux-extras>summary{cursor:pointer;padding:10px 12px;font-weight:800;color:#255d75}
.monthly-ux-focus .monthly-ux-extras>.card{margin:0;border:0;border-top:1px solid #dce6e9;border-radius:0;padding:9px}
.monthly-manager-controls,.monthly-manager-editor{margin:9px 0;border:1px solid #bcd5df;border-radius:12px;background:#f8fbfd;overflow:hidden}
.monthly-manager-controls>summary,.monthly-manager-editor>summary{cursor:pointer;color:#1a5974;padding:12px 14px;font-weight:800}
.monthly-manager-controls>section.card,.monthly-manager-editor>#monthly-editor{margin:0}
.monthly-manager-editor:not([open]){background:#fff}
#monthly-editor .monthly-manager-goals{border:1px solid #bfd6e3;border-radius:10px;padding:8px 10px;margin:10px 0}
#monthly-editor .monthly-manager-goals>summary{font-weight:750;color:#245b73;cursor:pointer}
#monthly-editor .monthly-manager-goals ul{max-height:300px;overflow:auto}
@media(max-width:640px){
.monthly-ux-focus .monthly-ux-extras>summary{min-height:42px}
.monthly-manager-controls>summary,.monthly-manager-editor>summary{min-height:43px}
}

.monthly-manager-workspace>summary{cursor:pointer;padding:12px;font-weight:700}.monthly-ux-focus .msv2-subject-head+.msv2-help{display:block;font-size:.82rem}.monthly-ux-focus .mc-footer{bottom:calc(64px + env(safe-area-inset-bottom))!important}.monthly-manager-workspace{margin:12px 0}.monthly-ux-focus .ms-lesson-summary{font-size:.85rem}

/* Keep the save controls outside the independently scrolling roster. */
:is(.msv2-board,.monthly-subject-first) .monthly-next-subject{position:static}
:is(.msv2-board,.monthly-subject-first) .monthly-combined .mc-list{max-height:50dvh;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
:is(.msv2-board,.monthly-subject-first) .monthly-combined .mc-footer{position:relative;bottom:auto!important;margin-top:8px;flex-shrink:0}
/* R99.11: explicit month navigation, short entry flow, optional details. */
.monthly-teacher-nav{position:sticky;top:0;z-index:8;display:flex;align-items:center;gap:10px;padding:8px;background:#f7fafc;border:1px solid #c4d6e3;border-radius:10px;margin-bottom:8px;box-sizing:border-box}
.monthly-teacher-nav button{min-height:44px;flex-shrink:0;background:#155eaa;color:white;border:0;border-radius:8px;padding:7px 12px;font:inherit;font-weight:700}
.monthly-teacher-nav>div{display:flex;flex-direction:column;gap:3px;min-width:0}.monthly-teacher-nav small{color:#386179}
.monthly-month-picker{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:end;gap:7px;margin:12px 0}.monthly-month-picker label{min-width:0}.monthly-month-picker select{width:100%;max-width:100%;min-height:44px}.monthly-month-picker button{min-height:44px;padding:7px}
.monthly-month-list .monthly-periods{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));overflow:visible!important;white-space:normal!important;max-width:100%}
.monthly-month-list .monthly-period{width:100%;min-width:0!important;max-width:100%;white-space:normal;overflow-wrap:anywhere}
.monthly-ux-focus #monthly-teacher-progress,.monthly-ux-focus .msv2-board>h3,.monthly-ux-focus .msv2-board>p,.monthly-ux-focus .monthly-combined .mc-help{display:none!important}
.monthly-ux-focus .mc-head h3{font-size:.95rem}.monthly-ux-focus .ms-lesson-summary{padding:7px;margin:5px 0}.monthly-ux-focus .monthly-next-subject{position:static;min-height:44px;margin:8px 0}
.monthly-ux-focus .mc-head,.monthly-ux-focus [data-goal-subject],.monthly-ux-focus .msv2-goals{scroll-margin-top:90px}
.monthly-month-complete{border:1px solid #93c9a8;background:#edf9f1;color:#166534;padding:9px;border-radius:8px;font-weight:700}
.monthly-extra-tools details>summary{min-height:40px;cursor:pointer;align-content:center}.monthly-history-tools{border-top:1px solid #d3e0e8;margin-top:8px;padding-top:5px}
.monthly-note-tools label,#monthly-advanced>label{display:block;margin:9px 0}.monthly-note-tools textarea,#monthly-advanced textarea{box-sizing:border-box;max-width:100%;width:100%}.monthly-note-tools select{max-width:100%}.monthly-note-tools small,#monthly-note-state{display:block;color:#166534}.monthly-related-goals p{font-size:.85rem;margin:5px 0}
.mmi-subject-states{display:flex;flex-wrap:wrap;gap:5px;margin:7px 0}.mmi-subject-states>span{background:#edf3f8;color:#244d66;border-radius:5px;padding:4px 6px;font-size:.78rem}.mmi-item{min-width:0;overflow-wrap:anywhere}.mmi-open{white-space:normal!important}
.monthly-parent-v2 .mpr2-goals>summary{font-weight:700;cursor:pointer;min-height:38px;align-content:center}.monthly-parent-v2 .mpr2-goals:not([open]){padding-bottom:0}.monthly-parent-v2 .mpr2-subject{min-width:0}
@media(max-width:600px){.monthly-month-list .monthly-periods{display:none!important}.monthly-teacher-nav{gap:7px;font-size:.8rem}.monthly-teacher-nav button{font-size:.78rem;padding:7px}.monthly-month-picker{gap:4px}.monthly-month-picker button{font-size:.76rem}.monthly-ux-focus .ms-lesson-tabs{grid-template-columns:repeat(2,minmax(0,1fr))!important}.monthly-ux-focus .mc-ratings button{overflow-wrap:normal;word-break:normal}.monthly-manager-inbox{padding:8px}.mmi-item-top{gap:7px}.mmi-open{padding:7px}.monthly-extra-tools{padding:8px}}
@media(prefers-reduced-motion:reduce){.monthly-role-page *{scroll-behavior:auto!important}}
.monthly-ux-focus .monthly-combined{padding:0!important}.monthly-ux-focus #monthly-quick.card{padding:7px!important}.monthly-ux-focus .mc-head h3{display:none}.monthly-ux-focus .mc-head{justify-content:flex-end;padding:3px 0}.monthly-ux-focus .monthly-combined .mc-search{margin:8px 0;min-height:40px;padding:7px}.monthly-ux-focus .monthly-combined .mc-list{max-height:44dvh}.monthly-ux-focus .ms-lesson-tab{padding:6px!important}
@media(max-width:360px){.monthly-role-page :is(button,select,textarea){max-width:100%;box-sizing:border-box}.monthly-teacher-nav{padding:6px}.monthly-teacher-nav button{max-width:112px}.monthly-ux-focus .monthly-combined .mc-ratings button{font-size:.74rem;padding:4px 2px}.monthly-ux-focus .monthly-combined .mc-row{padding:5px}.monthly-ux-focus .monthly-extra-tools{padding:6px}}
#monthly-open-period{grid-column:1/-1}
/* R99.12: one preparation stage for the whole month. */
.monthly-preparation{min-width:0;padding:12px!important}.monthly-preparation h3{font-size:1.08rem;margin:4px 0 8px}.monthly-preparation-help{font-size:.84rem;line-height:1.7;margin:6px 0 10px;color:#36566d}
.monthly-preparation-tabs{display:grid;grid-template-columns:repeat(auto-fit,minmax(115px,1fr));gap:6px;margin-bottom:10px}.monthly-preparation-tabs button{min-width:0;min-height:48px;display:flex;flex-direction:column;gap:4px;padding:7px;border:1px solid #b8cee1;background:#f1f7fc;border-radius:8px;font:inherit;color:#173e60;white-space:normal}.monthly-preparation-tabs button[aria-pressed=true]{color:white;background:#155eaa;border-color:#155eaa}.monthly-preparation-tabs small{font-size:.73rem;color:inherit}
.monthly-preparation-goals{max-height:45dvh;overflow-y:auto;overscroll-behavior:contain;padding:5px 7px;border:1px solid #d2dfe8;border-radius:9px;scrollbar-gutter:stable}.monthly-preparation-goals h4{margin:4px 0 8px}.monthly-preparation-goals label{display:flex;gap:9px;align-items:start;padding:9px 2px;min-height:44px;box-sizing:border-box;border-bottom:1px solid #e0e8ef;font-size:.9rem;line-height:1.65}.monthly-preparation-goals input{flex-shrink:0;margin-top:5px;accent-color:#155eaa}
.monthly-preparation-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:space-between;padding:10px 0 2px}.monthly-preparation-actions strong{font-size:.88rem}.monthly-preparation-actions button{min-height:44px;white-space:normal;max-width:100%}.monthly-preparation-error{color:#8c3616;background:#fff0e5;padding:9px;border-radius:7px;margin-top:8px}.monthly-preparation-warning{font-size:.8rem;color:#874511;margin-top:7px}
.monthly-submit-summary{display:flex;flex-wrap:wrap;align-items:center;gap:8px;justify-content:space-between;border:1px solid #b7d4c2;border-radius:9px;background:#f5fbf7;padding:9px;margin-top:9px}.monthly-submit-summary strong{font-size:.88rem}.monthly-submit-summary .monthly-month-complete{padding:0;border:0;background:none;margin:0}.monthly-submit-summary button{min-height:44px;white-space:normal}.monthly-month-settings{margin-top:8px;padding:8px;border:1px solid #d0deea;border-radius:8px}.monthly-month-settings>summary,.msv2-independent-submit>summary{cursor:pointer;min-height:36px;align-content:center;font-weight:700}.msv2-independent-submit{margin:5px 0;font-size:.83rem}.msv2-bulk-submit .msv2-subject-select{display:flex;gap:7px;margin:6px 0}
@media(max-width:600px){.monthly-preparation-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}.monthly-preparation{padding:9px!important}.monthly-preparation-actions button{width:100%;font-size:.87rem}.monthly-preparation-goals{max-height:39dvh}.monthly-submit-summary button{width:100%;font-size:.9rem}.monthly-submit-summary strong{font-size:.82rem}}
/* R99.13: explicit preparation review and distinct manager decisions. */
.monthly-preparation-step{margin:4px 0 9px;font-size:.82rem;font-weight:700;color:#24567e}.monthly-preparation-pending{display:block;flex-basis:100%;color:#8b4b14;font-size:.8rem}
.monthly-preparation-tabs button[data-review-state=unreviewed]:not([aria-pressed=true]){background:#fff7eb;border-color:#d8af6a;color:#79501d}.monthly-preparation-tabs button[data-review-state=not_taught]:not([aria-pressed=true]){background:#f1f4f7;border-color:#bac6d1;color:#4b5f70}.monthly-preparation-tabs button[data-review-state=reviewed]:not([aria-pressed=true]){background:#edf8f1;border-color:#9bc7ac;color:#245d3b}
.monthly-lesson-actions{display:grid;grid-template-columns:1fr 1.2fr 1fr;gap:8px;margin-top:9px}.monthly-lesson-actions button{min-height:44px;padding:7px 9px;border-radius:8px;border:1px solid #9eb8d2;background:#eaf2fb;color:#1b4e7e;font:inherit;font-weight:700;white-space:normal}.monthly-lesson-actions #monthly-mark-not-taught{background:#f2f5f8;color:#455a6b;border-color:#aebdca}.monthly-lesson-actions #monthly-mark-not-taught[aria-pressed=true]{background:#e1e9f0;border:2px solid #5c778f}
.monthly-preparation-summary h4{margin:8px 0}.monthly-preparation-summary ul{list-style:none;padding:0;margin:8px 0;border:1px solid #d1dfe9;border-radius:8px;overflow:hidden}.monthly-preparation-summary li{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border-bottom:1px solid #e0e8ee;font-size:.88rem}.monthly-preparation-summary li:last-child{border:0}.monthly-preparation-summary li span{color:#365b72}.monthly-preparation-summary:focus{outline:3px solid #86b8e9;outline-offset:2px}
.monthly-manager-actions-panel{padding:14px;border:1px solid #c8d7e4;border-radius:10px;background:#fbfdff;margin-top:12px}.monthly-manager-actions{display:flex;flex-wrap:wrap;gap:14px;align-items:center;margin:4px 0}.monthly-manager-actions-panel label{display:block;margin:12px 0 7px}.monthly-manager-actions-panel textarea{display:block;box-sizing:border-box;width:100%;max-width:100%;min-height:84px;margin-top:7px}
.monthly-role-page :is(#monthly-publish,#msv2-publish){background:#166534!important;border:1px solid #12552c!important;color:#fff!important}.monthly-role-page :is(#monthly-reopen,#msv2-return-open,#msv2-reject,#msv2-reopen){background:#fff0de!important;border:1.5px solid #c88b43!important;color:#7b3d0b!important}
.monthly-manager-actions button,.monthly-manager-actions-panel>button{min-height:44px;max-width:100%;box-sizing:border-box;padding:10px 16px;margin:0;font:inherit;font-weight:700;border-radius:8px;white-space:normal;line-height:1.5}.monthly-role-page :is(#monthly-publish,#msv2-publish):hover:not(:disabled){background:#115329!important}.monthly-role-page :is(#monthly-reopen,#msv2-return-open,#msv2-reject,#msv2-reopen):hover:not(:disabled){background:#ffe0b7!important}
.monthly-role-page :is(.monthly-manager-actions-panel,.monthly-month-picker,.monthly-lesson-actions) :is(button,select):focus-visible{outline:3px solid #2563eb;outline-offset:3px}.monthly-role-page :is(.monthly-manager-actions-panel,.monthly-month-picker,.monthly-lesson-actions) button:disabled{background:#e7ecf0!important;border-color:#bac6cf!important;color:#627282!important;cursor:not-allowed;opacity:1}.monthly-role-page [aria-busy=true]{cursor:progress}.monthly-role-page button[aria-busy=true]::after{content:' · در حال انجام…';font-size:.8em}#msv2-return-form[hidden]{display:none!important}
.monthly-role-page .monthly-month-picker{grid-template-columns:minmax(72px,.8fr) minmax(0,2fr) minmax(72px,.8fr);gap:8px}.monthly-month-picker :is(#monthly-prev,#monthly-next){height:46px;min-height:46px;padding:7px 8px;border:1px solid #9ab3ce;border-radius:8px;background:#e8f1fb;color:#174b7b;font:inherit;font-size:.84rem;font-weight:700;white-space:nowrap}.monthly-month-picker :is(#monthly-prev,#monthly-next):hover:not(:disabled){background:#d6e8fb;border-color:#6e9bc7}.monthly-role-page :is(#monthly-class,#monthly-new-period,#monthly-period-select){box-sizing:border-box;max-width:100%;min-height:46px;border:1px solid #9ab3ce;border-radius:8px;background:#fff;color:#183e5f;font:inherit;padding:7px}.monthly-month-picker #monthly-period-select{width:100%;font-size:.9rem;text-align:center}
@media(max-width:600px){.monthly-role-page .monthly-month-picker{grid-template-columns:minmax(72px,.85fr) minmax(0,1.8fr) minmax(72px,.85fr);gap:5px}.monthly-month-picker :is(#monthly-prev,#monthly-next){font-size:.76rem;padding:6px 3px}.monthly-manager-actions{display:grid;grid-template-columns:1fr;gap:12px}.monthly-manager-actions button{width:100%;min-height:46px}.monthly-manager-actions-panel{padding:12px}.monthly-lesson-actions{gap:5px}.monthly-lesson-actions button{padding:7px 3px;font-size:.78rem}.monthly-preparation-summary li{padding:9px 8px;gap:8px}.monthly-preparation-goals{max-height:34dvh}}
.monthly-role-page :is(#monthly-publish,#msv2-publish,#monthly-reopen,#msv2-return-open,#msv2-reject,#msv2-reopen,#monthly-prev,#monthly-next):disabled{background:#e6ebf0!important;border-color:#bac5ce!important;color:#637383!important;box-shadow:none;cursor:not-allowed}
.monthly-role-page :is(#monthly-publish,#msv2-publish,#monthly-reopen,#msv2-return-open,#msv2-reject,#msv2-reopen)[aria-busy=true]{cursor:progress}
#monthly-editor :is(#monthly-publish,#monthly-reopen,#msv2-publish,#msv2-return-open,#msv2-reject,#msv2-reopen){min-height:46px!important}
@media(max-width:480px){.monthly-role-page .monthly-month-picker{grid-template-columns:1fr 1fr;gap:8px}.monthly-month-picker>label{grid-column:1/-1;grid-row:1}.monthly-month-picker>#monthly-prev{grid-column:1;grid-row:2}.monthly-month-picker>#monthly-next{grid-column:2;grid-row:2}.monthly-month-picker>#monthly-open-period{grid-column:1/-1;grid-row:3}.monthly-month-picker #monthly-period-select{min-width:150px}}
/* R99.14: stable autosave status and named course navigation. */
.monthly-role-page .mc-row-state{display:inline-flex;align-items:center;min-height:28px;min-width:110px;font-size:.8rem}.monthly-role-page .mc-footer{min-height:68px;box-sizing:border-box}.monthly-role-page .mc-footer button[hidden]{display:none!important}.monthly-role-page .monthly-next-subject{min-height:46px;max-width:100%;padding:10px 14px;white-space:normal;overflow-wrap:normal;word-break:normal;line-height:1.65}.monthly-manager-workspace .monthly-periods{display:none}.monthly-manager-workspace .monthly-month-picker{max-width:680px;margin-inline:auto}.monthly-manager-workspace .monthly-month-picker select{font-size:.85rem}.monthly-manager-inbox .mmi-item-top button{min-height:46px}.monthly-role-page .monthly-manager-workspace{min-width:0}
@media(min-width:769px){.monthly-role-page .mc-footer{bottom:8px}}
@media(max-width:1000px){.monthly-manager-workspace .monthly-review-table,.monthly-manager-workspace .monthly-review-table tbody{display:block}.monthly-manager-workspace .monthly-review-table thead{display:none}.monthly-manager-workspace .monthly-review-table tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border:1px solid #cbd5e1;border-radius:9px;margin:8px 0;padding:7px;gap:5px}.monthly-manager-workspace .monthly-review-table th{grid-column:1/-1}.monthly-manager-workspace .monthly-review-table td{border:0;padding:3px;font-size:.83rem}.monthly-manager-workspace .monthly-review-table td[data-label]:before{content:attr(data-label)'：';font-weight:700}.monthly-manager-workspace .monthly-review-table .monthly-row-actions{grid-column:1/-1}}
@media(max-width:768px){.monthly-role-page :is(.msv2-board,.monthly-subject-first) .monthly-combined .mc-footer{bottom:calc(78px + env(safe-area-inset-bottom,0px))}}
/* R99.15: current subject remains identifiable while entering outcomes. */
.monthly-role-page .monthly-combined .mc-head{position:sticky;top:76px;z-index:4;padding:10px 8px;background:#f5fbff;border:1px solid #bfd6e3;border-radius:10px;scroll-margin-top:90px}.monthly-role-page .monthly-combined .mc-head h3{font-size:1rem;line-height:1.7}.mc-autosave-label{display:inline-flex;align-items:center;padding:4px 8px;background:#e3f4e9;border:1px solid #a5cfb4;border-radius:8px;color:#176338;font-size:.8rem;font-weight:700}.monthly-role-page .msv2-subject-head{scroll-margin-top:90px}.monthly-role-page .ms-lesson-rating{scroll-margin-top:90px}.msv2-print-actions{display:flex;flex-wrap:wrap;gap:12px}.msv2-print-actions button,.monthly-approved-publication button,.mpr2-actions button{min-height:44px}.mpr2-actions{display:flex;flex-wrap:wrap;gap:12px}.monthly-pdf-guide{max-width:520px;width:calc(100% - 28px);border:1px solid #a9c3d6;border-radius:14px;padding:20px;color:#173b50;background:#fff;font:inherit}.monthly-pdf-guide p{line-height:1.9}.monthly-pdf-guide>div{display:flex;flex-wrap:wrap;gap:12px}.monthly-pdf-guide button{min-height:46px;padding:10px 14px}.monthly-pdf-guide::backdrop{background:#102c4580}
@media(max-width:600px){.monthly-role-page .monthly-combined .mc-head{top:66px;gap:6px}.msv2-print-actions button{width:100%}.monthly-pdf-guide>div button{flex:1 1 100%}}
.monthly-role-page .monthly-combined .mc-head h3{display:block!important}.monthly-role-page.monthly-ux-focus .monthly-combined .mc-help{display:block!important}
/* R99.16 compact output and one month grid, without horizontal navigation. */
.monthly-role-page .monthly-month-grid,.monthly-periods.monthly-month-grid{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(125px,1fr));gap:8px!important;overflow:visible!important;white-space:normal!important;max-width:100%}.monthly-month-grid .monthly-period{min-width:0!important;width:100%;min-height:64px;white-space:normal;border:1px solid #b8c9d9;background:#f5f9fd;color:#25475f}.monthly-month-grid .monthly-period[aria-pressed=true]{background:#145a8c;color:white;border:2px solid #0a3d60}.monthly-month-grid .monthly-period[data-status=published]:not([aria-pressed=true]){background:#e8f6ed;color:#235b38}.monthly-month-grid small{display:block;white-space:normal;font-size:.78rem}
.monthly-compact-print{border:1px solid #b9d0df;border-radius:11px;padding:10px;margin:8px 0;background:#f8fbff;min-width:0}.monthly-compact-print h3{font-size:.95rem;margin:0 0 7px}.monthly-print-main{display:flex;gap:8px;align-items:end;flex-wrap:wrap}.monthly-print-main>label:first-child{flex:1 1 150px;min-width:0}.monthly-print-main select{width:100%;min-height:44px}.monthly-print-main button,.monthly-print-selected-actions button{min-height:44px;padding:7px 12px}.monthly-print-all{display:flex;align-items:center;gap:5px;min-height:44px}.monthly-print-status{font-size:.76rem;color:#4e6576;margin:6px 0;line-height:1.65}.monthly-print-more>summary{cursor:pointer;font-size:.8rem;padding:6px 0}.monthly-print-checks{display:grid;grid-template-columns:repeat(auto-fit,minmax(155px,1fr));gap:8px;max-height:220px;overflow:auto}.monthly-print-selected-actions{display:flex;flex-wrap:wrap;gap:10px;margin:10px 0}.monthly-compact-preview{margin-top:8px;border-top:1px solid #b8cbd8;padding-top:7px}.monthly-compact-preview[hidden]{display:none!important}.monthly-compact-preview>[data-preview-host]{max-height:420px;overflow:auto;margin-top:8px}.monthly-compact-preview .monthly-parent-view{box-shadow:none;margin:0;padding:10px}.monthly-advice{margin-top:9px}.monthly-advice [hidden]{display:none!important}.monthly-advice textarea{width:100%;box-sizing:border-box}.monthly-advice section{border:1px solid #c2d6da;padding:10px;border-radius:10px;margin-top:8px}.monthly-advice section>div{display:flex;flex-wrap:wrap;gap:10px}.monthly-advice button{min-height:44px}.monthly-advice p{font-size:.8rem;line-height:1.8}
@media(max-width:600px){.monthly-print-main{display:grid;grid-template-columns:1fr 1fr}.monthly-print-main>label:first-child{grid-column:1/-1}.monthly-print-main button{width:100%}.monthly-print-main .monthly-print-all{grid-column:1}.monthly-compact-print .monthly-print-main button{min-height:44px}.monthly-month-grid .monthly-period{font-size:.85rem}.monthly-advice section>div button{flex:1}}
.monthly-compact-print button{font:inherit;font-size:.84rem;border:1px solid #91afc6;border-radius:8px;background:#edf5fb;color:#16496d;cursor:pointer}.monthly-compact-print [data-print=print]{background:#155c8a;color:#fff;border-color:#155c8a}.monthly-compact-print button:disabled{background:#e7edf1;color:#647583;border-color:#bcc9d2;cursor:not-allowed}.monthly-compact-print button:focus-visible{outline:3px solid #246bb2;outline-offset:2px}.monthly-compact-print button:hover:not(:disabled){filter:brightness(.96)}

/* R99.19: keep context on the right and month navigation on the left. */
.monthly-teacher-nav>div{order:1;flex:1;min-width:0}
.monthly-teacher-nav #monthly-back-months{order:2;display:inline-flex;align-items:center;justify-content:center;gap:6px;margin-inline-start:auto;min-height:44px;max-width:150px;padding:8px 12px;background:#edf6f9;border:1px solid #afd0dc;color:#15556d;border-radius:11px;box-shadow:0 2px 5px #173e5810;font-size:12px;line-height:1.5}
.monthly-teacher-nav #monthly-back-months svg{width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.monthly-teacher-nav #monthly-back-months:hover:not(:disabled){background:#dfeff5;border-color:#6da7bb}
.monthly-teacher-nav #monthly-back-months:focus-visible{outline:3px solid #2395a0;outline-offset:3px}
.monthly-teacher-nav #monthly-back-months:disabled{opacity:.55;cursor:default}
@media(max-width:390px){.monthly-teacher-nav{gap:7px}.monthly-teacher-nav #monthly-back-months{max-width:128px;padding:7px 9px;font-size:11px}}

.monthly-manager-legacy-board .msv2-subject{display:flex;flex-direction:column;border:1px solid var(--border,#cbd5e1);border-radius:8px;background:var(--card,#fff);text-align:start}

/* Shared manager sections; existing report print styles remain unchanged. */
.monthly-role-page .monthly-manager-board{background:#fff;border:1px solid #cddfe8;border-radius:14px;padding:12px;min-width:0}
.monthly-manager-heading h3{font-size:1.05rem;margin:0 0 5px}.monthly-manager-heading p{font-size:.83rem;margin:0 0 10px;color:#50778e;line-height:1.6}
@media(max-width:1000px){.monthly-role-page .monthly-manager-board .monthly-review-table td{min-width:0;white-space:normal;overflow-wrap:anywhere}.monthly-role-page .monthly-manager-board .monthly-review-table td[data-label]:before{display:block;white-space:normal;overflow-wrap:anywhere;margin-bottom:3px}.monthly-role-page .monthly-manager-board .monthly-review-table tr{align-items:start}}
.monthly-role-page .monthly-manager-review{margin:8px 0}.monthly-role-page .monthly-selected-results{max-width:100%;overflow-x:auto}.monthly-role-page [data-monthly-manager-section=review]:empty:before{content:"برای بررسی، یک درس را انتخاب کنید."}.monthly-manager-legacy-board .msv2-subject:focus-visible{outline:3px solid #2563eb;outline-offset:3px}
