/* 3.8: contained names, compact lesson controls and weekly plan review. */
.schedule-scroll380{max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch}
.schedule-scroll380 .schedule-table{min-width:var(--schedule-width380);width:100%;table-layout:fixed}
.schedule-table .period-column380{width:56px}.schedule-table .period-head,.schedule-table .period-cell{min-width:0;width:56px}
.schedule-table .schedule-slot{min-width:0;height:92px;padding:0;vertical-align:middle;cursor:pointer}
.schedule-table .lesson{position:relative;box-sizing:border-box;min-width:0;width:auto;margin:5px;padding:21px 8px 22px;min-height:80px;height:auto;border-inline-start:4px solid var(--subject);border-right-width:4px;overflow:hidden;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:5px}
.schedule-table .lesson b.lesson-subject380,.schedule-table .lesson small.lesson-teacher380{display:block;box-sizing:border-box;min-width:0;max-width:100%;width:100%;white-space:normal;overflow-wrap:anywhere;word-break:normal;text-overflow:clip;overflow:visible;text-align:center;line-height:1.4;margin:0}
.schedule-table .lesson b.lesson-subject380{font-size:14px;font-weight:800}.schedule-table .lesson small.lesson-teacher380{font-size:12px;color:#374151}
.lesson-remove380,.schedule-table .lesson-lock{position:absolute;left:3px;min-height:0;min-width:0;width:22px;height:20px;display:grid;place-items:center;margin:0;padding:0;line-height:1;border:0;border-radius:5px;background:#ffffffdc;cursor:pointer;font-family:inherit}
.lesson-remove380{top:2px;font-size:17px;font-weight:600;color:#a22828}.lesson-remove380:hover{background:#fee2e2;color:#991b1b}.schedule-table .lesson-lock{bottom:2px;color:#475569;font-size:12px;opacity:1}.schedule-slot:focus-visible,.pending-lesson:focus-visible{outline:3px solid #2563eb;outline-offset:-3px}
.schedule-table .lesson.selected,.pending-lesson.selected{outline:3px solid #2563eb;outline-offset:-2px;background:#eff6ff}.manual-busy380 .schedule-slot,.manual-busy380 .pending-lesson{cursor:wait}.manual-busy380 .lesson-remove380,.manual-busy380 .lesson-lock{pointer-events:none}
.touch-ghost380{position:fixed!important;z-index:9999!important;pointer-events:none!important;box-sizing:border-box!important;width:140px!important;min-height:70px!important;margin:0!important;padding:10px!important;background:#fff!important;border:2px solid #2563eb!important;border-radius:10px!important;opacity:.9!important;box-shadow:0 6px 24px #0f172a40;text-align:center}.touch-ghost380 b,.touch-ghost380 small{display:block;white-space:normal;overflow-wrap:anywhere}
.pending-grid380{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:10px}.pending-grid380 .pending-lesson{text-align:center;white-space:normal;min-height:108px;touch-action:pan-y;line-height:1.5;overflow-wrap:anywhere}.pending-grid380 .pending-lesson b,.pending-grid380 .pending-lesson small,.pending-grid380 .pending-lesson span{display:block;white-space:normal;overflow-wrap:anywhere}.pending-grid380 .pending-lesson span{font-size:12px;color:#475569;margin-top:6px}.pending-lessons h2>span{display:inline-block;padding:2px 10px;border-radius:20px;background:#dbeafe;color:#1e40af;font-size:16px}.pending-lessons>p{line-height:1.8;color:#475569}
.draft-notice380{padding:11px 16px;border:1px solid #c9ded2;border-radius:10px;background:#eefbf3;color:#166534;margin-bottom:14px;line-height:1.7}.draft-notice380.has-draft{background:#fff8e7;border-color:#f2d78c;color:#7c4a06}.draft-notice380>span{display:block;font-weight:800}
.assignment-sort380{display:flex;align-items:end;gap:14px;flex-wrap:wrap;padding:16px 20px;border-top:1px solid #e2e8f0;background:#f8fafc}.assignment-sort380 label{min-width:180px}.assignment-sort380 span{color:#64748b;padding-bottom:12px;font-size:13px}
.curriculum-panel .panel-head>div>p{margin:5px 0 0;color:#64748b;font-size:13px;line-height:1.7}.curriculum-status{padding:12px 20px;border-block:1px solid #e2e8f0;font-weight:700;font-size:14px}.curriculum-status.ready{color:#166534;background:#f0fdf4}.curriculum-status.incomplete{color:#854d0e;background:#fefce8}.quota-warning>td:nth-child(4),.quota-warning>td:nth-child(5){color:#b45309;font-weight:800}.quota-details{min-width:220px;margin-top:9px}.quota-details>div{padding:7px 0;border-bottom:1px solid #e2e8f0;white-space:normal}.quota-details b,.quota-details span{display:block;white-space:normal}.quota-details span{font-size:12px;color:#64748b;margin-top:3px}.quota-details .quota-difference{color:#9a3412}.quota-details .quota-difference span{color:#9a3412}summary{cursor:pointer}.ba-quota380{grid-column:1/-1;display:block;color:#1e40af;font-size:12px;line-height:1.6}
#modal:has(.grade-plan380){width:min(940px,95vw)}.grade-plan380{display:grid;gap:14px}.grade-plan380>p{margin:0;color:#475569;line-height:1.8}.grade-plan380>label{max-width:440px}.grade-plan380 .plan-notice380{padding:12px;background:#eff6ff;border-radius:9px;color:#1e40af}.plan-row380{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr) 34px;gap:12px;align-items:end;border:1px solid #e2e8f0;background:#f8fafc;border-radius:12px;padding:13px;margin-bottom:12px}.plan-row380 button{min-width:0;width:34px;height:40px;padding:0}.grade-plan380 #planTotals380{padding:12px;background:#ecfdf5;color:#166534;border-radius:9px;line-height:1.8}.grade-plan380 #planAdd380{justify-self:start}
@media(max-width:760px){.assignment-sort380{padding:12px;gap:10px;display:grid;grid-template-columns:1fr 1fr}.assignment-sort380 label{min-width:0}.assignment-sort380 span{grid-column:1/-1;padding:0}.curriculum-panel .panel-head{flex-wrap:wrap}.curriculum-panel .panel-head>button{width:100%}.pending-grid380{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.pending-grid380 .pending-lesson{padding:10px 8px}.pending-grid380 .pending-lesson b{font-size:13px}.plan-row380{grid-template-columns:minmax(0,1fr) 34px;gap:8px;padding:10px}.plan-row380 label{grid-column:1}.plan-row380 button{grid-column:2;grid-row:1/3;align-self:center}.draft-notice380{font-size:12px;padding:10px}.schedule-title h2{white-space:normal!important;overflow-wrap:anywhere}}
@media print{
 #content:has(.schedule-table){height:auto!important;display:block!important}
 .schedule-scroll380{overflow:visible!important;max-width:none!important;display:block!important}
 .schedule-scroll380 .schedule-table{width:100%!important;min-width:0!important;height:auto!important;table-layout:fixed!important;flex:none!important}
 .day-card{height:auto!important;flex:none!important;display:block!important;margin:0 0 2mm!important}
 .schedule-table thead,.schedule-table tbody,.schedule-table tbody tr{height:auto!important}
 .schedule-table .grade-head{height:auto!important;padding:1mm .5mm!important;white-space:normal!important}.schedule-table .section-head{height:auto!important;padding:.6mm .5mm!important;white-space:normal!important}
 .schedule-table .period-column380{width:7mm!important}.schedule-table .period-head,.schedule-table .period-cell{width:7mm!important;min-width:0!important}
 .schedule-table .schedule-slot{height:6mm!important;min-width:0!important;padding:0!important}
 .schedule-table .lesson{height:auto!important;min-height:0!important;overflow:visible!important;padding:.5mm!important;margin:.4mm auto!important;gap:.4mm!important;border-radius:0!important;width:calc(100% - .8mm)!important;border-right-width:.7mm!important}
 .schedule-table .lesson b.lesson-subject380,.schedule-table .lesson small.lesson-teacher380{width:100%!important;max-width:100%!important;white-space:normal!important;overflow-wrap:anywhere!important;overflow:visible!important;word-break:normal!important;text-overflow:clip!important;line-height:1.2!important;margin:0!important}
 .schedule-table .lesson b.lesson-subject380{font-size:8.5px!important}.schedule-table .lesson small.lesson-teacher380{font-size:7.5px!important;color:#111!important}
 .draft-notice380{margin:0 0 1mm!important;padding:1mm 2mm!important;font-size:8px!important;border-radius:0!important}
 .lesson-remove380,.lesson-lock,.pending-lessons,.curriculum-panel,.assignment-sort380{display:none!important}
}
