/* YENTUMI Gradebook Enterprise — Cross-platform release gate 2026.08.27.017 */

/* Never let a page-level component overlap the canonical application frame. */
body.enterprise-shell-v3 .page-head,
body.enterprise-shell-v3 .panel,
body.enterprise-shell-v3 .card{position:relative}

/* Desktop/web: preserve dense information layouts, but keep forms readable. */
@media(min-width:1008px){
  body.enterprise-shell-v3 .lesson-note-form{max-width:1280px;margin-inline:auto}
  body.enterprise-shell-v3 .lesson-note-form>.panel{padding:22px 24px}
  body.enterprise-shell-v3 .lesson-section-title{
    margin:-22px -24px 20px!important;padding:13px 20px!important;
    border-radius:16px 16px 0 0!important
  }
  body.enterprise-shell-v3 .lesson-note-banner,
  body.enterprise-shell-v3 .lesson-ai-panel{max-width:1280px;margin-inline:auto;margin-bottom:18px}
  body.enterprise-shell-v3 .lesson-fields-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* Medium/tablet: reflow instead of shrinking desktop columns. */
@media(min-width:801px) and (max-width:1007px){
  body.enterprise-shell-v3 .lesson-choice-grid{grid-template-columns:1fr 1fr!important}
  body.enterprise-shell-v3 .lesson-fields-grid{grid-template-columns:1fr 1fr!important}
  body.enterprise-shell-v3 .lesson-development-editor table{min-width:760px}
}

/* Phone: no horizontal page overflow, no giant title banners. */
@media(max-width:800px){
  body.enterprise-shell-v3 .page-head h1{max-width:100%;overflow-wrap:normal!important;word-break:normal!important}
  body.enterprise-shell-v3 .lesson-note-banner{
    gap:12px!important;padding:16px!important;background:var(--gb-surface,#fff)!important;
    color:var(--gb-text,#17243d)!important;border:1px solid var(--gb-line,#dce4ee)!important
  }
  body.enterprise-shell-v3 .lesson-note-banner .eyebrow{color:var(--gb-brand-strong,var(--school-accent-dark))!important}
  body.enterprise-shell-v3 .lesson-note-banner h2{font-size:17px!important;line-height:1.3!important;margin:3px 0!important}
  body.enterprise-shell-v3 .lesson-note-banner p{font-size:13px!important;color:var(--gb-muted,#64748b)!important}
  body.enterprise-shell-v3 .lesson-note-banner .button{width:100%!important}
}

/* Print remains independent of screen/mobile authoring rules. */
@media print{
  .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}
}


/* Release 2026.08.27.018 — route-independent form stability */
@media(max-width:800px){
  body.enterprise-shell-v3 form{max-width:100%}
  body.enterprise-shell-v3 label,body.enterprise-shell-v3 fieldset,body.enterprise-shell-v3 .form-grid>*{min-width:0!important}
  body.enterprise-shell-v3 input:not([type="checkbox"]):not([type="radio"]),body.enterprise-shell-v3 textarea,body.enterprise-shell-v3 select{max-width:100%!important}
  body.enterprise-shell-v3 .table-wrap{max-width:100%}
  body.enterprise-shell-v3 .actions{max-width:100%}
}
