:root {
  --bg: #f5f8fc;
  --card: #ffffff;
  --line: #dde6f2;
  --ink: #1d2733;
  --sub: #5e6c81;
  --primary: #0b6ed0;
  --primary-ghost: #e7f1fd;
  --qt: #8a5a00;
  --attitude: #4b5f12;
  --note: #1d5f12;
}

body[data-app-mode="student"] {
  --primary: #0a7a58;
  --primary-ghost: #e6f6f1;
}

body[data-app-mode="student"] .app-shell {
  padding: 12px 10px 20px;
}

body[data-app-mode="student"] .student-banner {
  margin-top: 2px;
}

body[data-app-mode="student"] .student-banner-frame,
body[data-app-mode="student"] .student-banner-image {
  min-height: 112px;
  border-radius: 16px;
}

body[data-app-mode="student"] .panel {
  margin-top: 8px;
  padding: 10px;
  border-radius: 12px;
}

body[data-app-mode="student"] .simple-panel {
  padding: 14px 12px 12px;
  border-radius: 14px;
}

body[data-app-mode="student"] .simple-panel-plain {
  padding-top: 10px;
}

body[data-app-mode="student"] .simple-list {
  margin-top: 8px;
}

body[data-app-mode="student"] .simple-field input {
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
}

body[data-app-mode="student"] .simple-choice {
  padding: 10px 12px;
  border-radius: 12px;
}

body[data-app-mode="student"] .simple-choice .item-title,
body[data-app-mode="student"] .compact-head .item-title {
  font-size: 14px;
}

body[data-app-mode="student"] .simple-meta,
body[data-app-mode="student"] .compact-head .item-sub,
body[data-app-mode="student"] .legend {
  font-size: 11px;
}

body[data-app-mode="student"] button {
  min-height: 38px;
  padding: 8px 10px;
}

body[data-app-mode="student"] .icon-btn {
  width: 30px;
  height: 30px;
  min-width: 30px;
  min-height: 30px;
  font-size: 16px;
}

body[data-app-mode="student"] .summary {
  gap: 6px;
  margin-top: 6px;
}

body[data-app-mode="student"] .summary .box {
  padding: 7px 6px;
}

body[data-app-mode="student"] .summary .label {
  font-size: 11px;
}

body[data-app-mode="student"] .summary .value {
  margin-top: 2px;
  font-size: 16px;
}

body[data-app-mode="student"] .calendar-nav {
  margin-top: 8px;
  gap: 6px;
  padding: 5px;
  border-radius: 10px;
}

body[data-app-mode="student"] .calendar-title {
  font-size: 14px;
}

body[data-app-mode="student"] .calendar-nav button {
  min-width: 60px;
  min-height: 34px;
  padding: 7px 8px;
  font-size: 12px;
}

body[data-app-mode="student"] .weekday {
  font-size: 11px;
  padding: 6px 2px;
}

body[data-app-mode="student"] .day-cell {
  min-height: 76px;
  padding: 5px;
}

body[data-app-mode="student"] .day-num {
  font-size: 11px;
}

body[data-app-mode="student"] .day-icons,
body[data-app-mode="student"] .day-marker {
  font-size: 13px;
}

body[data-app-mode="teacher"] {
  --primary: #0b6ed0;
  --primary-ghost: #e7f1fd;
}

body[data-app-mode="teacher"] .app-shell {
  padding: 12px 10px 20px;
}

body[data-app-mode="teacher"] .panel {
  margin-top: 8px;
  padding: 10px;
  border-radius: 12px;
}

body[data-app-mode="teacher"] .simple-panel {
  padding: 14px 12px 12px;
  border-radius: 14px;
}

body[data-app-mode="teacher"] .simple-title {
  font-size: 21px;
}

body[data-app-mode="teacher"] .simple-copy {
  font-size: 13px;
  line-height: 1.4;
}

body[data-app-mode="teacher"] label {
  gap: 3px;
  font-size: 12px;
}

body[data-app-mode="teacher"] input[type="text"],
body[data-app-mode="teacher"] input[type="password"],
body[data-app-mode="teacher"] input[type="number"],
body[data-app-mode="teacher"] select {
  border-radius: 9px;
  padding: 8px 9px;
}

body[data-app-mode="teacher"] button {
  min-height: 38px;
  padding: 8px 10px;
}

body[data-app-mode="teacher"] .meeting-note-help-trigger {
  min-height: 22px;
  padding: 0;
}

body[data-app-mode="teacher"] .icon-btn {
  width: 30px;
  height: 30px;
  min-width: 30px;
  min-height: 30px;
  font-size: 16px;
}

body[data-app-mode="teacher"] .item-title,
body[data-app-mode="teacher"] .compact-head .item-title {
  font-size: 14px;
}

body[data-app-mode="teacher"] .item-sub,
body[data-app-mode="teacher"] .compact-head .item-sub,
body[data-app-mode="teacher"] .legend {
  font-size: 11px;
}

body[data-app-mode="teacher"] .row {
  gap: 6px;
}

body[data-app-mode="teacher"] .teacher-student-hero-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

body[data-app-mode="teacher"] .teacher-student-hero-head .simple-title {
  margin: 0;
}

body[data-app-mode="teacher"] .teacher-toolbar-actions {
  margin-left: auto;
  position: relative;
}

body[data-app-mode="teacher"] .teacher-menu-trigger {
  border: 1px solid #cfd9e5;
  background: #f6f9fc;
  color: #27425e;
}

body[data-app-mode="teacher"] .teacher-menu-icon {
  font-size: 17px;
  line-height: 1;
}

body[data-app-mode="teacher"] .teacher-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 148px;
  padding: 6px;
  border: 1px solid #d8e0ea;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 12px 28px #16324a14;
  display: grid;
  gap: 4px;
  z-index: 20;
}

body[data-app-mode="teacher"] .teacher-menu-item {
  width: 100%;
  justify-content: flex-start;
  border-radius: 10px;
}

body[data-app-mode="teacher"] .teacher-toolbar-logout {
  background: #eef3f8;
  border-color: #c9d5e3;
  color: #27425e;
}

body[data-app-mode="teacher"] .teacher-password-btn {
  background: #fff0d9;
  border-color: #f0be63;
  color: #8a5300;
}

body[data-app-mode="teacher"] .password-change-grid {
  display: grid;
  gap: 10px;
}

body[data-app-mode="teacher"] .password-change-actions {
  justify-content: flex-start;
  gap: 8px;
}

body[data-app-mode="teacher"] .password-change-actions button {
  flex: 1 1 0;
  min-width: 0;
}

body[data-app-mode="teacher"] .summary {
  gap: 6px;
  margin-top: 6px;
}

body[data-app-mode="teacher"] .summary .box {
  padding: 7px 6px;
}

body[data-app-mode="teacher"] .summary .label {
  font-size: 11px;
}

body[data-app-mode="teacher"] .summary .value {
  margin-top: 2px;
  font-size: 16px;
}

body[data-app-mode="teacher"] .calendar-nav {
  margin-top: 8px;
  gap: 6px;
  padding: 5px;
  border-radius: 10px;
}

body[data-app-mode="teacher"] .calendar-title {
  font-size: 14px;
}

body[data-app-mode="teacher"] .calendar-nav button {
  min-width: 60px;
  min-height: 34px;
  padding: 7px 8px;
  font-size: 12px;
}

body[data-app-mode="teacher"] .calendar-nav .today-cta {
  background: #1f5fbf;
  color: #fff;
}

body[data-app-mode="teacher"] .weekday {
  font-size: 11px;
  padding: 6px 2px;
}

body[data-app-mode="teacher"] .day-cell {
  min-height: 76px;
  padding: 5px;
}

body[data-app-mode="teacher"] .day-num,
body[data-app-mode="teacher"] .day-birthday {
  font-size: 11px;
}

body[data-app-mode="teacher"] .day-icons,
body[data-app-mode="teacher"] .day-marker {
  font-size: 13px;
}

body[data-app-mode="teacher"] .teacher-stats {
  margin-top: 5px;
  gap: 6px;
  font-size: 11px;
}

body[data-app-mode="teacher"] .badge {
  padding: 2px 6px;
}

body[data-app-mode="teacher"] .birthday-panel {
  margin-top: 8px;
  padding: 8px;
}

body[data-app-mode="teacher"] .birthday-title {
  font-size: 12px;
}

body[data-app-mode="teacher"] .birthday-item {
  padding: 7px 8px;
}

body[data-app-mode="teacher"] .birthday-name {
  font-size: 13px;
}

body[data-app-mode="teacher"] .check-panel {
  margin-top: 8px;
  padding: 8px;
  border-radius: 10px;
}

body[data-app-mode="teacher"] .check-title {
  font-size: 13px;
}

body[data-app-mode="teacher"] .switch-row,
body[data-app-mode="teacher"] .quick-row,
body[data-app-mode="teacher"] .save-row {
  margin-top: 6px;
  gap: 6px;
}

body[data-app-mode="teacher"] .quick-row button {
  min-height: 32px;
  font-size: 11px;
}

body[data-app-mode="teacher"] .switch-row label {
  font-size: 12px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Pretendard", "Apple SD Gothic Neo", sans-serif;
}

.app-shell {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 18px 12px 28px;
}

.app-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 2px 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.kicker {
  margin: 0;
  font-size: 12px;
  color: #3974b5;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1 {
  margin: 3px 0 0;
  font-size: 20px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 9px;
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  line-height: 1;
  background: var(--primary-ghost);
  color: #1557a3;
  font-size: 18px;
  font-weight: 700;
}

.hidden {
  display: none !important;
}

.notice {
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  border: 1px solid #f0c6bf;
  background: #fff2f0;
  color: #8a3225;
}

.loading {
  margin-top: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #cfe0f5;
  background: #f0f7ff;
  color: #2f5e95;
  font-size: 13px;
  font-weight: 700;
}

.student-banner {
  margin-top: 4px;
}

.student-banner-frame {
  position: relative;
  min-height: 132px;
  border: 1px solid #d9e5f3;
  border-radius: 20px;
  background:
    linear-gradient(135deg, #f4fbf7 0%, #edf6ff 48%, #fdfefe 100%);
  overflow: hidden;
}

.student-banner-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 132px;
  object-fit: cover;
}

.panel {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}

.simple-panel {
  padding: 18px 16px 16px;
  border-radius: 18px;
  box-shadow: 0 10px 30px #16324a0a;
}

.simple-panel-plain {
  padding-top: 14px;
}

.simple-hero {
  margin-bottom: 14px;
}

.simple-kicker {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
}

.simple-title {
  margin: 8px 0 0;
  font-size: 24px;
  line-height: 1.2;
}

.simple-copy {
  margin: 8px 0 0;
  color: var(--sub);
  font-size: 14px;
  line-height: 1.5;
}

.panel + .panel {
  margin-top: 10px;
}

.row {
  display: flex;
  gap: 8px;
  align-items: end;
  flex-wrap: wrap;
}

.auth-row {
  display: grid;
  gap: 10px;
}

.simple-auth-row {
  gap: 12px;
}

.auth-submit {
  margin-top: 10px;
  display: flex;
  justify-content: center;
}

.simple-auth-submit {
  margin-top: 14px;
}

.auth-submit button {
  min-width: 160px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}

input, button, select {
  font: inherit;
}

input[type="text"],
input[type="password"],
input[type="number"],
select {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: #fff;
}

.simple-field {
  gap: 6px;
}

.simple-field span {
  color: var(--sub);
  font-size: 12px;
  font-weight: 700;
}

.simple-field input {
  border-radius: 12px;
  padding: 12px 14px;
  background: #fbfcfe;
}

button {
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  min-height: 42px;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

button.ghost {
  background: var(--primary-ghost);
  color: #1e589d;
}

button.danger {
  background: #fdecec;
  border-color: #efb4b4;
  color: #b42318;
}

.list {
  display: grid;
  gap: 8px;
}

.item-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: #fff;
}

.simple-list {
  margin-top: 12px;
}

.simple-choice {
  padding: 14px 16px;
  border-radius: 14px;
  background: #fcfdff;
}

.simple-choice .item-head {
  align-items: center;
}

.simple-choice .item-title {
  font-size: 15px;
}

.simple-meta {
  color: var(--sub);
  font-size: 13px;
  font-weight: 600;
}

.auth-panel button {
  width: 100%;
  max-width: none;
}

button.item-card {
  width: 100%;
  text-align: left;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}

button.item-card:active {
  transform: scale(0.995);
}

.item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.item-title {
  font-size: 16px;
  font-weight: 700;
}

.item-sub {
  margin-top: 4px;
  color: var(--sub);
  font-size: 13px;
}

.empty-state {
  border: 1px dashed #c9d8ee;
  border-radius: 10px;
  background: #f5f9ff;
  color: #54729a;
  padding: 14px 10px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}

.summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.summary .box {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  text-align: center;
  background: #f9fcff;
}

.summary .total-box {
  grid-column: 1 / -1;
}

.summary .label {
  font-size: 12px;
  color: var(--sub);
}

.summary .value {
  margin-top: 3px;
  font-size: 18px;
  font-weight: 800;
}

.compact-head .item-title {
  font-size: 17px;
}

.compact-head .item-sub {
  margin-top: 2px;
  font-size: 12px;
}

.compact-head-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.compact-back-btn {
  flex: 0 0 auto;
}

.calendar-nav {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border: 1px solid #dbe7f6;
  border-radius: 12px;
  padding: 6px;
  background: #f7fbff;
}

.calendar-title {
  flex: 1;
  text-align: center;
  font-weight: 800;
}

.calendar-nav button {
  min-width: 72px;
  min-height: 38px;
  padding: 8px 10px;
}

.calendar-nav .today-cta {
  background: #0a8f6a;
  color: #fff;
}

.calendar {
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.weekday-row,
.day-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.weekday {
  text-align: center;
  font-size: 12px;
  padding: 8px 2px;
  background: #f3f8ff;
  border-bottom: 1px solid var(--line);
  color: #4f647f;
}

.day-cell {
  min-height: 92px;
  border-right: 1px solid #eef3fa;
  border-bottom: 1px solid #eef3fa;
  padding: 6px;
  background: #fff;
  text-align: left;
  vertical-align: top;
}

button.day-cell {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  border-radius: 0;
  border: 0;
  color: var(--ink);
  font-weight: 400;
}

.day-cell:nth-child(7n) {
  border-right: 0;
}

.day-num {
  font-size: 12px;
  color: #596a80;
}

.day-num-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.day-birthday {
  flex: 0 0 auto;
  font-size: 12px;
  line-height: 1;
}

.day-icons {
  margin-top: auto;
  padding-top: 6px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 2px;
  font-size: 14px;
  line-height: 1;
}

.day-icons-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 18px;
}

.day-icons-row.bottom {
  justify-content: space-between;
}

.day-icons-row.bottom.notes {
  justify-content: center;
  gap: 1px;
}

.day-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  min-height: 18px;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
}

.day-marker.birthday {
  color: inherit;
}

.day-marker.qt {
  color: inherit;
}

.day-marker.attitude {
  color: inherit;
}

.day-marker.note {
  color: inherit;
}

.day-cell.today {
  background: #eaf4ff;
}

.day-cell.selectable {
  cursor: pointer;
}

.day-cell.selected {
  outline: 2px solid #63a4eb;
  outline-offset: -2px;
}

.legend {
  margin-top: 8px;
  color: #5d6d82;
  font-size: 12px;
}

.birthday-panel {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: #fbfdff;
}

.birthday-title {
  font-size: 13px;
  font-weight: 800;
}

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

.birthday-item {
  border: 1px solid #e4edf7;
  border-radius: 10px;
  padding: 8px 10px;
  background: #ffffff;
}

.birthday-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.birthday-date {
  font-size: 12px;
  font-weight: 700;
  color: #4d6280;
}

.birthday-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 20px;
  border-radius: 999px;
  padding: 0 7px;
  font-size: 11px;
  font-weight: 700;
}

.birthday-type.teacher {
  background: #e8f0ff;
  color: #24509a;
}

.birthday-type.student {
  background: #eaf7f1;
  color: #1d6d50;
}

.birthday-name {
  margin-top: 5px;
  font-size: 14px;
  font-weight: 700;
}

.teacher-stats {
  margin-top: 6px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
}

.teacher-student-section {
  display: grid;
  gap: 8px;
}

.teacher-student-section + .teacher-student-section {
  margin-top: 8px;
}

.teacher-student-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 2px;
}

.teacher-student-section-title {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  color: #27425e;
}

.teacher-student-section-count {
  color: #5d6d82;
  font-size: 12px;
  font-weight: 700;
}

.badge {
  border-radius: 999px;
  padding: 3px 7px;
  font-weight: 700;
}

.badge.qt {
  background: #fff2d8;
  color: var(--qt);
}

.badge.note {
  background: #eef7de;
  color: var(--note);
}

.badge.attitude {
  background: #f5f2cf;
  color: var(--attitude);
}

.badge.total {
  background: #eaf1ff;
  color: #1e4d8e;
}

.check-panel {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: #fbfdff;
}

.check-panel-spacer {
  display: none;
}

.check-title {
  font-size: 14px;
  font-weight: 800;
}

.switch-row {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.quick-row {
  margin-top: 8px;
  display: flex;
  gap: 8px;
}

.quick-row button {
  flex: 1;
  min-height: 36px;
  font-size: 12px;
}

.switch-row label {
  flex-direction: row;
  align-items: center;
  gap: 6px;
}

.switch-divider {
  color: #93a4b8;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.switch-row label.disabled {
  opacity: 0.5;
}

.note-stepper {
  display: flex;
  align-items: center;
  gap: 4px;
}

.note-stepper.disabled {
  opacity: 0.5;
}

.note-stepper-label,
.note-stepper-value {
  font-size: 13px;
  font-weight: 700;
}

body[data-app-mode="teacher"] .note-stepper-btn {
  min-width: 24px;
  width: 24px;
  height: 26px;
  min-height: 26px;
  padding: 0;
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
}

.save-row {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}

.save-row button {
  flex: 1;
}

.teacher-tab-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.teacher-tab-btn {
  border: 1px solid #d4deea;
  background: #f4f8fc;
  color: #47627d;
  border-radius: 12px;
  font-weight: 700;
}

.teacher-tab-btn.active {
  background: linear-gradient(135deg, #0b6ed0, #2f87dc);
  color: #ffffff;
  border-color: #0b6ed0;
  box-shadow: 0 10px 24px #0b6ed022;
}

.meeting-note-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.meeting-note-card {
  width: 100%;
  display: grid;
  gap: 8px;
  text-align: left;
  border: 1px solid #d7e3ef;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 10px 24px #123b650d;
}

.meeting-note-card-head,
.meeting-note-card-meta,
.meeting-note-detail-head,
.meeting-note-editor-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.meeting-note-card-head {
  justify-content: space-between;
}

.meeting-note-card-title,
.meeting-note-detail-title {
  color: #1a2735;
}

.meeting-note-card-date,
.meeting-note-card-meta,
.meeting-note-detail-meta,
.meeting-note-preview-label {
  font-size: 12px;
  color: #607184;
}

.meeting-note-card-preview {
  margin: 0;
  color: #2f4356;
  line-height: 1.6;
  font-size: 13px;
}

.meeting-note-card-meta {
  justify-content: space-between;
}

.meeting-note-empty {
  margin-top: 12px;
}

.teacher-fab {
  position: fixed;
  right: 18px;
  bottom: 24px;
  width: 56px;
  height: 56px;
  min-width: 56px;
  min-height: 56px;
  border-radius: 50%;
  padding: 0;
  font-size: 28px;
  line-height: 1;
  box-shadow: 0 18px 34px #0b6ed038;
  z-index: 25;
}

.meeting-note-detail-head,
.meeting-note-editor-top {
  justify-content: space-between;
  margin-top: 14px;
}

.meeting-note-editor-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.meeting-note-detail-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.meeting-note-detail-actions-standalone {
  margin-top: 12px;
}

.meeting-note-author-chip {
  margin-left: 0;
}

.meeting-note-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #edf4fb;
  border: 1px solid #d4dfeb;
  color: #47627d;
  font-size: 12px;
  font-weight: 700;
}

.meeting-note-detail-card {
  margin-top: 10px;
  padding: 16px;
  border: 1px solid #d9e4f0;
  border-radius: 16px;
  background: #ffffff;
}

.meeting-note-detail-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.meeting-note-detail-title {
  margin: 0;
  font-size: 22px;
}

.meeting-note-detail-meta {
  display: grid;
  gap: 4px;
  text-align: right;
  white-space: nowrap;
}

.meeting-note-detail-divider {
  height: 1px;
  margin: 14px 0 16px;
  background: #d9e4f0;
}

.meeting-note-detail-body {
  min-width: 0;
}

.meeting-note-editor-grid {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.meeting-note-editor-panels {
  display: grid;
  gap: 12px;
}

.meeting-note-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.meeting-note-help-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.meeting-note-help-trigger {
  width: 46px;
  height: 22px;
  min-width: 46px;
  min-height: 22px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #c8d8e8;
  border-radius: 999px;
  background: #f4f9ff;
  color: #235487;
  line-height: 1;
  font-size: 10px;
  font-weight: 700;
}

.meeting-note-help-popover {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 10;
  width: min(320px, calc(100vw - 36px));
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d7e2ee;
  border-radius: 14px;
  box-shadow: 0 14px 30px #17324d18;
  background: linear-gradient(180deg, #fbfdff, #f3f8fe);
}

.meeting-note-help-title {
  font-size: 13px;
  font-weight: 800;
  color: #203243;
}

.meeting-note-help-grid {
  display: grid;
  gap: 8px;
}

.meeting-note-help-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.meeting-note-help-desc {
  font-size: 12px;
  color: #607184;
}

.meeting-note-editor-panel {
  display: grid;
  gap: 8px;
}

.meeting-note-textarea {
  min-height: 280px;
  resize: vertical;
  border: 1px solid #d7e2ee;
  border-radius: 14px;
  background: #fbfdff;
  padding: 14px;
  font: inherit;
  font-size: 14px;
  line-height: 1.6;
  color: #223140;
}

.meeting-note-textarea::placeholder {
  color: #223140;
  opacity: 0.72;
  font-size: 14px;
  line-height: 1.7;
}

.meeting-note-preview {
  min-height: 280px;
  padding: 14px;
  border: 1px solid #d7e2ee;
  border-radius: 14px;
  background: #ffffff;
}

.markdown-empty {
  color: #8091a2;
  font-size: 13px;
}

.markdown-body {
  color: #223140;
  line-height: 1.7;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  margin: 0 0 10px;
  color: #172434;
}

.markdown-body p,
.markdown-body ul,
.markdown-body ol,
.markdown-body blockquote,
.markdown-body pre {
  margin: 0 0 12px;
}

.markdown-list {
  padding-left: 20px;
}

.markdown-check-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  list-style: none;
  margin-left: -20px;
}

.markdown-check-box {
  color: #0b6ed0;
  font-weight: 700;
}

.markdown-quote {
  padding: 10px 12px;
  border-left: 4px solid #82afe2;
  background: #f3f8fe;
  border-radius: 0 12px 12px 0;
  color: #31485e;
}

.markdown-code {
  overflow-x: auto;
  padding: 12px;
  border-radius: 12px;
  background: #13263a;
  color: #f3f7fb;
}

.markdown-body code {
  padding: 2px 6px;
  border-radius: 6px;
  background: #eef3f8;
  color: #1d3855;
  font-size: 12px;
}

.markdown-body pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.markdown-body a {
  color: #0b6ed0;
}

@media (min-width: 721px) {
  .app-shell {
    padding-top: 18px;
  }

  .meeting-note-editor-panels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  background: #1e4d8f;
  color: #fff;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 10px 28px #0c244640;
  z-index: 30;
}

@media (max-width: 720px) {
  .student-banner-frame {
    min-height: 112px;
    border-radius: 18px;
  }

  .student-banner-image {
    min-height: 112px;
  }

  .simple-panel {
    padding: 16px 14px 14px;
  }

  .simple-title {
    font-size: 22px;
  }

  .summary .value {
    font-size: 17px;
  }

  .compact-head .item-title {
    font-size: 16px;
  }

  .day-cell {
    min-height: 82px;
  }

  .check-panel-fixed {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    border-radius: 14px 14px 0 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    box-shadow: 0 -8px 22px #0f27411f;
    background: #ffffff;
    max-width: 720px;
    margin: 0 auto;
  }

  .check-panel-spacer {
    display: block;
    height: 170px;
  }

  body[data-app-mode="student"] .app-shell {
    padding: 10px 8px 16px;
  }

  body[data-app-mode="student"] .student-banner-frame,
  body[data-app-mode="student"] .student-banner-image {
    min-height: 96px;
    border-radius: 14px;
  }

  body[data-app-mode="student"] .simple-panel {
    padding: 12px 10px 10px;
  }

  body[data-app-mode="student"] .day-cell {
    min-height: 72px;
  }

  body[data-app-mode="teacher"] .app-shell {
    padding: 10px 8px 16px;
  }

  body[data-app-mode="teacher"] .simple-panel {
    padding: 12px 10px 10px;
  }

  body[data-app-mode="teacher"] .simple-title {
    font-size: 19px;
  }

  body[data-app-mode="teacher"] .day-cell {
    min-height: 72px;
  }

  body[data-app-mode="teacher"] .check-panel-fixed {
    border-radius: 12px 12px 0 0;
    padding: 8px;
  }

  body[data-app-mode="teacher"] .check-panel-spacer {
    height: 150px;
  }

  .teacher-fab {
    right: 14px;
    bottom: 16px;
  }

  .meeting-note-detail-card {
    padding: 14px;
  }

  .meeting-note-detail-title {
    font-size: 19px;
  }

  .meeting-note-textarea,
  .meeting-note-preview {
    min-height: 220px;
  }
}
