.teacher-homework-dialog { width: min(760px, calc(100vw - 32px)); max-height: 90vh; overflow: auto; border: 1px solid #d1e1ef; border-radius: 16px; padding: 24px; color: #12324c; background: #fff; }
.teacher-homework-dialog::backdrop { background: rgb(12 30 50 / 65%); }
.academic-homework-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.academic-homework-actions button { width: auto; margin: 0; }

/* Give shortcuts their own space; use the panel width, including an open sidebar. */
.academic-toolbar { container-type: inline-size; min-width: 0; }
.academic-management-heading.academic-toolbar-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 12px; }
.academic-toolbar-header > div { min-width: 0; }
.academic-toolbar-header > .muted { grid-column: 1 / -1; font-size: 14px; line-height: 1.5; }
.academic-toolbar-header .eyebrow { font-size: 10px; margin-bottom: 4px; }
.academic-management-heading.academic-toolbar-header > button { min-height: 44px; margin: 0; padding: 10px 16px; border: 1px solid #c6d6e5; background: #fff; color: #174a7c; font-size: 13px; }
.academic-homework-actions.academic-toolbar-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 8px; margin-top: 16px; }
.academic-toolbar-actions > :is(button, a.btn) { display: flex; align-items: center; justify-content: center; width: 100%; min-width: 0; min-height: 52px; margin: 0; padding: 10px 12px; border: 1px solid #c6d6e5; border-radius: 9px; background: #f5f9fd; color: #174a7c; font-family: inherit; font-size: 13px; font-weight: 700; line-height: 1.35; text-align: center; white-space: normal; overflow-wrap: anywhere; box-shadow: none; }
.academic-toolbar-actions > :is(button, a.btn):hover, .academic-toolbar-header > button:hover { background: #e7f0fa; border-color: #8aa9c6; color: #12395f; }
.academic-toolbar-actions > button[data-academic-open-score-register] { background: #1761d5; border-color: #1761d5; color: #fff; }
.academic-toolbar-actions > button[data-academic-open-score-register]:hover { background: #124eaf; border-color: #124eaf; color: #fff; }
.academic-toolbar :is(button, a):focus-visible { outline: 3px solid #1761d5; outline-offset: 3px; }
@container (min-width: 600px) { .academic-homework-actions.academic-toolbar-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container (min-width: 1100px) { .academic-homework-actions.academic-toolbar-actions { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@container (max-width: 340px) { .academic-toolbar-actions > :is(button, a.btn) { padding: 9px 8px; font-size: 12px; } .academic-management-heading.academic-toolbar-header > button { padding: 9px 12px; } .academic-toolbar-header h2 { font-size: 18px; } .academic-toolbar-header > .muted { font-size: 13px; } }
html[data-theme="dark"] .academic-toolbar-actions > :is(button, a.btn), html[data-theme="dark"] .academic-management-heading.academic-toolbar-header > button { background: #14263a; border-color: #425b74; color: #e2effb; }
html[data-theme="dark"] .academic-toolbar-actions > :is(button, a.btn):hover, html[data-theme="dark"] .academic-toolbar-header > button:hover { background: #213b55; }
html[data-theme="dark"] .academic-toolbar-actions > button[data-academic-open-score-register] { background: #1761d5; border-color: #5c9eff; color: #fff; }
html[data-theme="dark"] .academic-toolbar :is(button, a):focus-visible { outline-color: #9bc7ff; }
.teacher-homework-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; position: sticky; top: -24px; z-index: 1; margin: 0; padding: 8px 0; background: #fff; border-bottom: 1px solid #e3edf5; }
.teacher-homework-heading button { width: auto; flex: 0 0 auto; }
.teacher-homework-heading h2 { margin: 4px 0 12px; }
.teacher-homework-dialog [data-homework-compose] { display: grid; gap: 12px; margin: 0; }
.teacher-homework-dialog label { display: grid; gap: 6px; margin: 0; }
.teacher-homework-dialog input:not([type=checkbox]), .teacher-homework-dialog select, .teacher-homework-dialog textarea { width: 100%; box-sizing: border-box; padding: 10px; border: 1px solid #bacddd; border-radius: 8px; color: inherit; background: #fff; font: inherit; }
.teacher-homework-dialog fieldset, .teacher-homework-dialog [data-homework-confirm] { border: 1px solid #cce3df; border-radius: 10px; padding: 16px; margin: 0; }
.teacher-homework-dialog [data-homework-arms] { display: flex; flex-wrap: wrap; gap: 18px; }
.teacher-homework-dialog label.teacher-homework-arm { display: flex; align-items: center; }
.teacher-homework-arm input { width: auto; }
.teacher-homework-message { white-space: pre-wrap; overflow-wrap: anywhere; }
.teacher-homework-dialog button { cursor: pointer; }
.teacher-homework-dialog button:disabled { opacity: .55; cursor: default; }
@media (max-width: 560px) { .teacher-homework-dialog { padding: 16px; } .teacher-homework-heading { align-items: flex-start; top: -16px; } }
