/* Mobile application shell. Business routes and server permissions stay shared. */
html{scrollbar-gutter:stable}html:has(dialog[open]){overflow:hidden}
.ui-icon{width:19px;height:19px;flex:0 0 auto;vertical-align:-4px;pointer-events:none}
:is(button,summary,a.button)>.ui-icon{margin-right:6px}
.topnav a,.settings-link,.section-nav a{display:inline-flex;align-items:center;justify-content:center;gap:7px}
.topbar .brand>span:last-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.topnav .ui-icon{width:17px;height:17px}
.mobile-tabs,.mobile-home,.mobile-page-title,.mobile-student-switch,.mobile-attendance-note{display:none}
.mobile-refresh{display:none}.phone-link{display:inline-flex;align-items:center;gap:5px;max-width:100%;overflow-wrap:anywhere}.phone-link>.ui-icon{width:15px;height:15px}
.mobile-install{display:none}.install-instructions{font-size:14px;line-height:1.9}.install-instructions>.entry-icon{margin-bottom:15px}
.mobile-today-caption{display:none}
.credit-owing{font-size:inherit}
.attendance-choices,.attendance-row-tools{display:none}.attendance-row-more>summary{display:none}
.export-label-short{display:none}
.attendance-readonly-info>summary{display:none}.attendance-readonly-info{margin:0 0 14px}.attendance-roster-filter{margin:14px 0 20px;padding:14px;border:1px solid var(--border);border-radius:10px;background:#f8fafc}.attendance-roster-filter>label{display:block;font-size:12px;margin-bottom:7px;font-weight:600}.roster-search-input{display:flex;gap:7px}.roster-search-input input{flex:1;min-width:0}.roster-search-input button{flex-shrink:0;min-width:44px;padding:8px}.roster-search-input button>.ui-icon{margin:0}.attendance-roster-filter p{font-size:11px;line-height:1.7;margin:8px 0 0}.roster-no-matches{padding:10px;background:white;border-radius:7px;color:#53687f}
.statistics-intro{display:flex;gap:14px;align-items:center;margin-bottom:24px}
.statistics-intro h2{font-size:20px;margin:0 0 5px}.statistics-intro p{margin:0;color:var(--muted);font-size:12px}
.statistics-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:16px}
.statistics-metric{display:flex;flex-direction:column;padding:22px;border:1px solid var(--border);border-radius:14px;background:var(--surface-soft);color:#263444;gap:12px}
.statistics-metrics strong{font-size:30px;line-height:1.2}.statistics-metrics small{font-size:12px;font-weight:400;color:var(--muted);margin-left:7px}
.statistics-metric>span{font-size:12px;color:var(--muted)}.statistics-note{margin:20px 0 0;line-height:1.8}
.app-section-title{font-size:16px;margin:28px 0 14px}
.entry-icon{display:grid;place-items:center;width:46px;height:46px;flex-shrink:0;border-radius:15px;background:#edf4ff;color:#347fe0}
.entry-icon .ui-icon{width:26px;height:26px;stroke-width:1.8}
.tone-violet{background:#f1ecfc;color:#7858c1}.tone-green{background:#e6f6ef;color:#218464}.tone-orange{background:#fff1de;color:#ad6c18}
.report-entries{display:grid;gap:12px}.report-entries>a{display:flex;align-items:center;gap:14px;padding:18px;border:1px solid var(--border);border-radius:14px;color:#263444}
.report-entries>a>span:nth-child(2){flex:1;min-width:0}.report-entries strong{display:block;font-size:15px}.report-entries small{display:block;color:var(--muted);font-size:12px;margin-top:5px}.report-entries>a>.ui-icon{color:var(--muted)}
.week-head>button[aria-pressed=true]{background:var(--accent-soft);color:var(--blue)}
@media(min-width:701px) and (max-width:1100px){.topnav a{padding-inline:8px;gap:4px}.topnav a>.ui-icon{display:none}.topbar{gap:16px}.topbar .brand{font-size:14px}.top-right{gap:8px}}
@media(max-width:700px),(max-width:1000px) and (max-height:500px) and (pointer:coarse){
  :root{--app-bottom:calc(76px + env(safe-area-inset-bottom,0px));--app-top:calc(60px + env(safe-area-inset-top,0px));background:#f5f6fa}
  html{scroll-padding-top:calc(var(--app-top) + 12px);scroll-padding-bottom:calc(var(--app-bottom) + 16px)}
  body{overflow-wrap:anywhere}.topbar{height:var(--app-top);padding:env(safe-area-inset-top,0px) max(16px,env(safe-area-inset-right,0px)) 0 max(16px,env(safe-area-inset-left,0px));display:flex;flex-wrap:nowrap;align-content:normal;align-items:center;gap:12px;background:#fff;color:#263444;box-shadow:0 1px 0 #e5e9f0}
  .topbar .brand{height:auto;flex:1;min-width:0;max-width:none;font-size:16px;color:#263444!important;gap:10px;font-weight:650}
  .topbar .brand>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.brand .logo{width:30px;height:30px;border-radius:10px}
  .topnav{display:none}.top-right{margin-left:auto;gap:0;flex-shrink:0}.top-right .settings-link{display:none}.topbar .header-guide{color:#617083;min-width:44px;min-height:44px;font-size:11px;padding:6px 0 6px 8px;display:flex;align-items:center;gap:4px}
  .header-guide>.ui-icon{width:18px;height:18px;margin:0}.header-guide:hover{color:var(--blue);background:transparent}
  .mobile-refresh{display:grid;place-items:center;min-width:44px;min-height:44px;border:0;background:transparent;box-shadow:none;color:#617083;padding:10px}.mobile-refresh>.ui-icon{margin:0}.phone-link{min-height:44px}
  .mobile-install{display:block}
  body.ai-open{overflow:hidden}.ai-scrim{position:fixed;inset:0;z-index:30;display:block;border:0;border-radius:0;padding:0;background:#14243b66;opacity:0;visibility:hidden;pointer-events:none}.ai-assistant.open .ai-scrim{opacity:1;visibility:visible;pointer-events:auto}.ai-panel{inset:0;width:100%;height:100dvh;border-width:0;border-radius:0;transform:translateY(24px);transform-origin:bottom}.ai-panel-actions .ai-minimize{display:none}.ai-panel-actions .ai-close{display:block}.ai-panel .ai-disclaimer{padding-bottom:max(9px,env(safe-area-inset-bottom))}.ai-panel .ai-toolbar{padding-top:max(10px,env(safe-area-inset-top));padding-left:max(15px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right))}
  .focused-main{margin:var(--app-top) auto 0;padding:22px max(16px,env(safe-area-inset-right,0px)) calc(var(--app-bottom) + 24px) max(16px,env(safe-area-inset-left,0px));min-height:calc(100dvh - var(--app-top));max-width:100%;width:100%}
  .mobile-tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));position:fixed;inset:auto 0 0;z-index:20;height:var(--app-bottom);padding:6px max(8px,env(safe-area-inset-right,0px)) env(safe-area-inset-bottom,0px) max(8px,env(safe-area-inset-left,0px));background:#fffffffa;border-top:1px solid #e5e8ef;box-shadow:0 -4px 24px #26344406;isolation:isolate}
  .mobile-tab{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-width:0;min-height:60px;color:#727b89;font-size:11px;line-height:1.3;font-weight:500;text-decoration:none;border-radius:10px}
  .mobile-tab:hover{text-decoration:none;background:#f7f9fc}.mobile-tab[aria-current]{color:var(--blue);font-weight:650}.mobile-tab-icon{display:grid;place-items:center;width:32px;height:29px}.mobile-tab-icon>.ui-icon{width:25px;height:25px;stroke-width:1.8}
  .mobile-tab[aria-current] .mobile-tab-icon{background:var(--accent-soft);border-radius:9px}
  .mobile-tab-lesson{justify-content:flex-start;gap:3px;position:relative;overflow:visible}.mobile-tab-lesson .mobile-tab-icon{margin-top:-24px;width:58px;height:58px;border:5px solid #fff;border-radius:50%;background:var(--blue);color:white;box-shadow:0 -1px 0 #e5e8ef,0 5px 14px color-mix(in srgb,var(--blue) 22%,transparent)}
  .mobile-tab-lesson[aria-current] .mobile-tab-icon{background:var(--blue);border-radius:50%}.mobile-tab-lesson .ui-icon{width:29px;height:29px}.mobile-tab-lesson>span:last-child{margin-top:1px}
  .mobile-tab:focus-visible{outline-offset:-3px}.desktop-page-title{display:none}.mobile-page-title{display:inline}
  .page-head{margin-bottom:18px;gap:10px;align-items:flex-start}.page-head h1{font-size:24px;letter-spacing:-.6px}.page-head-actions{gap:8px;max-width:48%;flex-wrap:wrap}.page-head-actions>.tag{display:none}.page-head p{font-size:12px;line-height:1.7}.page-head .view-exports>summary{min-height:44px;font-size:12px;padding:10px}
  .section-nav{margin-bottom:20px;gap:5px;padding-bottom:10px}.section-nav a{min-height:44px;padding:8px 11px;font-size:12px;gap:5px}.section-nav .ui-icon{width:16px;height:16px}
  [data-page=lessons]>.section-nav{display:none}
  .mobile-student-switch{display:flex;gap:7px;margin-bottom:18px;padding:4px;border:1px solid #e5e8ef;border-radius:12px;background:#edf0f5}.mobile-student-switch a{flex:1;display:flex;align-items:center;justify-content:center;gap:7px;min-height:43px;border-radius:9px;color:#617083;font-size:13px}.mobile-student-switch a[aria-current]{color:var(--blue);background:white;box-shadow:0 2px 6px #26344408;font-weight:600}
  .mobile-home{display:block}.mobile-home~.workspace-intro,.mobile-home~.workflow-grid{display:none}
  .institution-card{background:white;border:1px solid #e9ecf2;border-radius:19px;margin-bottom:18px;overflow:hidden;box-shadow:0 4px 16px #26344403}
  .institution-identity{display:flex;align-items:center;gap:13px;padding:23px 19px}.institution-avatar{width:56px;height:56px;display:grid;place-items:center;border-radius:18px;flex-shrink:0;background:var(--accent-soft);color:var(--blue);font-size:25px;font-weight:650;object-fit:contain}
  .institution-identity>div{min-width:0}.institution-identity h1{font-size:20px;margin:0 0 6px;letter-spacing:-.4px;line-height:1.4}.institution-identity p{font-size:12px;color:var(--muted);margin:0}.institution-identity p>span{display:block;font-size:11px;margin-top:3px}
  .institution-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));padding:18px 0;border-top:1px solid #f0f2f6}.institution-metrics a{display:flex;flex-direction:column;gap:5px;text-align:center;min-height:58px;color:var(--muted);font-size:12px}.institution-metrics a+a{border-left:1px solid #f0f2f6}.institution-metrics strong{font-size:27px;color:var(--blue);line-height:1.2;font-weight:650;font-variant-numeric:tabular-nums}
  .app-group{background:white;border:1px solid #e9ecf2;border-radius:18px;padding:20px 15px 14px;margin-bottom:18px}.app-group header{display:flex;align-items:center;gap:8px;justify-content:space-between;padding:0 3px;margin-bottom:18px}.app-group h2{font-size:16px;margin:0}.app-group header>span{font-size:10px;color:var(--muted)}
  .app-entry-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));column-gap:5px;row-gap:14px}.icon-entry{min-width:0;display:flex;flex-direction:column;align-items:center;gap:9px;text-align:center;color:#344256;padding:4px 0 9px;font-size:12px;line-height:1.5;border-radius:12px}.icon-entry:hover{text-decoration:none;background:#f8f9fb}.icon-entry small{font-size:10px;color:var(--muted)}
  .entry-icon{width:44px;height:44px;border-radius:14px}.entry-icon .ui-icon{width:25px;height:25px}
  button,.button,summary{touch-action:manipulation}button,.button,summary{min-height:44px}button.link{min-height:44px}.class-card-footer button.link,.class-card-footer a.link{min-height:44px;padding:9px 0}.panel{border-radius:16px}.panel-body{padding:16px}.toolbar{gap:9px;flex-wrap:wrap}
  .student-table td:nth-child(6)>.link{min-height:44px}.student-table td:nth-child(6)>a{display:inline-flex;align-items:center;min-height:44px}.calendar-nav button,.page-controls button,.student-records-nav button{min-width:44px;min-height:44px}
  .record-table .name-cell{white-space:normal;min-width:0;overflow-wrap:anywhere}.student-table .name-cell a{white-space:normal;overflow-wrap:anywhere}
  .student-table .credit-owing{display:block;font-size:11px;line-height:1.5;font-weight:500;white-space:nowrap}
  .filters{gap:12px;align-items:stretch}.filters label{min-width:0;flex:1 1 calc(50% - 6px);display:flex;flex-direction:column;align-items:stretch;gap:6px;font-size:12px}.filters label:first-child{flex-basis:100%}.filters input,.filters select{width:100%;min-height:44px;max-width:100%}
  .statistics-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.statistics-metric{padding:18px;gap:12px}.statistics-metrics strong{font-size:29px}.statistics-intro h2{font-size:18px}.statistics-intro{gap:12px;margin:3px 0 20px}.report-entries>a{gap:11px;padding:15px 12px}.report-entries small{font-size:11px;line-height:1.7}
  .today-panel{margin-top:18px}.today-head{padding:18px 16px}.today-head>a{min-height:44px;display:flex;align-items:center}.today-lesson{padding:17px 0}.next-action{margin-bottom:18px}
  .today-panel>.panel-body{display:flex;flex-direction:column}.today-panel .today-lesson{order:var(--mobile-order,99)}.today-panel .today-lesson:not(.mobile-today-preview){display:none}.mobile-today-caption{display:block;margin:0;padding:14px 16px 0;color:var(--muted);font-size:11px}
  .drawer-head{padding-top:max(12px,env(safe-area-inset-top,0px));padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(12px,env(safe-area-inset-right,0px))}.drawer-footer{padding-bottom:max(14px,env(safe-area-inset-bottom,0px));gap:8px}.drawer-body{overscroll-behavior-y:contain;scroll-padding:16px}.field{grid-template-columns:minmax(0,1fr);gap:7px;margin-bottom:20px}.field>span{text-align:left;padding:0;font-size:13px}.photo-picker{margin-left:0}.field input,.field select{min-height:46px}.field textarea{min-height:104px}.lesson-fixed{margin-left:0}.drawer-inner{background:#fff}.drawer-head h2{font-size:17px}
  .roll-table{width:100%;min-width:0!important}.roll-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.roll-table tbody{display:grid;gap:12px}.roll-table tr{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;padding:16px;border:1px solid var(--border);border-radius:13px;background:#fff}.roll-table td{padding:0;border:0;min-width:0;white-space:normal}.roll-table td:first-child{grid-column:1/-1}.roll-table .name-cell{display:flex;flex-wrap:wrap;font-size:15px;font-weight:600;gap:7px}.roll-table td:nth-child(2){grid-column:1/-1}.roll-table td:nth-child(2)::before{content:'点名结果';display:block;font-size:11px;color:var(--muted);margin-bottom:6px}.roll-table select{width:100%;min-height:46px}.roll-table td:nth-child(3){grid-column:1/-1}.roll-table input{width:100%;min-height:44px}.roll-table td:nth-child(4){grid-column:1/-1;justify-self:end}.roll-table td:nth-child(4) button{font-size:12px;padding:6px 0}.table-wrap:has(>.roll-table){overflow:visible}.mobile-table-hint{display:none}
  .roll-table .attendance-status-select,.roll-table td:nth-child(2)::before,.roll-table td:nth-child(4){display:none}.attendance-choices{display:grid;grid-template-columns:repeat(var(--status-count),minmax(0,1fr));gap:6px}.attendance-choice{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-width:0;min-height:56px;padding:7px 3px;font-size:12px;color:#65758a;white-space:normal;background:#f8fafc;border-color:#e4e9ef;box-shadow:none}.attendance-choice>.ui-icon{width:18px;height:18px;margin:0}.attendance-choice[aria-pressed=true]{background:#edf1f6;border-color:#b7c3d2;color:#34465c;font-weight:650}.attendance-choice[data-attendance-status="到课"][aria-pressed=true]{background:#e9f7ef;border-color:#64b790;color:#176b49}.attendance-choice[data-attendance-status="试听"][aria-pressed=true]{background:#fff4df;border-color:#d7ad55;color:#845407}.attendance-choice[data-attendance-status="缺席"][aria-pressed=true]{background:#fff0f2;border-color:#d5828e;color:#a5283c}
  .attendance-row-more{border-top:1px solid #edf1f6}.attendance-row-more>summary{display:flex;align-items:center;min-height:44px;cursor:pointer;font-size:12px;color:#65758a;list-style:none}.attendance-row-more>summary::after{content:'⌄';margin-left:auto}.attendance-row-more>summary::-webkit-details-marker{display:none}.attendance-row-tools{display:flex;justify-content:flex-end;margin-top:7px}.attendance-row-more input{margin-top:5px}.attendance-row-tools button{font-size:12px}
  .attendance-drawer .lesson-fixed{display:none}.attendance-readonly-info{margin:0 0 16px;border:1px solid var(--border);border-radius:10px;padding:0 12px}.attendance-readonly-info>summary{display:flex;align-items:center;min-height:46px;cursor:pointer;font-size:12px;color:#53687f;list-style:none}.attendance-readonly-info>summary::after{content:'⌄';margin-left:auto}.attendance-readonly-info .lesson-readonly{margin-top:10px}
  .attendance-tools #all-present{flex-basis:100%}.attendance-more{flex:1}.attendance-more>summary{min-height:44px;display:flex;align-items:center;justify-content:center}.attendance-more>.toolbar{display:grid;grid-template-columns:minmax(0,1fr)}.attendance-tools>button{white-space:normal}.attendance-tools button>.ui-icon{width:17px;height:17px}
  .attendance-explanation{display:none}.mobile-attendance-note{display:block;margin:10px 0 16px;background:#f5f8fb;border-radius:9px;padding:0 12px;color:#53677f;font-size:12px}.mobile-attendance-note>summary{min-height:44px;cursor:pointer;display:flex;align-items:center}.mobile-attendance-note>p{font-size:12px;line-height:1.8;padding:0 0 12px;margin:0}.mobile-attendance-note>summary::after{content:'⌄';margin-left:auto}
  .record-table:not(.roll-table,.student-table,.credit-ledger){min-width:0!important;width:100%}.record-table:not(.roll-table,.student-table,.credit-ledger) thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.record-table:not(.roll-table,.student-table,.credit-ledger) tbody{display:grid;gap:12px}.record-table:not(.roll-table,.student-table,.credit-ledger) tr{display:grid;grid-template-columns:minmax(0,1fr);gap:11px;padding:16px;border:1px solid var(--border);border-radius:13px}.record-table:not(.roll-table,.student-table,.credit-ledger) td{display:block;min-width:0;max-width:100%;border:0;padding:0;white-space:normal!important;overflow-wrap:anywhere;font-size:13px}.record-table:not(.roll-table,.student-table,.credit-ledger) td[data-label]::before{content:attr(data-label)'：';font-size:11px;color:var(--muted);margin-right:5px}.record-table:not(.roll-table,.student-table,.credit-ledger) td:last-child:has(button){border-top:1px solid var(--border);padding-top:8px}.record-table:not(.roll-table,.student-table,.credit-ledger) td:last-child:has(button)::before{display:none}.record-table:not(.roll-table,.student-table,.credit-ledger) td .link{margin-right:6px}.table-wrap:has(>.record-table){max-width:100%}
  .lesson-toolbar>.toolbar{gap:10px}.calendar-nav{flex-wrap:wrap;justify-content:flex-start;width:100%;margin-left:0;gap:6px}.calendar-nav strong{font-size:12px;margin-left:auto}.view-switch{width:100%}.view-switch button{min-height:44px}.calendar-hint{font-size:12px}.mobile-week-strip button{min-height:64px;font-size:11px}.mobile-week-strip button strong{width:33px;height:33px;font-size:14px}.mobile-agenda .calendar-event{padding:15px;border-radius:12px;min-height:88px;text-align:left}.mobile-agenda .calendar-event-preview{font-size:14px;line-height:1.7}.mobile-agenda .calendar-event-details{font-size:12px;line-height:1.8}.lesson-readonly{grid-template-columns:1fr 1fr}
  .week-desktop{display:none}.week-mobile{display:block;margin-top:14px}.mobile-week-strip{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}.mobile-week-strip button{display:flex;flex-direction:column;align-items:center;gap:4px;padding:7px 2px;border:0;background:transparent;color:#617083}.mobile-week-strip button strong{display:grid;place-items:center;border-radius:50%}.mobile-agenda{margin-top:9px;border-top:1px solid var(--border);padding-top:12px}.mobile-agenda-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.mobile-agenda .calendar-event{position:static;width:100%;height:auto!important;margin-bottom:9px}.mobile-agenda .calendar-event-preview{white-space:normal}.mobile-agenda .calendar-event-details{display:flex;flex-wrap:wrap;gap:4px 12px;margin-top:6px}.mobile-agenda .calendar-event-details>span{display:inline-flex}
  .mobile-week-strip button[aria-pressed=true]{color:var(--blue);background:var(--accent-soft);border-radius:12px;font-weight:650}.mobile-week-strip button[aria-pressed=true] strong{color:white;background:var(--blue)}.mobile-week-strip button.today:not([aria-pressed=true]) strong{color:var(--blue);background:transparent;box-shadow:inset 0 0 0 1px var(--accent-border)}
  #toast{top:auto;bottom:calc(var(--app-bottom) + 14px);left:16px;right:16px;max-width:calc(100vw - 32px);transform:none;margin:0;width:auto;text-align:center;z-index:50}
  .settings-links a{align-items:center;min-height:58px;flex-wrap:wrap}.settings-links a>.ui-icon{color:var(--blue)}.settings-links a>span{font-size:11px}.settings-body>section:first-child{background:var(--accent-soft);padding:20px;border-radius:14px;border:0}.settings-body>section:first-child h2{font-size:13px;color:var(--muted)}.settings-body>section:first-child p{font-size:19px;font-weight:600}.settings-body>section:first-child .toolbar button{font-size:12px}.settings-body{padding-top:16px}
  .auth-page{min-height:100dvh;padding:max(24px,env(safe-area-inset-top,0px)) 20px max(24px,env(safe-area-inset-bottom,0px))}.auth-card{width:100%;max-width:420px;padding:28px 24px;border-radius:20px}
}
@media(min-width:701px) and (max-width:1000px) and (max-height:500px) and (pointer:coarse){
  .student-table,.credit-ledger{width:100%;min-width:0}.student-table thead,.credit-ledger thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.student-table tbody,.credit-ledger tbody{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.student-table tr,.credit-ledger tr{display:grid;gap:10px;padding:16px;border:1px solid var(--border);border-radius:13px;min-width:0}.student-table td,.credit-ledger td{border:0;padding:0;white-space:normal;min-width:0;overflow-wrap:anywhere}.student-table td[data-label]::before,.credit-ledger td[data-label]::before{content:attr(data-label)'：';font-size:11px;color:var(--muted)}.student-table td:last-child,.credit-ledger td:last-child{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.student-table td:last-child::before,.credit-ledger td:last-child::before{display:none}.student-table td:last-child button{min-height:44px}.student-table .name-cell{font-size:15px}.phone-link{min-height:44px}
  .field textarea{min-height:64px}.drawer-head,.drawer-footer{padding:8px max(16px,env(safe-area-inset-right)) 8px max(16px,env(safe-area-inset-left))}.drawer-body{padding:16px max(16px,env(safe-area-inset-right)) 16px max(16px,env(safe-area-inset-left))}
}
@media(max-width:360px){.focused-main{padding-inline:12px}.app-group{padding-inline:11px}.icon-entry{font-size:11px}.app-group header>span{font-size:9px}.institution-identity{padding:20px 16px}.institution-identity h1{font-size:18px}.mobile-tab{font-size:10px}.page-head h1{font-size:22px}.calendar-nav strong{width:100%;margin:3px 0 0}.drawer-footer>button{min-width:72px}}
@media(max-width:360px){.student-table td:nth-child(6){gap:6px}.student-table td:nth-child(6)>a,.student-table td:nth-child(6)>.link{font-size:11px}.student-table td:nth-child(6)>.link{padding-inline:6px}.student-table td:nth-child(6) .ui-icon{width:16px;height:16px;margin-right:4px}}
@media(max-width:360px){.drawer-exports .export-label-full{display:none}.drawer-exports .export-label-short{display:inline}}
@media(prefers-reduced-motion:no-preference){.mobile-tab .mobile-tab-icon{transition:background-color .15s,color .15s}.icon-entry:active{transform:scale(.96)}}

/* Measured text contrast on the real mobile surfaces (including cancelled lessons).
   Hierarchy comes from size/weight and surface, rather than unreadably pale copy. */
.auth-card>p,.page-head p,.settings-links span,.stat .label,.lesson-readonly span{color:#536277}
.auth-card input::placeholder{color:#536277;opacity:1}
.guide-steps button:not([aria-current]){color:#536277}
.photo-picker label{color:var(--blue)}
.mobile-tabs,dialog.onboarding{background:#fff}
.mobile-tab,.mobile-student-switch a,.attendance-choice{color:#536277}
.calendar-event.cancelled{opacity:1;color:#536277;background:#f1f3f6}
.calendar-event.cancelled :is(strong,span,b){color:inherit}
.att-badge.present{color:#176b49}.att-badge.trial{color:#845407}.att-badge.unmarked{color:#536277}
