:root {
  color-scheme: light;
  --bg: #f6f7f4;
  --surface: #ffffff;
  --surface-strong: #f0f5ef;
  --line: #d7ddd2;
  --grid-line: #d8ded3;
  --text: #242823;
  --muted: #66705f;
  --primary: #2f6f5e;
  --primary-strong: #24574a;
  --primary-soft: #e0f0ea;
  --accent: #b8643a;
  --danger: #b33232;
  --danger-soft: #f8e6e3;
  --weekend: #b33b3b;
  --weekend-soft: #fff7f6;
  --weekend-card: #c65b63;
  --weekend-card-soft: #fff0f1;
  --weekend-card-line: #f0c3c7;
  --teacher-h: #4338ca;
  --teacher-h-soft: #f3f2ff;
  --teacher-h-line: #cbc7ff;
  --teacher-n: #4d9a35;
  --teacher-n-soft: #f2faec;
  --teacher-n-line: #cfe8c2;
  --lane-empty-bg: #fffefd;
  --lane-empty-hjeon-bg: rgba(67, 56, 202, 0.004);
  --lane-empty-ngreen-bg: rgba(77, 154, 53, 0.005);
  --lane-drag-over-bg: rgba(47, 111, 94, 0.045);
  --lane-drag-over-line: rgba(47, 111, 94, 0.18);
  --lesson-hjeon-accent: var(--teacher-h);
  --lesson-hjeon-soft: var(--teacher-h-soft);
  --lesson-hjeon-line: var(--teacher-h-line);
  --lesson-ngreen-accent: var(--teacher-n);
  --lesson-ngreen-soft: var(--teacher-n-soft);
  --lesson-ngreen-line: var(--teacher-n-line);
  --lesson-weekend-accent: var(--weekend-card);
  --lesson-weekend-soft: var(--weekend-card-soft);
  --lesson-weekend-line: var(--weekend-card-line);
  --surface-gradient: linear-gradient(150deg, rgba(255, 255, 255, 0.99) 0%, rgba(250, 252, 249, 0.97) 58%, rgba(245, 248, 244, 0.96) 100%);
  --primary-gradient: linear-gradient(145deg, #3b806d 0%, var(--primary) 48%, var(--primary-strong) 100%);
  --dark-gradient: linear-gradient(145deg, #38453f 0%, #26332e 52%, #1f2925 100%);
  --shadow: 0 1px 2px rgba(36, 40, 35, 0.035), 0 12px 30px rgba(36, 40, 35, 0.07);
  --shadow-raised: 0 2px 5px rgba(36, 40, 35, 0.055), 0 16px 36px rgba(36, 40, 35, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 88% 4%, rgba(124, 166, 145, 0.11) 0, rgba(124, 166, 145, 0) 31%),
    linear-gradient(155deg, #fafbf8 0%, var(--bg) 44%, #f1f4ef 100%);
  color: var(--text);
  font-family:
    "Segoe UI",
    "Noto Sans KR",
    "Apple SD Gothic Neo",
    Arial,
    sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(47, 111, 94, 0.12);
}

.app-shell {
  min-height: 100vh;
}

.section-heading h2 {
  margin: 0;
  letter-spacing: 0;
}

.eyebrow {
  display: block;
  margin: 0 0 6px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: clamp(180px, 16vw, 292px) minmax(0, 1fr);
  gap: 0;
  min-height: 100vh;
}

.mini-calendar-panel {
  overflow-y: auto;
  max-height: 100vh;
  padding: clamp(10px, 1vw, 18px);
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.48) 0%, rgba(255, 255, 255, 0) 16%),
    linear-gradient(155deg, #f1f5ee 0%, #e8eee5 100%);
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.mini-calendar-panel::-webkit-scrollbar,
.mini-month-stack::-webkit-scrollbar {
  display: none;
}

.mini-month-stack {
  display: grid;
  gap: clamp(8px, 0.8vw, 12px);
}

.mini-month {
  padding: clamp(8px, 0.8vw, 12px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-gradient);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    0 5px 14px rgba(36, 40, 35, 0.045);
}

.mini-month h2 {
  margin: 0 0 10px;
  font-size: 15px;
  letter-spacing: 0;
}

.mini-weekdays,
.mini-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
}

.mini-weekdays {
  margin-bottom: 5px;
}

.mini-weekdays span {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 850;
  text-align: center;
}

.mini-weekdays span.weekend {
  color: var(--weekend);
}

.mini-day {
  min-width: 0;
  aspect-ratio: 1;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
}

.mini-day:hover {
  border-color: #9cc7b7;
  background: var(--primary-soft);
}

.mini-day.weekend {
  color: var(--weekend);
}

.mini-day.outside-month {
  color: #abb2a6;
}

.mini-day.outside-month.weekend {
  color: #c99a9a;
}

.mini-day.in-week {
  background: #e8f2ed;
}

.mini-day.today {
  border-color: #d7a24d;
}

.mini-day.selected {
  border-color: rgba(36, 87, 74, 0.72);
  background: var(--primary-gradient);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 4px 9px rgba(47, 111, 94, 0.2);
}

main {
  min-width: 0;
  padding: clamp(18px, 1.4vw, 24px) clamp(14px, 1.8vw, 28px) 40px;
}

.view-tabs {
  position: relative;
  display: inline-flex;
  gap: 0;
  margin: 0 0 12px;
  padding: 4px;
  border: 1px solid rgba(215, 221, 210, 0.9);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 6px 18px rgba(36, 40, 35, 0.06);
}

.view-tabs::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 82px;
  height: 30px;
  border-radius: 999px;
  background: var(--dark-gradient);
  box-shadow: 0 8px 18px rgba(36, 40, 35, 0.16);
  transform: translateX(0);
  transition:
    width 420ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 560ms cubic-bezier(0.22, 1, 0.36, 1);
}

.view-tabs.active-class::before {
  width: 62px;
  transform: translateX(82px);
}

.view-tabs button {
  position: relative;
  z-index: 1;
  min-height: 30px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  transition: color 260ms ease;
}

.view-tabs button:first-child {
  width: 82px;
}

.view-tabs button:last-child {
  width: 62px;
}

.view-tabs button.selected {
  color: #fff;
}

.view-viewport {
  overflow: hidden;
  width: 100%;
}

.view-slider {
  display: grid;
  grid-template-columns: 100% 100%;
  grid-auto-flow: column;
  align-items: start;
  width: 100%;
  transform: translateX(0);
  transition: transform 720ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.view-viewport.showing-class .view-slider {
  transform: translateX(-100%);
}

.view-pane {
  min-width: 0;
  width: 100%;
  opacity: 0.18;
  pointer-events: none;
  transform: scale(0.975);
  transition:
    opacity 520ms ease,
    transform 720ms cubic-bezier(0.22, 1, 0.36, 1);
}

.view-pane.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.view-stack {
  display: grid;
  gap: 18px;
}

.class-view {
  display: grid;
  gap: 12px;
}

.student-panel,
.student-detail-panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-gradient);
  box-shadow: var(--shadow);
}

.class-utility-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 34px;
}

.student-search {
  position: relative;
  display: block;
  width: 176px;
  min-width: 0;
}

.student-search-wrap {
  position: relative;
  width: 176px;
}

.student-search input {
  width: 100%;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
}

.student-search-results {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  display: grid;
  width: min(230px, calc(100vw - 40px));
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 36px rgba(36, 40, 35, 0.16);
}

.student-search-results button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  padding: 0 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.student-search-results button:hover {
  background: var(--primary-soft);
}

.student-search-results em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.student-search-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.class-grade-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(146px, 1fr));
  gap: 10px;
}

.class-grade-group {
  display: grid;
  gap: 8px;
  align-items: center;
  justify-items: center;
  min-width: 0;
  min-height: 78px;
  padding: 10px 12px 12px;
  border: 1px solid rgba(217, 224, 211, 0.82);
  border-radius: 18px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.94) 0%, rgba(247, 249, 246, 0.84) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 6px 18px rgba(36, 40, 35, 0.045);
}

.class-grade-group.selected {
  border-color: rgba(156, 199, 183, 0.75);
  background: linear-gradient(145deg, rgba(250, 255, 252, 0.96) 0%, rgba(224, 242, 233, 0.9) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    0 8px 20px rgba(47, 111, 94, 0.08);
}

.class-grade-group > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.class-chip-row {
  display: flex;
  justify-content: center;
  gap: 6px;
  width: 100%;
}

.class-chip {
  min-width: 44px;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #f7f9f5;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.class-chip:hover {
  border-color: #9cc7b7;
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.class-chip.selected {
  border-color: var(--primary);
  background: var(--primary-gradient);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 4px 10px rgba(47, 111, 94, 0.18);
}

.class-mode-row {
  position: relative;
  justify-self: start;
  display: inline-flex;
  gap: 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 4px 14px rgba(36, 40, 35, 0.05);
}

.class-mode-row::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 54px;
  height: 28px;
  border-radius: 999px;
  background: var(--dark-gradient);
  box-shadow: 0 8px 18px rgba(36, 40, 35, 0.14);
  transform: translateX(0);
  transition: transform 560ms cubic-bezier(0.22, 1, 0.36, 1);
}

.class-mode-row.active-assessments::before {
  transform: translateX(54px);
}

.class-mode-row button {
  position: relative;
  z-index: 1;
  width: 54px;
  min-height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  transition: color 260ms ease;
}

.class-mode-row button.selected {
  color: #fff;
}

.class-workspace {
  display: grid;
  grid-template-columns: minmax(270px, 0.42fr) minmax(460px, 1fr);
  gap: 12px;
}

.assessment-mode-panel {
  display: grid;
  gap: 12px;
  min-height: 520px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-gradient);
  box-shadow: var(--shadow);
}

.assessment-mode-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.assessment-mode-head > div:first-child {
  display: grid;
  gap: 3px;
}

.assessment-mode-head strong {
  font-size: 24px;
  line-height: 1.05;
}

.assessment-mode-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.assessment-add-wrap {
  position: relative;
  flex: 0 0 auto;
}

.assessment-add-form {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  display: grid;
  width: 260px;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 36px rgba(36, 40, 35, 0.16);
}

.assessment-add-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.assessment-add-form input,
.assessment-add-form textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.assessment-add-form input {
  min-height: 32px;
  padding: 0 9px;
}

.assessment-add-form textarea {
  min-height: 70px;
  resize: vertical;
  padding: 8px;
  line-height: 1.45;
}

.assessment-add-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}

.assessment-add-actions button {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.assessment-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.assessment-chip,
.assessment-empty-chip {
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.assessment-chip.selected {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.assessment-workspace {
  display: grid;
  grid-template-columns: minmax(620px, 960px) minmax(240px, 300px);
  align-items: start;
  gap: 14px;
}

.assessment-result-board {
  display: grid;
  gap: 11px;
  width: 100%;
  justify-self: start;
}

.assessment-result-title {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(247, 250, 247, 0.86);
}

.assessment-result-title strong {
  font-size: 16px;
}

.assessment-result-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  white-space: pre-wrap;
}

.assessment-result-list {
  display: grid;
  gap: 8px;
  width: 100%;
}

.assessment-result-row {
  display: grid;
  grid-template-columns: 42px minmax(64px, 72px) 116px minmax(64px, 1fr) minmax(64px, 1fr);
  gap: 6px;
  align-items: center;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid rgba(184, 199, 187, 0.72);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 6px 18px rgba(31, 48, 36, 0.035);
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.assessment-result-row:hover {
  border-color: rgba(124, 158, 136, 0.68);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 22px rgba(31, 48, 36, 0.055);
}

.assessment-result-row.student-out {
  opacity: 0.66;
  background: rgba(246, 247, 244, 0.78);
}

.assessment-student-number {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.assessment-student-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.assessment-student-name strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.assessment-result-select,
.assessment-custom-input {
  min-height: 30px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
}

.assessment-result-select {
  padding: 0 8px;
}

.assessment-result-select.good {
  border-color: rgba(113, 178, 135, 0.42);
  background: linear-gradient(180deg, rgba(241, 251, 244, 0.96) 0%, rgba(216, 241, 224, 0.9) 100%);
  color: #27613c;
}

.assessment-result-select.normal {
  border-color: rgba(212, 182, 91, 0.42);
  background: linear-gradient(180deg, rgba(255, 250, 230, 0.96) 0%, rgba(248, 235, 188, 0.9) 100%);
  color: #765d16;
}

.assessment-result-select.needs {
  border-color: rgba(211, 118, 100, 0.38);
  background: linear-gradient(180deg, rgba(255, 243, 240, 0.96) 0%, rgba(249, 218, 211, 0.88) 100%);
  color: #8b3d31;
}

.assessment-result-select.missed {
  border-color: rgba(177, 183, 177, 0.48);
  background: rgba(241, 243, 240, 0.9);
  color: #636b63;
}

.assessment-result-select.custom {
  border-color: rgba(152, 132, 190, 0.38);
  background: linear-gradient(180deg, rgba(248, 245, 254, 0.96) 0%, rgba(230, 221, 246, 0.9) 100%);
  color: #614d86;
}

.assessment-result-select.missing {
  border-color: rgba(158, 167, 159, 0.42);
  background: rgba(249, 250, 248, 0.92);
  color: var(--muted);
}

.assessment-custom-input {
  min-width: 0;
  padding: 0 10px;
  grid-column: 4;
}

.assessment-result-memo-inline {
  grid-column: 4 / -1;
  min-height: 30px;
  height: 30px;
  width: 100%;
  resize: none;
  overflow: hidden;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #465349;
  font-size: 11px;
  font-weight: 750;
  line-height: 28px;
  text-align: center;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.assessment-custom-input + .assessment-result-memo-inline {
  grid-column: 5;
}

.assessment-result-memo-inline::placeholder {
  color: rgba(96, 108, 98, 0.48);
  opacity: 1;
}

.assessment-result-memo-inline:hover,
.assessment-result-memo-inline:focus {
  border-color: rgba(124, 158, 136, 0.68);
  background: rgba(255, 255, 255, 0.98);
  color: #465349;
  outline: none;
  box-shadow: 0 0 0 3px rgba(44, 123, 96, 0.08);
}

.assessment-summary-panel {
  position: sticky;
  top: 14px;
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(184, 199, 187, 0.72);
  border-radius: 18px;
  background: var(--surface-gradient);
  box-shadow: 0 10px 28px rgba(31, 48, 36, 0.06);
}

.assessment-summary-panel > strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
}

.assessment-summary-counts {
  display: grid;
  gap: 6px;
}

.assessment-summary-count {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 30px;
  padding: 6px 9px;
  border-radius: 11px;
  border: 1px solid rgba(205, 215, 205, 0.72);
  background: rgba(247, 250, 247, 0.86);
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
}

.assessment-summary-count b {
  font-size: 12px;
  font-weight: 900;
}

.assessment-summary-count.good {
  border-color: rgba(113, 178, 135, 0.38);
  background: linear-gradient(150deg, rgba(244, 252, 246, 0.94) 0%, rgba(216, 241, 224, 0.84) 100%);
}

.assessment-summary-count.normal {
  border-color: rgba(212, 182, 91, 0.38);
  background: linear-gradient(150deg, rgba(255, 251, 235, 0.94) 0%, rgba(248, 235, 188, 0.82) 100%);
}

.assessment-summary-count.needs {
  border-color: rgba(211, 118, 100, 0.34);
  background: linear-gradient(150deg, rgba(255, 245, 242, 0.94) 0%, rgba(249, 218, 211, 0.8) 100%);
}

.assessment-summary-count.missed {
  border-color: rgba(177, 183, 177, 0.45);
  background: rgba(241, 243, 240, 0.82);
}

.assessment-summary-count.custom {
  border-color: rgba(152, 132, 190, 0.34);
  background: linear-gradient(150deg, rgba(249, 247, 253, 0.94) 0%, rgba(230, 221, 246, 0.82) 100%);
}

.assessment-summary-count.missing {
  border-color: rgba(158, 167, 159, 0.42);
  background: rgba(249, 250, 248, 0.9);
  color: var(--muted);
}

.assessment-summary-section {
  display: grid;
  gap: 7px;
}

.assessment-summary-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.assessment-summary-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.assessment-summary-list span,
.assessment-summary-list em {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: default;
  user-select: none;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.assessment-summary-list em {
  color: var(--muted);
}

.assessment-summary-section p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.assessment-empty-state {
  display: grid;
  place-items: center;
  gap: 5px;
  min-height: 220px;
  color: var(--muted);
  text-align: center;
}

.assessment-empty-state strong {
  color: var(--text);
  font-size: 15px;
}

@media (max-width: 1180px) {
  .assessment-workspace {
    grid-template-columns: 1fr;
  }

  .assessment-summary-panel {
    position: static;
    max-width: 620px;
  }
}

.student-panel,
.student-detail-panel {
  min-height: 420px;
  padding: 12px;
  border-radius: 18px;
}

.student-detail-panel {
  padding: 20px;
}

.student-panel-head,
.student-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.student-panel-head strong,
.student-detail-head strong {
  display: block;
  font-size: 16px;
}

.student-panel-head span,
.student-detail-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.student-panel-title {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.student-panel-title strong {
  font-size: 24px;
  line-height: 1.08;
  letter-spacing: 0;
}

.student-detail-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.student-excellent-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: linear-gradient(145deg, #9561f2 0%, #7c3aed 52%, #5b21b6 100%);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(124, 58, 237, 0.22);
  vertical-align: 0.08em;
}

.student-excellent-badge.compact {
  width: 17px;
  height: 17px;
}

.student-excellent-badge svg {
  display: block;
  width: 64%;
  height: 64%;
  fill: #ffffff;
}

.student-excellent-badge svg path {
  fill: #ffffff;
}

.excellent-star-toggle svg {
  display: block;
  width: 92%;
  height: 92%;
  fill: currentColor;
}

.excellent-star-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid #c9b2ef;
  border-radius: 999px;
  background: #f7f1ff;
  color: #7c3aed;
  box-shadow: 0 2px 6px rgba(124, 58, 237, 0.08);
  cursor: pointer;
}

.excellent-star-toggle:hover {
  border-color: #9f73e8;
  background: #efe4ff;
  color: #6425c7;
}

.excellent-star-toggle.selected {
  border-color: #7c3aed;
  background: #7c3aed;
  color: #ffffff;
  box-shadow: 0 5px 14px rgba(124, 58, 237, 0.26);
}

.student-add-popover-wrap {
  position: relative;
  flex: 0 0 auto;
}

.student-add-trigger {
  min-height: 29px;
  padding: 0 11px;
  border: 1px solid rgba(217, 224, 211, 0.92);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.student-add-trigger:hover {
  border-color: rgba(156, 199, 183, 0.78);
  background: rgba(239, 248, 243, 0.9);
  color: var(--primary-strong);
}

.student-add-trigger[aria-expanded="true"] {
  border-color: var(--primary);
  background: var(--primary-gradient);
  color: #fff;
}

.student-add-form {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 35;
  display: grid;
  grid-template-columns: 60px 150px 66px;
  gap: 6px;
  align-items: end;
  width: 304px;
  max-width: calc(100vw - 40px);
  padding: 26px 9px 9px;
  border: 1px solid var(--grid-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 38px rgba(36, 40, 35, 0.16);
  animation: transfer-island-in 160ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.student-add-close {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 999px;
  background: #f1f3ef;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

.student-add-form label,
.student-memo-editor {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.student-add-form input,
.student-memo-editor textarea {
  width: 100%;
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
}

.student-add-form input[type="number"] {
  text-align: center;
}

.student-add-form .button {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
}

.student-form-message {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--danger);
  font-size: 12px;
  font-weight: 750;
}

.student-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.student-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  min-height: 42px;
  padding: 7px 8px;
  border: 1px solid var(--grid-line);
  border-radius: 13px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.94) 0%, rgba(247, 249, 246, 0.84) 100%);
  color: var(--text);
  text-align: left;
  box-shadow: 0 1px 4px rgba(36, 40, 35, 0.035);
}

.student-card:hover,
.student-card.selected {
  border-color: #9cc7b7;
  background: linear-gradient(145deg, rgba(250, 255, 252, 0.98) 0%, rgba(224, 240, 234, 0.94) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 7px 16px rgba(47, 111, 94, 0.09);
}

.student-card.student-out {
  opacity: 0.66;
  background: rgba(246, 247, 244, 0.78);
}

.student-card.student-out strong {
  color: #747b71;
}

.student-card.student-out .student-number,
.student-card.student-out .student-card-meta {
  color: #9aa197;
}

.student-card-main {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 6px;
}

.student-card-meta {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.student-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.student-card em,
.student-number,
.student-memo-dot {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.student-memo-dot {
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 10.5px;
}

.student-transfer-pill,
.student-alert-badge,
.student-alert-toggle,
.student-transfer-toggle-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

.student-transfer-pill {
  min-width: 23px;
  min-height: 17px;
  padding: 0 6px;
  border: 1px solid transparent;
  font-size: 9.5px;
  text-transform: lowercase;
}

.student-transfer-pill.transfer-in {
  border-color: #b9dcca;
  background: #e8f6ef;
  color: #2f6f5e;
}

.student-transfer-pill.transfer-out {
  border-color: #d6d9d0;
  background: #f0f1ed;
  color: #777e72;
}

.student-detail-head strong .student-transfer-pill {
  margin-left: 8px;
  vertical-align: middle;
}

.student-detail-head strong .student-excellent-badge {
  margin-left: 8px;
  width: 22px;
  height: 22px;
  transform: translateY(-5px);
  vertical-align: middle;
}

.student-alert-badges {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.student-alert-badge {
  width: auto;
  min-width: 22px;
  height: 19px;
  padding: 0 6px;
  border: 1px solid transparent;
  font-size: 9.5px;
}

.health-badge {
  display: block;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.health-badge-bg {
  stroke-width: 1.2;
}

.health-badge.health-high .health-badge-bg {
  fill: #ee4b42;
  stroke: #9d2c27;
}

.health-badge.health-mid .health-badge-bg {
  fill: #f3b12f;
  stroke: #9c6812;
}

.health-badge-cross {
  fill: #151515;
}

.student-alert-badge.urgent,
.student-alert-toggle.urgent {
  border-color: #e1aaa3;
  background: #fde7e4;
  color: #a93b33;
}

.student-alert-badge.caution,
.student-alert-toggle.caution {
  border-color: #e5cf8f;
  background: #fff4c7;
  color: #7d6116;
}

.student-alert-badge.health-high,
.student-alert-toggle.health-high.selected {
  border-color: transparent;
  background: transparent;
  color: inherit;
}

.student-alert-badge.health-high {
  width: 22px;
  min-width: 22px;
  height: 22px;
  padding: 0;
}

.student-alert-badge.health-mid,
.student-alert-toggle.health-mid.selected {
  border-color: transparent;
  background: transparent;
  color: inherit;
}

.student-alert-badge.health-mid {
  width: 22px;
  min-width: 22px;
  height: 22px;
  padding: 0;
}

.student-alert-badge.special-ed,
.student-alert-toggle.special-ed {
  border-color: #bdb8e8;
  background: #eeecff;
  color: #4f46a5;
}

.student-alert-badge.behavior,
.student-alert-toggle.behavior {
  border-color: #d8bd96;
  background: #f8ebd8;
  color: #7d5424;
}

.student-alert-badge.absence,
.student-alert-toggle.absence {
  border-color: #b7c7dc;
  background: #edf4fb;
  color: #3f5e80;
}

.student-detail-panel {
  display: grid;
  align-content: start;
  gap: 17px;
}

.student-detail-head {
  padding-bottom: 2px;
}

.student-detail-head strong {
  font-size: 24px;
  line-height: 1.2;
}

.student-detail-head span {
  margin-top: 5px;
  color: #6f786c;
  font-size: 14px;
}

.student-detail-controls {
  display: grid;
  gap: 11px;
  padding: 14px;
  border: 1px solid rgba(217, 224, 211, 0.72);
  border-radius: 16px;
  background: rgba(251, 252, 250, 0.72);
}

.student-detail-control-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.student-transfer-dynamic {
  position: relative;
}

.student-transfer-trigger {
  min-height: 27px;
  padding: 0 11px;
  border: 1px solid rgba(217, 224, 211, 0.9);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.student-transfer-trigger.in {
  border-color: #9ecdb9;
  background: #e5f5ed;
  color: #2f6f5e;
}

.student-transfer-trigger.out {
  border-color: #cfd3cb;
  background: #eceee9;
  color: #68706a;
}

.student-transfer-trigger[aria-expanded="true"] {
  border-color: #26332e;
  background: #26332e;
  color: #fff;
}

.student-transfer-island {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 30;
  display: flex;
  gap: 4px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(38, 51, 46, 0.96);
  box-shadow: 0 14px 32px rgba(36, 40, 35, 0.2);
  animation: transfer-island-in 170ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes transfer-island-in {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.student-alert-toggle-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.student-transfer-toggle-button {
  min-width: 36px;
  min-height: 23px;
  padding: 0 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 10px;
  text-transform: lowercase;
}

.student-transfer-toggle-button:hover {
  border-color: #9cc7b7;
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.student-alert-toggle:hover {
  filter: brightness(0.98);
}

.student-transfer-toggle-button.in.selected {
  border-color: #9ecdb9;
  background: #e5f5ed;
  color: #2f6f5e;
}

.student-transfer-toggle-button.out.selected {
  border-color: #cfd3cb;
  background: #eceee9;
  color: #68706a;
}

.student-alert-toggle {
  width: auto;
  min-width: 48px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: #9aa197;
  font-size: 12.5px;
  transition: box-shadow 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.student-alert-toggle.health-high,
.student-alert-toggle.health-mid {
  min-width: 36px;
  width: 36px;
  padding: 0;
  border-color: transparent;
  background: transparent;
}

.student-alert-toggle .health-badge {
  width: 26px;
  height: 26px;
  transform: scale(1);
  opacity: 1;
  transition: filter 140ms ease, transform 140ms ease;
}

.student-alert-toggle.selected {
  border-color: rgba(38, 51, 46, 0.34);
  box-shadow:
    0 0 0 2px rgba(38, 51, 46, 0.13),
    0 4px 10px rgba(36, 40, 35, 0.12);
  outline: 2px solid rgba(38, 51, 46, 0.13);
  outline-offset: 1px;
  transform: translateY(-1px);
}

.student-alert-toggle.urgent.selected {
  border-color: #b94940;
  box-shadow: 0 0 0 2px rgba(238, 75, 66, 0.18), 0 4px 10px rgba(169, 59, 51, 0.16);
  outline-color: rgba(238, 75, 66, 0.32);
}

.student-alert-toggle.caution.selected {
  border-color: #b98c1c;
  box-shadow: 0 0 0 2px rgba(243, 177, 47, 0.2), 0 4px 10px rgba(125, 97, 22, 0.15);
  outline-color: rgba(243, 177, 47, 0.36);
}

.student-alert-toggle[aria-pressed="true"] {
  outline: 2px solid rgba(38, 51, 46, 0.14);
  outline-offset: 1px;
  transform: translateY(-1px);
}

.student-alert-toggle.urgent[aria-pressed="true"] {
  outline-color: rgba(238, 75, 66, 0.34);
}

.student-alert-toggle.caution[aria-pressed="true"] {
  outline-color: rgba(243, 177, 47, 0.38);
}

.student-alert-toggle .health-badge,
.student-alert-toggle:hover .health-badge {
  opacity: 1;
}

.student-alert-toggle.health-high.selected,
.student-alert-toggle.health-mid.selected {
  border-color: transparent;
  background: transparent;
}

.student-alert-toggle.selected .health-badge {
  filter: drop-shadow(0 0 0 rgba(0, 0, 0, 0.25)) drop-shadow(0 3px 4px rgba(0, 0, 0, 0.22));
  transform: scale(1);
}

.student-memo-editor textarea {
  min-height: 230px;
  resize: vertical;
  padding: 14px;
  line-height: 1.5;
  font-size: 14px;
}

.student-detail-actions {
  display: flex;
  justify-content: flex-end;
}

.class-empty {
  margin: 0;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  text-align: center;
}

.student-detail-empty {
  align-self: center;
  justify-self: center;
  display: grid;
  gap: 5px;
  max-width: 240px;
  padding: 18px 20px;
  border: 1px solid rgba(217, 224, 211, 0.72);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--muted);
  text-align: center;
}

.student-detail-empty strong {
  color: #6e776d;
  font-size: 14px;
}

.student-detail-empty span {
  font-size: 12px;
  font-weight: 750;
}

.action-band,
.text-preservation,
.table-section,
.calendar-shell,
.timetable-shell,
.inline-form,
.output-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-gradient);
  box-shadow: var(--shadow);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 12px;
}

.dashboard-tools {
  display: grid;
  gap: 12px;
}

.dashboard-tool-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(110px, 1fr));
  gap: 10px;
}

.metric-card {
  min-height: 96px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-gradient);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    0 7px 18px rgba(36, 40, 35, 0.045);
}

.metric-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.metric-card strong {
  display: block;
  margin-top: 12px;
  color: var(--primary-strong);
  font-size: 30px;
  line-height: 1;
}

.action-band {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px;
}

.button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f8f4 100%);
  color: var(--text);
  font-weight: 750;
}

.button.primary {
  border-color: var(--primary);
  background: var(--primary-gradient);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 6px 14px rgba(47, 111, 94, 0.18);
}

.button.primary:hover {
  background: linear-gradient(145deg, #347765 0%, #286251 52%, #204c41 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.17),
    0 8px 18px rgba(47, 111, 94, 0.22);
}

.button.secondary:hover {
  background: var(--primary-soft);
  border-color: #9cc7b7;
}

.button.secondary.selected {
  border-color: #9cc7b7;
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.button.danger {
  border-color: #ebbbb4;
  background: linear-gradient(180deg, #fff7f5 0%, var(--danger-soft) 100%);
  color: var(--danger);
}

.button.small {
  min-height: 30px;
  padding: 0 10px;
  font-size: 13px;
}

.text-preservation {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 18px;
}

.text-preservation p {
  margin: 0;
  font-size: 18px;
  font-weight: 750;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.table-section {
  overflow: hidden;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 249, 245, 0.96) 100%);
}

.section-heading h2 {
  font-size: 18px;
}

.section-heading span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

th {
  background: #f4f6f2;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

td {
  font-size: 14px;
}

tbody tr:hover {
  background: #fbfaf6;
}

.strong-text,
.date-cell {
  font-weight: 800;
}

.date-cell {
  color: #3f594d;
}

.inline-form {
  display: grid;
  grid-template-columns: 180px minmax(180px, 1fr) minmax(180px, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 16px;
}

.inline-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.inline-form input {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

.calendar-shell {
  overflow: hidden;
}

.timetable-shell {
  overflow: hidden;
}

.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(47, 111, 94, 0.035) 0%, rgba(47, 111, 94, 0) 30%),
    linear-gradient(180deg, #ffffff 0%, #f6f9f5 100%);
}

.calendar-toolbar h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0;
}

.week-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

.week-actions .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-color: rgba(199, 208, 196, 0.92);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 247, 0.96) 100%);
  color: #30362f;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    0 1px 2px rgba(36, 40, 35, 0.05),
    0 7px 16px rgba(36, 40, 35, 0.055);
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease, color 140ms ease, transform 140ms ease;
}

.week-actions .button:hover {
  border-color: rgba(171, 184, 169, 0.96);
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfcfa 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    0 2px 4px rgba(36, 40, 35, 0.065),
    0 10px 20px rgba(36, 40, 35, 0.075);
  transform: translateY(-1px);
}

.week-actions .button:active {
  box-shadow:
    inset 0 1px 2px rgba(36, 40, 35, 0.07),
    0 1px 2px rgba(36, 40, 35, 0.04);
  transform: translateY(0);
}

.week-actions .calendar-briefing-button {
  border-color: rgba(199, 208, 196, 0.92);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 247, 0.96) 100%);
  color: #30362f;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    0 1px 2px rgba(36, 40, 35, 0.05),
    0 7px 16px rgba(36, 40, 35, 0.055);
}

.week-actions .calendar-briefing-button:hover {
  border-color: rgba(171, 184, 169, 0.96);
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfcfa 100%);
  color: #30362f;
}

.week-actions .calendar-filter-button[aria-pressed="true"] {
  border-color: rgba(47, 111, 94, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(239, 248, 243, 0.96) 100%);
  color: var(--primary-strong);
}

.week-actions .calendar-nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 74px;
  padding: 0 10px;
  font-size: 14px;
}

.calendar-nav-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #2d332f;
  font-size: 1.3em;
  font-weight: inherit;
  line-height: 1;
}

.calendar-toolbox {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.tool-button {
  white-space: nowrap;
}

.icon-tool-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  min-width: 36px;
  padding: 0;
}

.icon-tool-button svg {
  flex: 0 0 23px;
  width: 23px;
  min-width: 23px;
  height: 23px;
  min-height: 23px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.15;
}

.icon-tool-button[aria-expanded="true"] {
  border-color: rgba(199, 208, 196, 0.92);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 247, 0.96) 100%);
  color: #30362f;
}

.tool-menu-button {
  animation: toolMenuIn 180ms ease both;
}

.calendar-filter-panel {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 18px 14px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfa;
}

.calendar-filter-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.calendar-filter-status strong {
  color: var(--primary-strong);
  font-size: 13px;
}

.calendar-filter-segment {
  display: inline-flex;
  gap: 0;
  padding: 4px;
  border: 1px solid rgba(215, 221, 210, 0.95);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 6px 16px rgba(36, 40, 35, 0.05);
}

.calendar-filter-segment button {
  min-width: 58px;
  min-height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.calendar-filter-segment button:hover {
  color: var(--primary-strong);
}

.calendar-filter-segment button.selected {
  background: var(--text);
  color: #fff;
  box-shadow: 0 6px 14px rgba(36, 40, 35, 0.14);
}

.today-briefing-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(6, 10, 8, 0.8);
  backdrop-filter: blur(2px);
  animation: briefingOverlayIn 160ms ease both;
}

.semester-import-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  justify-items: center;
  align-items: start;
  overflow-y: auto;
  padding: 24px;
  background: rgba(6, 10, 8, 0.8);
  backdrop-filter: blur(2px);
  animation: briefingOverlayIn 160ms ease both;
}

.semester-import-card {
  display: grid;
  gap: 18px;
  width: min(880px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  min-height: 0;
  overflow-y: auto;
  padding: 24px;
  border: 1px solid rgba(223, 231, 221, 0.9);
  border-radius: 20px;
  background: #fbfcfa;
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.32);
}

.semester-import-head,
.semester-import-section-head,
.semester-import-actions,
.semester-import-history > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.semester-import-head {
  align-items: flex-start;
}

.semester-import-head span {
  color: var(--primary);
  font-size: 12px;
  font-weight: 850;
}

.semester-import-head h2 {
  margin: 3px 0 5px;
  font-size: 25px;
}

.semester-import-head p,
.semester-import-section-head span {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.semester-import-close,
.semester-import-history button {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-weight: 750;
}

.semester-import-controls {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(120px, 180px);
  gap: 12px;
}

.semester-import-controls label,
.semester-import-control {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.semester-import-controls input,
.semester-import-grid input {
  width: 100%;
  min-height: 39px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

.semester-date-picker {
  position: relative;
}

.semester-date-picker-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 39px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 750;
}

.semester-date-picker-trigger svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.semester-date-picker-popover {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  z-index: 12;
  width: min(310px, calc(100vw - 70px));
  padding: 13px;
  border: 1px solid rgba(184, 199, 187, 0.95);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(36, 40, 35, 0.2);
  overscroll-behavior: contain;
}

.semester-date-picker-head {
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
}

.semester-date-picker-head strong {
  text-align: center;
  color: var(--text);
  font-size: 14px;
}

.semester-date-picker-head button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--text);
  font-size: 23px;
  line-height: 1;
}

.semester-date-picker-weekdays,
.semester-date-picker-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
}

.semester-date-picker-weekdays {
  margin-bottom: 4px;
}

.semester-date-picker-weekdays span {
  padding: 4px 0;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.semester-date-picker-weekdays .weekend,
.semester-date-picker-days button.weekend {
  color: #b45a4e;
}

.semester-date-picker-days button {
  min-width: 0;
  min-height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
}

.semester-date-picker-days button:hover {
  background: var(--surface-strong);
}

.semester-date-picker-days button.outside-month {
  color: #a9b0aa;
}

.semester-date-picker-days button.selected {
  background: var(--primary);
  color: #fff;
}

.semester-date-picker-popover > p {
  margin: 9px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.semester-import-unit-section,
.semester-import-history,
.semester-import-conflicts {
  display: grid;
  gap: 10px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.semester-import-section-head > div {
  display: grid;
  gap: 3px;
}

.semester-import-grid-wrap {
  overflow-x: auto;
}

.semester-import-grid {
  width: 100%;
  border-collapse: collapse;
}

.semester-import-grid th,
.semester-import-grid td {
  padding: 8px 10px;
  text-align: center;
}

.semester-import-grid th:first-child,
.semester-import-grid td:first-child {
  width: 90px;
}

.semester-import-grid input {
  min-width: 74px;
  text-align: center;
}

.semester-import-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.semester-import-preview > div {
  display: grid;
  gap: 6px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-strong);
}

.semester-import-preview span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.semester-import-preview strong {
  font-size: 18px;
}

.semester-import-preview .safe strong {
  color: var(--primary);
}

.semester-import-preview .conflict,
.semester-import-conflicts {
  border-color: #e8b7b0;
  background: var(--danger-soft);
}

.semester-import-preview .conflict strong,
.semester-import-error,
.semester-import-conflicts strong {
  color: var(--danger);
}

.semester-import-error {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
}

.semester-import-conflicts span,
.semester-import-conflicts li {
  color: #75423c;
  font-size: 13px;
}

.semester-import-conflicts ul {
  margin: 0;
  padding-left: 20px;
}

.semester-import-history > div {
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

.semester-import-history span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.semester-import-history button {
  color: var(--danger);
}

.semester-import-actions {
  justify-content: flex-end;
  padding-top: 4px;
}

.semester-import-actions .button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

@media (max-width: 720px) {
  .semester-import-overlay {
    padding: 10px;
  }

  .semester-import-card {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
    padding: 17px;
  }

  .semester-import-controls,
  .semester-import-preview {
    grid-template-columns: 1fr;
  }
}

.today-briefing-card {
  display: grid;
  gap: 20px;
  width: min(620px, calc(100vw - 48px));
  max-height: min(1000px, calc(100vh - 48px));
  overflow-x: hidden;
  overflow-y: auto;
  padding: 25px;
  border: 1px solid rgba(223, 231, 221, 0.9);
  border-radius: 22px;
  background: #fbfcfa;
  color: var(--text);
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.32);
}

.today-briefing-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.today-briefing-head h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 650;
  letter-spacing: 0;
}

.today-briefing-close {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-size: 15px;
  font-weight: 650;
}

.today-briefing-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.today-briefing-stats div {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid rgba(184, 199, 187, 0.72);
  border-radius: 16px;
  background: #fff;
}

.today-briefing-stats span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.today-briefing-stats strong {
  color: #2d332f;
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}

.today-briefing-split-count {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
}

.today-briefing-split-count em,
.today-briefing-split-count span {
  font-style: normal;
}

.today-briefing-split-count span {
  color: #9aa39b;
  font-weight: 500;
}

.today-briefing-split-count .hjeon {
  color: var(--lesson-hjeon-accent);
}

.today-briefing-split-count .ngreen {
  color: var(--lesson-ngreen-accent);
}

.today-briefing-section {
  display: grid;
  gap: 11px;
}

.today-briefing-section > strong {
  font-size: 17px;
  font-weight: 600;
}

.today-briefing-list {
  display: grid;
  gap: 9px;
}

.today-briefing-list.compact {
  gap: 8px;
}

.today-briefing-teacher-block {
  display: grid;
  gap: 12px;
}

.today-briefing-teacher-block + .today-briefing-teacher-block {
  margin-top: 10px;
}

.today-briefing-teacher-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px;
}

.today-briefing-teacher-head strong::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 999px;
  vertical-align: 1px;
  background: currentColor;
}

.today-briefing-teacher-head strong {
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
}

.today-briefing-teacher-block.hjeon .today-briefing-teacher-head strong {
  color: var(--lesson-hjeon-accent);
}

.today-briefing-teacher-block.ngreen .today-briefing-teacher-head strong {
  color: var(--lesson-ngreen-accent);
}

.today-briefing-teacher-head span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.today-briefing-item {
  display: grid;
  grid-template-columns: 54px 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 51px;
  padding: 10px 12px;
  border: 1px solid rgba(184, 199, 187, 0.72);
  border-left-width: 4px;
  border-radius: 14px;
  background: #fff;
}

.today-briefing-item.hjeon {
  border-left-color: var(--lesson-hjeon-accent);
}

.today-briefing-item.ngreen {
  border-left-color: var(--lesson-ngreen-accent);
}

.today-briefing-item span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.today-briefing-item b {
  font-size: 15px;
  font-weight: 600;
}

.today-briefing-item p {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #26352d;
  font-size: 15px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-briefing-item p strong,
.today-briefing-item p small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-briefing-item p strong {
  font-size: 15px;
  font-weight: 600;
}

.today-briefing-item p small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.today-briefing-item i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #fff2df;
  color: #9b4f15;
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
}

.today-briefing-empty {
  margin: 0;
  padding: 13px 14px;
  border: 1px dashed rgba(184, 199, 187, 0.8);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 15px;
  font-weight: 400;
}

@keyframes briefingOverlayIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes toolMenuIn {
  from {
    opacity: 0;
    transform: translateX(8px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.unit-board {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.unit-board-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.unit-board-header h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0;
}

.unit-back-button {
  width: 38px;
  min-width: 38px;
  padding: 0;
}

.unit-back-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.3;
}

.unit-grade-stack {
  display: grid;
  gap: 14px;
}

.unit-grade-section {
  display: grid;
  gap: 16px;
  min-height: 164px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 24px rgba(36, 40, 35, 0.05);
}

.unit-grade-section h3 {
  margin: 0;
  color: var(--text);
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 0;
  opacity: 1;
  text-align: center;
}

.unit-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(136px, 160px));
  justify-content: start;
  gap: 12px;
}

.unit-card-wrap {
  position: relative;
  min-width: 0;
}

.unit-card {
  display: grid;
  width: 100%;
  min-height: 94px;
  align-content: start;
  gap: 8px;
  padding: 13px;
  border: 1px solid #d8e0d3;
  border-radius: 16px;
  background: linear-gradient(145deg, #ffffff 0%, #f5faf4 100%);
  color: var(--text);
  text-align: left;
  box-shadow: 0 8px 18px rgba(36, 40, 35, 0.06);
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.unit-card:hover {
  border-color: #bfd0c2;
  box-shadow: 0 12px 24px rgba(36, 40, 35, 0.09);
  transform: translateY(-1px);
}

.teacher-board-view {
  display: grid;
  gap: 16px;
  padding: 16px;
}

.teacher-board-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.teacher-board-header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.teacher-board-header h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0;
}

.teacher-board-header p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
}

.teacher-board-teacher-toggle {
  display: inline-flex;
  justify-self: start;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(215, 221, 210, 0.95);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 6px 16px rgba(36, 40, 35, 0.05);
}

.teacher-board-teacher-toggle button {
  min-height: 32px;
  padding: 0 15px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.teacher-board-teacher-toggle button.selected {
  background: var(--text);
  color: #fff;
  box-shadow: 0 8px 16px rgba(36, 40, 35, 0.12);
}

.teacher-board-add-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(215, 221, 210, 0.95);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.94) 0%, rgba(249, 251, 247, 0.92) 100%);
  box-shadow: 0 12px 28px rgba(36, 40, 35, 0.07);
}

.teacher-board-add-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.teacher-board-add-head strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 760;
}

.teacher-board-add-head button,
.teacher-board-form-actions button {
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.teacher-board-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.teacher-board-form-grid label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
}

.teacher-board-form-grid input,
.teacher-board-form-grid select,
.teacher-board-form-grid textarea {
  width: 100%;
  min-height: 34px;
  box-sizing: border-box;
  border: 1px solid rgba(215, 221, 210, 0.96);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 13px;
}

.teacher-board-form-grid input,
.teacher-board-form-grid select {
  padding: 0 10px;
}

.teacher-board-form-grid textarea {
  min-height: 72px;
  padding: 10px;
  resize: vertical;
  line-height: 1.45;
}

.teacher-board-form-wide {
  grid-column: 1 / -1;
}

.teacher-board-form-error {
  margin: 0;
  color: #a34323;
  font-size: 12px;
  font-weight: 650;
}

.teacher-board-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.teacher-board-form-actions button[type="submit"] {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.teacher-board-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px;
}

.teacher-board-panel {
  display: grid;
  gap: 12px;
  min-height: 176px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 24px rgba(36, 40, 35, 0.05);
}

.teacher-board-panel-head {
  display: grid;
  gap: 4px;
}

.teacher-board-panel-head span {
  color: var(--primary);
  font-size: 11px;
  font-weight: 850;
}

.teacher-board-panel-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  letter-spacing: 0;
}

.teacher-board-empty {
  align-self: start;
  margin: 0;
  padding: 16px;
  border: 1px dashed rgba(184, 199, 187, 0.8);
  border-radius: 14px;
  background: rgba(251, 252, 250, 0.72);
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.teacher-board-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.teacher-board-item {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(207, 191, 153, 0.72);
  border-radius: 13px;
  background: rgba(255, 250, 235, 0.72);
}

.teacher-board-item strong {
  color: #6b542f;
  font-size: 11px;
  font-weight: 900;
}

.teacher-board-item span {
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

.teacher-board-item em {
  justify-self: start;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(196, 144, 63, 0.13);
  color: #745629;
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
}

.teacher-board-item button {
  justify-self: start;
  border: 1px solid rgba(148, 120, 82, 0.26);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: #7a5a35;
  font-size: 11px;
  font-weight: 650;
  line-height: 1;
  padding: 6px 9px;
  cursor: pointer;
}

.teacher-board-item button:hover {
  background: rgba(255, 247, 237, 0.92);
  border-color: rgba(180, 83, 9, 0.26);
}

.teacher-board-item p {
  margin: 0;
  color: #5f625b;
  font-size: 12px;
  font-weight: 560;
  line-height: 1.45;
}

.lesson-prep-view {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.lesson-prep-create {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(260px, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 14px;
  border: 1px solid rgba(215, 221, 210, 0.95);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 22px rgba(36, 40, 35, 0.05);
}

.lesson-prep-create label,
.lesson-prep-editor label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.lesson-prep-create input,
.lesson-prep-create textarea,
.lesson-prep-editor input,
.lesson-prep-editor textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(215, 221, 210, 0.96);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 13px;
}

.lesson-prep-create input,
.lesson-prep-editor input {
  min-height: 36px;
  padding: 0 10px;
}

.lesson-prep-create textarea,
.lesson-prep-editor textarea {
  min-height: 66px;
  padding: 10px;
  resize: vertical;
  line-height: 1.45;
}

.lesson-prep-create button,
.lesson-prep-editor-actions button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--primary);
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 780;
  cursor: pointer;
}

.lesson-prep-error {
  margin: -4px 0 0;
  color: #a34323;
  font-size: 12px;
  font-weight: 700;
}

.lesson-prep-workspace {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
  gap: 14px;
  align-items: start;
}

.lesson-prep-notes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}

.lesson-prep-note {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 14px;
  border: 1px solid rgba(185, 169, 121, 0.58);
  border-radius: 8px;
  background: linear-gradient(145deg, #fff9cf 0%, #fff3b0 58%, #f5df7f 100%);
  color: #4f4324;
  text-align: left;
  box-shadow: 0 10px 18px rgba(76, 66, 38, 0.1);
  cursor: pointer;
}

.lesson-prep-note.color-1 {
  border-color: rgba(126, 172, 151, 0.62);
  background: linear-gradient(145deg, #f0fbf3 0%, #dff5e6 58%, #c6e8d1 100%);
  color: #244d38;
}

.lesson-prep-note.color-2 {
  border-color: rgba(121, 151, 190, 0.58);
  background: linear-gradient(145deg, #f2f7ff 0%, #e4efff 58%, #cbdcf6 100%);
  color: #263f63;
}

.lesson-prep-note.color-3 {
  border-color: rgba(188, 145, 158, 0.56);
  background: linear-gradient(145deg, #fff3f6 0%, #ffe2ea 58%, #f4c7d3 100%);
  color: #633244;
}

.lesson-prep-note.selected {
  border-color: var(--primary);
  box-shadow:
    0 12px 20px rgba(36, 40, 35, 0.12),
    0 0 0 2px rgba(47, 143, 115, 0.22);
}

.lesson-prep-note strong {
  font-size: 15px;
  font-weight: 900;
  line-height: 1.25;
}

.lesson-prep-note span {
  display: -webkit-box;
  overflow: hidden;
  color: inherit;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.lesson-prep-editor {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 24px rgba(36, 40, 35, 0.05);
}

.lesson-prep-editor textarea {
  min-height: 220px;
}

.lesson-prep-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.lesson-prep-editor-actions button:first-child {
  border-color: rgba(164, 67, 35, 0.25);
  background: #fff;
  color: #9b3d24;
}

.lesson-prep-empty {
  margin: 0;
  padding: 16px;
  border: 1px dashed rgba(184, 199, 187, 0.8);
  border-radius: 8px;
  background: rgba(251, 252, 250, 0.72);
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

@media (max-width: 760px) {
  .teacher-board-grid {
    grid-template-columns: 1fr;
  }

  .teacher-board-form-grid {
    grid-template-columns: 1fr;
  }

  .lesson-prep-create,
  .lesson-prep-workspace {
    grid-template-columns: 1fr;
  }
}

.unit-card.selected {
  border-color: #2f8f73;
  background: linear-gradient(145deg, #ffffff 0%, #ebfaf3 100%);
  box-shadow:
    0 14px 28px rgba(36, 40, 35, 0.1),
    0 0 0 2px rgba(47, 143, 115, 0.24),
    0 0 22px rgba(47, 143, 115, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.82);
}

.unit-card.selected:hover {
  border-color: #25765f;
  box-shadow:
    0 15px 30px rgba(36, 40, 35, 0.11),
    0 0 0 2px rgba(47, 143, 115, 0.3),
    0 0 24px rgba(47, 143, 115, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.86);
}

.add-unit-wrap {
  min-height: 94px;
}

.add-unit-card {
  border-style: dashed;
  background: rgba(255, 255, 255, 0.44);
  color: var(--muted);
  opacity: 0.42;
  box-shadow: none;
}

.unit-grade-section:hover .add-unit-card,
.add-unit-card:focus-visible {
  opacity: 0.62;
}

.add-unit-card:hover,
.add-unit-card:focus-visible {
  border-color: #bfd0c2;
  background: rgba(255, 255, 255, 0.86);
  color: var(--primary-strong);
  opacity: 0.96;
  box-shadow: 0 10px 22px rgba(36, 40, 35, 0.07);
}

.unit-special-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
}

.unit-special-add {
  min-height: 28px;
  padding: 0 10px;
  border: 1px dashed #cbd8ca;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0;
  cursor: pointer;
  opacity: 0.72;
  transition: opacity 140ms ease, border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.unit-special-add:hover,
.unit-special-add:focus-visible {
  border-color: #9fc8b5;
  background: rgba(255, 255, 255, 0.9);
  color: var(--primary-strong);
  opacity: 1;
  outline: none;
}

.unit-card strong {
  color: var(--primary-strong);
  font-size: 19px;
  letter-spacing: 0;
}

.unit-card span {
  color: var(--text);
  font-size: 13px;
  font-weight: 780;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.unit-card-badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px;
}

.unit-card em {
  justify-self: start;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(47, 111, 94, 0.09);
  color: var(--primary-strong);
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
}

.unit-card-badges .student-alert-badge {
  min-height: 0;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.unit-card-badges .student-alert-badge.urgent {
  border-color: #e1aaa3;
  background: #fde7e4;
  color: #a93b33;
}

.unit-card-badges .student-alert-badge.caution {
  border-color: #e5cf8f;
  background: #fff4c7;
  color: #7d6116;
}

.unit-card.empty span {
  color: var(--muted);
  font-weight: 650;
}

.unit-card-editor {
  display: grid;
  position: relative;
  z-index: 12;
  width: min(520px, calc(100vw - 360px));
  min-width: 340px;
  max-height: min(72vh, 720px);
  gap: 10px;
  margin-top: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 14px 30px rgba(36, 40, 35, 0.1);
  overflow-y: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.unit-card-editor::-webkit-scrollbar {
  display: none;
  width: 0;
}

.unit-card-editor input,
.unit-card-editor textarea {
  width: 100%;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid #cbd8ca;
  border-radius: 12px;
  background: #fff;
}

.unit-card-editor .unit-title-input {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.45);
  color: var(--text);
  font-size: 20px;
  font-weight: 750;
  letter-spacing: 0;
  text-align: center;
}

.unit-card-editor .unit-title-input:focus {
  border-color: #cbd8ca;
  background: #fff;
  outline: none;
}

.unit-card-editor textarea {
  min-height: 136px;
  resize: vertical;
  line-height: 1.55;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.unit-card-editor textarea::-webkit-scrollbar {
  display: none;
  width: 0;
}

.unit-lesson-notes {
  display: grid;
  gap: 9px;
  padding-top: 2px;
}

.unit-lesson-notes > strong {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.unit-lesson-notes > p {
  margin: 0;
  padding: 12px;
  border: 1px dashed #d6ded2;
  border-radius: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.unit-lesson-note {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #e0e6db;
  border-radius: 14px;
  background: #fbfdf9;
}

.unit-lesson-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.unit-lesson-alerts {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.unit-lesson-alerts .student-alert-toggle {
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
}

.unit-lesson-nav {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-left: auto;
}

.unit-lesson-note h4 {
  margin: 0;
  min-width: 54px;
  font-size: 15px;
  letter-spacing: 0;
  text-align: center;
}

.unit-lesson-note h4 span {
  color: var(--primary-strong);
  font-weight: 900;
}

.unit-note-arrow {
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--primary-strong);
}

.unit-note-arrow svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.3;
}

.unit-note-arrow:disabled {
  opacity: 0.32;
  cursor: default;
}

.unit-note-arrow:not(:disabled):hover {
  border-color: #bfd0c2;
  background: var(--primary-soft);
}

.unit-lesson-note label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.unit-card-editor .unit-lesson-note textarea {
  min-height: 76px;
  padding: 9px 10px;
  font-size: 12px;
}

.unit-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.unit-editor-actions .button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.unit-delete-button {
  border-color: transparent;
  background: transparent;
}

.unit-delete-button:hover:not(:disabled) {
  border-color: #ebbbb4;
  background: var(--danger-soft);
}

.unit-delete-button:disabled {
  opacity: 0.34;
  cursor: default;
}

.calendar-scroll {
  overflow-x: auto;
  padding: 16px;
}

.timetable-scroll {
  overflow-x: auto;
  padding: 16px;
}

.weekly-timetable {
  display: grid;
  grid-template-columns: 72px repeat(5, minmax(132px, 1fr)) repeat(2, minmax(66px, 0.5fr));
  min-width: 940px;
  border-top: 1px solid var(--grid-line);
  border-left: 1px solid var(--grid-line);
  border-radius: 18px;
  background: var(--grid-line);
  box-shadow:
    0 1px 1px rgba(36, 40, 35, 0.04),
    0 18px 42px rgba(36, 40, 35, 0.07);
}

.timetable-corner,
.timetable-day-header,
.period-label,
.timetable-cell {
  border-right: 1px solid var(--grid-line);
  border-bottom: 1px solid var(--grid-line);
  background: var(--surface);
}

.timetable-corner,
.timetable-day-header,
.period-label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 8px;
  font-weight: 700;
}

.timetable-corner,
.period-label {
  background: linear-gradient(145deg, #f9faf7 0%, #eef3eb 100%);
  color: var(--muted);
  font-size: 13px;
}

.timetable-day-header {
  display: grid;
  gap: 3px;
  align-content: center;
  appearance: none;
  border-top: 0;
  border-left: 0;
  color: inherit;
  cursor: pointer;
  text-align: center;
  user-select: none;
  background: linear-gradient(180deg, #ffffff 0%, #f7f9f6 100%);
}

.timetable-day-header.weekend {
  background: linear-gradient(180deg, #fffdfd 0%, var(--weekend-soft) 100%);
  color: var(--weekend);
}

.timetable-day-header:hover {
  background: var(--primary-soft);
}

.timetable-day-header.selected {
  box-shadow: inset 0 0 0 2px #9cc7b7;
}

.timetable-day-header.today {
  background: linear-gradient(180deg, #fffdf7 0%, #fff3d7 100%);
}

.timetable-day-header strong {
  font-size: 16px;
  font-weight: 700;
}

.timetable-day-header span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.timetable-day-header.weekend span,
.timetable-day-header.weekend strong {
  color: var(--weekend);
}

.timetable-day-header em {
  color: var(--danger);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.period-label {
  min-height: 146px;
}

.timetable-corner,
.period-label,
.mini-month h2,
.mini-weekdays,
.lesson-card {
  cursor: default;
  user-select: none;
}

.timetable-cell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 146px;
  background: var(--lane-empty-bg);
  overflow: visible;
}

.weekend-simple-cell {
  grid-template-columns: minmax(0, 1fr);
  background: var(--weekend-soft);
}

.add-lesson-button {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd8ca;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--primary-strong);
  font-size: 16px;
  font-weight: 850;
  line-height: 1;
  opacity: 0;
  pointer-events: auto;
  transform: translate(-50%, -50%);
  transition: opacity 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.teacher-lane:hover .add-lesson-button,
.teacher-lane:focus-within .add-lesson-button,
.teacher-lane.adding .add-lesson-button {
  opacity: 1;
}

.add-lesson-button:hover {
  background: var(--primary-gradient);
  color: #fff;
  box-shadow: 0 6px 16px rgba(36, 40, 35, 0.14);
}

.teacher-lane {
  position: relative;
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  padding: 8px;
  background: var(--lane-empty-bg);
  overflow: visible;
  transition: background 140ms ease, box-shadow 140ms ease;
}

.timetable-shell.dragging-lesson .teacher-lane.drop-blocked {
  cursor: not-allowed;
}

.timetable-shell.dragging-lesson .teacher-lane.drop-ready {
  box-shadow: inset 0 0 0 1px rgba(47, 111, 94, 0.11);
}

.timetable-shell.dragging-lesson .teacher-lane.drop-over {
  background: var(--lane-drag-over-bg);
  box-shadow: inset 0 0 0 2px var(--lane-drag-over-line);
}

.add-lesson-popover {
  position: absolute;
  top: calc(50% + 18px);
  left: 50%;
  z-index: 5;
  display: grid;
  width: 210px;
  gap: 7px;
  padding: 10px;
  border: 1px solid #cbd8ca;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 12px 28px rgba(36, 40, 35, 0.14);
  transform: translateX(-50%);
}

.add-lesson-popover label {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.add-lesson-popover select,
.add-lesson-popover input,
.add-lesson-popover textarea {
  width: 100%;
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
}

.add-lesson-popover textarea {
  min-height: 62px;
  padding: 7px 8px;
  resize: vertical;
  line-height: 1.4;
}

.add-lesson-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.add-lesson-actions button {
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
}

.add-lesson-actions button[type="submit"] {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.teacher-lane + .teacher-lane {
  border-left: 1px dashed var(--grid-line);
}

/* 빈 시간표 lane은 항상 거의 흰색에 가깝게 유지한다.
   교사별 색상은 수업 아일랜드에서만 강하게 표현한다.
   drop target 강조는 드래그 중 실제 hover lane에만 적용한다. */
.teacher-lane-blue {
  background: var(--lane-empty-hjeon-bg);
}

.teacher-lane-green {
  background: var(--lane-empty-ngreen-bg);
}

.week-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(154px, 1fr));
  min-width: 1120px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: var(--line);
}

.calendar-day {
  min-height: 420px;
  padding: 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.calendar-day.weekend {
  background: #f7f8f5;
}

.calendar-day.today {
  box-shadow: inset 0 0 0 2px #d7a24d;
}

.day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  margin-bottom: 10px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}

.weekday-label {
  color: var(--text);
  font-size: 16px;
  font-weight: 850;
}

.date-label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.today-badge,
.day-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-bottom: 8px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.today-badge {
  border: 1px solid #e1bd76;
  background: linear-gradient(180deg, #fffdf5 0%, #fff0c9 100%);
  color: #845a17;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 3px 8px rgba(132, 90, 23, 0.08);
}

.day-badge {
  width: 100%;
  border: 1px solid #e5c9c2;
  background: linear-gradient(180deg, #fff8f6 0%, var(--danger-soft) 100%);
  color: var(--danger);
}

.lesson-stack {
  display: grid;
  gap: 8px;
  align-content: start;
}

.no-lessons {
  margin: 10px 0 0;
  color: #8a9284;
  font-size: 13px;
  font-weight: 650;
}

.lesson-card {
  position: relative;
  display: block;
  min-height: 126px;
  min-width: 0;
  padding: 0 0 24px;
  color: var(--text);
  cursor: grab;
  overflow: visible;
  box-sizing: border-box;
}

.lesson-card-body {
  position: relative;
  display: grid;
  gap: 5px;
  min-width: 0;
  min-height: 102px;
  padding: 10px 7px 10px 8px;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.34) 38%, rgba(255, 255, 255, 0) 100%),
    linear-gradient(145deg, #ffffff 0%, #f9fbf8 54%, #eef4ee 100%);
  box-sizing: border-box;
  overflow: visible;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(36, 40, 35, 0.026),
    0 1px 2px rgba(36, 40, 35, 0.055),
    0 12px 24px rgba(36, 40, 35, 0.085);
  transition: box-shadow 120ms ease, transform 120ms ease;
}

.lesson-card.drag-primed,
.lesson-card.dragging,
.lesson-card.is-dragging {
  z-index: 100;
  cursor: grabbing;
  opacity: 0.96;
}

.lesson-card [data-no-drag="true"] {
  cursor: pointer;
}

.lesson-card:hover .lesson-card-body,
.lesson-card:focus-within .lesson-card-body {
  transform: translateY(-2px) scale(1.01);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    inset 0 -1px 0 rgba(36, 40, 35, 0.03),
    0 3px 7px rgba(36, 40, 35, 0.1),
    0 16px 30px rgba(36, 40, 35, 0.13);
}

.lesson-card.teacher-blue .lesson-card-body {
  border-color: var(--lesson-hjeon-line);
  border-left-color: var(--lesson-hjeon-accent);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.34) 40%, rgba(255, 255, 255, 0) 100%),
    linear-gradient(145deg, #ffffff 0%, #f8f7ff 48%, var(--lesson-hjeon-soft) 70%, #f0eeff 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(67, 56, 202, 0.022),
    0 1px 2px rgba(36, 40, 35, 0.052),
    0 12px 24px rgba(36, 40, 35, 0.072);
}

.lesson-card.teacher-green .lesson-card-body {
  border-color: var(--lesson-ngreen-line);
  border-left-color: var(--lesson-ngreen-accent);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.34) 40%, rgba(255, 255, 255, 0) 100%),
    linear-gradient(145deg, #ffffff 0%, #f8fcf5 48%, var(--lesson-ngreen-soft) 70%, #edf7e7 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(77, 154, 53, 0.022),
    0 1px 2px rgba(36, 40, 35, 0.05),
    0 12px 24px rgba(36, 40, 35, 0.068);
}

.lesson-card.lesson-weekend .lesson-card-body {
  border-color: var(--lesson-weekend-line);
  border-left-color: var(--lesson-weekend-accent);
  background: linear-gradient(145deg, #fffdfd 0%, var(--lesson-weekend-soft) 52%, #f9dfe2 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 1px 2px rgba(198, 91, 99, 0.08),
    0 8px 18px rgba(198, 91, 99, 0.11);
}

.lesson-card.lesson-weekend .lesson-teacher {
  color: #8e595d;
}

.lesson-card.lesson-makeup .lesson-card-body,
.lesson-card.lesson-moved .lesson-card-body {
  border-color: #e8c893;
  border-left-color: var(--accent);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88) 0%, rgba(255, 255, 255, 0) 54%),
    linear-gradient(145deg, #fffdf9 0%, #fff6e8 58%, #f6e1bf 100%);
}

.lesson-card.teacher-blue:hover .lesson-card-body,
.lesson-card.teacher-blue:focus-within .lesson-card-body {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    inset 0 -1px 0 rgba(67, 56, 202, 0.026),
    0 3px 7px rgba(36, 40, 35, 0.09),
    0 16px 30px rgba(36, 40, 35, 0.12);
}

.lesson-card.teacher-green:hover .lesson-card-body,
.lesson-card.teacher-green:focus-within .lesson-card-body {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    inset 0 -1px 0 rgba(77, 154, 53, 0.026),
    0 3px 7px rgba(36, 40, 35, 0.088),
    0 16px 30px rgba(36, 40, 35, 0.115);
}

.lesson-card.drag-primed .lesson-card-body,
.lesson-card.drag-primed:hover .lesson-card-body,
.lesson-card.dragging .lesson-card-body,
.lesson-card.dragging:hover .lesson-card-body,
.lesson-card.dragging:focus-within .lesson-card-body,
.lesson-card.is-dragging .lesson-card-body,
.lesson-card.is-dragging:hover .lesson-card-body,
.lesson-card.is-dragging:focus-within .lesson-card-body {
  transform:
    translate3d(
      var(--drag-offset-x, 0px),
      calc(-7px + var(--drag-offset-y, 0px)),
      0
    )
    scale(1.04)
    rotate(var(--drag-rotate, 0deg));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    inset 0 -1px 0 rgba(36, 40, 35, 0.04),
    0 8px 16px rgba(36, 40, 35, 0.14),
    0 24px 44px rgba(36, 40, 35, 0.2);
  transition-duration: 80ms;
}

.lesson-card.lesson-cancelled {
  opacity: 0.62;
  text-decoration: line-through;
}

.lesson-island-main {
  position: relative;
  z-index: 3;
  display: grid;
  gap: 3px;
  min-width: 0;
  padding-right: 0;
  box-sizing: border-box;
  overflow: visible;
  pointer-events: none;
}

.lesson-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
}

.lesson-card-topline strong {
  font-size: 14px;
}

.lesson-card-topline span {
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(184, 100, 58, 0.12);
  color: var(--accent);
  font-size: 11px;
  font-weight: 850;
}

.lesson-class {
  font-size: 16px;
  font-weight: 750;
  line-height: 1.12;
}

.lesson-class-link {
  position: relative;
  z-index: 5;
  justify-self: start;
  width: max-content;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  letter-spacing: 0;
  white-space: nowrap;
  pointer-events: auto;
}

.lesson-class-link:hover {
  color: #1f4f43;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.lesson-assessment-pill {
  position: absolute;
  top: -3px;
  right: -4px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 31px;
  height: 21px;
  padding: 0 6px;
  border: 2px solid rgba(154, 50, 46, 0.66);
  border-radius: 4px;
  background:
    radial-gradient(circle at 24% 28%, rgba(255, 255, 255, 0.38) 0 1px, transparent 1.6px),
    radial-gradient(circle at 78% 68%, rgba(255, 255, 255, 0.28) 0 1px, transparent 1.7px),
    rgba(255, 247, 244, 0.22);
  color: rgba(154, 50, 46, 0.66);
  font-size: 10.5px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0;
  pointer-events: none;
  transform: rotate(-8deg);
  box-shadow:
    inset 0 0 0 1px rgba(154, 50, 46, 0.18),
    0 1px 0 rgba(128, 20, 20, 0.12);
  mix-blend-mode: multiply;
  opacity: 0.98;
  text-shadow: 0.25px 0 rgba(154, 50, 46, 0.16);
}

.lesson-assessment-pill::before,
.lesson-assessment-pill::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 2px;
  pointer-events: none;
}

.lesson-assessment-pill::before {
  display: none;
}

.lesson-assessment-pill::after {
  background:
    radial-gradient(circle at 20% 40%, rgba(154, 50, 46, 0.12) 0 1px, transparent 1.5px),
    radial-gradient(circle at 74% 58%, rgba(154, 50, 46, 0.1) 0 1px, transparent 1.5px);
  opacity: 0.62;
}

.lesson-teacher,
.lesson-display {
  font-size: 12px;
  font-weight: 650;
  line-height: 1.22;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.lesson-teacher {
  color: var(--muted);
}

.lesson-display {
  color: #1f312a;
  font-size: 14.4px;
  line-height: 1.15;
  white-space: normal;
}

.lesson-unit-link {
  position: relative;
  z-index: 5;
  display: inline;
  min-height: 0;
  padding: 1px 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: inherit;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  text-align: left;
  cursor: pointer;
  pointer-events: auto;
}

.lesson-unit-link:hover,
.lesson-unit-link:focus-visible {
  color: #1f6f58;
  text-decoration: underline;
  text-underline-offset: 2px;
  outline: none;
}

.lesson-status-chip {
  width: max-content;
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(184, 100, 58, 0.12);
  color: var(--accent);
  font-size: 11px;
  font-weight: 850;
}

.lesson-actions {
  position: absolute;
  bottom: 4px;
  left: 0;
  right: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #8a9284;
  font-size: 11px;
  font-weight: 850;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease;
}

.lesson-card:hover .lesson-actions,
.lesson-card:focus-within .lesson-actions,
.lesson-actions:hover {
  opacity: 1;
  pointer-events: auto;
}

.lesson-actions button {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #68736a;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
}

.lesson-actions button:hover {
  background: transparent;
  color: var(--primary-strong);
  text-decoration: underline;
}

.lesson-actions .danger-action,
.memo-popover-actions .danger-action {
  color: var(--danger);
}

.lesson-actions .danger-action:hover {
  color: #8f2727;
}

.memo-button {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 3;
  min-height: 20px;
  padding: 0 5px;
  border: 1px solid #cbd8ca;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease, color 140ms ease, background 140ms ease;
}

.lesson-card:hover .memo-button,
.lesson-card:focus-within .memo-button,
.memo-button:hover {
  opacity: 1;
  pointer-events: auto;
}

.memo-button:hover,
.memo-button.has-note {
  border-color: #9cc7b7;
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.memo-button.has-note {
  opacity: 1;
  pointer-events: auto;
}

.floating-popover {
  position: fixed;
  z-index: 3000;
  overflow: visible;
  pointer-events: auto;
}

.memo-popover {
  display: grid;
  width: 300px;
  max-width: calc(100vw - 24px);
  gap: 11px;
  padding: 13px;
  border: 1px solid #cbd8ca;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 44px rgba(36, 40, 35, 0.2);
}

.edit-popover {
  display: grid;
  width: 280px;
  max-width: calc(100vw - 24px);
  gap: 11px;
  padding: 13px;
  border: 1px solid #cbd8ca;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 44px rgba(36, 40, 35, 0.2);
}

.unit-info-popover {
  display: grid;
  width: 300px;
  max-width: calc(100vw - 24px);
  gap: 10px;
  padding: 13px;
  border: 1px solid #bfd8cd;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 44px rgba(36, 40, 35, 0.2);
}

.unit-info-popover-body {
  display: grid;
  gap: 9px;
}

.unit-info-popover-code {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.unit-info-title-text,
.unit-info-memo-text {
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  letter-spacing: 0;
  cursor: text;
}

.unit-info-title-text {
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.35;
}

.unit-info-empty {
  padding: 10px;
  border: 1px dashed #d4dfd7;
  border-radius: 10px;
  background: rgba(247, 250, 247, 0.92);
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-align: center;
}

.unit-info-memo-text {
  color: #46524a;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.5;
  white-space: pre-wrap;
}

.unit-info-title-input,
.unit-info-memo-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #bfd8cd;
  border-radius: 9px;
  background: #fff;
  color: var(--text);
}

.unit-info-title-input {
  min-height: 34px;
  padding: 0 9px;
  font-size: 14px;
  font-weight: 850;
}

.unit-info-memo-input {
  min-height: 92px;
  resize: vertical;
  padding: 9px;
  font-size: 12px;
  line-height: 1.5;
}

.unit-info-lesson-note {
  display: grid;
  gap: 8px;
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px solid #e2ebe4;
}

.unit-info-lesson-note-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #2f4c40;
  font-size: 12px;
  font-weight: 900;
}

.unit-info-lesson-note-header strong {
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
}

.unit-info-note-block {
  display: grid;
  gap: 3px;
}

.unit-info-note-block span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.unit-info-note-text {
  max-height: 72px;
  width: 100%;
  min-height: 78px;
  box-sizing: border-box;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: rgba(247, 250, 247, 0.42);
  margin: 0;
  overflow: auto;
  color: #36473d;
  font-size: 12.1px;
  font-weight: 650;
  line-height: 1.45;
  letter-spacing: 0;
  text-align: left;
  white-space: pre-wrap;
  word-break: keep-all;
  overflow-wrap: break-word;
  cursor: text;
}

.unit-info-evaluation-island {
  display: grid;
  gap: 5px;
  padding: 10px 11px;
  border: 1px solid rgba(190, 78, 73, 0.26);
  border-radius: 11px;
  background: linear-gradient(180deg, rgba(255, 249, 246, 0.98) 0%, rgba(255, 239, 235, 0.92) 100%);
  color: #7b2f2a;
}

.unit-info-evaluation-island span {
  color: #a34f47;
  font-size: 10.5px;
  font-weight: 800;
}

.unit-info-evaluation-island strong {
  color: #6f2724;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.3;
}

.unit-info-class-note {
  display: grid;
  gap: 7px;
  padding: 10px 11px 11px;
  border: 1px solid rgba(199, 178, 127, 0.44);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 253, 245, 0.98) 0%, rgba(255, 248, 225, 0.94) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 5px 12px rgba(113, 94, 52, 0.07);
}

.unit-info-class-note-head {
  display: grid;
  gap: 2px;
}

.unit-info-class-note-head strong {
  color: #635436;
  font-size: 11.5px;
  font-weight: 780;
  line-height: 1.25;
}

.unit-info-class-note-head span {
  color: rgba(91, 80, 55, 0.66);
  font-size: 10.5px;
  font-weight: 560;
  line-height: 1.35;
}

.unit-info-class-note textarea {
  min-height: 82px;
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  padding: 8px 9px;
  border: 1px solid rgba(188, 168, 119, 0.42);
  border-radius: 9px;
  background: rgba(255, 255, 252, 0.72);
  color: #3f3a2f;
  font-size: 12px;
  font-weight: 560;
  line-height: 1.5;
}

.unit-info-class-note textarea::placeholder {
  color: rgba(101, 90, 64, 0.48);
}

.unit-info-class-note textarea:focus {
  outline: none;
  border-color: rgba(155, 129, 73, 0.54);
  background: rgba(255, 255, 253, 0.94);
  box-shadow: 0 0 0 3px rgba(181, 146, 64, 0.09);
}

.unit-info-note-input {
  width: 100%;
  min-height: 78px;
  box-sizing: border-box;
  resize: vertical;
  padding: 8px;
  border: 1px solid rgba(191, 216, 205, 0.72);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.92);
  color: #36473d;
  font-size: 12.1px;
  font-weight: 650;
  line-height: 1.45;
  letter-spacing: 0;
  white-space: pre-wrap;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.unit-info-note-input:focus {
  outline: none;
  border-color: rgba(75, 116, 96, 0.42);
  box-shadow: 0 0 0 3px rgba(47, 111, 94, 0.075);
}

.unit-info-note-text::-webkit-scrollbar,
.unit-info-note-input::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.unit-info-note-text,
.unit-info-note-input {
  scrollbar-width: none;
}

.edit-popover-form {
  display: grid;
  gap: 11px;
}

.memo-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.edit-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.memo-popover-header strong,
.edit-popover-header strong {
  font-size: 13px;
}

.memo-close {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.memo-popover textarea {
  width: 100%;
  min-height: 88px;
  resize: vertical;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
}

.edit-popover label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.edit-popover select,
.edit-popover input {
  width: 100%;
  min-height: 32px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
}

.edit-popover input {
  min-height: 34px;
}

.memo-popover-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.edit-popover-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.memo-save-status {
  min-width: 42px;
  margin-right: auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.memo-popover-actions button {
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
}

.edit-popover-actions button {
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
}

.memo-popover-actions .primary-action,
.edit-popover-actions .primary-action {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.unplaced-events {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  padding: 0 16px 16px;
}

.output-panel {
  padding-bottom: 18px;
}

.output-panel p {
  margin: 18px;
  color: var(--muted);
}

.future-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 12px;
  padding: 0 18px 18px;
}

.future-item {
  min-height: 62px;
  display: flex;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  font-weight: 750;
}

.empty-state {
  margin: 0;
  padding: 24px;
  color: var(--muted);
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: min(420px, calc(100vw - 40px));
  padding: 13px 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: var(--dark-gradient);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 14px 34px rgba(24, 31, 28, 0.24);
  font-weight: 750;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .view-slider,
  .view-pane {
    transition: none;
  }
}

@media (max-width: 1100px) {
  .metric-grid,
  .dashboard-tool-summary {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }

  .two-column,
  .text-preservation,
  .future-grid,
  .class-workspace {
    grid-template-columns: 1fr;
  }

  .class-grade-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inline-form {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .mini-calendar-panel {
    max-height: none;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 12px;
  }

  .mini-month-stack {
    grid-template-columns: repeat(4, 260px);
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  main {
    padding: 20px 14px 34px;
  }

  .action-band,
  .calendar-toolbar {
    align-items: stretch;
  }

  .class-utility-row,
  .calendar-toolbar {
    display: grid;
  }

  .student-search {
    width: 180px;
    min-width: 0;
    justify-self: end;
  }

  .student-search-results {
    right: 0;
    width: min(230px, calc(100vw - 40px));
  }

  .class-grade-grid {
    grid-template-columns: 1fr;
  }

  .metric-grid,
  .dashboard-tool-summary,
  .inline-form,
  .student-add-form {
    grid-template-columns: 1fr;
  }

  .action-band .button,
  .inline-form .button {
    width: 100%;
  }
}
