/* Responsive preview only. Keep print layout in portal.css unchanged. */
.mobile-menu-toggle,.mobile-scroll-hint{display:none}
.scroll-table{max-width:100%;overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch}
.teacher-card,.large-card,.card-head>div,.hero-grid>div,.workspace,#results{min-width:0}
@media screen and (min-width:761px) and (max-width:1000px){
 .nav-inner{flex-wrap:wrap;height:auto;min-height:90px;padding-block:15px;gap:16px}.navbar nav{order:3;width:100%;justify-content:center}.admin-link{margin-left:auto}.cards{grid-template-columns:1fr}.timetable td{font-size:12px}.timetable small{font-size:11px}
}
@media screen and (max-width:760px){
 html{scroll-padding-top:14px}.wrap{width:calc(100% - 28px)}body{font-size:14px}
 .topline .wrap{gap:10px;align-items:center}.topline .wrap>span{min-width:0}.topline .wrap>span:last-child{text-align:right}.topline{font-size:10px}.topline .divider{padding:0 4px}
 .nav-inner{height:auto;min-height:80px;flex-wrap:wrap;gap:8px;padding-block:14px;position:relative}.brand{gap:9px}.brand strong{font-size:15px}.brand small{font-size:10px}.brand-mark{width:36px;height:36px}.mobile-menu-toggle{display:flex;align-items:center;justify-content:center;gap:7px;min-height:44px;padding:8px 12px;background:white;border:1px solid #dfe4ec;border-radius:8px;color:var(--ink);margin-left:auto;font-size:13px}.mobile-menu-toggle span{font-size:18px}
 .navbar .admin-link{display:none}.navbar.menu-open .admin-link{display:flex;order:4;width:100%;justify-content:center;min-height:46px;font-size:13px;margin-top:6px}.navbar.menu-open nav{display:grid;width:100%;order:3;gap:0;margin:10px 0 0;border-top:1px solid var(--border)}.navbar.menu-open nav a{display:flex!important;align-items:center;min-height:48px;font-size:14px;padding:10px 12px;border-bottom:1px solid var(--border)}
 .hero-grid{padding-top:27px;padding-bottom:48px}.hero h1{font-size:clamp(24px,6.5vw,32px);letter-spacing:0;margin:15px 0;line-height:1.55}.hero p{font-size:13px;line-height:1.85}.desktop{display:none}.eyebrow{font-size:9px;letter-spacing:1.6px}.hero-actions{gap:10px;flex-wrap:wrap}.hero-actions .button{min-height:48px;padding:11px 12px;font-size:13px;flex:1;white-space:nowrap}.hero-meta{flex-wrap:wrap;row-gap:7px;font-size:10px}.hero-meta span+span{padding-left:8px}
 .stats{margin-top:-22px}.stats>div{padding:15px 12px;min-height:86px}.stats b{font-size:26px}.stats p>span{font-size:10px;line-height:1.6}.stats strong{font-size:12px}.stats small{font-size:13px}
 .section-heading{align-items:stretch;flex-direction:column;gap:13px;margin-bottom:16px}.section-heading h2{font-size:25px}.section-heading p{font-size:12px}.section-kicker{font-size:11px}.print-button{font-size:14px;min-height:48px;gap:9px;width:100%}.print-button svg{width:19px;height:19px}
 .view-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;padding:10px;overflow:visible;background:#fafbfc}.view-tabs button{white-space:normal;justify-content:center;min-height:48px;padding:10px 6px;font-size:13px;border:1px solid transparent;border-radius:6px;gap:6px}.view-tabs button:last-child{grid-column:1/-1}.view-tabs button[aria-selected=true]{background:#fff0f1;border:1px solid #f2c6cb;color:#b71828}
 .filters{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:18px 12px 0}.filters label{font-size:12px;min-width:0}.filters .search-label{grid-column:1/-1}.filters #room-label{grid-column:1/-1}.filters input,.filters select,.teacher-picker select,.print-choice select{font-size:16px;min-height:48px;width:100%;max-width:100%}.search-input>span{top:6px}.clear-button{font-size:13px;min-height:48px;text-align:center;border:1px solid #e1e5ec;border-radius:6px;background:#fafbfc}.result-line{gap:12px;padding:18px 13px 14px}.result-line p{font-size:12px}.legend{gap:9px 12px;font-size:11px}.legend i{width:10px;height:10px}
 #results{padding:0 10px 16px}.cards{gap:16px;grid-template-columns:minmax(0,1fr)}.teacher-card{padding:13px 10px}.card-head{gap:9px;flex-wrap:wrap;margin-bottom:8px}.card-head>div{flex:1}.card-head h3{font-size:15px;overflow-wrap:anywhere}.card-head p{font-size:11px;line-height:1.7}.avatar{width:32px;height:32px;font-size:13px}.expand-btn{font-size:12px;min-height:44px;width:100%;margin:5px 0 0;background:#fafbfc;flex:0 0 100%}.mobile-scroll-hint{display:block;margin:9px 0;font-size:11px;color:#7a8698}.timetable{min-width:420px;font-size:11px;border-spacing:3px;table-layout:fixed}.timetable th{font-size:11px}.timetable th:first-child{width:30px}.timetable td{height:57px;padding:5px 3px}.timetable td small{font-size:10px;margin-top:4px}.scroll-table{border:1px solid #edf0f4;border-radius:6px;isolation:isolate}.timetable tr>th:first-child{position:sticky;left:0;z-index:1;background:white;box-shadow:1px 0 0 #dfe5ed}.card-foot{font-size:10px;gap:6px;flex-wrap:wrap;line-height:1.7;margin-top:10px}
 #pagination{gap:12px;padding:0 10px 18px;font-size:12px}#pagination>div{gap:5px;width:100%;justify-content:center;flex-wrap:wrap}#pagination button{min-width:36px;min-height:44px;padding:8px 10px;font-size:13px}
 .large-card{padding:14px 10px}.large-card .card-head h3{font-size:18px}.large-card .card-head p{font-size:12px}.large-subtitle{font-size:12px;line-height:1.8}.large-card .timetable{min-width:790px}.large-card .timetable th:first-child{width:65px}.large-card .timetable td{font-size:14px;height:94px}.large-card .timetable small{font-size:12px}.large-card .timetable th small{font-size:11px}.teacher-picker{font-size:13px}.teacher-picker select{margin-top:8px}.combined-table{min-width:900px}.combined-table th:first-child,.combined-table tbody th{position:sticky;left:0;z-index:1;background:#f2f5f8;box-shadow:1px 0 0 #dfe5ed}.combined-table td span{font-size:13px}.combined-table td small{font-size:11px}.workload-table{min-width:720px}.workload-table td,.workload-table th{font-size:12px}.workload-table button{min-height:44px;min-width:60px;font-size:13px}
 dialog{padding:0;max-height:92dvh;overscroll-behavior:contain}#detail-dialog{width:calc(100% - 16px);max-width:calc(100% - 16px);margin:auto}#print-dialog{width:calc(100% - 24px);max-width:calc(100% - 24px);padding:18px}.dialog-bar{position:sticky;top:0;z-index:3;background:white;margin:0;padding:13px 15px;border-bottom:1px solid var(--border);font-size:13px}.dialog-bar .icon-button{min-width:44px;min-height:44px;flex-shrink:0}.dialog-bar h2{font-size:19px}#detail-content{padding:12px}#detail-content .large-card{margin:0}.dialog-actions{position:sticky;bottom:0;z-index:3;background:white;margin:0;padding:13px 14px max(13px,env(safe-area-inset-bottom));border-top:1px solid var(--border);gap:8px;flex-wrap:wrap}.dialog-actions .button{min-height:48px;padding:10px 12px;font-size:13px;flex:1}.dialog-actions .primary{flex:2}#print-dialog .dialog-bar{padding:0 0 12px}#print-dialog .dialog-actions{padding:15px 0 0}#print-summary{font-size:14px}.print-choice{font-size:13px}.print-help{font-size:12px}
 .info-note{font-size:12px;gap:9px;line-height:1.8}.info-note small{font-size:11px}footer{padding:26px 0 max(26px,env(safe-area-inset-bottom))}footer .wrap{flex-direction:column;gap:14px}footer strong{font-size:14px}footer p,footer span{font-size:12px}footer span{max-width:none}footer a{min-height:44px;display:inline-flex;align-items:center}.plan{padding:20px 15px;margin:16px 12px}.plan table{font-size:12px;table-layout:fixed;overflow-wrap:anywhere}.plan th,.plan td{padding:8px}.plan .button{min-height:48px}
}
@media screen and (max-width:350px){.wrap{width:calc(100% - 20px)}.brand strong{font-size:13px}.brand small{font-size:9px}.brand-mark{width:30px;height:34px}.mobile-menu-toggle{padding:8px 10px;font-size:12px}.hero h1{font-size:24px}.hero-actions{flex-direction:column}.hero-meta span+span{border-left:0;padding-left:0}.hero-meta{gap:5px 12px}.view-tabs button{font-size:12px}.filters{grid-template-columns:1fr}.filters label,.filters #room-label{grid-column:1}.topline{font-size:9px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
