/* Small screens get a compact layout; long records keep their own scroll areas. */
.mobile-lobby{display:none}.done-icon{margin-right:4px}
@media(max-width:760px){
 html{scroll-padding-block:12px 90px;-webkit-text-size-adjust:100%}
 *,*:before,*:after{min-inline-size:0}
 input,select,textarea{font-size:16px!important;max-width:100%}
 button,a,input,select,textarea{touch-action:manipulation}
 body[data-onboarding]{height:var(--phone-viewport-height,100dvh);overflow:hidden}
 .onboard-shell{height:var(--phone-viewport-height,100dvh);min-height:0;display:flex;flex-direction:column;padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom)}
 .onboard-header{height:52px;min-height:52px;padding:0 18px;width:100%;flex-shrink:0}
 .onboard-logo{font-size:17px;gap:7px}.onboard-logo img{width:28px;height:28px}.onboard-header>button{min-height:32px;padding:5px 10px}
 .onboard-layout{display:flex;flex:1;min-height:0;width:100%;max-width:520px;padding:0 18px;margin:0 auto;gap:0}
 .onboard-content{display:flex;flex-direction:column;flex:1;min-height:0;padding:7px 0 10px;align-self:stretch!important}
 .onboard-progress,.onboard-shell[data-phase=install] .onboard-progress{flex-shrink:0;gap:20px;margin:0 0 14px;min-height:25px;font-size:9px}
 .onboard-progress li{font-size:9px;gap:6px}.onboard-progress li>span{width:20px;height:20px}
 .onboard-art.gif-art{display:none!important}
 .onboard-panel{min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#d1d5ef transparent;padding:0 2px 5px;flex:1}
 .onboard-panel h1,.install-panel h1{font-size:clamp(24px,4.5dvh,30px);line-height:1.4;letter-spacing:-1.2px;margin:0 0 10px}
 .onboard-eyebrow{font-size:7px;letter-spacing:1.4px;margin-bottom:9px}
 .onboard-lead,.install-lead{font-size:11px;line-height:1.7;margin:0 0 13px}
 .onboard-features{font-size:9px;gap:10px;margin:13px 0 15px}
 .welcome-mobile-video{height:clamp(85px,20dvh,155px);margin:14px 0 17px;border-radius:14px}
 .welcome-mobile-video img{margin-top:clamp(-130px,-23dvh,-80px);width:100%;height:auto}
 .signup-card{margin-top:13px;padding-top:12px}.first-time{font-size:8px;top:-8px}
 .onboard-primary{min-height:44px;padding:12px 10px;border-radius:10px;font-size:12px;flex-shrink:0}
 .signup-card p{font-size:9px;line-height:1.6;margin:8px 0 5px}
 .onboard-login{min-height:38px;padding:10px 4px;font-size:11px}
 .onboard-status{font-size:10px;line-height:1.6;margin:5px 0;min-height:16px}
 .onboard-fine{font-size:9px;margin:8px 0;line-height:1.5}
 .onboard-footer{display:none}
 .onboard-panel .onboard-back{min-height:30px;padding:0 0 9px;font-size:10px;flex-shrink:0}
 .onboard-panel label{margin:10px 0;gap:5px;font-size:11px}
 .onboard-panel input,.onboard-panel select{height:44px;padding:9px 11px;font-size:16px}
 .onboard-error:empty{display:none}.onboard-error{margin:6px 0;font-size:11px;line-height:1.7}
 /* Registration keeps the submit button visible while fields can scroll above it. */
 [data-onboard-panel=profile]{display:flex;flex-direction:column;overflow:hidden}
 [data-onboard-panel=profile]>.onboard-eyebrow{display:none}
 [data-onboard-panel=profile] h1{font-size:25px;line-height:1.3;margin-bottom:7px}
 [data-onboard-panel=profile] h1 br{display:none}
 [data-onboard-panel=profile]>.onboard-lead{font-size:10px;margin-bottom:7px;flex-shrink:0}
 #onboardingProfileForm{flex:1;min-height:0;display:flex;flex-direction:column;gap:9px;margin:0}
 .signup-fields{display:grid;grid-template-columns:1fr 1fr;align-content:start;gap:9px 10px;min-height:0;overflow:auto;overscroll-behavior:contain;padding:0 2px 4px;flex:1;scroll-padding-bottom:12px}
 .signup-fields>label{margin:0;display:flex;flex-direction:column;gap:5px}.signup-fields>label:nth-of-type(3){grid-column:1/-1}
 .signup-fields>.registration-class,.signup-fields>.student-id-preview,.signup-fields>.hint,.signup-fields>.onboard-error{grid-column:1/-1}
 .registration-class{gap:8px}.registration-class label{margin:0;display:flex;flex-direction:column;gap:5px}
 .registration-class input,.registration-class select{padding-inline:9px;height:42px}
 .student-id-preview{padding:8px 12px;margin:0;display:grid;grid-template-columns:auto 1fr;gap:3px 9px;align-items:center}
 .student-id-preview>span{font-size:10px}.student-id-preview b{font-size:17px;letter-spacing:.5px;margin:0;text-align:right}
 .student-id-preview small{font-size:9px;grid-column:1/-1;line-height:1.4}
 .signup-fields>.hint{font-size:10px!important;line-height:1.6;margin:0}
 #onboardingProfileForm>.onboard-primary{position:relative;margin:0}
 [data-onboard-panel=profile]>.onboard-fine{margin:6px 0 0;font-size:9px;flex-shrink:0}
 #localLoginForm label{margin:14px 0}.onboard-shell[data-phase=login] .onboard-panel{display:flex;flex-direction:column;justify-content:center}
 /* The GIF and matching text share a row, leaving controls on screen. */
 .onboard-shell[data-phase=install] .onboard-layout{align-items:stretch}
 .install-panel>.onboard-eyebrow{display:none}
 .install-panel h1{font-size:25px;line-height:1.3;margin-bottom:7px}.install-panel h1 br{display:none}
 .install-lead{font-size:10px;margin-bottom:10px}
 .device-picker{margin:9px 0 12px;padding:4px;gap:6px;border-radius:10px}.device-picker button{min-height:38px;padding:8px;font-size:11px}.device-picker small{font-size:8px;margin-left:4px}
 .install-guide{display:grid;grid-template-columns:minmax(0,44%) minmax(0,56%);overflow:hidden;border-radius:12px}
 .gif-stage{display:contents}.gif-stage picture{grid-column:1;grid-row:1;align-self:center;width:100%;margin:0}
 .gif-stage img{max-height:clamp(140px,29dvh,210px);width:100%;height:auto;object-fit:contain;margin:0}
 .gif-controls{grid-column:1/-1;grid-row:2;gap:8px;padding:4px 9px;justify-content:space-between}
 .gif-controls>span{font-size:8px;flex-basis:auto;margin-right:0}.gif-controls button,.gif-controls a{font-size:10px;min-height:32px;padding:7px 2px;display:inline-flex;align-items:center}
 .install-guide .guide-copy{grid-column:2;grid-row:1;display:flex;flex-direction:column;min-height:0;gap:0;padding:12px 11px}
 .gif-summary-label{display:none}.guide-copy>span{font-size:7px}.guide-copy h2{font-size:13px;line-height:1.55;margin:6px 0}
 .guide-copy>p{font-size:10px;line-height:1.7;margin:0 0 7px;overflow-wrap:anywhere}
 .guide-stepper{margin:0;padding:2px 0 7px;gap:4px}.guide-stepper button{min-width:27px;min-height:27px;font-size:9px}
 .guide-stepper i{width:9px}.guide-controls{margin-top:auto;gap:9px;flex-wrap:wrap;justify-content:space-between}.guide-controls button{font-size:10px;min-height:32px;padding:5px 0}
 .device-notice{font-size:10px;line-height:1.6;margin:9px 0 5px}
 .install-links{margin:3px 0;gap:8px;flex-wrap:wrap}.install-links button{font-size:10px;min-height:34px;padding:7px 0}
 .install-help{padding-top:9px;margin-top:5px}.install-help summary{min-height:30px}.install-help p{line-height:1.9}
 .ready-badge{width:54px;height:54px;margin:9px 0 22px}.ready-badge>span{width:54px;height:54px;border-radius:17px;font-size:28px}.ready-badge i{font-size:18px;right:-24px}.ready-badge i:last-child{top:39px;font-size:16px}
 .permission-card{padding:13px;gap:10px;margin:16px 0}.permission-card p{font-size:10px;line-height:1.7;margin:7px 0}.permission-card button{min-height:36px;font-size:10px}
 /* Dialogs stay inside the visible viewport, including when the keyboard opens. */
 dialog{max-width:calc(100vw - 24px);width:480px;max-height:calc(var(--phone-viewport-height,100dvh) - 24px);padding:18px;border-radius:15px;overscroll-behavior:contain;scroll-padding-block:14px}
 .modal-head{gap:10px}.modal-head h2{font-size:19px}.modal-head .icon-btn{min-width:36px;min-height:36px}
 dialog label,.form-grid label{margin:11px 0;gap:6px}.form-grid{gap:10px}dialog input,dialog select{height:42px;padding:9px}
 dialog textarea{min-height:90px;height:16dvh;padding:10px}.modal-actions{position:sticky;bottom:-18px;padding:12px 0 8px;margin-top:12px;background:#fff;z-index:2}
 .modal-actions>*{min-height:42px}.detail-body{padding:8px 0 16px;font-size:13px}.detail-buttons>button{min-height:42px}
 #passwordDialog button[type=submit]{width:100%;min-height:44px}.admin-actions button{min-height:38px}
 .phone-keyboard .onboard-progress{display:none}.phone-keyboard .onboard-header{height:42px;min-height:42px}.phone-keyboard .onboard-panel h1{font-size:20px;margin-bottom:5px}.phone-keyboard .onboard-eyebrow,.phone-keyboard .onboard-panel>.onboard-lead,.phone-keyboard .onboard-fine{display:none}
 .phone-keyboard .onboard-content{padding-top:0}.phone-keyboard .onboard-panel .onboard-back{min-height:26px;padding-bottom:5px}
}
@media(max-width:650px){
 .topbar{min-height:54px;height:auto;padding:8px 14px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}
 .topbar>span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:10px}.topbar .crumb,.topbar #breadcrumb{display:none}
 .topbar>div{gap:6px;min-width:0}.topbar .demo-pill{display:inline-flex;min-height:34px;align-items:center;padding:5px 8px;font-size:10px;white-space:nowrap;max-width:95px;overflow:hidden;text-overflow:ellipsis}
 .topbar #demoBadge{display:none}.motion-toggle{min-height:34px;font-size:9px;padding:5px 8px}.topbar>div>.icon-btn{display:none}
 .page{padding:18px 14px calc(85px + env(safe-area-inset-bottom));max-width:100%;overflow-wrap:anywhere}
 .page-heading{gap:10px;align-items:center;margin-bottom:15px}.page-heading>div{min-width:0;flex:1}.page-heading h1{font-size:23px;line-height:1.4;margin:6px 0}.page-heading p{font-size:10px;margin:4px 0;line-height:1.6}
 .page-heading .primary{min-height:40px;margin-top:0;padding:9px 11px;font-size:11px;flex-shrink:0}.eyebrow{font-size:7px;letter-spacing:1.5px}
 .demo-banner{padding:9px 10px;margin-bottom:14px;gap:8px;align-items:flex-start}.demo-banner p{font-size:10px;line-height:1.6}.demo-banner #refreshNotices{min-height:34px;align-items:center;padding:5px 0}
 .hero{height:clamp(160px,26dvh,215px);padding:18px 17px;border-radius:14px;align-items:center}
 .hero-copy{max-width:72%}.hero h2{font-size:clamp(19px,5.4vw,24px);line-height:1.5;margin:10px 0 7px}.hero-copy>p{font-size:10px;line-height:1.6;max-width:180px}
 .hero-link{min-height:34px;padding:7px 9px;font-size:10px;margin-top:5px}.hero-link span{margin-left:8px}.hero-tag{font-size:6px;letter-spacing:1px}
 .motion-stage{width:230px;height:200px;right:-65px;bottom:-16px;transform:scale(.56);transform-origin:bottom right;opacity:.8}
 .motion-strip{margin-top:9px;padding:5px 0}.stats{margin:12px 0 20px;gap:7px}.stats>div{padding:12px 10px;display:flex;gap:8px;align-items:center}.stat-icon{width:26px;height:26px;font-size:16px;margin:0;flex-shrink:0}.stats p{font-size:8px;line-height:1.5}.stats b{font-size:21px;margin-top:4px}
 .section-title{margin-bottom:13px;gap:8px}.section-title h2{font-size:15px}.section-title>.secondary{font-size:10px;padding:9px;min-height:38px;white-space:nowrap}
 .filter-row{gap:9px;margin-bottom:14px}.filters{flex-wrap:wrap;gap:4px;overflow:visible}.filters button{min-height:34px;font-size:10px;padding:7px 10px}.search{min-height:40px;padding:5px 10px!important}.search input{font-size:16px!important}
 .notice-grid{gap:11px}.notice-card{padding:17px}.notice-card h3{font-size:15px;margin:12px 0 8px}.notice-card .snippet{font-size:12px;margin-bottom:13px}.card-bottom{gap:7px;font-size:10px}.done-button{min-height:34px;font-size:10px}
 .settings-grid{gap:12px}.setting-card{padding:19px}.setting-card h2{font-size:17px;margin:12px 0}.setting-card>p{font-size:12px}.setting-card button{max-width:100%;white-space:normal;min-height:40px}.instruction p{font-size:12px}
 .calendar{margin:12px 0}.calendar-day{min-height:56px;padding:6px 3px;gap:3px}.day-label{padding:8px 4px}.calendar-event{font-size:8px;max-width:100%}
 .mobile-nav{padding:7px 8px calc(7px + env(safe-area-inset-bottom));gap:4px}.mobile-nav button{min-width:0;min-height:45px;flex:1;font-size:20px;gap:3px}.mobile-nav span{font-size:10px}
 .admin-stats{gap:7px;margin:15px 0}.admin-stats>div{padding:13px 10px;font-size:10px}.admin-stats b{font-size:23px;margin-top:5px}.admin-search{margin:15px 0;gap:7px}.admin-search input{min-width:0}.admin-search .primary{min-height:42px;padding:9px 14px}
 .admin-table-wrap{max-width:100%;max-height:40dvh;overflow:auto;overscroll-behavior:contain}.admin-table th{position:sticky;top:0;z-index:1}.admin-table th,.admin-table td{padding:10px;font-size:11px}.admin-table button{min-height:34px;padding:7px 9px}
 .admin-classes{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.admin-class-card{padding:14px}.admin-class-card b{font-size:13px}.admin-class-card small{line-height:1.6}
 .page>footer{margin-top:24px;padding:17px 0;font-size:9px}#toast{max-width:calc(100vw - 28px);bottom:calc(80px + env(safe-area-inset-bottom));font-size:11px}
}
@media(max-width:370px){.onboard-layout{padding-inline:14px}.onboard-header{padding-inline:14px}.onboard-progress{gap:15px}.onboard-panel h1{font-size:24px}.onboard-features{font-size:8px;gap:8px}.welcome-mobile-video{height:110px}.onboard-primary{font-size:11px}.onboard-status{font-size:9px}.first-time{font-size:8px}.student-id-preview b{font-size:15px}.topbar{padding-inline:12px;gap:6px}.topbar .demo-pill{padding-inline:6px;max-width:78px;font-size:9px}.motion-toggle{font-size:8px;padding-inline:6px}.stats>div{display:block;padding:10px}.stat-icon{display:none}.page-heading h1{font-size:21px}.guide-copy h2{font-size:12px}.guide-copy>p{font-size:10px}.gif-controls>span{display:none}}
@media(max-width:760px) and (max-height:650px){.welcome-mobile-video{height:85px;margin-block:10px 14px}.onboard-panel h1{font-size:24px}.onboard-features{margin:9px 0}.onboard-progress{margin-bottom:9px}.onboard-lead{margin-bottom:9px}.onboard-status{font-size:9px}.signup-card{margin-top:10px}.onboard-panel[data-onboard-panel=profile] h1{font-size:22px}.signup-fields{gap:7px 9px}.signup-fields input{height:40px}.registration-class input,.registration-class select{height:40px}.student-id-preview{padding:6px 10px}.install-panel h1{font-size:23px}.device-picker{margin-block:6px 8px}.guide-copy>p{font-size:9px}.gif-stage img{max-height:150px}.device-notice{margin-top:6px}.install-help{margin-top:2px;padding-top:6px}.ready-badge{margin-bottom:17px;width:45px;height:45px}.ready-badge>span{width:45px;height:45px;font-size:24px;border-radius:13px}.permission-card{margin-block:12px;padding:11px}}
/* Mobile lobby: the next assignment is the main content, with more rows below. */
@media(max-width:650px){
 body[data-view=all] #dashboard,body[data-view=all] #demoNotice,body[data-view=all] .page-heading .eyebrow,body[data-view=all] .page-heading p{display:none}
 body[data-view=all] .page{padding-top:21px}
 body[data-view=all] .page-heading{margin-bottom:15px;align-items:center}
 body[data-view=all] .page-heading h1{font-size:25px;letter-spacing:-1px;line-height:1.35;margin:0}
 body[data-view=all] .page-heading h1 .green-dot{display:none}
 body[data-view=all] .mobile-lobby{display:block;margin-bottom:13px}
 .mobile-lobby-meta{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:15px}
 .mobile-lobby-meta>button{font-size:12px;font-weight:600;color:#7d84a9;padding:0;min-height:30px;text-align:left;max-width:65%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .mobile-lobby-meta>span{font-size:11px;color:#8c92ad;white-space:nowrap}
 .mobile-lobby-tools{display:flex;align-items:center;gap:7px;border-top:1px solid #e5e7f1;padding-top:11px}
 .mobile-lobby-tools>span{font-size:10px;color:#a0a6bb;margin-right:auto}
 .mobile-lobby-tools>button{min-height:32px;border:1px solid #e1e4f0;background:#fff;padding:6px 10px;border-radius:8px;color:#8189ad;font-size:10px}
 #mobileRefreshBtn{min-width:32px;font-size:18px;line-height:1;padding:4px 8px}
 body[data-view=all] #listSection>.section-title{display:none}
 body[data-view=all] #listSection>.filter-row{display:none}
 body[data-view=all] #listSection.mobile-filters-open>.filter-row{display:flex;background:#fff;border:1px solid #e4e7f2;border-radius:11px;padding:10px;margin:0 0 12px;gap:9px}
 .notice-grid{display:flex;flex-direction:column;gap:10px}
 .notice-card{display:grid;grid-template-columns:42px minmax(0,1fr) 48px;grid-template-rows:minmax(24px,auto) minmax(24px,auto);gap:5px 11px;align-items:center;min-height:92px;border-radius:12px;padding:13px 12px;border:1px solid #e2e6f0;box-shadow:0 2px 4px #3c447503;animation:none}
 .notice-card:hover{transform:none;box-shadow:0 3px 10px #3c447509}
 .notice-card .card-top,.notice-card .card-bottom{display:contents}
 .notice-card .subject-tag{grid-column:1;grid-row:1/3;align-self:center;display:flex;align-items:center;justify-content:center;min-height:43px;width:42px;border-radius:11px;padding:0 3px;font-size:12px;font-weight:700;letter-spacing:-.3px}
 .notice-card .due-badge{grid-column:3;grid-row:1;justify-self:end;white-space:nowrap;padding:4px 6px;font-size:10px;font-weight:700;border-radius:6px;line-height:1.4;background:#f0f2fd;color:#8d97b8}
 .notice-card .due-badge.urgent{background:#fff0e9;color:#cb835b}
 .notice-card .due-badge.overdue{background:#f0f1f7;color:#9ea4b6}
 .notice-card h3{grid-column:2;grid-row:1;min-width:0;font-size:14px;font-weight:700;color:#3f486c;line-height:1.6;margin:0;padding:0;letter-spacing:-.4px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;word-break:keep-all;overflow-wrap:anywhere}
 .notice-card .snippet{display:none}
 .notice-card .card-bottom>span{grid-column:2;grid-row:2;font-size:10px;line-height:1.6;color:#9aa2ba;min-width:0;letter-spacing:-.2px}
 .notice-card .done-button{grid-column:3;grid-row:2;justify-self:end;align-self:center;display:grid;place-items:center;min-width:36px;width:36px;min-height:34px;height:34px;padding:0;margin:0;border:0;border-radius:8px;background:transparent;color:#b9bfd1}
 .notice-card .done-button:hover{background:#f3f4fb}
 .notice-card .done-icon{font-size:22px;line-height:1;font-weight:400;margin:0}
 .notice-card .done-label{display:none}
 .notice-card .done-button.checked{color:#7c89cc;background:#f0f2fd}
 .notice-card .done-button.checked .done-icon{font-size:17px;font-weight:700}
 .notice-card.completed{opacity:1;background:#fafbfe}.notice-card.completed h3{color:#9ea5ba;text-decoration-color:#c3c9d7}
 .notice-card.is-overdue h3{color:#939cb4}
 .past-notice-label{font-size:11px;color:#a5acbe;letter-spacing:-.2px;padding:16px 2px 2px}
 #empty{padding:31px 17px;border-radius:12px;margin-top:5px}#empty>span{font-size:29px}#empty h3{font-size:14px}#empty p{font-size:11px;line-height:1.8}
 .page>footer{margin-top:26px;font-size:8px}.footer-logo{font-size:13px}
}
@media(max-width:370px){body[data-view=all] .page-heading h1{font-size:23px}.notice-card{grid-template-columns:37px minmax(0,1fr) 44px;gap:4px 9px;padding:12px 10px;min-height:88px}.notice-card .subject-tag{width:37px;min-height:40px;font-size:11px;border-radius:10px}.notice-card h3{font-size:13px}.notice-card .card-bottom>span{font-size:9px}.notice-card .due-badge{font-size:9px}.mobile-lobby-meta>button{font-size:11px}}
