#teacherTimetable{padding:18px;max-width:100%;overflow:hidden}#teacherTimetable .tt-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:end;margin:14px 0}#teacherTimetable .tt-actions button,#teacherTimetable .tt-actions select{border:1px solid #b8c9d0;border-radius:10px;padding:10px;background:#fff;color:#082b4b;cursor:pointer}#teacherTimetable .tt-actions #ttSave{background:#0a756b;color:#fff}#teacherTimetable .tt-note{font-size:13px;color:#526578;line-height:1.8}#teacherTimetable .tt-scroll{overflow:auto;max-width:100%;border:1px solid #dae3e8;border-radius:12px}#teacherTimetable .tt-table{width:100%;border-collapse:collapse;min-width:850px;table-layout:fixed;background:white}#teacherTimetable .tt-table th,#teacherTimetable .tt-table td{border:1px solid #dae3e8;padding:8px;vertical-align:top;text-align:center}#teacherTimetable .tt-table th{background:#eaf3f3;color:#12394e}#teacherTimetable .tt-table th small{display:block;font-size:10px}#teacherTimetable .tt-table input{box-sizing:border-box;max-width:100%;width:100%;padding:6px;border:1px solid #d6e0e5;border-radius:6px;font:inherit;text-align:center}#teacherTimetable .tt-table label{display:flex;align-items:center;gap:5px;font-size:11px;margin-top:5px}#teacherTimetable .tt-table input[type=number]{width:60px}#ttStatus{min-height:1.4em;color:#0a756b}@media print{body:has(#teacherTimetable:not(.hidden)) .app-shell aside,body:has(#teacherTimetable:not(.hidden)) .app-shell header,body:has(#teacherTimetable:not(.hidden)) .bottom-nav,body:has(#teacherTimetable:not(.hidden)) .view:not(#teacherTimetable),body:has(#teacherTimetable:not(.hidden)) .tt-actions,body:has(#teacherTimetable:not(.hidden)) #ttStatus{display:none!important}body:has(#teacherTimetable:not(.hidden)) #teacherTimetable{display:block!important;padding:0}body:has(#teacherTimetable:not(.hidden)) .tt-scroll{overflow:visible;border:0}body:has(#teacherTimetable:not(.hidden)) .tt-table{min-width:0;font-size:9px}body:has(#teacherTimetable:not(.hidden)) .tt-table input{border:0;padding:1px;font-size:9px}body:has(#teacherTimetable:not(.hidden)) .tt-table td{padding:2px}@page nataiji-timetable{size:A4 landscape;margin:9mm}body:has(#teacherTimetable:not(.hidden)) #teacherTimetable{page:nataiji-timetable!important}}
/* Mobile: select a day without horizontal scrolling; printing always shows the full week. */
.tt-day-picker{display:none}
@media screen and (max-width:700px){#teacherTimetable{padding:12px}#teacherTimetable .tt-day-picker{display:flex;align-items:center;gap:12px;margin:14px 0;font-weight:700}#teacherTimetable .tt-day-picker select{flex:1;min-width:0;border:1px solid #b8c9d0;border-radius:10px;background:#fff;padding:12px;color:#082b4b;font:inherit}#teacherTimetable .tt-scroll{overflow:visible}#teacherTimetable .tt-table{min-width:0;width:100%;table-layout:fixed}#teacherTimetable .tt-table th:first-child{width:72px}#teacherTimetable .tt-table th[data-tt-day],#teacherTimetable .tt-table td[data-tt-day]{display:none}#teacherTimetable[data-selected-day="0"] [data-tt-day="0"],#teacherTimetable[data-selected-day="1"] [data-tt-day="1"],#teacherTimetable[data-selected-day="2"] [data-tt-day="2"],#teacherTimetable[data-selected-day="3"] [data-tt-day="3"],#teacherTimetable[data-selected-day="4"] [data-tt-day="4"]{display:table-cell}#teacherTimetable .tt-table td{padding:9px 6px}#teacherTimetable .tt-table input{font-size:14px}}
@media print{#teacherTimetable .tt-day-picker{display:none!important}#teacherTimetable .tt-table th[data-tt-day],#teacherTimetable .tt-table td[data-tt-day]{display:table-cell!important}body:has(#teacherTimetable:not(.hidden)) #teacherTimetable .tt-table{font-size:12px!important;width:100%!important;table-layout:fixed!important}body:has(#teacherTimetable:not(.hidden)) #teacherTimetable .tt-table input{font-size:12px!important;white-space:normal!important;overflow:visible!important}body:has(#teacherTimetable:not(.hidden)) #teacherTimetable .tt-table td{padding:8px 4px!important}body:has(#teacherTimetable:not(.hidden)) #teacherTimetable .tt-table th{padding:9px 4px!important}body:has(#teacherTimetable:not(.hidden)) #teacherTimetable .tt-note{font-size:12px!important;margin:8px 0 14px!important}body:has(#teacherTimetable:not(.hidden)) #teacherTimetable .tt-table input[type=number]{width:46px!important}body:has(#teacherTimetable:not(.hidden)) #teacherTimetable .tt-table tr{break-inside:avoid}}

/* Mobile day selector: explicit specificity prevents hidden cells from winning. */
@media screen and (max-width:700px){#teacherTimetable .tt-table th[data-tt-day],#teacherTimetable .tt-table td[data-tt-day]{display:none!important}#teacherTimetable[data-selected-day="0"] .tt-table [data-tt-day="0"],#teacherTimetable[data-selected-day="1"] .tt-table [data-tt-day="1"],#teacherTimetable[data-selected-day="2"] .tt-table [data-tt-day="2"],#teacherTimetable[data-selected-day="3"] .tt-table [data-tt-day="3"],#teacherTimetable[data-selected-day="4"] .tt-table [data-tt-day="4"]{display:table-cell!important}}
/* Android print preview can keep portrait A4 despite @page landscape: make rows readable. */
@media print{body:has(#teacherTimetable:not(.hidden)) #teacherTimetable .tt-table{font-size:14px!important}body:has(#teacherTimetable:not(.hidden)) #teacherTimetable .tt-table td{padding:13px 5px!important;height:56px!important}body:has(#teacherTimetable:not(.hidden)) #teacherTimetable .tt-table th{padding:12px 5px!important}body:has(#teacherTimetable:not(.hidden)) #teacherTimetable .tt-table input{font-size:13px!important;line-height:1.4!important}body:has(#teacherTimetable:not(.hidden)) #teacherTimetable .tt-table label{font-size:12px!important;justify-content:center!important}body:has(#teacherTimetable:not(.hidden)) #teacherTimetable .tt-note{font-size:14px!important}}
