.mode-nav {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.mode-link {
  padding: 6px 14px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  color: var(--teacher, #666);
  border: 1.5px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.mode-link:hover {
  background: var(--line, #eee);
  color: var(--app-fg, #333);
}
.mode-link.active {
  background: var(--btn, #ff8fb1);
  color: var(--btn-fg, #fff);
  border-color: var(--btn, #ff8fb1);
}
@media (max-width: 640px) {
  .mode-link { padding: 8px 12px; font-size: 12px; min-height: 44px; display: inline-flex; align-items: center; }
  .tb-group .tbtn { min-height: 44px; }
}

/* 顶栏分组（课程表 / 时间轴共用） */
.app-toolbar,
.schedule-toolbar,
.timeline-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line, #eee);
  flex-shrink: 0;
  z-index: 100;
}
.schedule-toolbar {
  margin: -18px -18px 14px;
}
.tb-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  padding: 6px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line, #eee);
}
.tb-nav-group { flex-shrink: 0; }
.tb-schedule-group {
  flex: 1 1 220px;
  min-width: 0;
}
.tb-action-group {
  margin-left: auto;
  flex-shrink: 0;
}
@media (max-width: 899px) {
  .tb-nav-group { flex-basis: 100%; }
  .tb-action-group { margin-left: 0; }
}

.current-schedule-info {
  flex: 1;
  min-width: 120px;
  padding: 0 4px;
  line-height: 1.35;
}
.current-schedule-name {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #4a3f55;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.current-schedule-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #8a7f92;
  min-height: 16px;
}
.save-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.save-status.idle { display: none; }
.save-status.saving::before {
  content: "";
  width: 11px;
  height: 11px;
  border: 2px solid var(--spinner-border, rgba(0, 0, 0, 0.15));
  border-top-color: var(--app-fg, #ff5c8a);
  border-radius: 50%;
  animation: save-spin 0.65s linear infinite;
}
.save-status.saved::before {
  content: "✓";
  font-size: 12px;
  font-weight: 800;
  color: #43a047;
  line-height: 1;
}
.save-status-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.save-status-text.is-saving {
  color: var(--app-fg, #ff5c8a);
  font-weight: 600;
}
.save-status-text.is-saved { color: #5d6b63; }
@keyframes save-spin {
  to { transform: rotate(360deg); }
}
