:root {
  --primary: #0f8b7a;
  --primary-dark: #0f766e;
  --bg: #f6fafa;
  --panel: rgba(255, 255, 255, 0.88);
  --line: #e2ecee;
  --line-strong: #d5e3e6;
  --text: #1f2a44;
  --muted: #748293;
  --shadow: 0 18px 48px rgba(31, 42, 68, 0.08);
  --radius: 18px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(15, 139, 122, 0.09), transparent 30%),
    linear-gradient(180deg, #eef8f6 0%, #f6fafa 34%, #f8fbfb 100%);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.workspace {
  width: min(1180px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 22px 22px 104px;
}

.app-top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  margin: 0 -22px 14px;
  padding: 14px 22px;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.98), rgba(9, 124, 115, 0.96));
  color: #fff;
  box-shadow: 0 12px 30px rgba(9, 80, 75, 0.12);
}

.profile-button,
.top-actions,
.pill-button,
.icon-button {
  display: inline-flex;
  align-items: center;
}

.profile-button {
  min-width: 0;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--primary-dark);
  font-weight: 800;
}

.teacher-name {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 18px;
  font-weight: 750;
}

.top-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
  gap: 10px;
}

.pill-button,
.icon-button {
  justify-content: center;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.94);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  transition: transform 0.18s ease, background 0.18s ease;
}

.pill-button {
  min-width: 68px;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 750;
}

.icon-button {
  width: 42px;
  padding: 0;
}

.icon-button svg,
.floating-menu svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pill-button:hover,
.icon-button:hover,
.profile-button:hover .avatar {
  transform: translateY(-1px);
}

.board-card {
  overflow: hidden;
  border: 1px solid rgba(213, 227, 230, 0.86);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.week-row,
.slot-row {
  display: grid;
  grid-template-columns: 72px 136px repeat(5, minmax(86px, 1fr));
}

.week-row {
  min-height: 78px;
  background: rgba(226, 232, 240, 0.72);
  border-bottom: 1px solid var(--line-strong);
}

.period-head,
.time-head,
.day-head,
.period-cell,
.time-cell,
.day-cell {
  min-width: 0;
  border-right: 1px solid var(--line);
}

.day-head:last-child,
.day-cell:last-child {
  border-right: 0;
}

.period-head,
.time-head,
.day-head {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 800;
}

.day-head {
  flex-direction: column;
  gap: 3px;
  font-size: 16px;
}

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

.day-head.is-today {
  background: linear-gradient(180deg, rgba(15, 139, 122, 0.1), rgba(255, 255, 255, 0.18));
  color: var(--primary-dark);
}

.slot-row {
  min-height: 82px;
  border-bottom: 1px solid var(--line);
}

.slot-row:last-child {
  border-bottom: 0;
}

.row-morning {
  background: linear-gradient(90deg, rgba(220, 252, 231, 0.48), transparent 28%);
}

.row-noon {
  background: linear-gradient(90deg, rgba(254, 243, 199, 0.58), rgba(255, 251, 235, 0.5));
}

.row-afternoon {
  background: linear-gradient(90deg, rgba(220, 252, 231, 0.42), transparent 30%);
}

.period-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-dark);
  font-size: 18px;
  font-weight: 850;
  letter-spacing: 2px;
}

.row-noon .period-cell {
  color: #b7791f;
}

.time-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  text-align: center;
}

.time-cell strong {
  color: var(--text);
  font-size: 16px;
  font-weight: 850;
}

.time-cell span {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.day-cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 82px;
  padding: 8px;
  border-top: 0;
  border-bottom: 0;
  border-left: 0;
  background: transparent;
}

.day-cell.has-lesson {
  color: var(--text);
}

.empty-mark {
  color: rgba(116, 130, 147, 0.32);
  font-size: 18px;
}

.is-editing .empty-mark {
  color: rgba(15, 139, 122, 0.68);
  font-weight: 750;
}

.lesson {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  min-height: 54px;
  padding: 8px 6px;
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.56);
}

.lesson strong {
  font-size: 16px;
  line-height: 1.2;
  font-weight: 850;
}

.lesson em {
  color: rgba(31, 42, 68, 0.62);
  font-size: 14px;
  line-height: 1.2;
  font-style: normal;
  font-weight: 800;
}

.color-teal { background: rgba(188, 240, 229, 0.84); }
.color-blue { background: rgba(219, 234, 254, 0.86); }
.color-amber { background: rgba(254, 240, 178, 0.86); }
.color-rose { background: rgba(255, 228, 230, 0.86); }
.color-violet { background: rgba(237, 233, 254, 0.86); }
.color-green { background: rgba(220, 252, 231, 0.86); }
.color-peach { background: rgba(255, 237, 213, 0.88); }
.color-slate { background: rgba(226, 232, 240, 0.9); }

.primary-fab {
  position: fixed;
  right: max(22px, calc((100vw - 1180px) / 2 + 22px));
  bottom: 24px;
  left: max(22px, calc((100vw - 1180px) / 2 + 22px));
  z-index: 18;
  height: 58px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), #087f73);
  color: #fff;
  font-size: 17px;
  font-weight: 850;
  box-shadow: 0 18px 42px rgba(15, 139, 122, 0.22);
}

.edit-bar {
  position: fixed;
  right: max(22px, calc((100vw - 1180px) / 2 + 22px));
  bottom: 24px;
  left: max(22px, calc((100vw - 1180px) / 2 + 22px));
  z-index: 18;
  display: grid;
  grid-template-columns: 96px 1fr 96px;
  align-items: center;
  gap: 12px;
  padding: 9px;
  border: 1px solid rgba(226, 236, 238, 0.9);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 44px rgba(31, 42, 68, 0.12);
  backdrop-filter: blur(18px);
}

.edit-bar span {
  text-align: center;
  color: var(--muted);
  font-weight: 750;
}

.strong-button,
.soft-danger {
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
}

.strong-button {
  background: var(--primary);
  color: #fff;
}

.strong-button.full {
  width: 100%;
}

.soft-danger {
  background: #fff1f2;
  color: #be123c;
}

.scrim,
.floating-layer {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(5px);
}

.today-drawer,
.settings-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(420px, 88vw);
  height: 100%;
  padding: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: -22px 0 60px rgba(31, 42, 68, 0.12);
  animation: slideIn 0.22s ease both;
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.drawer-head p {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 850;
}

.drawer-head span {
  color: var(--muted);
  font-size: 14px;
}

.small-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #f8fbfb;
  color: var(--muted);
  font-size: 24px;
}

.today-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.today-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 12px 14px;
  border-radius: 16px;
}

.today-slot,
.today-time {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.today-course {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: center;
}

.today-course strong {
  font-size: 17px;
}

.today-course em {
  color: rgba(31, 42, 68, 0.62);
  font-style: normal;
  font-weight: 800;
}

.floating-menu {
  position: absolute;
  top: 82px;
  right: max(22px, calc((100vw - 1180px) / 2 + 22px));
  width: 260px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 48px rgba(31, 42, 68, 0.14);
  backdrop-filter: blur(20px);
  animation: popIn 0.18s ease both;
}

.floating-menu button,
.settings-actions button {
  display: grid;
  align-items: center;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
}

.floating-menu button {
  grid-template-columns: 34px 1fr 16px;
  gap: 10px;
  min-height: 52px;
  padding: 0 8px;
  border-radius: 14px;
  text-align: left;
  font-weight: 750;
}

.floating-menu button:hover,
.settings-actions button:hover {
  background: #f2f7f7;
}

.floating-menu b {
  color: #9aa7b5;
  font-size: 22px;
  font-weight: 500;
}

.settings-form,
.lesson-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

input,
select {
  min-height: 44px;
  width: 100%;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  outline: none;
}

input:focus,
select:focus {
  border-color: rgba(15, 139, 122, 0.5);
  box-shadow: 0 0 0 3px rgba(15, 139, 122, 0.1);
}

.settings-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
}

.settings-actions button {
  grid-template-columns: 1fr;
  gap: 3px;
  min-height: 58px;
  padding: 9px 12px;
  border-radius: 14px;
  text-align: left;
}

.settings-actions button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.settings-actions span {
  font-weight: 800;
}

.settings-actions small {
  color: var(--muted);
  font-size: 12px;
}

.lesson-modal {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(420px, calc(100vw - 36px));
  padding: 24px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 80px rgba(31, 42, 68, 0.18);
  transform: translate(-50%, -50%);
  animation: popIn 0.18s ease both;
}

.form-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
}

.empty-state {
  padding: 32px 16px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  background: #f8fbfb;
}

.toast {
  position: fixed;
  left: 50%;
  top: 88px;
  z-index: 80;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 14px;
  transform: translateX(-50%);
}

@keyframes slideIn {
  from { transform: translateX(24px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes popIn {
  from { transform: translateY(-4px) scale(0.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.remote-screen {
  min-height: 100vh;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(236, 253, 247, 0.86), rgba(248, 250, 252, 0.94)),
    #f8fafc;
}

.remote-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1280px;
  margin: 0 auto 18px;
  padding: 22px 24px;
  border: 1px solid rgba(207, 238, 231, 0.88);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
}

.remote-top p,
.remote-top h1 {
  margin: 0;
}

.remote-top p {
  color: var(--primary-dark);
  font-size: 15px;
  font-weight: 850;
}

.remote-top h1 {
  margin-top: 4px;
  color: #111827;
  font-size: clamp(28px, 4vw, 54px);
  line-height: 1.08;
  font-weight: 900;
}

.remote-top-actions,
.remote-code-form,
.remote-status {
  display: flex;
  align-items: center;
}

.remote-top-actions {
  flex: 0 0 auto;
  gap: 12px;
}

.remote-soft-button,
.remote-voice-button,
.remote-primary-button {
  min-height: 46px;
  border-radius: 999px;
  font-weight: 850;
}

.remote-soft-button,
.remote-voice-button {
  padding: 0 18px;
  border: 1px solid #cfeee7;
  background: #f0fbf8;
  color: var(--primary-dark);
}

.remote-voice-button.is-on {
  border-color: rgba(15, 118, 110, 0.3);
  background: var(--primary-dark);
  color: #fff;
}

.remote-primary-button {
  min-width: 110px;
  padding: 0 24px;
  border: 0;
  background: linear-gradient(135deg, #0f8b7a, #0f766e);
  color: #fff;
}

.remote-code-panel,
.remote-content-grid,
.remote-view-tabs,
.remote-view-panel {
  max-width: 1280px;
  margin: 0 auto;
}

.remote-code-panel {
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid #e5eaf0;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
}

.remote-code-form {
  gap: 12px;
}

.remote-code-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.remote-code-display > div:first-child {
  min-width: 0;
}

.remote-code-display span {
  display: block;
  color: #64748b;
  font-size: 14px;
  font-weight: 800;
}

.remote-code-display strong {
  display: block;
  margin-top: 6px;
  color: #0f172a;
  font-size: 34px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: 4px;
}

.remote-code-form label {
  flex: 1 1 auto;
  min-width: 180px;
}

.remote-code-form input {
  height: 48px;
  font-size: 22px;
  letter-spacing: 3px;
  font-weight: 900;
  text-transform: uppercase;
}

.remote-status {
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  color: #475569;
  font-size: 14px;
  font-weight: 750;
}

.remote-status em {
  color: #94a3b8;
  font-style: normal;
}

.remote-status.is-error {
  color: #be123c;
}

.remote-connect-alert {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid #f6d58b;
  border-radius: 14px;
  background: #fff8e8;
  color: #92400e;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 780;
}

.remote-sound-hint {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #fde68a;
  border-radius: 14px;
  background: #fffbeb;
  color: #92400e;
  font-size: 14px;
  font-weight: 750;
}

.remote-view-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.remote-view-tabs button {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  min-height: 72px;
  padding: 10px 14px;
  border: 1px solid #dbe6ef;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  color: #334155;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.remote-view-tabs button.is-active {
  border-color: rgba(15, 118, 110, 0.24);
  background: linear-gradient(180deg, #ecfdf7, #ffffff);
  color: var(--primary-dark);
  box-shadow: 0 10px 26px rgba(15, 118, 110, 0.12);
}

.remote-view-tabs span {
  font-size: 18px;
  font-weight: 900;
}

.remote-view-tabs em {
  max-width: 100%;
  overflow: hidden;
  color: #64748b;
  font-size: 13px;
  font-style: normal;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.remote-view-tabs button.is-active em {
  color: #0f766e;
}

.remote-view-panel {
  min-height: 520px;
}

.remote-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.34fr);
  gap: 18px;
}

.remote-main-column {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.remote-homework-card,
.remote-homework-status-card,
.remote-broadcast-card,
.remote-rtc-card {
  min-width: 0;
  border: 1px solid #e5eaf0;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
}

.remote-homework-card {
  min-height: 520px;
  padding: 24px;
}

.remote-homework-status-card {
  padding: 22px;
}

.remote-homework-status-date-switcher {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  margin: 0 0 16px;
}

.remote-homework-status-date-switcher button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid #dbe6ef;
  border-radius: 999px;
  background: #ffffff;
  color: #294957;
  font-size: 24px;
  line-height: 1;
  font-weight: 800;
}

.remote-homework-status-date-switcher strong {
  min-width: 220px;
  height: 42px;
  padding: 0 22px;
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: 999px;
  background: #ecfdf7;
  color: #0f766e;
  font-size: 17px;
  line-height: 42px;
  font-weight: 900;
  text-align: center;
}

.remote-side-column {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-self: start;
  min-width: 0;
}

.remote-broadcast-card,
.remote-rtc-card {
  padding: 20px;
}

.remote-view-panel > .remote-broadcast-card,
.remote-view-panel > .remote-rtc-card,
.remote-view-panel > .remote-homework-status-card {
  min-height: 520px;
}

.remote-rtc-card.is-active {
  border-color: rgba(15, 118, 110, 0.24);
  background: linear-gradient(180deg, #ffffff, #f0fbf8);
}

.remote-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.remote-section-head span {
  color: #64748b;
  font-size: 16px;
  font-weight: 850;
}

.remote-section-head strong {
  color: var(--primary-dark);
  font-size: 22px;
  font-weight: 900;
}

.remote-section-head .remote-section-subject {
  color: var(--primary-dark);
  font-size: 22px;
  font-weight: 900;
}

.remote-section-head .remote-section-badge {
  color: #64748b;
  font-size: 15px;
  font-weight: 850;
}

.remote-homework-status-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.remote-homework-status-display-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 38px;
  padding: 3px;
  border: 1px solid #e5eaf0;
  border-radius: 999px;
  background: #f8fafc;
  box-sizing: border-box;
}

.remote-homework-status-display-switch button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #64748b;
  font-size: 14px;
  font-weight: 850;
}

.remote-homework-status-display-switch button.is-active {
  background: #ffffff;
  color: #0f766e;
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.08);
}

.remote-homework-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: -4px 0 18px;
}

.remote-homework-tabs button {
  min-width: 74px;
  height: 38px;
  padding: 0 16px;
  border: 1px solid #dbe6ef;
  border-radius: 999px;
  background: #f8fafc;
  color: #64748b;
  font-size: 15px;
  font-weight: 850;
}

.remote-homework-tabs button.is-active {
  border-color: rgba(15, 118, 110, 0.22);
  background: #ecfdf7;
  color: var(--primary-dark);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.remote-homework-status-subject-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: -4px 0 12px;
}

.remote-homework-status-subject-tabs button {
  min-width: 82px;
  height: 40px;
  padding: 0 18px;
  border: 1px solid #cfeee7;
  border-radius: 999px;
  background: #f0fbf8;
  color: #0f766e;
  font-size: 15px;
  font-weight: 900;
}

.remote-homework-status-subject-tabs button.is-active {
  border-color: rgba(15, 118, 110, 0.3);
  background: #0f766e;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 118, 110, 0.14);
}

.remote-homework-content-tabs {
  margin-top: 0;
  margin-bottom: 16px;
}

.remote-homework-content-tabs button {
  max-width: 240px;
  overflow: hidden;
  border-color: #e5eaf0;
  background: #ffffff;
  color: #64748b;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.remote-homework-body pre {
  min-height: 150px;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: #111827;
  font: 300 clamp(28px, 4.2vw, 58px)/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
}

.remote-latex {
  margin-top: 18px;
  padding: 16px;
  overflow-x: auto;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  background: #eff6ff;
  color: #111827;
  font-size: 24px;
}

.web-math-content {
  min-height: 150px;
  color: #111827;
  font: 300 clamp(28px, 4.2vw, 58px)/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
}

.math-line {
  line-height: 1.9;
  font-size: 18px;
  font-weight: 300;
  white-space: pre-wrap;
}

.web-math-content > .math-line {
  font-size: inherit;
}

.math-scroll {
  display: inline-block;
  max-width: none;
  overflow: visible;
  vertical-align: middle;
}

.math-scroll.is-display {
  display: block;
  margin: 10px 0;
}

.katex {
  font-size: 1.08em;
  font-weight: 400;
}

.remote-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.remote-image-grid img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border: 1px solid #e5eaf0;
  border-radius: 18px;
  background: #f8fafc;
}

.remote-homework-files {
  display: grid;
  gap: 12px;
  margin: 14px 0 20px;
}

.remote-homework-file {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 12px 14px;
  border: 1px solid #e5eeee;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.remote-homework-file-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: #ecfdf7;
  color: #0f766e;
  font-size: 20px;
  font-weight: 900;
}

.remote-homework-file-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.remote-homework-file-main strong {
  overflow: hidden;
  color: #111827;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.remote-homework-file-main em {
  overflow: hidden;
  color: #8a94a6;
  font-size: 14px;
  line-height: 1.2;
  font-style: normal;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.remote-homework-file-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.remote-homework-file-actions button,
.remote-homework-file-actions a,
.remote-homework-file-actions span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid #cfeee7;
  border-radius: 999px;
  background: #f0fbf8;
  color: #0f766e;
  font-size: 14px;
  line-height: 1;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.remote-homework-file-actions button {
  appearance: none;
}

.remote-homework-file-actions a:last-child {
  border-color: #dbe6ef;
  background: #f8fafc;
  color: #294957;
}

.remote-file-preview-mask {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(15, 23, 42, 0.46);
  box-sizing: border-box;
}

.remote-file-preview-modal {
  display: flex;
  width: min(1080px, 100%);
  height: min(780px, 92vh);
  border: 1px solid #dfe9ef;
  border-radius: 22px;
  flex-direction: column;
  background: #ffffff;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.22);
  overflow: hidden;
}

.remote-file-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  border-bottom: 1px solid #e5eeee;
  background: #f8fcfb;
}

.remote-file-preview-head div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.remote-file-preview-head span {
  color: #0f766e;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 850;
}

.remote-file-preview-head strong {
  overflow: hidden;
  color: #111827;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.remote-file-preview-head button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: #eef4f4;
  color: #294957;
  font-size: 24px;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
}

.remote-file-preview-body {
  display: flex;
  align-items: stretch;
  justify-content: center;
  flex: 1 1 auto;
  min-height: 0;
  padding: 18px;
  background: #f7fafa;
  overflow: auto;
}

.remote-file-preview-frame {
  width: 100%;
  height: 100%;
  border: 1px solid #e5eeee;
  border-radius: 16px;
  background: #ffffff;
}

.remote-file-preview-image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 16px;
  background: #ffffff;
}

.remote-file-preview-media {
  width: min(640px, 100%);
  align-self: center;
}

.remote-file-preview-video {
  display: block;
  width: 100%;
  max-height: 100%;
  border-radius: 16px;
  background: #0f172a;
}

.remote-file-preview-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-height: 260px;
  flex-direction: column;
  gap: 8px;
  border: 1px dashed #d6e5e4;
  border-radius: 18px;
  background: #ffffff;
  color: #8a94a6;
  text-align: center;
}

.remote-file-preview-empty strong {
  color: #111827;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 760;
}

.remote-file-preview-empty span {
  color: #8a94a6;
  font-size: 15px;
  line-height: 1.4;
  font-weight: 560;
}

.remote-file-preview-foot {
  display: flex;
  justify-content: flex-end;
  padding: 14px 22px;
  border-top: 1px solid #e5eeee;
  background: #ffffff;
}

.remote-file-preview-foot a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  background: #0f766e;
  color: #ffffff;
  font-size: 14px;
  line-height: 1;
  font-weight: 760;
  text-decoration: none;
}

.remote-homework-status-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -6px 0 14px;
  color: #64748b;
  font-size: 14px;
  font-weight: 760;
}

.remote-homework-status-meta em {
  color: #0f766e;
  font-style: normal;
}

.remote-homework-status-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.remote-homework-status-stats div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  border: 1px solid #e5eaf0;
  border-radius: 16px;
  background: #f8fafc;
  color: #334155;
}

.remote-homework-status-stats .is-excellent {
  border-color: #f6d58b;
  background: #fff8e8;
}

.remote-homework-status-stats .is-revise {
  border-color: #a7e3d0;
  background: #ecfdf7;
}

.remote-homework-status-stats .is-missing {
  border-color: #f3b4b8;
  background: #fff1f2;
}

.remote-homework-status-stats strong,
.remote-homework-status-stats span,
.remote-homework-status-stats em {
  font-style: normal;
  font-weight: 900;
}

.remote-homework-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
  max-height: 360px;
  overflow: auto;
}

.remote-homework-status-grid div {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
  min-height: 56px;
  padding: 8px 10px;
  border: 1px solid #edf1f5;
  border-radius: 14px;
  background: #ffffff;
  text-align: center;
  box-sizing: border-box;
}

.remote-homework-status-grid div.is-excellent {
  background: #fff8e8;
}

.remote-homework-status-grid div.is-revise {
  background: #ecfdf7;
}

.remote-homework-status-grid div.is-missing {
  background: #fff1f2;
}

.remote-homework-status-grid strong,
.remote-homework-status-grid span,
.remote-homework-status-grid em {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.remote-homework-status-grid strong {
  width: 100%;
  color: #111827;
  font-size: 15px;
  font-weight: 850;
  text-align: center;
}

.remote-homework-status-grid strong.is-number {
  font-size: 17px;
  letter-spacing: 0;
}

.remote-homework-status-grid .remote-homework-status-mark {
  width: 28px;
  height: 22px;
  margin-top: 1px;
  color: #0f766e;
  font-size: 17px;
  line-height: 22px;
  font-weight: 900;
  text-align: center;
}

.remote-homework-status-grid em {
  color: #8a99aa;
  font-size: 12px;
  font-style: normal;
  font-weight: 760;
  text-align: center;
}

.remote-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  min-height: 360px;
  padding: 28px;
  border: 1px dashed #cbd5e1;
  border-radius: 20px;
  background: #f8fafc;
  text-align: center;
}

.remote-empty.is-small {
  min-height: 180px;
}

.remote-empty strong {
  color: #334155;
  font-size: 24px;
}

.remote-empty span {
  color: #64748b;
  font-size: 15px;
}

.remote-command {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.remote-command p {
  margin: 0;
  color: #111827;
  font-size: 24px;
  line-height: 1.45;
  font-weight: 850;
}

.remote-command span,
.remote-command em {
  color: #64748b;
  font-size: 14px;
  font-style: normal;
  font-weight: 720;
}

.remote-command small {
  color: #64748b;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 650;
}

.remote-command em {
  color: #0f766e;
}

.remote-soft-button.full,
.remote-primary-button.full {
  width: 100%;
  margin-top: 4px;
}

.remote-soft-button:disabled,
.remote-primary-button:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.remote-rtc-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid #dbe6ef;
  border-radius: 18px;
  background: #0f172a;
}

.remote-rtc-preview video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0f172a;
}

.remote-rtc-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 7px;
  height: 100%;
  padding: 16px;
  text-align: center;
}

.remote-rtc-empty strong {
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
}

.remote-rtc-empty span {
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 720;
}

.remote-camera-inline {
  display: flex;
  justify-content: flex-start;
  margin-top: 14px;
}

.remote-camera-picker {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 16px;
  background: #f8fafc;
}

.remote-camera-picker.is-required {
  border-color: rgba(245, 158, 11, 0.42);
  background: #fffbeb;
}

.remote-camera-picker-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.remote-camera-picker-head {
  justify-content: space-between;
  margin-bottom: 10px;
}

.remote-camera-picker-head strong {
  color: #0f172a;
  font-size: 15px;
  font-weight: 900;
}

.remote-camera-picker-head .remote-soft-button {
  min-height: 36px;
  padding: 0 14px;
}

.remote-camera-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.remote-camera-list span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  max-width: 100%;
  padding: 7px 10px;
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: 999px;
  background: #ffffff;
  color: #475569;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 780;
  box-sizing: border-box;
  overflow-wrap: anywhere;
}

.remote-camera-list span.is-selected {
  border-color: rgba(15, 118, 110, 0.35);
  background: #e7f8f4;
  color: #0f766e;
}

.remote-camera-picker p,
.remote-camera-picker em {
  margin: 0;
  color: #475569;
  font-size: 14px;
  line-height: 1.45;
  font-style: normal;
  font-weight: 720;
}

.remote-camera-picker em {
  display: block;
  margin-top: 8px;
  color: #0f766e;
}

.remote-rtc-message {
  margin: 12px 0 0;
  color: #475569;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 720;
}

.remote-rtc-room {
  display: block;
  margin-top: 8px;
  color: var(--primary-dark);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.remote-rtc-control-note {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin: 14px 0 0;
  padding: 0 18px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 999px;
  background: #ecfdf7;
  color: #0f766e;
  font-size: 14px;
  line-height: 40px;
  font-weight: 900;
}

.remote-rtc-hidden-video {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 760px) {
  .workspace {
    padding: 14px 12px 98px;
  }

  .app-top {
    margin: 0 -12px 12px;
    padding: 12px;
  }

  .teacher-name {
    max-width: 112px;
  }

  .top-actions {
    gap: 7px;
  }

  .pill-button,
  .icon-button {
    height: 38px;
  }

  .pill-button {
    min-width: 56px;
    padding: 0 13px;
  }

  .icon-button {
    width: 38px;
  }

  .board-card {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .week-row,
  .slot-row {
    width: 760px;
    grid-template-columns: 58px 112px repeat(5, 118px);
  }

  .primary-fab,
  .edit-bar {
    right: 14px;
    left: 14px;
    bottom: 16px;
  }

  .remote-screen {
    padding: 12px;
  }

  .remote-top,
  .remote-code-form,
  .remote-content-grid {
    display: flex;
    flex-direction: column;
  }

  .remote-top {
    align-items: stretch;
    padding: 18px;
  }

  .remote-top-actions {
    width: 100%;
  }

  .remote-top-actions button {
    flex: 1 1 0;
  }

  .remote-code-form {
    align-items: stretch;
  }

  .remote-view-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .remote-view-tabs button {
    min-height: 64px;
    border-radius: 16px;
  }

  .remote-view-tabs span {
    font-size: 16px;
  }

  .remote-content-grid {
    gap: 12px;
  }

  .remote-homework-card,
  .remote-homework-status-card,
  .remote-broadcast-card {
    width: 100%;
    padding: 18px;
  }

  .remote-section-head {
    align-items: flex-start;
  }

  .remote-homework-status-head-actions {
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
  }

  .remote-homework-status-date-switcher {
    gap: 8px;
  }

  .remote-homework-status-date-switcher strong {
    min-width: 0;
    flex: 1 1 auto;
    padding: 0 12px;
    font-size: 15px;
  }

  .remote-camera-picker-head {
    flex-direction: column;
    align-items: stretch;
  }

  .remote-homework-card {
    min-height: 360px;
  }

  .remote-homework-body pre {
    font-size: 30px;
  }
}
