*{box-sizing:border-box}body{margin:0;background:#f2f6fc;font:14px Prompt,sans-serif;color:#102c50}.container{max-width:1240px;margin:auto;padding:0 22px}header{background:white;box-shadow:0 3px 24px #193a6312}.nav{display:flex;justify-content:space-between;align-items:center;min-height:78px;gap:16px}.nav a{text-decoration:none;color:#15385f}.nav nav{display:flex;gap:22px}.logo{font-size:20px;font-weight:700}.logo small{display:block;color:#607a96;font-size:10px;letter-spacing:1px}.heading{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:44px 0 22px}.heading h1{font-size:30px;margin:5px 0}.heading p{margin:0;color:#71839a}.eyebrow{color:#237cdd;letter-spacing:2px;font-weight:700;font-size:11px}.print{border:0;background:#1178e7;border-radius:12px;color:white;padding:13px 20px;font:inherit;cursor:pointer}.tabs{display:flex;gap:12px;margin:8px 0 20px}.tabs a{padding:13px 20px;text-decoration:none;background:#fff;border:1px solid #dce6f5;border-radius:12px;color:#244464;font-weight:600}.tabs a.active{background:#0b3768;color:white}.filters{display:flex;gap:16px;background:#fff;border-radius:16px;padding:20px;margin-bottom:22px;box-shadow:0 4px 20px #18375a0a}.filters label{flex:1;font-weight:500;color:#385879}.filters select{display:block;width:100%;margin-top:6px;padding:12px;border:1px solid #d7e2f0;border-radius:10px;background:#fff;color:#15365b;font:inherit}.meta{display:flex;justify-content:space-between;gap:10px;margin-bottom:14px;flex-wrap:wrap}.meta span{color:#71839a}.tablewrap{overflow-x:auto;background:#fff;border:1px solid #e0e9f4;border-radius:16px;box-shadow:0 10px 30px #153b5f0c}table{width:100%;border-collapse:collapse;min-width:760px}th,td{border:1px solid #e2eaf4;padding:11px;vertical-align:top}thead th{background:#123e70;color:white;padding:15px}tbody th{width:112px;background:#eaf3ff}th small,.lesson small{display:block;font-size:11px;color:#7190aa;font-weight:400}.lesson{background:#ebf5ff;padding:10px;border-radius:10px;border-left:3px solid #1782f4;margin-bottom:7px;min-height:80px}.lesson strong{font-size:12px;display:block}.lesson span{display:block;color:#42688b;font-size:11px;margin-top:4px}.empty{text-align:center;background:#fff;border-radius:18px;padding:70px 20px;box-shadow:0 5px 30px #153b5f0a}.empty-icon{font-size:50px;color:#8bbbe7}.empty h2{margin:8px}.empty p{color:#74889e}footer{text-align:center;padding:38px;color:#7990a9;font-size:12px}@media(max-width:650px){.nav{display:block;padding-top:15px;padding-bottom:15px}.nav nav{margin-top:15px;gap:18px}.heading{padding-top:25px;align-items:flex-start;flex-direction:column}.heading h1{font-size:25px}.filters{flex-direction:column}.tabs{flex-wrap:wrap}.tabs a{flex:1;text-align:center}}
@media print{body{background:white}header,.tabs,.filters,.print,footer{display:none!important}.heading{padding:0 0 10px}.container{max-width:none;padding:0}.tablewrap{box-shadow:none;border:0;border-radius:0}table{min-width:0}th,td{padding:5px}.lesson{min-height:0;break-inside:avoid;font-size:10px}@page{size:A4 landscape;margin:9mm}}

/* Phase 2.4 landscape day-by-period timetable */
.tablewrap{overflow:auto;overscroll-behavior-x:contain;scrollbar-color:#93bcec #eef5fd}
.timetable{min-width:1180px;table-layout:fixed}
.timetable th,.timetable td{padding:8px;vertical-align:top}
.timetable thead th{min-width:135px;white-space:nowrap;text-align:center;background:linear-gradient(135deg,#0e508b,#123969);color:#fff;position:sticky;top:0;z-index:3}
.timetable thead th small{color:#cee5ff;font-size:10px;margin-top:3px}
.timetable .day-col{width:105px;min-width:105px;position:sticky;left:0;z-index:2;box-shadow:3px 0 8px #1734520c}
.timetable thead .day-col{z-index:5;background:#0d315d}
.timetable tbody .day-col{font-weight:700;text-align:center;vertical-align:middle;color:#0c3d6c;background:#e7f3ff;font-size:13px}
.timetable .day-TU{background:#fff4db!important;color:#895b00!important}.timetable .day-WE{background:#e9f9e9!important;color:#256e38!important}.timetable .day-TH{background:#fff0e0!important;color:#944919!important}.timetable .day-FR{background:#eaf1ff!important;color:#3850a0!important}
.timetable td{background:#fff;min-height:108px;overflow-wrap:anywhere}.lesson{min-height:94px;margin:0 0 5px;padding:10px 9px;border-radius:12px;border:1px solid var(--stroke,#c4d3e8);border-left:4px solid var(--accent,#64748b);background:var(--tint,#f1f5f9);box-shadow:0 4px 11px #15385e10;break-inside:avoid}
.lesson strong{font-size:12px;line-height:1.5;color:#132e4f}.lesson small{font-size:10px;color:#46657b;line-height:1.45}.lesson .lesson-code{color:var(--accent,#64748b);font-weight:700;margin:3px 0}.lesson .lesson-related{font-size:10px;color:#2c4766;line-height:1.45}.no-lesson{display:block;text-align:center;color:#a9b7c7;padding:20px 0}.legend{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-bottom:12px}.legend-title{font-weight:700;color:#35516f;font-size:12px;margin-right:4px}.legend-item{display:inline-flex;padding:4px 9px;border:1px solid var(--stroke,#cbd5e1);border-radius:999px;color:var(--accent,#64748b);background:var(--tint,#f1f5f9);font-size:10px;font-weight:650}
.sg-thai{--tint:#ffe8f2;--accent:#db2777;--stroke:#f9c3dd}.sg-math{--tint:#e1f4ff;--accent:#0284c7;--stroke:#b6e2fa}.sg-science{--tint:#e5f9e9;--accent:#15803d;--stroke:#b6e9c5}.sg-tech{--tint:#e5ecff;--accent:#3457d5;--stroke:#c4d0fc}.sg-social{--tint:#f3e9ff;--accent:#8948be;--stroke:#dfc7fa}.sg-language{--tint:#fff0e1;--accent:#e66a12;--stroke:#fad6b5}.sg-health{--tint:#ffe8e6;--accent:#d33d43;--stroke:#f5c5c7}.sg-art{--tint:#fff9d6;--accent:#a67c00;--stroke:#f3e7ab}.sg-career{--tint:#dff8f0;--accent:#078c75;--stroke:#aee6d5}.sg-activity{--tint:#fff2bd;--accent:#b77206;--stroke:#f1d474}.sg-club{--tint:#fce8ff;--accent:#a92bbe;--stroke:#efbcf5}.sg-guidance{--tint:#ede9ff;--accent:#7050ce;--stroke:#cbc3fa}.sg-scout{--tint:#fce5d8;--accent:#b95021;--stroke:#f2c1a7}.sg-elective{--tint:#e6f7fb;--accent:#007c95;--stroke:#a8e0eb}.sg-other{--tint:#f1f5f9;--accent:#64748b;--stroke:#dbe3eb}
@media(max-width:700px){.tablewrap{margin-inline:-8px;border-radius:12px}.timetable{min-width:1020px}.timetable th,.timetable td{padding:6px}.lesson{padding:8px;min-height:90px}.legend{gap:4px}.legend-item{font-size:9px}}
@media print{@page{size:A4 landscape;margin:7mm}.container{padding:0}.legend{margin:4px 0 8px}.legend-item{font-size:8px;padding:2px 5px}.timetable{width:100%;min-width:0!important;table-layout:fixed}.timetable th,.timetable td{padding:3px!important;border-color:#b7c8d8;print-color-adjust:exact;-webkit-print-color-adjust:exact}.timetable .day-col{width:65px;min-width:0;position:static}.timetable thead th{min-width:0;white-space:normal;position:static;padding:5px 2px!important;font-size:9px}.timetable tbody th{font-size:10px}.lesson{padding:4px 3px;min-height:0!important;border-radius:5px;margin:0 0 3px;box-shadow:none;print-color-adjust:exact;-webkit-print-color-adjust:exact}.lesson strong{font-size:8.2px;line-height:1.25}.lesson small,.lesson .lesson-related{font-size:7px;line-height:1.3}.tablewrap{overflow:visible}.meta{margin:6px 0;font-size:10px}.heading h1{font-size:17px}.heading p{font-size:9px}}

/* Phase 2.5: dedicated lunch column, not a lesson. */
.timetable .lunch-head{background:linear-gradient(155deg,#ff8a22,#e85a37)!important;color:#fff;min-width:90px;text-align:center}.timetable .lunch-head small{color:#fff8dc}.timetable .lunch-cell{background:linear-gradient(165deg,#fff8dc,#ffeddb);text-align:center;vertical-align:middle;min-width:92px;color:#9b4e21}.timetable .lunch-cell strong,.timetable .lunch-cell small{display:block}.timetable .lunch-cell small{font-size:10px;color:#aa7352}.timetable .lunch-icon{font-size:25px;margin-bottom:7px}.timetable tbody tr:hover .lunch-cell{background:#ffeed5}@media print{.timetable .lunch-head,.timetable .lunch-cell{min-width:0!important;print-color-adjust:exact;-webkit-print-color-adjust:exact}.timetable .lunch-icon{font-size:14px;margin-bottom:2px}.timetable .lunch-cell small{font-size:7px}}
