/* YENTUMI Gradebook Enterprise — Mobile Application Experience 2026.08.27.015 */

/* Modern mobile foundation ------------------------------------------------ */
@media (max-width:800px){
  html{overflow-x:hidden;text-size-adjust:100%;-webkit-text-size-adjust:100%}
  body{overflow-x:hidden}
  body.dashboard-shell>.shell,
  body.enterprise-shell-v3.dashboard-shell>.shell{
    width:100%;max-width:100%;min-width:0;
    padding:18px 14px calc(108px + env(safe-area-inset-bottom));
  }
  body.enterprise-shell-v3 .app-header{
    height:64px;min-height:64px;padding:0 10px;gap:7px;
    border-bottom:1px solid var(--gb-line,#e2e8f0);
    box-shadow:0 5px 18px #102a4309;
  }
  body.enterprise-shell-v3 .mobile-sidebar-toggle,
  body.enterprise-shell-v3 .theme-toggle,
  body.enterprise-shell-v3 .notification-menu summary,
  body.enterprise-shell-v3 .enterprise-user-avatar{
    width:42px;height:42px;min-width:42px;min-height:42px;border-radius:13px
  }
  body.enterprise-shell-v3 .enterprise-period-context b{
    min-height:38px;padding:7px 10px;font-size:11px;max-width:145px;overflow:hidden;text-overflow:ellipsis
  }
  body.enterprise-shell-v3 .enterprise-user-menu>summary{min-height:44px}
  body.enterprise-shell-v3 .enterprise-user-popover{
    top:70px;right:10px;left:10px;width:auto;max-height:min(78dvh,620px);overflow:auto;
    border-radius:20px;padding:9px;box-shadow:0 24px 60px #081b3340
  }
  .enterprise-user-action{min-height:58px;padding:11px}

  /* Never allow a desktop-sized child to force a horizontal page. */
  main.shell,main.shell *,body.dashboard-shell>.shell *,body.enterprise-shell-v3.dashboard-shell>.shell *{min-width:0}
  img,video,canvas,svg{max-width:100%}
  h1,h2,h3,h4,p,label,th,td,span,b,strong{overflow-wrap:anywhere}

  .page-head{margin:0 0 18px;padding:0 1px}
  .page-head h1{font-size:clamp(27px,8vw,34px)!important;line-height:1.08!important;letter-spacing:-.025em}
  .page-head .eyebrow{font-size:11px}
  .section-heading{display:grid!important;grid-template-columns:1fr!important;align-items:start!important;gap:10px!important}
  .section-heading>div,.section-heading>form,.section-heading>.actions{width:100%}
  .section-heading h2{font-size:clamp(20px,6vw,25px);line-height:1.15}
  .section-heading p{font-size:14px;line-height:1.55}

  .panel,.card,.cc-card{
    border-radius:18px!important;
    padding:16px!important;
    box-shadow:0 7px 24px #102a430a!important
  }
  .panel+.panel{margin-top:14px}
  .split,.form-grid,.filters,.payment-breakdown,.stats,
  .registration-request-stats,.enterprise-health-grid{
    grid-template-columns:1fr!important
  }
  .split{gap:14px!important}
  .form-grid{gap:14px!important}
  .filters{display:grid!important;gap:11px!important;align-items:stretch!important}
  .filters>*{width:100%!important;max-width:none!important}
  .filters button{width:100%}
  .actions{display:flex;flex-wrap:wrap;gap:9px}
  .actions>*{flex:1 1 140px;text-align:center;justify-content:center}

  /* iOS and Android form ergonomics: >=16px prevents Safari focus zoom. */
  input:not([type="checkbox"]):not([type="radio"]),select,textarea,button,.button{
    font-size:16px!important
  }
  input:not([type="checkbox"]):not([type="radio"]),select{
    min-height:50px!important
  }
  textarea{min-height:128px;line-height:1.5!important;resize:vertical}
  button,.button,a.button{min-height:48px;padding:11px 15px;border-radius:13px}
  label{gap:7px;line-height:1.35}
  label>small,.muted,small{line-height:1.45}
  input[type="checkbox"],input[type="radio"]{min-width:20px;min-height:20px}

  /* Tabs are a swipeable app sub-navigation row, not clipped desktop tabs. */
  .tabs,.subnav,.settings-subnav-main,.academic-ops-tabs,.analytics-tabs{
    display:flex!important;overflow-x:auto!important;overflow-y:hidden!important;gap:7px!important;
    padding:5px!important;margin-inline:-2px!important;scroll-snap-type:x proximity;
    scrollbar-width:none;-webkit-overflow-scrolling:touch
  }
  .tabs::-webkit-scrollbar,.subnav::-webkit-scrollbar,.settings-subnav-main::-webkit-scrollbar,.academic-ops-tabs::-webkit-scrollbar,.analytics-tabs::-webkit-scrollbar{display:none}
  .tabs>a,.subnav>a,.settings-subnav-main>a,.academic-ops-tabs>a,.analytics-tabs>a,
  .analytics-tab{flex:0 0 auto!important;min-height:44px!important;white-space:nowrap!important;scroll-snap-align:start}

  /* Generic mobile card tables. mobile-app.js provides data-label attributes. */
  .table-wrap:has(table.mobile-card-table){overflow:visible!important;border:0!important}
  table.mobile-card-table{display:block!important;width:100%!important;min-width:0!important;border:0!important;background:transparent!important}
  table.mobile-card-table thead{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0 0 0 0)!important}
  table.mobile-card-table tbody{display:grid!important;gap:11px!important;width:100%!important}
  table.mobile-card-table tr{display:grid!important;gap:0!important;padding:5px 13px!important;border:1px solid var(--gb-line,#dce4ee)!important;border-radius:16px!important;background:var(--gb-surface,#fff)!important;box-shadow:0 5px 18px #102a4308!important}
  table.mobile-card-table td{display:grid!important;grid-template-columns:minmax(92px,35%) minmax(0,1fr)!important;gap:10px!important;align-items:start!important;width:auto!important;padding:10px 0!important;border:0!important;border-bottom:1px solid var(--gb-line,#e6ebf1)!important;text-align:right!important;white-space:normal!important}
  table.mobile-card-table td:last-child{border-bottom:0!important}
  table.mobile-card-table td::before{content:attr(data-label);text-align:left;color:var(--gb-muted,#66788a);font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.035em}
  table.mobile-card-table td[colspan]{display:block!important;text-align:left!important}
  table.mobile-card-table td[colspan]::before{display:none}
  table.mobile-card-table td .actions{justify-content:flex-end}
  table.mobile-card-table td small{display:block}

  /* Alerts / validation should look like app messages, not raw browser boxes. */
  .alert{position:relative;border-radius:15px!important;padding:14px 14px 14px 46px!important;line-height:1.5!important}
  .alert::before{position:absolute;left:15px;top:14px;width:22px;height:22px;display:grid;place-items:center;border-radius:50%;font-weight:900;content:"i"}
  .alert.success::before{content:"✓"}.alert.warning::before{content:"!"}.alert.danger::before{content:"!"}
  pre,code{max-width:100%;overflow:auto}

  /* Dialogs become bottom sheets on phones. */
  dialog,.pwa-install-dialog,.academic-dialog{
    width:calc(100vw - 16px)!important;max-width:none!important;max-height:min(90dvh,760px)!important;
    margin:auto 8px 8px!important;border-radius:24px 24px 18px 18px!important
  }
  dialog::backdrop{backdrop-filter:blur(3px)}

  /* Charts / analytics ---------------------------------------------------- */
  .analytics-shell{gap:14px!important}
  .analytics-hero{display:grid!important;grid-template-columns:1fr!important;gap:14px!important;padding:18px!important}
  .analytics-hero .analytics-metric-badge{display:flex!important;flex-wrap:wrap!important;gap:7px!important;max-width:none!important}
  .analytics-hero .analytics-metric-badge span{flex:0 1 auto!important}
  .analytics-report-banner{display:grid!important;grid-template-columns:1fr!important;gap:12px!important;padding:16px!important}
  .analytics-report-banner .analytics-pill{justify-self:start!important;max-width:100%!important}
  .analytics-workspace-grid,.analytics-visual-grid,.analytics-card-grid,.analytics-rank-grid{grid-template-columns:1fr!important}
  .analytics-visual-card{padding:14px!important;overflow:hidden}
  .analytics-visual-card canvas{width:100%!important;height:auto!important;max-height:260px}
  .analytics-ring-card{grid-template-columns:auto 1fr!important}

  /* Academic Operations -------------------------------------------------- */
  .academic-operations{max-width:100%!important;overflow:hidden}
  .academic-ops-page-head{
    display:grid!important;grid-template-columns:1fr!important;gap:14px!important;
    padding:18px!important;border-radius:18px!important;margin-bottom:12px!important
  }
  .academic-ops-page-head h2{font-size:clamp(25px,7.5vw,31px)!important;line-height:1.1!important;margin:4px 0 9px!important}
  .academic-ops-page-head p{font-size:14px!important;line-height:1.55!important}
  .academic-ops-page-head>div:last-child{padding:13px!important;border-radius:14px!important}
  .academic-ops-tabs{margin:0 0 14px!important;padding:4px 0 7px!important}
  .academic-ops-tabs a{padding:10px 13px!important;border-radius:12px!important}
  .academic-ops-hero,.academic-ops-split,.academic-ops-overview-grid,.academic-ops-metrics{grid-template-columns:1fr!important}
  .academic-ops-hero{padding:18px!important;gap:16px!important}
  .academic-ops-hero h2{font-size:24px!important;line-height:1.15!important}
  .academic-ops-metrics{display:grid!important;gap:9px!important}
  .academic-period-strip{grid-template-columns:1fr!important}
  .academic-code-list article{grid-template-columns:auto minmax(0,1fr)!important;gap:10px!important}
  .academic-code-list article form,.academic-code-list .academic-legacy-map{grid-column:2!important}

  /* Student 360 / school operations generic layouts --------------------- */
  .student-360-grid,.student-overview-grid,.student-directory-grid,.student-family-grid,
  .student-document-grid,.cc-grid,.cc-grid-secondary,.cc-kpi-grid{grid-template-columns:1fr!important}
  .student-360-header{display:grid!important;grid-template-columns:auto 1fr!important;gap:13px!important}
  .student-360-header .actions{grid-column:1/-1}
  .cc-hero{display:grid!important;grid-template-columns:1fr!important;gap:15px!important;padding:20px!important}
  .cc-hero h2{font-size:clamp(28px,8vw,36px)!important}
  .cc-search{width:100%!important;max-width:none!important}
  .cc-kpis{grid-template-columns:1fr 1fr!important;gap:9px!important}
  .cc-kpi{padding:14px!important;min-height:105px!important}
}

/* Compact phones --------------------------------------------------------- */
@media(max-width:430px){
  body.dashboard-shell>.shell,body.enterprise-shell-v3.dashboard-shell>.shell{padding-inline:12px}
  body.enterprise-shell-v3 .app-header{padding-inline:8px;gap:5px}
  body.enterprise-shell-v3 .mobile-sidebar-toggle,
  body.enterprise-shell-v3 .theme-toggle,
  body.enterprise-shell-v3 .notification-menu summary,
  body.enterprise-shell-v3 .enterprise-user-avatar{width:40px;height:40px;min-width:40px;min-height:40px}
  body.enterprise-shell-v3 .enterprise-period-context b{max-width:125px;padding-inline:8px;font-size:10px}
  .panel,.card,.cc-card{padding:14px!important;border-radius:17px!important}
  .cc-kpis{grid-template-columns:1fr!important}
  .stats{grid-template-columns:1fr!important}
  .actions>*{flex-basis:100%}
  table.mobile-card-table td{grid-template-columns:88px minmax(0,1fr)!important}
}

/* Very small phones (320–359 CSS px) ------------------------------------ */
@media(max-width:359px){
  body.enterprise-shell-v3 .theme-toggle{display:none!important}
  body.enterprise-shell-v3 .enterprise-period-context b{max-width:110px}
  .page-head h1{font-size:26px!important}
  .panel,.card,.cc-card{padding:12px!important}
  .pwa-dock-item>b{font-size:9px!important}
}

/* Installed phone app ---------------------------------------------------- */
html.gradebook-installed-app.gradebook-phone-app{
  --gradebook-app-bottom:calc(82px + env(safe-area-inset-bottom));
}
html.gradebook-installed-app.gradebook-phone-app body.dashboard-shell>.shell,
html.gradebook-installed-app.gradebook-phone-app body.enterprise-shell-v3.dashboard-shell>.shell{
  padding-bottom:calc(var(--gradebook-app-bottom) + 28px)!important
}
html.gradebook-installed-app.gradebook-phone-app .pwa-app-dock{
  background:#fff!important;
  backdrop-filter:none!important;
  border-top:1px solid #dfe6ee!important;
  box-shadow:0 -10px 34px #102a4320!important
}
html[data-theme="dark"].gradebook-installed-app.gradebook-phone-app .pwa-app-dock{
  background:#111d2c!important;border-top-color:#30455e!important
}
html.gradebook-installed-app.gradebook-phone-app.mobile-keyboard-open .pwa-app-dock{
  transform:translateY(115%)!important;pointer-events:none!important
}
html.gradebook-installed-app.gradebook-phone-app.mobile-keyboard-open body.dashboard-shell>.shell{
  padding-bottom:24px!important
}

/* Mobile lesson-note authoring ------------------------------------------ */
@media(max-width:800px){
  .lesson-note-banner{display:grid!important;gap:12px!important;margin-bottom:12px!important;padding:16px!important;background:var(--gb-brand-wash,#f5f9ff)!important;color:var(--gb-text,#102a43)!important}
  .lesson-note-banner .eyebrow{color:var(--gb-brand-strong,var(--school-accent-dark))!important}
  .lesson-note-banner h2{font-size:21px!important;line-height:1.2!important;margin:2px 0!important}
  .lesson-note-banner p{color:var(--gb-muted,#63768a)!important;font-size:13px!important;line-height:1.5!important}
  .lesson-note-banner .button{width:100%}
  .lesson-ai-panel{border-radius:17px!important;padding:14px!important}
  .lesson-ai-panel>summary{align-items:flex-start!important;gap:10px!important;font-size:15px!important}

  .lesson-note-form.mobile-lesson-steps{display:block!important}
  .lesson-note-form.mobile-lesson-steps>section.panel{display:none!important;margin:0!important}
  .lesson-note-form.mobile-lesson-steps>section.panel.mobile-lesson-step-active{display:block!important;animation:mobileStepIn .16s ease-out}
  .lesson-note-form.mobile-lesson-steps .lesson-section-title{
    margin:-14px -14px 16px!important;padding:13px 14px!important;border-radius:17px 17px 0 0!important;
    background:var(--school-accent)!important;color:#fff!important;font-size:20px!important;line-height:1.2!important;letter-spacing:0!important;text-transform:none!important
  }
  .lesson-note-form.mobile-lesson-steps .form-grid,.lesson-fields-grid,.lesson-choice-grid{grid-template-columns:1fr!important;gap:15px!important}
  .lesson-note-form.mobile-lesson-steps label{font-size:15px!important}
  .lesson-note-form.mobile-lesson-steps textarea{min-height:132px!important}
  .lesson-sticky-actions{display:none!important}

  .mobile-lesson-progress{margin:0 0 12px;padding:12px 14px;border:1px solid var(--gb-line,#dce4ee);border-radius:16px;background:var(--gb-surface,#fff);box-shadow:0 6px 20px #102a4309}
  .mobile-lesson-progress-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:9px}
  .mobile-lesson-progress-head b{font-size:14px}.mobile-lesson-progress-head span{font-size:11px;color:var(--gb-muted,#63768a);font-weight:750}
  .mobile-lesson-progress-track{height:7px;border-radius:99px;background:var(--gb-brand-soft,#eef4ff);overflow:hidden}
  .mobile-lesson-progress-track i{display:block;height:100%;border-radius:inherit;background:var(--school-accent);transition:width .18s ease}
  .mobile-lesson-step-actions{
    position:sticky;z-index:55;bottom:calc(var(--gradebook-app-bottom,0px) + 8px);
    display:grid;grid-template-columns:auto 1fr 1fr;gap:8px;margin:14px 0 0;padding:9px;
    border:1px solid var(--gb-line,#dce4ee);border-radius:17px;background:var(--gb-surface,#fff);box-shadow:0 14px 34px #102a4324
  }
  .mobile-lesson-step-actions button{min-width:0;padding-inline:10px!important;font-size:14px!important}
  .mobile-lesson-step-actions [data-mobile-submit]{display:none}
  .mobile-lesson-step-actions.is-last [data-mobile-next]{display:none}
  .mobile-lesson-step-actions.is-last [data-mobile-submit]{display:block}
  .mobile-lesson-step-actions.is-first [data-mobile-prev]{visibility:hidden}

  .mobile-choice-picker{display:grid;gap:9px;margin-top:5px}
  .mobile-choice-picker-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
  .mobile-choice-picker-head span{font-size:12px;color:var(--gb-muted,#63768a)}
  .mobile-choice-chips{display:flex;flex-wrap:wrap;gap:8px}
  .mobile-choice-chip{min-height:42px!important;padding:8px 11px!important;border:1px solid var(--gb-line,#dce4ee)!important;border-radius:999px!important;background:var(--gb-surface,#fff)!important;color:var(--gb-text,#102a43)!important;font-size:13px!important;font-weight:750!important}
  .mobile-choice-chip[aria-pressed="true"]{border-color:var(--school-accent)!important;background:var(--gb-brand-soft,#eef4ff)!important;color:var(--gb-brand-strong,var(--school-accent-dark))!important}
  .mobile-choice-native{position:absolute!important;inline-size:1px!important;block-size:1px!important;opacity:0!important;pointer-events:none!important}
  .lesson-choice-grid label>small{display:none!important}

  /* Lesson development becomes five touch-friendly stage cards. */
  .lesson-development-scroll{overflow:visible!important}
  .lesson-development-editor table{display:block!important;min-width:0!important;width:100%!important;border:0!important}
  .lesson-development-editor thead{display:none!important}
  .lesson-development-editor tbody{display:grid!important;gap:12px!important}
  .lesson-development-editor tr{display:grid!important;gap:11px!important;padding:14px!important;border:1px solid var(--gb-line,#dce4ee)!important;border-radius:16px!important;background:var(--gb-surface-soft,#f8fafc)!important}
  .lesson-development-editor th,.lesson-development-editor td{display:block!important;width:auto!important;padding:0!important;border:0!important;background:transparent!important;color:var(--gb-text,#102a43)!important}
  .lesson-development-editor tbody th{font-size:17px!important;color:var(--gb-brand-strong,var(--school-accent-dark))!important}
  .lesson-development-editor tbody th small{font-size:11px!important;color:var(--gb-muted,#63768a)!important}
  .lesson-development-editor td::before{display:block;margin-bottom:6px;color:var(--gb-muted,#63768a);font-size:11px;font-weight:850;text-transform:uppercase;letter-spacing:.04em}
  .lesson-development-editor td:nth-of-type(1)::before{content:"Teacher activities"}
  .lesson-development-editor td:nth-of-type(2)::before{content:"Learner activities"}
  .lesson-development-editor td:nth-of-type(3)::before{content:"Assessment / evidence"}
  .lesson-development-editor textarea{min-height:120px!important;border:1px solid var(--gb-line,#dce4ee)!important;border-radius:13px!important;background:var(--gb-surface,#fff)!important;padding:12px!important}

  /* Approved lesson note: responsive reading mode on-screen; print stays A4. */
  .lesson-print{width:100%!important;max-width:100%!important;margin:0!important;padding:16px!important;border-radius:18px!important;box-shadow:0 7px 24px #102a4312!important;font-size:14px!important}
  .lesson-document-header{display:grid!important;grid-template-columns:auto 1fr!important;gap:12px!important;text-align:left!important}
  .lesson-document-header img{width:58px!important;height:58px!important}
  .lesson-document-header p{font-size:16px!important;line-height:1.3!important}
  .lesson-meta{grid-template-columns:1fr!important;border:0!important;gap:8px!important}
  .lesson-meta span{border:1px solid #dde3ea!important;border-radius:12px!important;padding:10px 12px!important}
  .lesson-print section h2{font-size:17px!important;line-height:1.25!important;border-radius:10px!important}
  .lesson-print section table:not(.lesson-development-print){display:block!important}
  .lesson-print section table:not(.lesson-development-print) tbody{display:grid!important;gap:7px!important}
  .lesson-print section table:not(.lesson-development-print) tr{display:grid!important;grid-template-columns:1fr!important;border:1px solid #d9dee5!important;border-radius:11px!important;overflow:hidden!important}
  .lesson-print section table:not(.lesson-development-print) th,.lesson-print section table:not(.lesson-development-print) td{display:block!important;width:auto!important;border:0!important;padding:9px 11px!important}
  .lesson-print section table:not(.lesson-development-print) th{background:#f4f6f8!important}
  .lesson-development-print{display:block!important;width:100%!important}
  .lesson-development-print thead{display:none!important}
  .lesson-development-print tbody{display:grid!important;gap:10px!important}
  .lesson-development-print tr{display:grid!important;gap:0!important;border:1px solid #d9dee5!important;border-radius:12px!important;overflow:hidden!important}
  .lesson-development-print th,.lesson-development-print td{display:block!important;width:auto!important;border:0!important;padding:10px 11px!important;min-height:0!important}
  .lesson-development-print tbody th{background:#e8f1ee!important}
  .lesson-development-print td{border-top:1px solid #e5e8ec!important}
  .lesson-development-print td::before{display:block;margin-bottom:5px;color:#66788a;font-size:10px;font-weight:800;text-transform:uppercase}
  .lesson-development-print td:nth-of-type(1)::before{content:"Teacher activities"}
  .lesson-development-print td:nth-of-type(2)::before{content:"Learner activities"}
  .lesson-development-print td:nth-of-type(3)::before{content:"Assessment / evidence"}
  .lesson-approval-signature{display:grid!important;gap:16px!important;justify-items:start!important}
  .lesson-print footer{display:grid!important;gap:8px!important}
  .lesson-print-controls{display:grid!important;grid-template-columns:1fr!important;gap:9px!important;margin:14px 0!important}
  .lesson-print-controls>*{width:100%!important}
}
@keyframes mobileStepIn{from{opacity:.3;transform:translateY(5px)}to{opacity:1;transform:none}}

/* Keep print documents untouched by mobile screen transformations. */
@media print{
  .mobile-lesson-progress,.mobile-lesson-step-actions{display:none!important}
  .lesson-print{border-radius:0!important}
}


/* Reusable app messages -------------------------------------------------- */
.gradebook-mobile-sheet{border:1px solid var(--gb-line,#dce4ee);background:var(--gb-surface,#fff);color:var(--gb-text,#102a43);box-shadow:0 30px 100px #081b3340}
.gradebook-mobile-sheet::backdrop{background:#06172a80;backdrop-filter:blur(4px)}
.gradebook-mobile-sheet-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:17px 18px;border-bottom:1px solid var(--gb-line,#dce4ee)}
.gradebook-mobile-sheet-head span{display:block;color:var(--gb-brand-strong,var(--school-accent-dark));font-size:10px;font-weight:900;letter-spacing:.11em;text-transform:uppercase}
.gradebook-mobile-sheet-head h2{margin:4px 0 0;font-size:21px}.gradebook-mobile-sheet-head>button{min-width:42px;width:42px;height:42px;padding:0;border-radius:50%;background:var(--gb-surface-soft,#f5f7fa);color:var(--gb-text,#102a43)}
.gradebook-mobile-sheet-body{padding:18px;font-size:15px;line-height:1.6;color:var(--gb-muted,#63768a);white-space:pre-line}
.gradebook-mobile-sheet-actions{display:flex;justify-content:flex-end;padding:0 18px 18px}.gradebook-mobile-sheet-actions button{min-width:110px}
.gradebook-mobile-toast-host{position:fixed;z-index:400;left:12px;right:12px;bottom:calc(var(--gradebook-app-bottom,20px) + 14px);display:grid;gap:8px;pointer-events:none}
.gradebook-mobile-toast{justify-self:center;max-width:min(480px,100%);padding:11px 14px;border-radius:13px;background:#102a43;color:#fff;box-shadow:0 14px 40px #081b3340;opacity:0;transform:translateY(8px);transition:.18s ease;font-size:13px;font-weight:700;text-align:center}.gradebook-mobile-toast.show{opacity:1;transform:none}.gradebook-mobile-toast.success{background:#166534}.gradebook-mobile-toast.danger{background:#b42318}
html.mobile-keyboard-open .gradebook-mobile-toast-host{bottom:14px}


/* ==========================================================================
   Release 2026.08.27.017 — reliable native mobile application bar
   ========================================================================== */
@media (max-width:800px){
  body.enterprise-shell-v3 .app-header{
    position:sticky!important;
    top:0!important;
    left:auto!important;
    right:auto!important;
    z-index:160!important;
    width:100%!important;
    min-height:calc(64px + env(safe-area-inset-top))!important;
    height:calc(64px + env(safe-area-inset-top))!important;
    padding:
      max(8px,env(safe-area-inset-top))
      max(10px,env(safe-area-inset-right))
      8px
      max(10px,env(safe-area-inset-left))!important;
    display:grid!important;
    grid-template-columns:44px minmax(0,1fr) 44px 44px!important;
    align-items:end!important;
    gap:7px!important;
    background:var(--gb-surface,#fff)!important;
    border-bottom:1px solid var(--gb-line,#e1e7ef)!important;
    box-shadow:0 4px 16px rgba(15,35,60,.08)!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
    opacity:1!important;
  }
  html[data-theme="dark"] body.enterprise-shell-v3 .app-header{
    background:#111d2c!important;
    border-bottom-color:#2b3f57!important;
    box-shadow:0 5px 20px rgba(0,0,0,.28)!important;
  }

  /* Remove all legacy fixed-header compensation. The app bar now owns its
     normal layout space, so page titles can never slide behind it. */
  body.enterprise-shell-v3.dashboard-shell>.shell,
  body.enterprise-shell-v3 main.shell{
    margin-top:0!important;
    padding-top:18px!important;
  }
  html{scroll-padding-top:calc(76px + env(safe-area-inset-top))}

  body.enterprise-shell-v3 .mobile-sidebar-toggle{
    grid-column:1!important;
    width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;
    margin:0!important;padding:0!important;border:0!important;border-radius:14px!important;
    background:var(--gb-brand-soft,var(--school-accent-soft))!important;
    color:var(--gb-brand-strong,var(--school-accent-dark))!important;
    box-shadow:none!important;
    display:grid!important;place-items:center!important;
  }
  body.enterprise-shell-v3 .enterprise-period-context{
    grid-column:2!important;
    min-width:0!important;margin:0!important;
    display:flex!important;align-items:center!important;height:44px!important
  }
  body.enterprise-shell-v3 .enterprise-period-context b{
    width:100%!important;max-width:100%!important;
    min-height:38px!important;
    display:flex!important;align-items:center!important;
    padding:7px 8px!important;border:0!important;border-radius:12px!important;
    background:transparent!important;
    color:var(--gb-brand-strong,var(--school-accent-dark))!important;
    font-size:11px!important;font-weight:850!important;
    overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important
  }
  body.enterprise-shell-v3 .notification-menu{
    grid-column:3!important;
    width:44px!important;height:44px!important;margin:0!important
  }
  body.enterprise-shell-v3 .notification-menu summary,
  body.enterprise-shell-v3 .enterprise-user-avatar{
    width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;
    border-radius:14px!important
  }
  body.enterprise-shell-v3 .notification-menu summary{
    padding:0!important;display:grid!important;place-items:center!important;
    background:var(--gb-surface-soft,#f6f8fb)!important;
    border:1px solid var(--gb-line,#e1e7ef)!important
  }
  body.enterprise-shell-v3 .enterprise-user-menu{
    grid-column:4!important;
    width:44px!important;height:44px!important;margin:0!important
  }
  body.enterprise-shell-v3 .enterprise-user-menu>summary{
    width:44px!important;height:44px!important;min-height:44px!important;
    padding:0!important;margin:0!important;border-radius:14px!important;
    display:grid!important;place-items:center!important;background:transparent!important
  }
  body.enterprise-shell-v3 .enterprise-user-summary>div,
  body.enterprise-shell-v3 .enterprise-user-chevron{display:none!important}

  /* Appearance stays in account; legacy standalone theme icon never returns. */
  body.enterprise-shell-v3 .app-header>.theme-toggle{display:none!important}

  body.enterprise-shell-v3 .enterprise-user-popover{
    position:fixed!important;
    top:calc(72px + env(safe-area-inset-top))!important;
    left:10px!important;right:10px!important;width:auto!important;
    max-height:min(76dvh,620px)!important;overflow:auto!important;
    padding:10px!important;border-radius:20px!important;
    background:var(--gb-surface,#fff)!important;
    border:1px solid var(--gb-line,#dce4ee)!important;
    box-shadow:0 24px 60px rgba(8,27,51,.24)!important;
    backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
  }
  html[data-theme="dark"] body.enterprise-shell-v3 .enterprise-user-popover{
    background:#111d2c!important;border-color:#30455e!important
  }
}

/* Appearance toggle in account menu. */
body.enterprise-shell-v3 .enterprise-theme-menu-action{
  width:100%;border:0;background:transparent;text-align:left;font:inherit;cursor:pointer
}
body.enterprise-shell-v3 .enterprise-theme-switch{
  margin-left:auto;width:40px;height:24px;flex:0 0 40px;border-radius:999px;
  padding:3px;background:#dfe7f0;display:flex;align-items:center;transition:background .16s ease
}
body.enterprise-shell-v3 .enterprise-theme-switch i{
  display:block;width:18px;height:18px;border-radius:50%;background:#fff;
  box-shadow:0 1px 4px rgba(0,0,0,.22);transform:translateX(0);transition:transform .16s ease
}
html[data-theme="dark"] body.enterprise-shell-v3 .enterprise-theme-switch{background:var(--school-accent,#2563eb)}
html[data-theme="dark"] body.enterprise-shell-v3 .enterprise-theme-switch i{transform:translateX(16px)}

@media(max-width:370px){
  body.enterprise-shell-v3 .app-header{
    grid-template-columns:42px minmax(0,1fr) 42px 42px!important;gap:5px!important;
    padding-left:max(7px,env(safe-area-inset-left))!important;
    padding-right:max(7px,env(safe-area-inset-right))!important
  }
  body.enterprise-shell-v3 .mobile-sidebar-toggle,
  body.enterprise-shell-v3 .notification-menu,
  body.enterprise-shell-v3 .notification-menu summary,
  body.enterprise-shell-v3 .enterprise-user-menu,
  body.enterprise-shell-v3 .enterprise-user-menu>summary,
  body.enterprise-shell-v3 .enterprise-user-avatar{
    width:42px!important;height:42px!important;min-width:42px!important;min-height:42px!important
  }
  body.enterprise-shell-v3 .enterprise-period-context b{font-size:10px!important;padding-inline:5px!important}
}



/* ==========================================================================
   Cross-platform form reliability
   Native desktop controls stay native. On touch-phone layouts Gradebook uses
   an app-native picker while retaining the real select for form submission.
   ========================================================================== */
.gb-mobile-select-native{
  display:none!important
}
.gb-mobile-select-trigger{
  width:100%!important;min-height:50px!important;
  display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;gap:10px!important;
  padding:11px 13px!important;text-align:left!important;
  border:1px solid #cbd5e1!important;border-radius:13px!important;
  background:var(--gb-surface,#fff)!important;color:var(--gb-text,#17243d)!important;
  box-shadow:none!important;font-size:16px!important;font-weight:650!important
}
.gb-mobile-select-trigger::after{
  content:"⌄";font-size:20px;line-height:1;color:var(--gb-muted,#64748b)
}
.gb-mobile-select-trigger.is-placeholder{color:var(--gb-muted,#64748b)!important;font-weight:600!important}
.gb-mobile-select-trigger:focus-visible{
  outline:3px solid color-mix(in srgb,var(--school-accent) 22%,transparent)!important;
  border-color:var(--school-accent)!important
}
.gb-select-sheet{
  width:calc(100vw - 16px)!important;max-width:520px!important;
  max-height:min(82dvh,680px)!important;
  margin:auto 8px 8px!important;padding:0!important;
  border:1px solid var(--gb-line,#dce4ee)!important;border-radius:24px 24px 18px 18px!important;
  background:var(--gb-surface,#fff)!important;color:var(--gb-text,#17243d)!important;
  box-shadow:0 28px 90px rgba(8,27,51,.32)!important;overflow:hidden!important
}
.gb-select-sheet::backdrop{background:rgba(6,23,42,.55);backdrop-filter:blur(3px)}
.gb-select-sheet-head{
  position:sticky;top:0;z-index:2;
  display:grid;grid-template-columns:minmax(0,1fr) 44px;align-items:center;gap:10px;
  padding:14px 14px 10px;background:var(--gb-surface,#fff);border-bottom:1px solid var(--gb-line,#dce4ee)
}
.gb-select-sheet-head small{display:block;color:var(--gb-muted,#64748b);font-size:11px}
.gb-select-sheet-head b{display:block;margin-top:2px;font-size:18px}
.gb-select-sheet-close{
  width:44px!important;height:44px!important;min-height:44px!important;padding:0!important;
  border-radius:50%!important;background:var(--gb-surface-soft,#f4f7fb)!important;
  color:var(--gb-text,#17243d)!important
}
.gb-select-sheet-options{display:grid;gap:2px;padding:8px 10px calc(12px + env(safe-area-inset-bottom))}
.gb-select-sheet-option{
  width:100%!important;min-height:50px!important;padding:11px 12px!important;
  display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;
  border:0!important;border-radius:12px!important;background:transparent!important;
  color:var(--gb-text,#17243d)!important;text-align:left!important;font-size:15px!important;font-weight:650!important
}
.gb-select-sheet-option:hover,.gb-select-sheet-option:focus-visible{background:var(--gb-brand-soft,var(--school-accent-soft))!important}
.gb-select-sheet-option[aria-selected="true"]{
  background:var(--gb-brand-soft,var(--school-accent-soft))!important;
  color:var(--gb-brand-strong,var(--school-accent-dark))!important
}
.gb-select-sheet-option[aria-selected="true"]::after{content:"✓";font-weight:900}
.gb-select-sheet-empty{padding:22px;text-align:center;color:var(--gb-muted,#64748b)}

@media(min-width:801px){
  .gb-mobile-select-trigger,.gb-select-sheet,.mobile-choice-picker,.mobile-lesson-progress,.mobile-lesson-step-actions{display:none!important}
  select.gb-mobile-select-native{display:block!important}
}

/* Desktop Lesson Note authoring must remain a desktop editor. */
@media(min-width:801px){
  .lesson-note-form .mobile-choice-native{position:static!important;inline-size:auto!important;block-size:auto!important;opacity:1!important;pointer-events:auto!important}
  .lesson-sticky-actions{
    position:static!important;bottom:auto!important;z-index:auto!important;
    margin-top:2px!important;padding:14px 0 4px!important;
    border:0!important;border-radius:0!important;background:transparent!important;
    box-shadow:none!important;backdrop-filter:none!important
  }
  .lesson-note-banner{
    background:linear-gradient(135deg,var(--gb-brand-wash,#f7faff),var(--gb-surface,#fff))!important;
    color:var(--gb-text,#17243d)!important;
    border:1px solid var(--gb-brand-border,#d9e6f5)!important
  }
  .lesson-note-banner .eyebrow{color:var(--gb-brand-strong,var(--school-accent-dark))!important}
  .lesson-note-banner p{color:var(--gb-muted,#64748b)!important}
  .lesson-choice-grid select[multiple]{
    min-height:190px!important;padding:8px!important;background:var(--gb-surface,#fff)!important
  }
}

/* On phone the original desktop sticky save bar is replaced by the step bar. */
@media(max-width:800px){
  .lesson-note-form>.lesson-sticky-actions{display:none!important}
}



/* ==========================================================================
   Release 2026.08.27.018 — complete mobile form and navigation reliability
   ========================================================================== */

/* Long option lists must scroll inside the sheet, not expand beyond the phone. */
.gb-select-sheet,.gb-temporal-sheet{
  display:none;
  flex-direction:column;
  overflow:hidden!important;
  overscroll-behavior:contain;
}
.gb-select-sheet[open],.gb-temporal-sheet[open]{display:flex!important}
.gb-select-sheet{height:min(82dvh,720px)!important}
.gb-select-sheet-head,.gb-temporal-head{flex:0 0 auto}
.gb-select-search-wrap{
  flex:0 0 auto;display:grid;grid-template-columns:24px minmax(0,1fr);align-items:center;gap:7px;
  margin:9px 12px 4px;padding:0 10px;border:1px solid var(--gb-line,#dce4ee);border-radius:12px;background:var(--gb-surface-soft,#f6f8fb)
}
.gb-select-search-wrap[hidden]{display:none!important}
.gb-select-search-wrap input{border:0!important;background:transparent!important;box-shadow:none!important;padding-inline:0!important;min-height:46px!important}
.gb-select-sheet-options{
  flex:1 1 auto!important;min-height:0!important;max-height:none!important;
  overflow-y:auto!important;overflow-x:hidden!important;
  overscroll-behavior:contain!important;-webkit-overflow-scrolling:touch!important;
  touch-action:pan-y!important;
  padding:8px 10px calc(14px + env(safe-area-inset-bottom))!important
}
.gb-sheet-close{
  width:44px!important;height:44px!important;min-height:44px!important;padding:0!important;border-radius:50%!important;
  background:var(--gb-surface-soft,#f4f7fb)!important;color:var(--gb-text,#17243d)!important;border:0!important
}

/* App-native temporal controls. The hidden native input remains the actual
   submitted source of truth. */
.gb-mobile-temporal-native{
  position:absolute!important;width:1px!important;height:1px!important;opacity:.001!important;
  pointer-events:none!important;clip-path:inset(50%)!important
}
.gb-mobile-temporal-trigger{
  width:100%!important;min-height:50px!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;gap:10px!important;padding:11px 13px!important;text-align:left!important;
  border:1px solid #cbd5e1!important;border-radius:13px!important;background:var(--gb-surface,#fff)!important;
  color:var(--gb-text,#17243d)!important;font-size:16px!important;font-weight:650!important
}
.gb-mobile-temporal-trigger::after{content:"▣";font-size:16px;color:var(--gb-brand-strong,var(--school-accent-dark))}
.gb-mobile-temporal-trigger.is-placeholder{color:var(--gb-muted,#64748b)!important;font-weight:600!important}
.gb-temporal-sheet{
  width:calc(100vw - 16px)!important;max-width:520px!important;max-height:min(88dvh,760px)!important;
  margin:auto 8px 8px!important;padding:0!important;border:1px solid var(--gb-line,#dce4ee)!important;
  border-radius:24px 24px 18px 18px!important;background:var(--gb-surface,#fff)!important;color:var(--gb-text,#17243d)!important;
  box-shadow:0 28px 90px rgba(8,27,51,.32)!important
}
.gb-temporal-sheet::backdrop{background:rgba(6,23,42,.55);backdrop-filter:blur(3px)}
.gb-temporal-head{
  display:grid;grid-template-columns:minmax(0,1fr) 44px;align-items:center;gap:10px;
  padding:14px 14px 10px;background:var(--gb-surface,#fff);border-bottom:1px solid var(--gb-line,#dce4ee)
}
.gb-temporal-head small{display:block;color:var(--gb-muted,#64748b);font-size:11px}.gb-temporal-head b{display:block;margin-top:2px;font-size:18px}
.gb-temporal-body{flex:1 1 auto;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:14px;overscroll-behavior:contain}
.gb-temporal-actions{flex:0 0 auto;display:grid;grid-template-columns:1fr 1fr;gap:9px;padding:10px 12px calc(10px + env(safe-area-inset-bottom));border-top:1px solid var(--gb-line,#dce4ee);background:var(--gb-surface,#fff)}
.gb-date-toolbar{display:grid;grid-template-columns:46px minmax(0,1fr) 46px;align-items:center;gap:8px;margin-bottom:12px}
.gb-date-toolbar>button{width:46px!important;height:46px!important;padding:0!important;font-size:28px!important}
.gb-date-month{text-align:center}.gb-date-month>b{display:block;font-size:17px}.gb-date-month label{display:flex;align-items:center;justify-content:center;gap:7px;margin-top:5px;color:var(--gb-muted);font-size:11px}.gb-date-month input{width:88px!important;min-height:36px!important;padding:5px 7px!important;text-align:center!important;font-size:15px!important}
.gb-date-weekdays,.gb-date-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}
.gb-date-weekdays{margin-bottom:5px}.gb-date-weekdays span{text-align:center;font-size:10px;font-weight:800;color:var(--gb-muted);text-transform:uppercase}
.gb-date-day,.gb-date-spacer{aspect-ratio:1;min-height:40px}.gb-date-day{padding:0!important;border:0!important;border-radius:12px!important;background:transparent!important;color:var(--gb-text)!important;font-size:14px!important;font-weight:700!important}.gb-date-day:hover{background:var(--gb-brand-soft)!important}.gb-date-day[aria-selected="true"]{background:var(--school-accent)!important;color:#fff!important}.gb-date-day.is-today:not([aria-selected="true"]){box-shadow:inset 0 0 0 2px var(--school-accent)!important}.gb-date-day:disabled{opacity:.28!important}
.gb-date-today{width:100%;margin-top:12px}
.gb-time-picker{display:grid;grid-template-columns:1fr 1fr .82fr;gap:8px;min-height:360px;max-height:56dvh}
.gb-time-column{display:grid;grid-template-rows:auto minmax(0,1fr);min-height:0;gap:6px}.gb-time-column>b{text-align:center;color:var(--gb-muted);font-size:11px;text-transform:uppercase;letter-spacing:.06em}
.gb-time-wheel{min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;scroll-snap-type:y proximity;border:1px solid var(--gb-line);border-radius:14px;background:var(--gb-surface-soft);padding:5px}
.gb-time-wheel button{width:100%!important;min-height:48px!important;padding:8px!important;border:0!important;border-radius:10px!important;background:transparent!important;color:var(--gb-text)!important;scroll-snap-align:center;font-size:17px!important;font-weight:750!important}.gb-time-wheel button[aria-selected="true"]{background:var(--school-accent)!important;color:#fff!important}

/* A visible phone app dock is part of the app frame, not page content. */
html.gradebook-installed-app.gradebook-phone-app body.enterprise-shell-v3 .shell{padding-bottom:calc(96px + env(safe-area-inset-bottom))!important}
html.gradebook-installed-app.gradebook-phone-app .pwa-app-dock{
  background:var(--gb-surface,#fff)!important;border-top:1px solid var(--gb-line,#dce4ee)!important;
  box-shadow:0 -12px 34px rgba(8,27,51,.16)!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important
}
html[data-theme="dark"].gradebook-installed-app.gradebook-phone-app .pwa-app-dock{background:#111d2c!important}

/* Do not let phone page headings break at arbitrary characters. */
@media(max-width:800px){
  body.enterprise-shell-v3 h1,body.enterprise-shell-v3 h2,body.enterprise-shell-v3 h3,body.enterprise-shell-v3 h4{
    overflow-wrap:normal!important;word-break:normal!important;hyphens:auto
  }
  body.enterprise-shell-v3 .page-head{padding-top:2px!important}
  body.enterprise-shell-v3 .page-head h1{font-size:clamp(28px,8vw,36px)!important}
  body.enterprise-shell-v3 .lesson-section-title{background:var(--school-accent)!important;color:#fff!important}
  body.enterprise-shell-v3 .lesson-note-form label{font-size:15px!important}
  body.enterprise-shell-v3 .lesson-note-form input,body.enterprise-shell-v3 .lesson-note-form textarea{width:100%!important}
  body.enterprise-shell-v3 .lesson-note-form textarea{min-height:150px!important}
  body.enterprise-shell-v3 .academic-editor form,body.enterprise-shell-v3 .filters,body.enterprise-shell-v3 .form-grid{min-width:0!important}
}
@media(min-width:801px){
  .gb-mobile-temporal-trigger,.gb-temporal-sheet{display:none!important}
  input.gb-mobile-temporal-native{position:static!important;width:auto!important;height:auto!important;opacity:1!important;pointer-events:auto!important;clip-path:none!important}
}


/* ========================================================================== 
   Release 2026.08.27.030 — Teacher mobile select & form UX refinement
   Compact, app-native bottom sheets; teacher forms remain desktop-safe.
   ========================================================================== */
@media(max-width:800px){
  .gb-select-sheet{
    position:fixed!important;inset:auto 8px calc(8px + env(safe-area-inset-bottom)) 8px!important;
    width:auto!important;max-width:520px!important;height:auto!important;min-height:0!important;
    margin:0 auto!important;border:1px solid color-mix(in srgb,var(--gb-line,#dce4ee) 86%,transparent)!important;
    border-radius:28px!important;background:var(--gb-surface,#fff)!important;
    box-shadow:0 28px 90px rgba(6,23,42,.30)!important;overflow:hidden!important;
    transform-origin:bottom center
  }
  .gb-select-sheet[data-picker-size="compact"]{max-height:min(56dvh,470px)!important}
  .gb-select-sheet[data-picker-size="medium"]{height:min(72dvh,640px)!important;max-height:calc(100dvh - 20px - env(safe-area-inset-top))!important}
  .gb-select-sheet[data-picker-size="large"]{height:min(86dvh,760px)!important;max-height:calc(100dvh - 12px - env(safe-area-inset-top))!important}
  .gb-select-sheet[open]{animation:gbPickerRise .18s cubic-bezier(.2,.8,.2,1)}
  .gb-select-sheet::backdrop{background:rgba(6,23,42,.48)!important;backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px)}
  @keyframes gbPickerRise{from{transform:translateY(20px);opacity:.35}to{transform:none;opacity:1}}
  .gb-select-sheet-grabber{display:grid;place-items:center;height:18px;background:var(--gb-surface,#fff)!important;padding-top:7px}
  .gb-select-sheet-grabber>span{display:block;width:38px;height:4px;border-radius:999px;background:color-mix(in srgb,var(--gb-muted,#64748b) 34%,transparent)}
  .gb-select-sheet-head{
    position:relative!important;display:grid!important;grid-template-columns:minmax(0,1fr) 44px!important;
    gap:12px!important;align-items:center!important;padding:8px 14px 14px!important;
    border-bottom:1px solid var(--gb-line,#dce4ee)!important;background:var(--gb-surface,#fff)!important
  }
  .gb-select-sheet-title{min-width:0;display:grid;gap:3px}
  .gb-select-sheet-head b{font-size:21px!important;line-height:1.18!important;letter-spacing:-.02em!important;color:var(--gb-text,#17243d)!important;overflow-wrap:anywhere}
  .gb-select-sheet-head small{font-size:12px!important;line-height:1.3!important;color:var(--gb-muted,#64748b)!important}
  .gb-sheet-close{
    width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;
    display:grid!important;place-items:center!important;padding:0!important;border:0!important;border-radius:16px!important;
    background:var(--gb-surface-soft,#f4f7fb)!important;color:var(--gb-text,#17243d)!important;
    font-size:25px!important;font-weight:400!important;line-height:1!important;box-shadow:none!important
  }
  .gb-sheet-close:active{transform:scale(.96)}
  .gb-select-search-wrap{
    margin:10px 12px 6px!important;padding:0 13px!important;min-height:50px!important;
    grid-template-columns:22px minmax(0,1fr)!important;border:1px solid var(--gb-line,#dce4ee)!important;
    border-radius:16px!important;background:var(--gb-surface-soft,#f7f9fc)!important
  }
  .gb-select-search-wrap input{min-height:48px!important;font-size:16px!important;color:var(--gb-text,#17243d)!important}
  .gb-select-sheet-options{
    display:block!important;flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;
    padding:6px 10px calc(12px + env(safe-area-inset-bottom))!important;scrollbar-width:thin!important
  }
  .gb-select-sheet-option{
    width:100%!important;min-height:56px!important;margin:2px 0!important;padding:12px 14px 12px 16px!important;
    display:grid!important;grid-template-columns:minmax(0,1fr) 30px!important;align-items:center!important;gap:12px!important;
    border:0!important;border-radius:15px!important;background:transparent!important;color:var(--gb-text,#17243d)!important;
    text-align:left!important;font-size:16px!important;font-weight:730!important;line-height:1.3!important;box-shadow:none!important
  }
  .gb-select-sheet-option-label{min-width:0;overflow-wrap:anywhere}
  .gb-select-sheet-option-check{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;color:transparent;font-size:17px;font-weight:900}
  .gb-select-sheet-option[aria-selected="true"]{
    background:var(--gb-brand-soft,var(--school-accent-soft,#eef4ff))!important;
    color:var(--gb-brand-strong,var(--school-accent-dark,#164e9f))!important
  }
  .gb-select-sheet-option[aria-selected="true"] .gb-select-sheet-option-check{color:var(--school-accent,#2463eb)}
  .gb-select-sheet-option[data-placeholder="true"]{color:var(--gb-muted,#64748b)!important;font-weight:650!important}
  .gb-select-sheet-option:active{background:color-mix(in srgb,var(--gb-brand-soft,#eef4ff) 72%,var(--gb-surface,#fff))!important}
  .gb-select-sheet-option::after{content:none!important}
  .gb-select-sheet-empty{display:grid!important;gap:5px!important;place-items:center!important;padding:30px 18px!important;text-align:center!important;color:var(--gb-muted,#64748b)!important}
  .gb-select-sheet-empty b{color:var(--gb-text,#17243d)!important;font-size:15px}.gb-select-sheet-empty span{font-size:13px}

  .gb-mobile-select-trigger,.gb-mobile-temporal-trigger{
    min-height:54px!important;border-radius:15px!important;border-color:var(--gb-line,#cbd5e1)!important;
    padding:12px 14px!important;background:var(--gb-surface,#fff)!important;font-size:16px!important;font-weight:700!important
  }
  .gb-mobile-select-trigger::after{content:"⌄"!important;width:28px;height:28px;display:grid;place-items:center;border-radius:10px;background:var(--gb-surface-soft,#f4f7fb);font-size:18px!important}

  /* Teacher workspace form rhythm: one predictable mobile form language. */
  html[data-gradebook-page="lesson-notes"] body.enterprise-shell-v3 .lesson-dashboard-head,
  html[data-gradebook-page="lesson-note-edit"] body.enterprise-shell-v3 .lesson-note-banner,
  html[data-gradebook-page="teacher-timetable"] body.enterprise-shell-v3 .teacher-timetable-editor,
  html[data-gradebook-page="results"] body.enterprise-shell-v3 .panel,
  html[data-gradebook-page="assignments"] body.enterprise-shell-v3 .panel{
    border-radius:20px!important
  }
  body.enterprise-shell-v3 .lesson-note-form label,
  body.enterprise-shell-v3 .teacher-timetable-editor label,
  html[data-gradebook-page="lesson-notes"] body.enterprise-shell-v3 .filters label{
    display:grid!important;gap:8px!important;color:var(--gb-text,#17243d)!important;font-size:14px!important;font-weight:800!important;line-height:1.35!important
  }
  body.enterprise-shell-v3 .lesson-note-form input:not([type="checkbox"]):not([type="radio"]),
  body.enterprise-shell-v3 .lesson-note-form textarea,
  body.enterprise-shell-v3 .teacher-timetable-editor input:not([type="checkbox"]):not([type="radio"]),
  body.enterprise-shell-v3 .teacher-timetable-editor textarea,
  html[data-gradebook-page="lesson-notes"] body.enterprise-shell-v3 .filters input{
    width:100%!important;min-height:54px!important;border:1px solid var(--gb-line,#cbd5e1)!important;border-radius:15px!important;
    background:var(--gb-surface,#fff)!important;color:var(--gb-text,#17243d)!important;padding:12px 14px!important;font-size:16px!important;box-shadow:none!important
  }
  body.enterprise-shell-v3 .lesson-note-form textarea,body.enterprise-shell-v3 .teacher-timetable-editor textarea{min-height:128px!important;resize:vertical!important}
  body.enterprise-shell-v3 .lesson-note-form input:focus,body.enterprise-shell-v3 .lesson-note-form textarea:focus,
  body.enterprise-shell-v3 .teacher-timetable-editor input:focus,body.enterprise-shell-v3 .teacher-timetable-editor textarea:focus{
    outline:3px solid color-mix(in srgb,var(--school-accent,#2463eb) 16%,transparent)!important;border-color:var(--school-accent,#2463eb)!important
  }
  html[data-gradebook-page="lesson-notes"] body.enterprise-shell-v3 .filters{
    display:grid!important;grid-template-columns:1fr!important;gap:10px!important;align-items:end!important
  }
  html[data-gradebook-page="lesson-notes"] body.enterprise-shell-v3 .filters>button{width:100%!important;min-height:50px!important;border-radius:15px!important}
  html[data-gradebook-page="lesson-notes"] body.enterprise-shell-v3 .lesson-dashboard-head .actions{
    display:grid!important;grid-template-columns:1fr!important;gap:9px!important;width:100%!important
  }
  html[data-gradebook-page="lesson-notes"] body.enterprise-shell-v3 .lesson-dashboard-head .actions>*{width:100%!important;margin:0!important}
  html[data-gradebook-page="lesson-notes"] body.enterprise-shell-v3 .lesson-dashboard-head .actions .button,
  html[data-gradebook-page="lesson-notes"] body.enterprise-shell-v3 .lesson-dashboard-head .actions button{width:100%!important;min-height:50px!important;border-radius:15px!important}
  body.enterprise-shell-v3 .lesson-note-cards{display:grid!important;gap:12px!important}
  body.enterprise-shell-v3 .lesson-note-cards>article{border-radius:18px!important;padding:15px!important}
  body.enterprise-shell-v3 .teacher-timetable-editor{padding:16px!important}
  body.enterprise-shell-v3 .teacher-timetable-editor .section-heading{margin-bottom:14px!important}
  body.enterprise-shell-v3 .teacher-timetable-editor>form>button{width:100%!important;min-height:54px!important;border-radius:15px!important;margin-top:4px!important}
  body.enterprise-shell-v3 .teacher-day-picker{position:relative!important;overflow-x:auto!important;scrollbar-width:none!important;padding-bottom:2px!important}
  body.enterprise-shell-v3 .teacher-day-picker::-webkit-scrollbar{display:none!important}
  body.enterprise-shell-v3 .teacher-day-picker span{min-height:48px!important;border-radius:14px!important}
  body.enterprise-shell-v3 .teacher-notification-state button{min-height:48px!important;border-radius:14px!important}
  .mobile-lesson-progress{position:sticky!important;top:calc(var(--gb-mobile-header-height,72px) + 8px)!important;z-index:35!important;border-radius:18px!important}
  .mobile-lesson-step-actions{border-radius:20px!important;padding:8px!important;gap:7px!important}
  .mobile-lesson-step-actions button{min-height:48px!important;border-radius:14px!important}
}
@media(max-width:359px){
  .gb-select-sheet{inset-inline:5px!important;bottom:calc(5px + env(safe-area-inset-bottom))!important;border-radius:24px!important}
  .gb-select-sheet-head{padding-inline:12px!important}.gb-select-sheet-option{padding-inline:13px!important;font-size:15px!important}
  .gb-mobile-select-trigger,.gb-mobile-temporal-trigger{font-size:15px!important;padding-inline:12px!important}
}
