@import url("./presence.css");
@import url("./students.css");
@import url("./homework-batch.css");
@font-face {
  font-family: Pretendard;
  src: url("../public/PretendardVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  font-family: Pretendard, system-ui, sans-serif;
  color: #19263f;
  background: #f5f7fb;
  --accent: #3155e7;
  --line: #dce3ee;
  --muted: #687a94;
  --surface: #fff;
  --soft: #edf1ff;
  --radius: 12px;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  color: inherit;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 0.12s,
    border-color 0.12s;
}
button:hover {
  background: #f0f3fa;
  border-color: #acbbd5;
}
button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}
button.active {
  background: var(--soft);
  border-color: #b7c6ff;
  color: var(--accent);
}
button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
button.primary:hover {
  background: #2346d2;
}
button.quiet {
  border-color: transparent;
  background: transparent;
}
button.danger {
  background: #b72d45;
  color: white;
}
.text-danger {
  color: #b02741;
}
.wide {
  width: 100%;
}
svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
input,
select,
textarea {
  border: 1px solid #cbd5e3;
  border-radius: 8px;
  padding: 10px 12px;
  background: white;
  color: inherit;
  min-width: 0;
}
input {
  min-height: 42px;
}
textarea {
  resize: vertical;
  line-height: 1.65;
  width: 100%;
  margin-top: 9px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #e9aa35;
  outline-offset: 3px;
}
a {
  color: var(--accent);
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 29px;
  letter-spacing: -0.8px;
}
h2 {
  font-size: 19px;
}
h3 {
  font-size: 16px;
}
p {
  line-height: 1.65;
}
small,
.muted,
.hint {
  color: var(--muted);
}
small {
  font-size: 12px;
}
.hint {
  font-size: 13px;
  line-height: 1.65;
}
.empty {
  padding: 28px 10px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}
.skip {
  position: fixed;
  top: -100px;
  left: 12px;
  z-index: 100;
}
.skip:focus {
  top: 10px;
  padding: 15px;
  background: white;
}
.demo-strip {
  padding: 5px 24px;
  background: #17253e;
  color: #e0e7f5;
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.app-header {
  height: 76px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 30px;
  border-bottom: 1px solid var(--line);
  background: white;
}
.brand {
  width: 160px;
  flex-shrink: 0;
}
.brand img {
  width: 100%;
  max-height: 35px;
  object-fit: contain;
  object-position: left;
}
.app-header nav {
  display: flex;
  gap: 4px;
}
.app-header nav button {
  border: 0;
  background: transparent;
  font-size: 14px;
}
.app-header nav button.active {
  color: var(--accent);
  background: var(--soft);
}
.global-search {
  position: relative;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f6f8fc;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  max-width: 355px;
  flex: 1;
}
.global-search input {
  border: 0;
  background: transparent;
  width: 100%;
  padding: 10px 0;
}
.global-search kbd {
  font-family: inherit;
  font-size: 11px;
  white-space: nowrap;
  color: #8795ad;
}
.search-dropdown {
  position: absolute;
  top: 49px;
  left: 0;
  right: 0;
  background: white;
  box-shadow: 0 12px 40px #20325020;
  border: 1px solid var(--line);
  padding: 8px;
  z-index: 30;
  border-radius: 12px;
  max-height: 460px;
  overflow: auto;
}
.search-dropdown button {
  display: flex;
  width: 100%;
  justify-content: space-between;
  min-height: 45px;
  border: 0;
}
.profile {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  white-space: nowrap;
}
.profile small {
  display: block;
  margin-top: 4px;
}
.avatar {
  height: 48px;
  width: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--soft);
  color: var(--accent);
  font-size: 23px;
  border-radius: 50%;
  font-weight: 700;
  flex-shrink: 0;
}
.avatar.small {
  height: 34px;
  width: 34px;
  font-size: 16px;
}
main {
  padding: 25px 26px 18px;
  max-width: 2400px;
  margin: auto;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 22px;
}
.breadcrumb {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.heading-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.count {
  background: #e8edfa;
  border-radius: 5px;
  font-size: 11px;
  padding: 2px 5px;
}
.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 15px;
}
.week-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.week-nav strong {
  font-size: 18px;
  padding: 0 5px;
  letter-spacing: -0.4px;
}
.week-nav > button:has(svg):not(:has(span)) {
  gap: 6px;
}
.week-nav > button[data-action="copy-next"] {
  margin-left: 12px;
  font-size: 12px;
}
.view-switch {
  display: flex;
  padding: 4px;
  gap: 3px;
  background: #e9edf5;
  border-radius: 10px;
}
.view-switch button {
  border: 0;
  background: transparent;
  font-size: 13px;
  min-height: 34px;
  padding: 7px 13px;
}
.view-switch button.active {
  color: var(--accent);
  background: white;
  box-shadow: 0 1px 4px #10204012;
}
.filterbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.campus-tabs {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 3px 1px;
  align-items: center;
}
.campus-tabs button {
  font-size: 13px;
  border-radius: 7px;
  flex-shrink: 0;
  min-height: 34px;
}
.small-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
.small-actions label {
  flex-direction: row;
  align-items: center;
  font-size: 12px;
  white-space: nowrap;
  color: var(--muted);
}
.small-actions select {
  padding: 7px 28px 7px 10px;
  font-size: 12px;
}
.small-actions button {
  font-size: 12px;
}
.board-caption {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--muted);
}
.board-caption b {
  color: var(--accent);
  font-weight: 500;
}
.board-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.board-layout.has-panel {
  grid-template-columns: minmax(0, 1fr) 320px;
}
.board-main {
  min-width: 0;
}
.board-scroll {
  height: calc(100dvh - 370px);
  min-height: 330px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  scrollbar-width: thin;
  scrollbar-color: #c4cede transparent;
  overscroll-behavior: contain;
}
table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  table-layout: fixed;
}
th {
  font-weight: 650;
  font-size: 13px;
  background: #f8faff;
  color: #344663;
  text-align: center;
}
td,
th {
  border-right: 1px solid #e3e8f1;
  border-bottom: 1px solid #e3e8f1;
}
td:last-child,
th:last-child {
  border-right: 0;
}
.master-table {
  min-width: 1270px;
}
.master-table thead th,
.week-table thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  height: 41px;
  background: #f5f8fd;
}
.master-table .time-col {
  width: 63px;
  position: sticky;
  left: 0;
  z-index: 3;
  background: #f6f8fc;
  font-size: 12px;
  vertical-align: top;
  padding-top: 12px;
}
.master-table .teacher-col {
  width: 83px;
  position: sticky;
  left: 63px;
  z-index: 3;
  background: #fff;
  white-space: nowrap;
  font-size: 12px;
}
.master-table thead .time-col,
.master-table thead .teacher-col {
  z-index: 7;
  background: #f5f8fd;
  padding-top: 0;
  vertical-align: middle;
}
.teacher-mark {
  display: inline-block;
  width: 5px;
  height: 18px;
  background: var(--teacher);
  border-radius: 3px;
  vertical-align: middle;
  margin-right: 7px;
}
.master-table td {
  padding: 4px;
  height: 95px;
  background: white;
  vertical-align: top;
}
.master-table td:nth-last-child(-n + 2) {
  background: #fbfcfe;
}
.master-table .time-start td,
.master-table .time-start th {
  border-top: 2px solid #d3dce9;
}
.cell-content {
  height: 85px;
  overflow: auto;
  scrollbar-width: thin;
}
.class-card {
  height: 85px;
  border: 1px solid #e0e5ef;
  border-left: 3px solid var(--teacher);
  border-radius: 7px;
  background: #fafbfe;
  padding: 7px 8px;
  overflow: hidden;
  position: relative;
  transition: box-shadow 0.12s;
}
.class-card.selected {
  background: #f0f3ff;
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.class-card.drop-hover {
  box-shadow: inset 0 0 0 2px var(--accent);
  background: #e8efff;
}
.class-open {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  width: 100%;
  padding: 0;
  min-height: 19px;
  background: transparent;
  border: 0;
  border-radius: 3px;
  text-align: left;
  font-size: 13px;
}
.class-open:hover {
  background: transparent;
  color: var(--accent);
}
.class-open strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}
.class-open > span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}
.class-open small {
  font-size: 10px;
}
.class-meta {
  font-size: 10px;
  color: #697c99;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.5;
  margin: 2px 0 4px;
}
.student-chips {
  display: flex;
  gap: 4px;
  height: 24px;
  align-items: center;
  overflow: hidden;
  white-space: nowrap;
}
.student-chips button {
  min-height: 23px;
  max-width: 90px;
  padding: 3px 5px;
  border: 1px solid #e7ebf4;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  background: white;
  flex-shrink: 1;
}
.student-chips button.chosen {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.student-chips button.more {
  background: #edf0f8;
  color: #637496;
  flex-shrink: 0;
}
.student-chips .muted {
  font-size: 11px;
}
.empty-slot {
  height: 100%;
  width: 100%;
  background: transparent;
  color: #b3bfd2;
  border: 1px dashed transparent;
  font-weight: 400;
  font-size: 18px;
}
.empty-slot:hover {
  border-color: #b7c6eb;
  background: #f5f8ff;
}
.empty-slot:disabled {
  background: transparent;
  border: 0;
  color: transparent;
}
.week-table {
  min-width: 1120px;
}
.week-table th:first-child {
  width: 65px;
}
.week-table td {
  padding: 5px;
  vertical-align: top;
}
.weekly-cell {
  height: 185px;
  overflow: auto;
  scrollbar-width: thin;
}
.weekly-cell .class-card + .class-card {
  margin-top: 5px;
}
.weekly-cell > .muted {
  display: grid;
  place-items: center;
  height: 100%;
}
.planbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  align-items: center;
}
.plan-tabs {
  display: flex;
  gap: 4px;
  overflow: auto;
  min-width: 0;
}
.plan-tabs button {
  border-radius: 7px 7px 0 0;
  font-size: 13px;
  min-height: 38px;
  border-bottom: 3px solid transparent;
  flex-shrink: 0;
}
.plan-tabs button.active {
  background: white;
  border-color: var(--line);
  border-bottom: 3px solid var(--accent);
}
.planbar > .quiet {
  font-size: 12px;
}
.side-panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  max-height: calc(100dvh - 370px);
  min-height: 330px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  gap: 10px;
  flex-shrink: 0;
}
.panel-head h2 {
  font-size: 16px;
}
.panel-head .quiet {
  padding: 4px;
  min-height: 28px;
}
.panel-body {
  padding: 18px;
  overflow: auto;
  scrollbar-width: thin;
  overscroll-behavior: contain;
}
.panel-body > h3 {
  margin: 24px 0 12px;
}
.panel-body > h3:first-child {
  margin-top: 0;
}
.panel-body > p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
}
.student-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 22px;
}
.student-heading h3 {
  font-size: 22px;
}
.student-heading p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 5px;
}
.assignment-row {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.assignment-row p {
  font-size: 12px;
  color: var(--muted);
  margin: 4px 0 9px;
}
.assignment-row button {
  font-size: 12px;
  min-height: 29px;
  padding: 5px 9px;
  margin-right: 4px;
}
.availability > div {
  display: flex;
  gap: 10px;
  border-bottom: 1px solid #edf0f5;
  padding: 7px 0;
  font-size: 12px;
  line-height: 1.7;
}
.availability b {
  background: #edf6f2;
  color: #167555;
  border-radius: 5px;
  width: 25px;
  text-align: center;
  height: 23px;
  flex-shrink: 0;
}
.panel-body .availability + p {
  margin-top: 12px;
}
.roster-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  border-bottom: 1px solid #edf0f5;
  min-height: 58px;
}
.roster-row > button:not(.student-name) {
  min-height: 30px;
  font-size: 12px;
  padding: 5px 8px;
}
.student-name {
  border: 0;
  align-items: flex-start;
  flex-direction: column;
  padding: 10px 3px;
  font-size: 14px;
  background: transparent;
}
.student-name small {
  font-weight: 400;
}
.roster-row > span {
  font-size: 12px;
  color: var(--muted);
}
#roster-search {
  width: 100%;
  margin-bottom: 9px;
  font-size: 13px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 22px 0 13px;
}
.history-item {
  border-left: 2px solid #dce4fb;
  margin: 20px 0 0;
  padding: 0 0 6px 12px;
}
.history-item strong {
  font-size: 14px;
}
.history-item p {
  font-size: 12px;
  margin: 7px 0;
  color: #4e627f;
  overflow-wrap: anywhere;
}
.history-item small {
  font-size: 11px;
}
.target-row {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  text-align: left;
  width: 100%;
  white-space: normal;
  gap: 5px;
  padding: 12px;
  margin-bottom: 8px;
}
.target-row strong {
  font-size: 13px;
}
.target-row em {
  font-style: normal;
  color: #a04440;
  font-size: 11px;
}
.target-row:disabled {
  opacity: 0.6;
  background: #f7f8fb;
}
.move-confirm {
  position: fixed;
  z-index: 40;
  bottom: 30px;
  right: 28px;
  width: min(490px, calc(100vw - 32px));
  background: white;
  border: 1px solid #a9bafa;
  border-top: 3px solid var(--accent);
  border-radius: 13px;
  box-shadow: 0 8px 32px #18336126;
  padding: 16px 18px;
  animation: enter 0.16s ease-out;
}
.move-confirm > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.move-confirm strong {
  font-size: 16px;
}
.move-confirm .quiet {
  min-height: 25px;
  padding: 3px;
}
.move-confirm p {
  font-size: 12px;
  margin-top: 7px;
  line-height: 1.5;
}
.move-confirm .from {
  color: var(--muted);
}
.move-confirm .to {
  color: #166e52;
  font-weight: 650;
}
.move-confirm footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 7px;
  margin-top: 13px;
}
.move-confirm footer small {
  margin-right: auto;
  font-size: 11px;
  max-width: 190px;
}
.move-confirm footer button {
  font-size: 13px;
  min-height: 34px;
}
.week-empty {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
  min-height: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 30px;
  text-align: center;
}
.week-empty > span {
  color: var(--accent);
  background: var(--soft);
  padding: 12px;
  border-radius: 12px;
}
.week-empty svg {
  height: 25px;
  width: 25px;
}
.week-empty p {
  font-size: 14px;
  color: var(--muted);
}
.week-empty button {
  min-width: 210px;
}
.campus-board {
  display: flex;
  gap: 14px;
  padding: 14px;
  width: max-content;
  min-width: 100%;
}
.campus-lane {
  width: 310px;
  flex: 1;
  min-width: 280px;
}
.campus-lane h3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
}
.campus-time {
  min-height: 130px;
  border-top: 1px solid var(--line);
  padding: 10px 0;
}
.campus-time > time {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}
.campus-time .class-card + .class-card {
  margin-top: 5px;
}
.campus-time > .muted {
  font-size: 12px;
}
.day-switch {
  display: flex;
  gap: 5px;
  padding: 10px 14px;
  background: white;
  position: sticky;
  top: 0;
  z-index: 6;
  border-bottom: 1px solid var(--line);
}
.day-switch button {
  flex: 1;
}
.inline-editor {
  position: fixed;
  right: 28px;
  bottom: 27px;
  z-index: 45;
  width: min(420px, calc(100vw - 30px));
  background: white;
  border: 1px solid #aebef0;
  border-radius: 13px;
  box-shadow: 0 8px 32px #18336126;
}
.inline-editor form {
  padding: 20px;
  display: grid;
  gap: 18px;
}
.inline-editor .row {
  display: flex;
  gap: 8px;
}
.inline-editor .checkbox {
  flex-direction: row;
  align-items: center;
  font-size: 13px;
  font-weight: 400;
}
.checkbox input {
  min-height: 20px;
}
.inline-editor [role="alert"] {
  color: #b02741;
  padding: 0 20px 14px;
  font-size: 12px;
}
.form-columns {
  display: grid;
  grid-template-columns: 1fr 1fr 80px;
  gap: 12px;
}
.settings-page,
.lessons-page {
  max-width: 1200px;
  margin: auto;
}
.settings-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 22px;
}
.settings-section {
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 25px;
}
.settings-section > h2:not(:first-child) {
  margin-top: 35px;
}
.settings-section > p {
  font-size: 14px;
  color: var(--muted);
  margin: 12px 0 22px;
}
.campus-form {
  display: flex;
  gap: 12px;
  align-items: end;
  margin: 16px 0;
}
.campus-form label {
  flex: 1;
}
.campus-form span {
  font-size: 11px;
  color: var(--muted);
}
.settings-section form button {
  min-height: 42px;
}
.settings-section #campus-add {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  margin-top: 24px;
  display: grid;
  gap: 12px;
}
.lesson-list {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 22px;
  margin-top: 20px;
}
.lesson-list-row {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  display: flex;
  gap: 22px;
  padding: 20px 0;
  text-align: left;
  white-space: normal;
}
.lesson-list-row:last-child {
  border-bottom: 0;
}
.lesson-list-row > div {
  flex: 1;
}
.lesson-list-row p {
  font-size: 13px;
  color: var(--muted);
  margin: 5px 0;
}
.date-stamp {
  background: #f1f4fb;
  padding: 12px;
  min-width: 74px;
  text-align: center;
  font-size: 13px;
  color: #536783;
  border-radius: 9px;
  align-self: center;
}
.date-stamp strong {
  display: block;
  margin-top: 4px;
  font-size: 15px;
}
.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  padding: 6px 8px;
  border-radius: 5px;
  background: var(--soft);
  color: #4560b7;
  white-space: nowrap;
}
.tag.good {
  background: #e9f5ee;
  color: #18734e;
}
.lesson-editor {
  max-width: 1180px;
  margin: auto;
}
.editor-nav {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 23px;
}
.editor-nav > div {
  display: flex;
  gap: 8px;
}
.lesson-heading {
  padding: 18px 0 27px;
}
.lesson-heading h1 {
  margin: 14px 0 10px;
  font-size: 32px;
}
.lesson-heading p {
  font-size: 14px;
  color: var(--muted);
}
.editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 25px;
  align-items: start;
}
.lesson-form {
  background: white;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 26px 30px;
}
.lesson-form .section-heading {
  margin-top: 0;
}
.lesson-form label {
  margin: 25px 0;
  font-size: 15px;
}
.lesson-form textarea {
  font-size: 15px;
  font-weight: 400;
}
.lesson-form textarea[readonly] {
  background: #f7f9fc;
  color: #485a75;
}
.required {
  color: var(--accent);
  display: contents;
}
.editor-save {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.editor-save > span,
#draft-status {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
.lesson-context section {
  border: 1px solid var(--line);
  background: white;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 18px;
}
.lesson-context h2 {
  font-size: 16px;
  margin-bottom: 14px;
}
.lesson-context .hint {
  font-size: 12px;
}
.lesson-students {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.lesson-students span {
  background: #f3f6fb;
  border-radius: 5px;
  padding: 6px 8px;
  font-size: 12px;
}
.reference-note {
  margin-top: 13px;
  padding: 12px;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  text-align: left;
  white-space: normal;
  width: 100%;
  gap: 6px;
  font-size: 12px;
}
.reference-note span {
  color: var(--muted);
}
.permission-note {
  background: #f3f6fd;
  padding: 12px;
  font-size: 13px;
  border-radius: 7px;
  color: #4c6183;
}
.pull-status:empty {
  display: none;
}
#form-error {
  color: #b02741;
}
.mobile-agenda {
  display: none;
}
#toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translate(-50%, 15px);
  z-index: 100;
  background: #1d2a43;
  color: white;
  padding: 13px 20px;
  border-radius: 10px;
  box-shadow: 0 5px 25px #14203620;
  font-size: 13px;
  max-width: min(620px, calc(100vw - 30px));
  line-height: 1.6;
  opacity: 0;
  pointer-events: none;
  transition: 0.18s;
}
#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
[hidden] {
  display: none !important;
}
.print-controls {
  max-width: 1400px;
  margin: 0 auto 25px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}
.print-controls h1 {
  font-size: 23px;
}
.print-controls p {
  width: 100%;
  font-size: 13px;
  color: var(--muted);
}
.print-sheet {
  background: white;
  width: 400mm;
  min-height: 277mm;
  padding: 9mm;
  margin: 0 auto 25px;
  box-shadow: 0 4px 25px #152a4415;
  overflow: hidden;
}
.print-page {
  overflow-x: auto;
}
.print-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 7mm;
  gap: 12px;
}
.print-heading > strong {
  font-size: 20px;
  letter-spacing: -0.5px;
}
.print-heading h1 {
  font-size: 20px;
}
.print-heading p {
  width: 100%;
  font-size: 14px;
  color: #53647e;
}
.print-sheet table {
  border-top: 1px solid #b5bfd0;
  border-left: 1px solid #b5bfd0;
}
.print-sheet td,
.print-sheet th {
  border-color: #c3ccda;
}
.print-sheet th {
  background: #f5f7fb;
  height: 10mm;
  font-size: 12px;
}
.print-sheet th:first-child {
  width: 24mm;
}
.roster-sheet td {
  height: 39mm;
  vertical-align: top;
  padding: 3mm 2mm;
  font-size: 12px;
}
.roster-sheet td h3 {
  font-size: 13px;
  margin-bottom: 1.5mm;
}
.roster-sheet td p {
  font-size: 11px;
  color: #4a5b76;
}
.print-names {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5mm 2mm;
  margin-top: 3mm;
  font-size: 12px;
  line-height: 1.65;
}
.print-names span {
  white-space: nowrap;
}
.print-sheet footer {
  font-size: 11px;
  margin-top: 5mm;
  color: #66748b;
}
.overview-sheet td {
  font-size: 9px;
  padding: 1mm 1.5mm;
  height: 8.5mm;
  vertical-align: middle;
}
.overview-sheet th {
  height: 7mm;
  font-size: 10px;
}
.overview-sheet th:first-child {
  width: 17mm;
}
.overview-sheet th:nth-child(2) {
  width: 20mm;
}
.overview-sheet small {
  display: block;
  font-size: 8px;
  color: #495b76;
}
.overview-sheet .print-heading {
  margin-bottom: 4mm;
}
.overview-sheet td b {
  font-size: 9px;
}
.overview-sheet {
  padding: 7mm;
}
.overview-sheet .print-heading p {
  font-size: 11px;
}
@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (min-width: 1800px) {
  .master-table {
    min-width: 1400px;
  }
  .master-table td {
    height: 101px;
  }
  .cell-content,
  .class-card {
    height: 91px;
  }
  .class-open {
    font-size: 14px;
  }
  .class-meta {
    font-size: 11px;
    margin: 4px 0 6px;
  }
  .student-chips button {
    font-size: 12px;
  }
  .board-layout.has-panel {
    grid-template-columns: minmax(0, 1fr) 355px;
  }
}
@media (max-width: 1200px) {
  .app-header {
    gap: 15px;
    padding: 0 18px;
  }
  .brand {
    width: 130px;
  }
  .profile > span:last-child {
    display: none;
  }
  .global-search {
    max-width: 290px;
  }
  .global-search kbd {
    display: none;
  }
  main {
    padding: 22px 18px;
  }
  .heading-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .heading-actions button {
    font-size: 12px;
  }
  .board-layout.has-panel {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
  .board-scroll,
  .side-panel {
    height: calc(100dvh - 410px);
    max-height: unset;
    min-height: 320px;
  }
  .toolbar {
    gap: 12px;
  }
  .editor-layout {
    grid-template-columns: minmax(0, 1fr) 260px;
  }
  .lesson-form {
    padding: 24px;
  }
  .small-actions label {
    display: none;
  }
}
@media (max-width: 800px) {
  .app-header {
    gap: 12px;
    height: 68px;
  }
  .app-header nav button {
    padding: 8px;
  }
  .app-header nav span {
    display: none;
  }
  .brand {
    width: 125px;
  }
  .global-search {
    max-width: none;
  }
  .profile {
    display: none;
  }
  .page-heading {
    align-items: flex-start;
  }
  .heading-actions {
    gap: 5px;
  }
  .heading-actions button {
    padding: 8px;
    font-size: 11px;
  }
  .heading-actions [data-action="undo"] {
    display: none;
  }
  .heading-actions .count {
    display: none;
  }
  h1 {
    font-size: 25px;
  }
  .board-caption {
    font-size: 11px;
  }
  .board-caption > span:last-child {
    display: none;
  }
  .board-layout.has-panel {
    grid-template-columns: minmax(0, 1fr);
  }
  .side-panel {
    position: fixed;
    right: 15px;
    top: 140px;
    bottom: 75px;
    width: 320px;
    height: auto;
    max-height: calc(100dvh - 210px);
    z-index: 20;
    box-shadow: 0 5px 35px #20355522;
  }
  .editor-layout {
    grid-template-columns: 1fr;
  }
  .lesson-context {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .settings-layout {
    grid-template-columns: 1fr;
  }
  .week-nav strong {
    font-size: 16px;
  }
  .week-nav > button[data-action="copy-next"] {
    font-size: 11px;
    padding: 9px;
    margin-left: 0;
  }
  .planbar > .quiet {
    font-size: 11px;
  }
  .demo-strip {
    font-size: 10px;
    padding: 5px 18px;
  }
}
@media (max-width: 600px) {
  .demo-strip {
    padding: 5px 12px;
    font-size: 9px;
  }
  .demo-strip span:last-child {
    max-width: 60%;
    text-align: right;
  }
  .app-header {
    padding: 0 13px;
    height: auto;
    min-height: 105px;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: space-between;
    padding-top: 12px;
    padding-bottom: 10px;
  }
  .brand {
    width: 139px;
  }
  .app-header nav {
    margin-left: auto;
  }
  .app-header nav button {
    min-height: 37px;
    min-width: 39px;
  }
  .global-search {
    flex-basis: 100%;
    max-width: none;
    margin: 0;
    order: 4;
  }
  .global-search input {
    font-size: 14px;
    min-height: 38px;
  }
  .global-search svg {
    width: 16px;
  }
  main {
    padding: 20px 13px 90px;
  }
  .page-heading {
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 18px;
  }
  .breadcrumb {
    font-size: 11px;
  }
  .heading-actions {
    width: 100%;
    justify-content: space-between;
  }
  .heading-actions button {
    min-height: 42px;
    padding: 9px 11px;
    font-size: 12px;
  }
  .heading-actions button svg {
    width: 16px;
  }
  .week-nav {
    width: 100%;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: space-between;
  }
  .week-nav strong {
    font-size: 16px;
  }
  .week-nav > button {
    min-height: 40px;
  }
  .week-nav > button[data-action="copy-next"] {
    width: 100%;
    margin-top: 3px;
    font-size: 13px;
  }
  .view-switch {
    width: 100%;
    gap: 0;
    padding: 3px;
  }
  .view-switch button {
    flex: 1;
    min-height: 42px;
    font-size: 12px;
    padding: 8px 7px;
  }
  .filterbar {
    flex-wrap: wrap;
    margin-bottom: 11px;
  }
  .campus-tabs {
    max-width: 100%;
  }
  .campus-tabs button {
    min-height: 40px;
  }
  .small-actions {
    display: none;
  }
  .board-caption {
    font-size: 11px;
  }
  .board-scroll {
    height: 55dvh;
    min-height: 330px;
  }
  .board-scroll:not(.is-campus) {
    display: none;
  }
  body:has([data-action="view"][data-id="master"].active) .board-scroll {
    display: block;
  }
  body:has([data-action="view"][data-id="master"].active) .mobile-agenda {
    display: none;
  }
  .mobile-agenda {
    display: block;
  }
  .mobile-agenda section {
    margin: 20px 0;
  }
  .mobile-agenda h3 {
    margin-bottom: 10px;
    color: #566b87;
    font-size: 13px;
  }
  .mobile-agenda .class-card {
    height: 106px;
    padding: 11px;
    margin-bottom: 9px;
  }
  .mobile-agenda .class-open {
    font-size: 16px;
    min-height: 24px;
  }
  .mobile-agenda .class-meta {
    font-size: 12px;
    margin: 5px 0 7px;
  }
  .mobile-agenda .student-chips button {
    min-height: 25px;
    font-size: 12px;
  }
  .day-switch {
    padding: 8px 0;
    gap: 3px;
  }
  .day-switch button {
    font-size: 13px;
    min-height: 42px;
    padding: 7px;
  }
  .board-layout.has-panel {
    display: block;
  }
  .side-panel {
    top: 164px;
    bottom: 80px;
    right: 10px;
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 244px);
    min-height: 240px;
    border: 1px solid #9fb3f5;
  }
  .panel-body {
    padding: 18px;
  }
  .panel-head button {
    min-height: 40px;
    min-width: 40px;
  }
  .roster-row {
    min-height: 64px;
  }
  .roster-row > button:not(.student-name),
  .assignment-row button {
    min-height: 40px;
    font-size: 13px;
  }
  .target-row {
    min-height: 70px;
  }
  .planbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 12;
    background: white;
    border-top: 1px solid var(--line);
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    margin: 0;
    gap: 5px;
  }
  .planbar button {
    min-height: 42px;
  }
  .planbar > .quiet {
    font-size: 10px;
    max-width: 85px;
    white-space: normal;
    padding: 4px;
  }
  .plan-tabs {
    flex: 1;
  }
  .plan-tabs button {
    font-size: 12px;
  }
  .move-confirm {
    right: 10px;
    bottom: 80px;
    width: calc(100vw - 20px);
    padding: 14px;
  }
  .move-confirm footer {
    flex-wrap: wrap;
  }
  .move-confirm footer small {
    max-width: none;
    flex: 1;
    font-size: 10px;
  }
  .move-confirm footer button {
    min-height: 42px;
  }
  .inline-editor {
    bottom: 82px;
    right: 10px;
    width: calc(100vw - 20px);
  }
  .week-empty {
    padding: 25px 17px;
    min-height: 340px;
  }
  .week-empty h2 {
    font-size: 19px;
  }
  .week-empty p {
    font-size: 13px;
  }
  .campus-lane {
    width: 275px;
    min-width: 275px;
  }
  .campus-board {
    padding: 10px;
  }
  .lesson-heading {
    padding: 12px 0 22px;
  }
  .lesson-heading h1 {
    font-size: 28px;
  }
  .lesson-heading p {
    font-size: 13px;
  }
  .editor-nav {
    gap: 6px;
  }
  .editor-nav > div {
    gap: 5px;
  }
  .editor-nav button {
    font-size: 12px;
    min-height: 44px;
    padding: 8px 9px;
  }
  .editor-nav svg {
    width: 14px;
  }
  .lesson-form {
    padding: 20px 16px;
  }
  .lesson-form textarea {
    font-size: 16px;
  }
  .lesson-form label {
    font-size: 15px;
  }
  .editor-save {
    align-items: stretch;
    flex-direction: column;
  }
  .editor-save button {
    min-height: 48px;
  }
  .lesson-context {
    display: block;
  }
  .lesson-list {
    padding: 0 12px;
  }
  .lesson-list-row {
    gap: 11px;
    padding: 18px 0;
  }
  .lesson-list-row h3 {
    font-size: 15px;
  }
  .lesson-list-row p {
    font-size: 12px;
  }
  .lesson-list-row > svg {
    display: none;
  }
  .date-stamp {
    min-width: 61px;
    padding: 10px 8px;
  }
  .lesson-list-row .tag {
    font-size: 10px;
    padding: 5px;
  }
  .settings-section {
    padding: 20px 16px;
  }
  .settings-section input {
    width: 100%;
  }
  .campus-form {
    gap: 8px;
  }
  .campus-form button {
    font-size: 13px;
    padding: 9px;
  }
  .print-controls {
    gap: 12px;
  }
  .print-controls h1 {
    font-size: 20px;
  }
  .print-controls .view-switch {
    order: 4;
  }
  .print-controls p {
    order: 5;
  }
  .form-columns {
    grid-template-columns: 1fr 1fr;
  }
  .form-columns label:last-child {
    grid-column: 1/-1;
  }
  #toast {
    bottom: 85px;
  }
}
@page {
  size: A3 landscape;
  margin: 10mm;
}
@media print {
  body {
    background: white !important;
  }
  .demo-strip,
  .app-header,
  .print-controls,
  #toast,
  .skip {
    display: none !important;
  }
  main {
    padding: 0 !important;
    margin: 0 !important;
    max-width: none;
  }
  .print-page {
    overflow: visible;
  }
  .print-sheet {
    width: 400mm;
    height: 277mm;
    min-height: 0;
    margin: 0;
    padding: 7mm;
    box-shadow: none;
    break-after: page;
    overflow: hidden;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .print-sheet:last-child {
    break-after: auto;
  }
  .print-sheet tr {
    break-inside: avoid;
  }
  .print-sheet header {
    break-inside: avoid;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Modeless assignment workbench: no backdrop, full interaction with the board. */
.class-tools {
  display: flex;
  gap: 7px;
  margin: 12px 0;
}
.class-tools button {
  font-size: 12px;
  flex: 1;
  padding: 9px;
}
.roster-drop {
  border: 1px dashed #94a8e4;
  background: #f4f7ff;
  border-radius: 9px;
  min-height: 92px;
  padding: 14px 10px;
  margin: 17px 0 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 7px;
  text-align: center;
  color: #4d66a4;
}
.roster-drop strong {
  font-size: 12px;
}
.roster-drop small {
  font-size: 10px;
}
.roster-drop.drop-hover {
  background: #e3edff;
  border: 2px solid var(--accent);
  color: var(--accent);
}
.work-window {
  position: fixed;
  z-index: 28;
  width: 380px;
  max-width: calc(100vw - 20px);
  height: min(610px, 65dvh);
  min-height: 180px;
  border: 1px solid #a7b8ed;
  border-radius: 13px;
  background: rgba(255, 255, 255, var(--window-alpha, 1));
  box-shadow: 0 8px 30px #203b652a;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
}
.work-window > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 57px;
  padding: 10px 12px;
  border-bottom: 1px solid #d0dbf4;
  background: rgba(240, 244, 255, var(--window-alpha, 1));
}
.work-window > header > div:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.work-window header strong {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}
.work-window header small {
  font-size: 10px;
  white-space: nowrap;
}
.drag-grip {
  font-size: 20px;
  color: #8898bb;
}
.window-actions {
  display: flex;
  gap: 2px;
}
.window-actions button {
  min-height: 30px;
  width: 28px;
  padding: 3px;
  font-size: 20px;
}
.window-actions svg {
  width: 16px;
}
.window-toolbar {
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  gap: 9px;
  font-size: 10px;
  color: #677a99;
  border-bottom: 1px solid #dce3ef;
}
.window-toolbar label {
  flex-direction: row;
  align-items: center;
  font-size: 10px;
  font-weight: 400;
  gap: 6px;
}
.window-toolbar input {
  width: 70px;
  min-height: 0;
  padding: 0;
  accent-color: var(--accent);
}
.window-toolbar output {
  width: 28px;
}
.work-window .panel-body {
  padding: 17px;
  flex: 1;
}
.work-window .panel-body > h3 {
  margin: 0 0 7px;
}
.work-window .panel-body > p {
  font-size: 12px;
  color: #516581;
  margin-bottom: 10px;
}
.work-window .class-tools {
  margin: 10px 0;
}
.work-window.minimized {
  height: 57px;
  min-height: 57px;
}
.work-window [data-search] button.student-name {
  background: transparent;
}
[data-window-handle] {
  cursor: grab;
  touch-action: none;
  user-select: none;
}
[data-window-handle].is-dragging {
  cursor: grabbing;
}
.transfer-modes {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 10px 0 3px;
}
.transfer-modes button {
  min-height: 29px;
  font-size: 11px;
  padding: 5px 9px;
}
.transfer-modes small {
  font-size: 10px;
  margin-left: 4px;
}
.move-confirm .transfer-error {
  background: #fff0ed;
  color: #a43835;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 11px;
  line-height: 1.5;
}
.move-confirm {
  z-index: 42;
}
.move-confirm > div[data-window-handle] {
  padding: 2px 0 5px;
}
.move-confirm > div strong {
  font-size: 15px;
}
.work-window .roster-row {
  background: transparent;
}
.work-window .roster-row button {
  background: rgba(255, 255, 255, 0.7);
}
@media (max-width: 600px) {
  .work-window {
    max-height: 62dvh;
    width: 360px;
  }
  .work-window .window-actions button {
    min-width: 35px;
    min-height: 35px;
  }
  .work-window .class-tools button {
    min-height: 42px;
  }
  .work-window .roster-drop strong {
    font-size: 12px;
  }
  .window-toolbar input {
    min-height: 28px;
  }
  .window-toolbar {
    padding: 6px 14px;
  }
  .work-window header small {
    display: none;
  }
  .move-confirm .transfer-modes button {
    min-height: 37px;
  }
  .roster-drop {
    min-height: 85px;
  }
  .work-window .panel-body {
    padding: 14px;
  }
}
@media print {
  .work-window,
  .move-confirm,
  .inline-editor {
    display: none !important;
  }
}

.enriched-row {
  min-height: 78px;
  align-items: center;
  padding: 9px 0;
}
.student-summary {
  min-width: 0;
  flex: 1;
}
.enriched-row .student-name {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 2px 0;
  min-height: 26px;
  text-align: left;
  white-space: normal;
  width: 100%;
  justify-content: flex-start;
}
.student-name .school-grade {
  font-size: 11px;
  font-weight: 400;
  color: #526887;
}
.student-name strong {
  font-size: 14px;
}
.student-schedule {
  font-size: 11px;
  line-height: 1.7;
  color: #5e728f;
  margin-top: 4px;
  word-break: keep-all;
}
.student-schedule > span {
  font-size: 10px;
  color: #8593a9;
  margin-right: 4px;
}
.student-flags {
  display: flex;
  gap: 5px;
  align-items: center;
  margin-top: 5px;
  flex-wrap: wrap;
}
.mini-tag {
  font-size: 9px;
  color: #5472b4;
  background: #edf2ff;
  padding: 2px 5px;
  border-radius: 4px;
  white-space: nowrap;
}
.mini-tag.warn {
  background: #fff3df;
  color: #946623;
}
.student-flags small {
  font-size: 10px;
  line-height: 1.5;
}
.enriched-row > button {
  flex-shrink: 0;
}
.work-window .enriched-row button.student-name {
  background: transparent;
}
.work-window .student-summary {
  min-width: 0;
}
@media (max-width: 600px) {
  .enriched-row {
    min-height: 84px;
  }
  .student-schedule {
    font-size: 12px;
  }
  .student-name .school-grade {
    font-size: 12px;
  }
  .enriched-row .student-name {
    min-height: 35px;
  }
  .enriched-row > button {
    min-height: 42px;
  }
  .enriched-row .student-flags small {
    font-size: 11px;
  }
}

.target-card {
  background: #f7f9fe;
  border: 1px solid #dce5f5;
  border-radius: 10px;
  padding: 13px;
  margin: 18px 0;
}
.target-summary {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 12px;
  line-height: 1.7;
}
.target-badge {
  font-size: 10px;
  padding: 4px 6px;
  border-radius: 5px;
  white-space: nowrap;
  font-weight: 600;
}
.target-badge.short {
  background: #fff0d9;
  color: #916115;
}
.target-badge.complete {
  background: #e7f5ed;
  color: #1b7650;
}
.target-badge.over {
  background: #eef0fa;
  color: #5b5ea1;
}
.target-card details {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.target-card summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  display: list-item;
}
.target-card summary small {
  font-size: 10px;
  font-weight: 400;
  margin-left: 5px;
}
#target-form {
  display: grid;
  gap: 12px;
  padding-top: 16px;
}
#target-form label {
  font-size: 12px;
}
#target-form .row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
#target-form button {
  font-size: 12px;
}
#target-form .hint {
  font-size: 11px;
}
.target-roster-row {
  padding: 10px 0;
  align-items: center;
}
.target-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.target-actions button {
  min-height: 28px;
  font-size: 10px;
  padding: 5px 2px;
}
.color-settings {
  margin-top: 22px;
}
.color-settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 35px;
}
.color-settings h3 {
  font-size: 16px;
  margin: 8px 0 15px;
}
.color-form {
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}
.color-row {
  display: flex;
  align-items: center;
  gap: 9px;
}
.color-row strong {
  flex: 1;
  font-size: 14px;
  min-width: 50px;
}
.color-row input[name="hex"] {
  font-size: 12px;
  font-family: monospace;
  width: 94px;
  min-height: 38px;
  padding: 9px;
}
.color-picker {
  width: 40px;
  height: 38px;
  display: block;
  flex-shrink: 0;
}
.color-picker input {
  width: 40px;
  height: 38px;
  padding: 3px;
  min-height: 0;
  cursor: pointer;
}
.color-row button {
  font-size: 12px;
  padding: 8px 11px;
}
.swatches {
  display: flex;
  gap: 9px;
  margin-top: 11px;
  justify-content: flex-end;
}
.swatch {
  width: 25px;
  height: 25px;
  min-height: 25px;
  border: 3px solid white;
  box-shadow: 0 0 0 1px #dce3ee;
  border-radius: 50%;
  padding: 0;
  background: var(--swatch);
}
.swatch:hover {
  background: var(--swatch);
  transform: scale(1.1);
  border-color: #e3e9f8;
}
.color-mode {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
}
.color-mode > span {
  color: var(--muted);
  margin-right: 3px;
}
.color-mode button {
  font-size: 11px;
  min-height: 29px;
  padding: 5px 8px;
}
@media (max-width: 1000px) {
  .color-settings-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .small-actions {
    display: flex;
    width: 100%;
    justify-content: space-between;
  }
  .small-actions .color-mode button {
    min-height: 38px;
  }
  .small-actions > button {
    min-height: 38px;
  }
  .swatch {
    width: 30px;
    height: 30px;
    min-height: 30px;
  }
  .swatches {
    gap: 8px;
    justify-content: flex-start;
  }
  .color-row input[name="hex"] {
    width: 88px;
  }
  .color-row {
    gap: 6px;
  }
  .color-row strong {
    font-size: 12px;
  }
  .color-row button {
    min-height: 42px;
  }
  .target-actions button {
    min-height: 37px;
    font-size: 11px;
  }
  .target-badge {
    font-size: 11px;
  }
}

.class-tools {
  flex-wrap: wrap;
}
.class-tools button {
  min-width: 75px;
}
.work-window .roster-drop {
  min-height: 70px;
  padding: 9px;
  margin: 10px 0 6px;
  gap: 5px;
}
.work-window.drop-hover {
  border: 2px solid var(--accent);
  background: #eff4ff;
}
.work-window .roster-drop > span {
  display: none;
}
.color-form .swatch {
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
}
.work-window {
  height: auto;
  max-height: min(650px, 65dvh);
}
.work-window .panel-body {
  min-height: 0;
}
.work-window.minimized {
  height: 57px;
  max-height: 57px;
}

.source-details {
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f8faff;
}
.source-details summary {
  cursor: pointer;
  font-weight: 600;
}
.source-details pre {
  white-space: pre-wrap;
  font: inherit;
  line-height: 1.65;
  margin: 12px 0;
}
.source-details p {
  font-size: 13px;
  line-height: 1.7;
}
.source-scroll {
  overflow: auto;
  max-height: 75dvh;
  border: 1px solid var(--line);
}
.source-table {
  border-collapse: collapse;
  table-layout: fixed;
  width: 2100px;
}
.source-table th {
  position: sticky;
  top: 0;
  background: #f1f4fa;
  z-index: 1;
}
.source-table td,
.source-table th {
  border: 1px solid #b9c4d8;
  padding: 8px;
  vertical-align: top;
}
.source-table td small {
  display: block;
  font-size: 10px;
  color: #52637f;
}
.source-table td pre,
.source-cell {
  white-space: pre-wrap;
  font: inherit;
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
  text-align: left;
}
.source-cell {
  display: block;
  width: 100%;
  height: auto;
  min-height: 44px;
  background: transparent;
  border: 0;
  padding: 6px 0;
}
.source-table th:first-child {
  width: 42px;
}
.source-table td:nth-child(2),
.source-table td:nth-child(3) {
  width: 90px;
}
.source-page .hint {
  margin: 12px 0;
}

.help-disclosure {
  display: inline-block;
  position: relative;
  vertical-align: middle;
  font:
    400 14px Pretendard,
    sans-serif;
}
.help-disclosure > summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid #cbd5e3;
  border-radius: 50%;
  font-weight: 600;
  color: #536884;
  background: white;
  cursor: pointer;
}
.help-disclosure > summary::-webkit-details-marker {
  display: none;
}
.help-disclosure > div {
  position: absolute;
  z-index: 100;
  top: 40px;
  left: 0;
  width: 310px;
  max-width: calc(100vw - 40px);
  padding: 18px;
  background: white;
  border: 1px solid #ccd6e5;
  border-radius: 12px;
  box-shadow: 0 8px 30px #19263f20;
  color: #263955;
  font-size: 13px;
  line-height: 1.65;
  text-align: left;
}
.help-disclosure p {
  margin: 9px 0 0;
  font-size: 13px;
}
.help-disclosure strong {
  font-size: 15px;
}
.help-disclosure summary:focus-visible {
  outline: 3px solid #e5a532;
}
@media (max-width: 600px) {
  .help-disclosure > summary {
    min-width: 44px;
    min-height: 44px;
  }
  .help-disclosure > div {
    position: fixed;
    top: 100px;
    left: 20px;
  }
}
.exams-page {
  max-width: 1560px;
  margin: auto;
}
.exam-title {
  display: flex;
  align-items: center;
  gap: 12px;
}
.exam-title > img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}
.exams-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 24px;
}
.exam-students {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  height: calc(100dvh - 185px);
  position: sticky;
  top: 95px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.exam-student-list {
  overflow: auto;
  min-height: 0;
}
.exam-student-option {
  display: block;
  text-align: left;
  width: 100%;
  border: 0;
  border-bottom: 1px solid #edf0f5;
  border-radius: 6px;
  padding: 12px;
  background: white;
}
.exam-student-option small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.exam-student-option.active {
  background: #edf1ff;
  color: #3155e7;
}
.exam-student-option[hidden] {
  display: none;
}
.exam-detail {
  min-width: 0;
}
.exam-student-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.exam-student-heading h2 {
  font-size: 23px;
}
.exam-student-heading p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}
.exam-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.exam-metrics > div {
  padding: 14px 18px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.exam-metrics span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.exam-metrics strong {
  display: block;
  font-size: 28px;
  margin-top: 5px;
}
.exam-metrics small,
.exam-score small {
  font-size: 13px;
  margin-left: 4px;
  color: var(--muted);
  font-weight: 400;
}
.exam-metrics .warning {
  color: #aa611f;
}
.exam-trend,
.exam-entry,
.exam-history {
  padding: 20px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 12px;
  margin-bottom: 16px;
}
.exam-trend .section-heading {
  margin: 0;
}
.exam-trend .section-heading span {
  font-size: 12px;
  color: var(--muted);
}
.exam-chart-scroll {
  overflow: auto;
  margin-top: 8px;
}
.exam-chart {
  width: 100%;
  height: 218px;
  display: block;
}
.exam-empty {
  min-height: 170px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--muted);
}
.exam-empty img {
  width: 65px;
  height: 65px;
  object-fit: contain;
}
.exam-empty strong {
  font-size: 14px;
  color: var(--text);
}
.exam-empty p {
  font-size: 12px;
}
.exam-fields {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1.5fr 1fr;
  gap: 12px;
}
.exam-progress-fields {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.exam-progress-fields button {
  margin-left: auto;
}
.exam-attempt {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 17px 0;
  border-bottom: 1px solid #e9eef5;
}
.exam-attempt > div:first-child {
  flex: 1;
}
.exam-attempt p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}
.exam-score {
  font-size: 24px;
  color: #263a72;
}
.exam-checks {
  display: flex;
  gap: 15px;
  font-size: 12px;
}
.exam-checks input {
  width: 18px;
  min-height: 18px;
}
.exam-attempt:last-child {
  border: 0;
}
button {
  transition:
    background-color 0.14s,
    box-shadow 0.14s,
    transform 0.12s;
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
@media (prefers-reduced-motion: reduce) {
  button {
    transition: none;
    transform: none !important;
  }
}
@media (max-width: 1000px) {
  .exams-layout {
    grid-template-columns: 210px 1fr;
    gap: 16px;
  }
  .exam-fields {
    grid-template-columns: repeat(3, 1fr);
  }
  .exam-attempt {
    flex-wrap: wrap;
  }
  .exam-checks {
    width: 100%;
  }
  .exam-metrics > div {
    padding: 12px;
  }
  .exam-metrics strong {
    font-size: 22px;
  }
}
@media (max-width: 650px) {
  .exams-layout {
    display: block;
  }
  .exam-students {
    position: static;
    height: 200px;
    margin-bottom: 20px;
  }
  .exam-fields {
    grid-template-columns: repeat(2, 1fr);
  }
  .exam-metrics {
    gap: 6px;
  }
  .exam-metrics span {
    font-size: 10px;
  }
  .exam-metrics > div {
    padding: 10px 7px;
  }
}

.grade-badge {
  display: inline-block;
  width: 26px;
  height: 26px;
  flex: none;
  background-image: url("../public/grade-badges.png");
  background-size: 300% 300%;
  vertical-align: middle;
}
.grade-text {
  display: inline-block;
  font-size: 10px;
  color: #63738a;
  white-space: nowrap;
}
.student-chips button {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 4px 1px 1px;
  min-height: 27px;
}
.student-chips button > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
}
.student-name > .grade-badge {
  float: left;
  margin-right: 5px;
}
.class-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.directory-form {
  display: flex;
  gap: 12px;
  align-items: end;
  padding: 14px 0;
  border-bottom: 1px solid var(--line, #dce3ee);
  flex-wrap: wrap;
}
.directory-form label {
  flex: 1;
  min-width: 140px;
}
.directory-form button {
  min-height: 44px;
}
.settings-page > .settings-section {
  margin-top: 20px;
}

.settings-layout {
  align-items: start;
}

.student-chips {
  height: 30px;
}

/* Intrinsic input widths must never widen the floating editor's grid. */
.inline-editor {
  max-height: calc(100dvh - 24px);
  overflow: auto;
  right: 12px;
  bottom: 12px;
  width: min(440px, calc(100vw - 24px));
}
.inline-editor form {
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}
.inline-editor label,
.inline-editor input,
.inline-editor select,
.inline-editor button,
.inline-editor .form-columns {
  min-width: 0;
  max-width: 100%;
}
.inline-editor input,
.inline-editor select {
  width: 100%;
}
.inline-editor .form-columns {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(60px, 0.55fr);
}
.inline-editor .panel-head {
  position: sticky;
  top: 0;
  background: white;
  z-index: 1;
}
.board-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-left: auto;
  color: #243650;
  flex-shrink: 0;
}
.board-controls button {
  min-height: 36px;
  font-size: 12px;
  padding: 6px 10px;
}
.board-zoom-controls {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  overflow: hidden;
}
.board-zoom-controls button {
  border: 0;
  border-radius: 0;
  min-width: 36px;
  font-size: 17px;
}
.board-zoom-controls .zoom-value {
  font-size: 12px;
  min-width: 58px;
  font-variant-numeric: tabular-nums;
}
.board-caption {
  align-items: center;
  margin-bottom: 8px;
}
.board-caption .board-tip {
  display: none;
}
.board-content {
  min-width: 0;
}
.class-card.roster-expanded {
  height: auto;
  min-height: 82px;
}
.roster-expanded .student-chips {
  height: auto;
  overflow: visible;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 5px;
  padding-bottom: 2px;
}
.roster-expanded .student-chips button {
  flex-shrink: 0;
  max-width: 100%;
}
.roster-expanded .student-chips button > span:last-child {
  overflow: visible;
  text-overflow: clip;
}
@media (min-width: 801px) {
  body[data-route="schedule"] main {
    padding: 12px 18px 8px;
  }
  .schedule-page > .page-heading {
    margin-bottom: 12px;
  }
  .schedule-page > .page-heading h1 {
    font-size: 23px;
  }
  .schedule-page > .page-heading .breadcrumb {
    display: none;
  }
  .schedule-page > .toolbar,
  .schedule-page > .filterbar {
    margin-bottom: 8px;
  }
  .schedule-page .board-scroll {
    min-height: 180px;
  }
  body.board-focus {
    overflow: hidden;
  }
  body.board-focus .app-header {
    display: none;
  }
  body.board-focus main {
    max-width: none;
    padding: 10px 12px 0;
  }
  body.board-focus .schedule-page > .page-heading {
    display: none;
  }
  body.board-focus .schedule-page > .toolbar {
    margin-bottom: 6px;
  }
  body.board-focus .schedule-page > .filterbar {
    margin-bottom: 4px;
  }
  body.board-focus .planbar {
    margin-top: 6px;
  }
}
@media (max-width: 800px) {
  .board-caption {
    flex-wrap: wrap;
  }
  .board-controls {
    margin-left: 0;
  }
  body.board-focus .app-header,
  body.board-focus .mobile-bottom-nav {
    display: none;
  }
  body.board-focus .board-scroll:not(.is-campus) {
    display: block;
    min-height: 180px;
  }
  body.board-focus .mobile-agenda {
    display: none;
  }
  body.board-focus .schedule-page > .page-heading,
  body.board-focus .schedule-page > .filterbar {
    display: none;
  }
}
@media (max-width: 420px) {
  .inline-editor .form-columns {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .inline-editor .form-columns label:last-child {
    grid-column: auto;
  }
  .inline-editor form {
    padding: 16px;
    gap: 12px;
  }
}
@media print {
  .board-controls {
    display: none !important;
  }
  .board-content {
    zoom: 1 !important;
  }
}

.cell-content:has(.roster-expanded) {
  height: auto;
  overflow: visible;
}

.operations-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}
.operations-link:hover {
  background: var(--soft);
}

/* One shared vertical clock: weekdays never drift away from Saturday. */
.master-table .time-col time {
  position: sticky;
  top: 52px;
  font-variant-numeric: tabular-nums;
}
.week-table .weekly-time {
  position: sticky;
  left: 0;
  z-index: 3;
  vertical-align: top;
  padding-top: 12px;
  font-variant-numeric: tabular-nums;
}
.planbar .sunday-toggle {
  font-size: 12px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Non-modal class windows keep the timetable and each editor stable. */
.class-window-layer {
  position: fixed;
  inset: 0;
  z-index: 32;
  pointer-events: none;
}
.class-window-layer[hidden],
.class-window[hidden] {
  display: none;
}
.class-window {
  position: absolute;
  pointer-events: auto;
  width: min(620px, calc(100vw - 16px));
  height: min(780px, calc(100dvh - 100px));
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #ced7ec;
  border-radius: 16px;
  box-shadow: 0 18px 65px #192b5029;
  overflow: hidden;
}
.class-window.focused {
  border-color: #7087ea;
  box-shadow: 0 18px 65px #192b503b;
}
.class-window > header {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 18px;
  background: #f6f8fe;
  border-bottom: 1px solid #e2e7f2;
  cursor: move;
  touch-action: none;
}
.class-window > header strong {
  font-size: 17px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.class-window > header button {
  border: 0;
  background: transparent;
  padding: 6px;
  flex-shrink: 0;
}
.class-window-nav {
  display: flex;
  gap: 6px;
  padding: 8px 14px;
  border-bottom: 1px solid #e8edf7;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.class-window-nav button {
  font-size: 12px;
  padding: 7px 10px;
  min-height: 32px;
}
.class-window-body {
  overflow: auto;
  min-height: 0;
  padding: 18px;
  flex: 1;
  overscroll-behavior: contain;
}
.class-window-body > h3 {
  margin: 0 0 6px;
  font-size: 19px;
}
.class-window-body > p {
  margin: 0 0 16px;
  font-size: 13px;
  color: #677c9c;
}
.class-window .class-tools {
  display: flex;
  gap: 8px;
}
.class-window .class-tools button {
  flex: 1;
}
.class-window .homework-open {
  padding: 12px;
  margin: 8px 0;
}
.class-window .roster-row {
  padding: 10px 0;
}
.popup-class-settings {
  border-top: 1px solid #e2e7f2;
  margin-top: 18px;
  padding-top: 12px;
}
.popup-class-settings > summary {
  display: flex;
  gap: 8px;
  align-items: center;
  cursor: pointer;
  color: #51617c;
  font-size: 13px;
}
.popup-class-settings label {
  display: block;
  margin: 12px 0;
}
.popup-class-settings select {
  margin-left: 10px;
}
.popup-memo {
  margin: 10px 0;
  border: 1px solid #e0e6f1;
  border-radius: 10px;
  padding: 10px 12px;
}
.popup-memo summary {
  cursor: pointer;
  font-size: 13px;
}
.popup-memo textarea {
  width: 100%;
  resize: vertical;
}
.popup-memo pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.class-window .editor-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.class-window .lesson-form,
.class-window .lesson-context section {
  padding: 14px;
  border-radius: 10px;
}
.class-window .lesson-heading {
  margin: 10px 0;
}
.class-window .lesson-heading h3 {
  font-size: 20px;
  margin: 8px 0;
}
.class-window .lesson-heading p {
  font-size: 12px;
  margin: 0;
}
.class-window .lesson-form label {
  margin: 0 0 12px;
  font-size: 14px;
}
.class-window .lesson-form textarea {
  padding: 10px;
  min-height: 70px;
  font-size: 14px;
}
.class-window .lesson-form textarea[name="progress"] {
  min-height: 120px;
}
.class-window .editor-save {
  position: static;
  flex-wrap: wrap;
  padding: 10px 0 0;
  gap: 8px;
}
.class-window .editor-save > span {
  width: 100%;
  font-size: 11px;
}
.class-window .editor-nav {
  margin: 0;
  gap: 8px;
}
.class-window .editor-nav button {
  font-size: 12px;
  padding: 7px;
}
.class-window .lesson-context {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.class-window .lesson-context h2 {
  font-size: 15px;
}
.lesson-help {
  display: inline-block;
  position: relative;
  font-size: 13px;
  margin: 0 0 10px;
}
.lesson-help summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  border: 1px solid #cdd8eb;
  color: #526887;
  border-radius: 50%;
  width: 24px;
  height: 24px;
}
.lesson-help summary::-webkit-details-marker {
  display: none;
}
.lesson-help p {
  padding: 12px;
  margin: 8px 0;
  background: #f5f7fd;
  border: 1px solid #e0e6f1;
  border-radius: 8px;
  line-height: 1.7;
}
.popup-lesson-nav {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 10px;
}
.class-window .server-lesson-editor {
  padding: 0;
  border: 0;
}
.class-window .server-lesson-editor h2 {
  font-size: 19px;
  margin: 8px 0;
}
.class-window .server-lesson-form fieldset {
  border: 0;
  padding: 0;
  min-width: 0;
}
.class-window .server-lesson-form label {
  display: block;
  font-size: 14px;
  margin: 12px 0;
}
.class-window .server-lesson-form textarea {
  display: block;
  width: 100%;
  min-height: 78px;
  font-size: 14px;
  padding: 10px;
  margin-top: 6px;
  resize: vertical;
}
.class-window .server-lesson-form textarea[name="progress"] {
  min-height: 130px;
}
.class-window .server-lesson-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.popup-lesson-context {
  border-top: 1px solid #e0e6f1;
  margin: 16px 0;
  padding-top: 12px;
}
.popup-lesson-context h3 {
  font-size: 15px;
  margin: 8px 0;
}
.popup-lesson-context .reference-note {
  display: block;
  width: 100%;
  text-align: left;
  margin: 6px 0;
  white-space: normal;
}
#side-panel {
  z-index: 40;
}
@media (max-width: 600px) {
  .class-window > header {
    padding: 10px 12px;
  }
  .class-window > header strong {
    font-size: 15px;
  }
  .class-window-body {
    padding: 12px;
  }
}
.class-window-body .section-heading {
  margin: 18px 0 10px;
}
.class-window-body input[placeholder="이 반 학생 찾기"] {
  width: 100%;
}
@media (max-width: 600px) {
  .app-header nav {
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  .app-header nav > * {
    flex-shrink: 0;
  }
}
.class-window > header strong {
  flex: 1;
}

/* Student profile: keyboard-first compact fields with explicit save. */
.student-profile-form {
  min-width: 0;
}
.student-profile-form fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.profile-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.profile-fields label {
  display: grid;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
}
.profile-fields input,
.profile-fields select {
  width: 100%;
  min-width: 0;
  padding: 9px 10px;
}
.profile-grade-preview {
  margin: 10px 0;
  color: #455578;
}
.profile-help {
  font-size: 13px;
  margin: 10px 0 20px;
}
.profile-help summary {
  cursor: pointer;
  color: #3155e7;
}
.profile-school-warning,
.availability-warning {
  display: block;
  color: #83500a;
  background: #fff5df;
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 12px;
}
.student-profile-form h3 {
  margin: 22px 0 10px;
}
.availability-row {
  display: grid;
  grid-template-columns:
    52px minmax(80px, 1fr) auto minmax(80px, 1fr) minmax(85px, 1fr)
    32px;
  align-items: center;
  gap: 5px;
  margin-bottom: 8px;
}
.availability-row input,
.availability-row select,
.availability-row button {
  min-width: 0;
  width: 100%;
  padding: 8px 5px;
}
.availability-row label {
  min-width: 0;
  margin: 0;
}
.profile-save {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 12px;
}
.profile-save [role="status"] {
  font-size: 12px;
  color: #63758f;
}
@media (max-width: 600px) {
  .profile-fields {
    grid-template-columns: minmax(0, 1fr);
  }
  .availability-row {
    grid-template-columns: 45px minmax(72px, 1fr) auto minmax(72px, 1fr) 30px;
  }
  .availability-row > input[data-block-reason] {
    grid-row: 2;
    grid-column: 1 / -1;
  }
  .availability-row button {
    grid-column: 5;
    grid-row: 1;
  }
}
@media print {
  .availability-warning {
    display: none;
  }
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.profile-overview {
  display: block;
}
.profile-overview > .student-detail-card + .student-detail-card {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.profile-overview > .student-detail-card + .student-detail-card h2 {
  grid-column: 1 / -1;
  margin-bottom: 0;
}
.profile-overview .student-feature {
  margin: 0;
}
.student-profile-form fieldset {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 28px;
  grid-template-areas: "heading heading" "basics availability" "basics plan" "save save";
}
.student-profile-form .section-heading {
  grid-area: heading;
}
.profile-basics {
  grid-area: basics;
}
.profile-plan {
  grid-area: plan;
}
.profile-availability {
  grid-area: availability;
}
.profile-availability h3 {
  margin-top: 0;
}
.profile-save {
  grid-area: save;
}
@media (max-width: 900px) {
  .student-profile-form fieldset {
    display: block;
  }
  .profile-availability h3 {
    margin-top: 22px;
  }
  .profile-overview > .student-detail-card + .student-detail-card {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* A dedicated weekend clock prevents a Saturday lesson from creating empty weekday rows. */
.split-clock-table .weekend-time-col {
  width: 62px;
  background: #f2f5fc;
  border-left: 2px solid #c8d3e9;
  vertical-align: top;
  padding-top: 12px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.split-clock-table thead .weekend-time-col {
  vertical-align: middle;
  padding-top: 0;
}
.split-clock-table .weekend-time-col time {
  position: sticky;
  top: 52px;
}
.split-clock-table .day-ended {
  background: #f8faff;
}

/* Per-device day widths; resizing never changes timetable slots. */
th[data-column-day] {
  padding-right: 16px;
}
.day-resizer {
  position: absolute;
  right: -5px;
  top: 0;
  bottom: 0;
  width: 12px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: col-resize;
  touch-action: none;
  z-index: 9;
}
.day-resizer::after {
  content: "";
  position: absolute;
  top: 25%;
  bottom: 25%;
  left: 5px;
  width: 2px;
  background: #aab9d4;
  border-radius: 2px;
}
.day-resizer:hover::after,
.day-resizer:focus-visible::after {
  background: #3454ed;
  width: 3px;
}
.day-resizer:focus-visible {
  outline: 2px solid #3454ed;
  outline-offset: -2px;
}
.board-controls [data-day-equal] {
  font-size: 12px;
  white-space: nowrap;
  padding: 7px 10px;
}
@media print {
  .day-resizer,
  [data-day-equal] {
    display: none !important;
  }
}

/* One class identity and one navigation surface for every class task. */
.class-window {
  border-top: 4px solid var(--class-accent, #3454ed);
}
.class-window > header {
  background: #fff;
  padding: 14px 16px 12px;
}
.class-window > header strong {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  font-size: 15px;
  line-height: 1.5;
}
.class-window-identity {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.class-window-identity small {
  font-size: 13px;
  font-weight: 500;
  color: #65748c;
}
.class-window .drag-grip {
  color: var(--class-accent, #3454ed);
  flex-shrink: 0;
}
.class-window-nav {
  background: #f8faff;
  padding: 8px 12px;
  gap: 4px;
}
.class-window-nav [data-popup-view] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 0;
  background: transparent;
  color: #53637c;
  padding: 9px 10px;
  min-height: 38px;
}
.class-window-nav [data-popup-view][aria-pressed="true"] {
  background: #fff;
  color: #243653;
  box-shadow: 0 1px 4px #1a2c4a15;
  font-weight: 750;
}
.class-window-nav [data-popup-view] svg {
  width: 17px;
  height: 17px;
}
.class-window-nav [data-popup-back],
.class-window-nav [data-popup-forward] {
  border: 0;
  background: transparent;
  padding: 5px 7px;
  font-size: 22px;
  min-height: 36px;
}
.class-window-body {
  padding: 18px 20px;
}
.class-window .class-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 24px;
}
.class-window .class-tools > button {
  flex: 0 1 auto;
  min-height: 44px;
  font-size: 14px;
  padding: 10px 16px;
}
.class-window .class-tools .class-message-action {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: #f5f8fe;
  margin-left: auto;
  text-align: left;
  padding: 6px 12px;
}
.class-message-action img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}
.class-message-action span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.class-message-action small {
  font-size: 11px;
  font-weight: 400;
  color: #697a94;
}
.class-window .section-heading {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.class-window .section-heading h3 {
  font-size: 15px;
  margin: 0;
}
.class-window .section-heading small {
  font-size: 12px;
  margin-left: auto;
}
.class-window .section-heading [data-action="roster"] {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  min-height: 34px;
  padding: 6px 10px;
}
.class-window .section-heading [data-action="roster"] svg {
  width: 15px;
  height: 15px;
}
.class-window .popup-memo {
  border: 1px solid #e1e7f0;
  border-radius: 10px;
  background: #fafbfd;
  margin: 0;
}
.class-window .popup-memo > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 12px;
  font-size: 13px;
  cursor: pointer;
}
.class-window .popup-memo > summary svg {
  width: 16px;
  height: 16px;
  color: #75849b;
}
.class-window .popup-memo form {
  padding: 0 12px 12px;
}
.class-window .popup-memo details {
  padding: 0 12px 12px;
}
.class-tool-host {
  min-width: 0;
}
.class-tool-host .homework-navigation {
  display: none;
}
.homework-session-context {
  padding: 0 0 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid #e3e9f2;
}
.homework-session-context strong {
  font-size: 17px;
}
.homework-session-context p {
  margin: 6px 0;
  color: #546781;
  font-size: 13px;
}
.homework-session-context small {
  font-size: 12px;
  color: #647791;
}
.class-tool-host h3 {
  font-size: 16px;
  margin: 12px 0;
}
.class-tool-host .hw-input-row {
  gap: 8px;
  grid-template-columns: minmax(90px, 1fr) minmax(120px, 2fr) 34px;
  align-items: center;
}
.class-tool-host .hw-input-row textarea {
  font-size: 13px;
  min-height: 42px;
  height: 42px;
  padding: 10px;
  line-height: 20px;
}
.class-tool-host .hw-input-row input {
  font-size: 13px;
  min-height: 42px;
  padding: 10px;
}
.class-tool-host .hw-input-row button {
  min-height: 34px;
  padding: 4px;
}
.class-tool-host .ops-hint {
  font-size: 12px;
  line-height: 1.65;
}
.class-tool-host .hw-class-form fieldset {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.class-tool-host .hw-class-form fieldset > button {
  align-self: flex-start;
}
.class-tool-host .homework-heading {
  display: none;
}
@media (max-width: 600px) {
  .class-window-body {
    padding: 14px;
  }
  .class-window-nav [data-popup-view] {
    padding: 8px 6px;
    font-size: 12px;
  }
  .class-window-nav [data-popup-view] svg {
    display: none;
  }
  .class-window .class-tools {
    flex-wrap: wrap;
    gap: 8px;
  }
  .class-window .class-tools .class-message-action {
    margin-left: 0;
  }
}
@media (max-width: 800px) {
  .board-controls [data-day-equal] {
    display: none;
  }
}
.class-window.focused {
  border-top-color: var(--class-accent, #3454ed);
}
