:root {
  --primary: #007AFF;
  --primary-light: #4DA3FF;
  --primary-dark: #0056CC;
  --primary-gradient: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
  --accent: #5AC8FA;
  --accent-warm: #FF9500;
  --success: #34C759;
  --warning: #FF9500;
  --danger: #FF3B30;
  --background: #FBFBFD;
  --card: #FFFFFF;
  --text-primary: #1D1D1F;
  --text-secondary: #6B7280;
  --text-tertiary: #9CA3AF;
  --border: #E5E7EB;
  --border-light: #F2F2F5;
  --shadow: rgba(0, 0, 0, 0.03);
  --shadow-md: rgba(0, 0, 0, 0.06);
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --safe-area-top: env(safe-area-inset-top, 0px);
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
  --header-height: 56px;
  --tabbar-height: 56px;
  --space-section: 20px;
  --space-card: 22px;
  --card-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  --card-shadow-md: 0 4px 18px rgba(0, 0, 0, 0.07);
  --radius-card: 18px;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overflow: hidden; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  max-width: 100%;
  margin: 0 auto;
  background: var(--background);
  position: relative;
  overflow: hidden;
}
@media (min-width: 768px) {
  .app-container { max-width: 480px; box-shadow: 0 0 40px var(--shadow-md); }
}
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100vw;
  height: calc(var(--header-height) + var(--safe-area-top));
  padding-top: var(--safe-area-top);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}
@media (min-width: 768px) {
  .app-header { left: 50%; transform: translateX(-50%); max-width: 480px; }
}
.app-header-content {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
}
.app-header-logo { width: 34px; height: 34px; border-radius: 50%; vertical-align: middle; object-fit: cover; display: block; }
.pipi-avatar-ring {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--primary-gradient);
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.22);
  flex-shrink: 0;
}
.pipi-avatar-ring--header { width: 40px; height: 40px; }
.pipi-avatar-ring--sidebar { width: 44px; height: 44px; }
.pipi-avatar-ring--sidebar img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; display: block; }
.pipi-avatar-ring--chat-head { width: 40px; height: 40px; }
.pipi-avatar-ring--chat-head img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; display: block; }
.app-header-back {
  position: absolute;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 16px;
  color: var(--primary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 0;
}
.app-header-back:active { opacity: 0.6; }
.app-header-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
}
.app-header-action {
  position: absolute;
  right: 16px;
  font-size: 14px;
  color: var(--primary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 0;
}
.sub-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0 20px;
  border-bottom: none;
  margin-bottom: 20px;
}
.sub-header-back {
  font-size: 20px;
  color: var(--primary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-weight: 500;
}
.sub-header-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
}
.app-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-top: calc(var(--header-height) + var(--safe-area-top));
  padding-bottom: calc(var(--tabbar-height) + var(--safe-area-bottom) + 24px);
}
.app-content::-webkit-scrollbar { display: none; }
.tab-content { display: none; min-height: 100%; padding: 24px 20px; }
.tab-content.active { display: block; }
.app-tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--tabbar-height) + var(--safe-area-bottom));
  padding: 0 8px;
  padding-bottom: var(--safe-area-bottom);
  background: rgba(251, 251, 253, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  z-index: 100;
}
@media (min-width: 768px) {
  .app-tabbar { left: 50%; transform: translateX(-50%); max-width: 480px; }
}
.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  color: var(--text-tertiary);
  transition: all 0.15s ease;
  -webkit-user-select: none;
  user-select: none;
  position: relative;
  padding: 6px 0;
}
.tab-item:active { transform: scale(0.96); }
.tab-item.active { color: var(--primary); }
.tab-icon { 
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease, filter 0.2s ease;
  filter: grayscale(0.3);
  opacity: 0.55;
}
.tab-icon svg {
  width: 100%;
  height: 100%;
}
.tab-item.active .tab-icon { 
  transform: scale(1.12);
  filter: grayscale(0);
  opacity: 1;
}
.tab-label { font-size: 10px; font-weight: 600; letter-spacing: 0.2px; }
.card {
  background: var(--card);
  border-radius: var(--radius-card);
  padding: var(--space-card);
  margin-bottom: var(--space-section);
  box-shadow: var(--card-shadow);
  border: none;
}
.card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
  margin-bottom: 16px;
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.template-page { padding-bottom: 28px; }
.template-list-card { padding: 22px 20px 24px; }
.template-list-body { display: flex; flex-direction: column; }
.template-list-section-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-tertiary);
  letter-spacing: 0.3px;
  margin: 22px 0 12px;
  padding-left: 2px;
}
.template-list-section-label:first-child { margin-top: 6px; }
.template-list-hint {
  padding: 16px 18px;
  margin: 10px 0 6px;
  border-radius: 14px;
  background: var(--background);
  font-size: 13px;
  color: var(--text-tertiary);
  line-height: 1.5;
}
.mine-profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: var(--card);
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
  margin-bottom: 32px;
  cursor: pointer;
  border: none;
  transition: background 0.15s ease;
}
.mine-profile-card:active { background: rgba(0, 0, 0, 0.02); }
#mineMainView #userInfoCard + .mine-section { margin-top: 4px; }
.mine-profile-avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(0, 122, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}
.mine-profile-avatar svg { width: 24px; height: 24px; }
.mine-profile-main { flex: 1; min-width: 0; }
.mine-profile-name { font-size: 17px; font-weight: 700; color: var(--text-primary); line-height: 1.3; }
.mine-profile-sub { font-size: 13px; color: var(--text-secondary); margin-top: 3px; }
.mine-profile-badge {
  flex-shrink: 0;
  background: rgba(0, 122, 255, 0.1);
  color: var(--primary);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.mine-profile-chevron { color: var(--text-tertiary); font-size: 20px; flex-shrink: 0; line-height: 1; }
.mine-section { margin-bottom: 32px; }
.mine-section-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  letter-spacing: 0.4px;
  margin-bottom: 12px;
  padding-left: 4px;
}
.mine-settings-group { display: flex; flex-direction: column; gap: 10px; }
.mine-settings-group .setting-item { margin-bottom: 0; }
.assignment-detail-hero {
  background: var(--card);
  border-radius: var(--radius-card);
  padding: 20px 18px 0;
  margin-bottom: var(--space-section);
  box-shadow: var(--card-shadow);
  border: none;
}
.assignment-stats-panel { padding-bottom: 6px; }
.assignment-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px; }
.assignment-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 14px 8px;
  border-radius: 14px;
  background: var(--background);
}
.assignment-stat-value {
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
  line-height: 1;
}
.assignment-stat-label { font-size: 11px; font-weight: 600; color: var(--text-tertiary); }
.assignment-stat-item.is-submit .assignment-stat-value { color: #34C759; }
.assignment-stat-item.is-correct .assignment-stat-value { color: #5856D6; }
.assignment-stat-item.is-muted .assignment-stat-value { color: var(--text-secondary); }
.assignment-progress-block { padding: 0 2px 6px; }
.assignment-progress-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.assignment-progress-track {
  height: 6px;
  border-radius: 999px;
  background: var(--border-light);
  overflow: hidden;
  margin-bottom: 14px;
}
.assignment-progress-track:last-child { margin-bottom: 0; }
.assignment-progress-fill { height: 100%; border-radius: 999px; transition: width 0.3s ease; }
.assignment-progress-fill.is-submit { background: linear-gradient(90deg, #34C759, #30D158); }
.assignment-progress-fill.is-correct { background: linear-gradient(90deg, #5856D6, #007AFF); }
.assignment-detail-hero .assignment-detail-actions {
  margin-top: 0;
  border-top: 0.5px solid var(--border-light);
  padding: 16px 0 18px;
}
@media (max-width: 400px) {
  .assignment-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .assignment-stat-value { font-size: 20px; }
}
.section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
  margin-top: 8px;
}
.upload-zone {
  border: none;
  border-radius: var(--radius-card);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
  background: rgba(0, 122, 255, 0.04);
}
.upload-zone:hover, .upload-zone.dragover {
  background: rgba(0, 122, 255, 0.08);
}
.upload-zone-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.8; }
.upload-zone-text { font-size: 15px; color: var(--text-secondary); margin-bottom: 4px; }
.upload-zone-hint { font-size: 12px; color: var(--text-tertiary); }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  -webkit-user-select: none;
  user-select: none;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--primary-gradient); color: white; box-shadow: 0 4px 12px rgba(0, 122, 255, 0.25); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0, 122, 255, 0.3); }
.btn-secondary { background: var(--border-light); color: var(--text-primary); border: none; }
.btn-secondary:hover { background: var(--border); }
.btn-secondary:active { background: var(--border); }
.btn-outline { background: rgba(0, 122, 255, 0.08); border: none; color: var(--primary); }
.btn-outline:hover { background: rgba(0, 122, 255, 0.12); }
.btn-outline:active { background: rgba(0, 122, 255, 0.16); }
.btn-danger { background: rgba(255, 59, 48, 0.08); color: var(--danger); border: none; }
.btn-danger:hover { background: rgba(255, 59, 48, 0.12); color: var(--danger); }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn-lg { padding: 14px 24px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-sm);
  font-size: 18px;
}
.list-item {
  display: flex;
  align-items: center;
  padding: 16px 18px;
  background: var(--card);
  border-radius: var(--radius-card);
  margin-bottom: 0;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease;
  border: none;
  box-shadow: var(--card-shadow);
}
.list-item:active { background: rgba(0,0,0,0.02); }
.list-item-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-right: 12px;
  flex-shrink: 0;
}
.list-item-content { flex: 1; min-width: 0; }
.list-item-title { font-size: 16px; font-weight: 500; color: var(--text-primary); }
.list-item-subtitle { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.list-item-arrow { color: var(--text-tertiary); font-size: 14px; margin-left: 8px; }
.list-item-badge {
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  margin-left: 8px;
}
.badge-success { background: rgba(52, 199, 89, 0.15); color: var(--success); }
.badge-warning { background: rgba(255, 149, 0, 0.15); color: var(--warning); }
.badge-danger { background: rgba(255, 59, 48, 0.15); color: var(--danger); }
.badge-default { background: var(--border-light); color: var(--text-secondary); }
.class-card {
  background: var(--card);
  border-radius: var(--radius-card);
  padding: 18px 20px;
  margin-bottom: 0;
  cursor: pointer;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
  border: none;
  box-shadow: var(--card-shadow);
}
.class-card:active { transform: scale(0.99); box-shadow: var(--card-shadow); }
.class-card-name { font-size: 17px; font-weight: 600; color: var(--text-primary); margin-bottom: 10px; }
.class-card-stats { display: flex; gap: 16px; font-size: 13px; color: var(--text-secondary); }
.class-card-stat { display: flex; align-items: center; gap: 4px; }
.panel-toolbar { display: flex; align-items: stretch; gap: 10px; margin-bottom: 16px; }
.panel-search { flex: 1; min-width: 0; margin-bottom: 0 !important; }
.btn-add-compact { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 44px; padding: 0 14px; border: none; border-radius: 12px; background: var(--primary); color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; box-shadow: 0 4px 14px rgba(0,122,255,0.22); }
.btn-add-compact:active { transform: scale(0.97); }
.btn-add-compact .ui-icon { width: 16px; height: 16px; }
.student-list, .assignment-list { display: flex; flex-direction: column; gap: 18px; }
.student-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--card); border-radius: 16px; border: none; cursor: pointer; transition: background 0.15s, box-shadow 0.15s; box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
.student-card:active { background: rgba(0,0,0,0.02); box-shadow: 0 1px 2px rgba(0,0,0,0.03); }
.student-card-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, rgba(0,122,255,0.14), rgba(88,86,214,0.12)); color: var(--primary); font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; display: flex; align-items: center; justify-content: center; flex-shrink: 0; padding: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1; }
.student-card-avatar.is-compact { font-size: 11px; letter-spacing: -0.02em; }
.student-card-avatar.is-empty { font-size: 16px; color: var(--text-tertiary); background: var(--border-light); }
.student-card-detail { flex-shrink: 0; border: none; border-radius: 999px; background: var(--border-light); color: var(--text-secondary); font-size: 12px; font-weight: 600; padding: 6px 12px; cursor: pointer; font-family: inherit; transition: background 0.15s; }
.student-card-detail:active { background: var(--border); color: var(--text-primary); }
.submission-student-card.submission-row-exemplar { background: linear-gradient(135deg, rgba(255,59,48,0.04) 0%, rgba(0,122,255,0.05) 100%) !important; }
.student-card-main { flex: 1; min-width: 0; }
.student-card-name { font-size: 15px; font-weight: 600; color: var(--text-primary); line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.student-card-meta { font-size: 12px; color: var(--text-tertiary); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.student-card-level { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.student-card-level.level-good { background: var(--success); }
.student-card-level.level-medium { background: var(--warning); }
.student-card-level.level-poor { background: var(--danger); }
.student-card-edit { width: 34px; height: 34px; border: none; border-radius: 50%; background: transparent; color: var(--text-tertiary); display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.student-card-edit .ui-icon { width: 16px; height: 16px; }
.student-card-edit:active { background: var(--border-light); color: var(--text-secondary); }
.level-good { background: var(--success); }
.level-medium { background: var(--warning); }
.level-poor { background: var(--danger); }
.tabs {
  display: flex;
  background: var(--border-light);
  border-radius: 12px;
  padding: 3px;
  margin-bottom: 20px;
}
.tab-btn {
  flex: 1;
  padding: 8px 16px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}
.tab-btn.active { background: var(--card); color: var(--text-primary); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }
.class-detail-header,
.assignment-detail-header { display: grid; grid-template-columns: minmax(64px, 1fr) auto minmax(64px, 1fr); align-items: center; gap: 8px; padding: 2px 0 16px; }
.class-detail-header .sub-header-back,
.assignment-detail-header .sub-header-back { justify-self: start; font-size: 15px; font-weight: 500; }
.class-detail-header .sub-header-title,
.assignment-detail-header .sub-header-title { justify-self: center; max-width: 100%; font-size: 22px; font-weight: 700; line-height: 1.2; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.assignment-detail-header::after { content: ''; }
.class-detail-header .class-header-settings { justify-self: end; font-size: 13px; padding: 4px 0 4px 8px; gap: 3px; }
.class-header-settings { flex-shrink: 0; display: inline-flex; align-items: center; border: none; background: transparent; color: var(--text-tertiary); font-size: 14px; font-weight: 600; padding: 6px 0 6px 8px; cursor: pointer; font-family: inherit; }
.class-header-settings .ui-icon { width: 15px; height: 15px; opacity: 0.72; }
.class-header-settings:active { color: var(--text-secondary); }
.class-settings-danger { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border-light); text-align: center; }
.class-settings-del { border: none; background: transparent; color: var(--text-tertiary); font-size: 13px; font-weight: 500; padding: 8px 16px; cursor: pointer; font-family: inherit; }
.class-settings-del:active { color: var(--danger); }
.class-panel-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.class-seg {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 11px;
  background: var(--border-light);
  flex-shrink: 0;
}
.class-seg-btn {
  border: none;
  background: transparent;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
}
.class-seg-btn.active { background: var(--card); color: var(--text-primary); box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.class-search {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--border-light);
  margin: 0;
}
.class-search-icon { color: var(--text-tertiary); display: flex; flex-shrink: 0; }
.class-search-icon .ui-icon { width: 15px; height: 15px; }
.class-search input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-size: 14px;
  outline: none;
  color: var(--text-primary);
  font-family: inherit;
}
.class-search input::placeholder { color: var(--text-tertiary); }
.class-panel-add {
  min-height: 36px;
  padding: 0 12px;
  gap: 4px;
  border: none;
  border-radius: 11px;
  background: rgba(0,122,255,0.12);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.12s;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  white-space: nowrap;
}
.class-panel-add .ui-icon { width: 16px; height: 16px; }
.class-panel-add:active { background: rgba(0,122,255,0.18); }
.student-level-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  padding: 4px 9px 4px 7px;
  border-radius: 999px;
  background: var(--border-light);
}
.student-level-tag.level-good { background: rgba(52,199,89,0.12); }
.student-level-tag.level-medium { background: rgba(255,149,0,0.12); }
.student-level-tag.level-poor { background: rgba(255,59,48,0.1); }
.student-level-tag .student-card-level { width: 6px; height: 6px; margin: 0; }
.student-level-text { font-size: 11px; font-weight: 600; line-height: 1; color: var(--text-secondary); }
.student-level-tag.level-good .student-level-text { color: var(--success); }
.student-level-tag.level-medium .student-level-text { color: var(--warning); }
.student-level-tag.level-poor .student-level-text { color: var(--danger); }
.student-header-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.student-action-primary { background: #007AFF; color: #fff; border: none; box-shadow: 0 2px 8px rgba(0,122,255,0.22); font-weight: 600; }
.student-action-primary:active { filter: brightness(0.95); }
.student-action-secondary { background: var(--border-light); color: var(--text-secondary); border: none; font-weight: 600; }
.student-action-secondary:active { background: var(--border); }
.student-action-danger { background: transparent; color: var(--text-tertiary); border: none; font-weight: 600; }
.student-action-danger:active { color: var(--danger); background: rgba(255,59,48,0.08); }
#classDetailView .sub-header { margin-bottom: 14px; padding-bottom: 0; }
.search-box {
  display: flex;
  align-items: center;
  background: var(--border-light);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 16px;
  border: none;
}
.search-box-icon { font-size: 16px; color: var(--text-tertiary); margin-right: 8px; }
.search-box input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 15px;
  outline: none;
  color: var(--text-primary);
}
.search-box input::placeholder { color: var(--text-tertiary); }
.input-group { margin-bottom: 16px; }
.input-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.input-field {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  font-size: 15px;
  background: var(--card);
  color: var(--text-primary);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.input-field:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,122,255,0.1); }
.input-field::placeholder { color: var(--text-tertiary); }
textarea.input-field { min-height: 100px; resize: vertical; font-family: inherit; }
select.input-field { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238E8E93' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.content-box {
  background: var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px;
  font-size: 15px;
  line-height: 1.8;
  white-space: pre-wrap;
  word-wrap: break-word;
  max-height: 400px;
  overflow-y: auto;
}
.content-box-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.content-box-title { font-size: 14px; font-weight: 600; color: var(--text-secondary); flex-shrink: 0; padding-top: 4px; }
.content-box-toolbar { display: flex; align-items: center; gap: 6px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.content-toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s ease, opacity 0.12s ease;
  white-space: nowrap;
  line-height: 1;
}
.content-toolbar-btn .ui-icon { width: 14px; height: 14px; }
.content-toolbar-btn:active:not(:disabled) { background: var(--border-light); }
.content-toolbar-btn.is-ghost { color: var(--text-tertiary); padding: 6px 8px; }
.content-toolbar-btn.is-action { background: rgba(0, 122, 255, 0.08); color: var(--primary); }
.content-toolbar-btn.is-action:active:not(:disabled) { background: rgba(0, 122, 255, 0.14); }
.content-toolbar-btn.is-primary { background: #007AFF; color: #fff; box-shadow: 0 2px 8px rgba(0, 122, 255, 0.22); padding: 6px 12px; }
.content-toolbar-btn.is-primary:active:not(:disabled) { filter: brightness(0.95); }
.content-toolbar-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.modal-overlay {
  display: flex;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.48);
  z-index: 200;
  align-items: flex-end;
  justify-content: center;
  transition: opacity 0.34s ease, visibility 0.34s;
}
.modal-overlay.active { visibility: visible; opacity: 1; pointer-events: auto; }
.modal-content {
  background: var(--card);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px 16px calc(24px + var(--safe-area-bottom));
  transform: translateY(28px);
  opacity: 0;
  transition: transform 0.46s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.36s ease;
  box-shadow: 0 -18px 48px rgba(0,0,0,0.16);
}
.modal-overlay.active .modal-content { transform: translateY(0); opacity: 1; }
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.modal-title { font-size: 18px; font-weight: 600; }
.modal-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-secondary);
  cursor: pointer;
  border: none;
}
.modal-close:active { background: var(--border); }
.confirm-overlay {
  display: flex;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.48);
  z-index: 300;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: opacity 0.3s ease, visibility 0.3s;
}
.confirm-overlay.active { visibility: visible; opacity: 1; pointer-events: auto; }
.confirm-dialog {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 100%;
  max-width: 300px;
  text-align: center;
  transform: scale(0.94) translateY(10px);
  opacity: 0;
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
  box-shadow: 0 -18px 48px rgba(0,0,0,0.16);
}
.confirm-overlay.active .confirm-dialog { transform: scale(1) translateY(0); opacity: 1; }
.confirm-icon { font-size: 48px; margin-bottom: 12px; }
.confirm-title { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.confirm-message { font-size: 14px; color: var(--text-secondary); margin-bottom: 20px; line-height: 1.5; }
.confirm-actions { display: flex; gap: 12px; }
.confirm-actions .btn { flex: 1; }
.float-btn {
  position: fixed;
  right: 16px;
  bottom: calc(var(--tabbar-height) + var(--safe-area-bottom) + 20px);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: white;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 122, 255, 0.2);
  cursor: pointer;
  border: none;
  z-index: 90;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
@media (min-width: 768px) {
  .float-btn { right: calc(50% - 240px + 16px); }
}
.float-btn:active { transform: scale(0.92); }
.float-btn:hover { transform: scale(1.05); box-shadow: 0 6px 20px rgba(0, 122, 255, 0.3); }
.float-btn-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; transition: transform 0.3s; }
.float-btn:hover .float-btn-avatar { transform: scale(1.05); }
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}
.empty-icon { font-size: 64px; margin-bottom: 16px; opacity: 0.6; }
.empty-text { font-size: 15px; margin-bottom: 20px; }
.loading-spinner {
  width: 28px;
  height: 28px;
  border: 2.5px solid rgba(0, 122, 255, 0.12);
  border-top-color: var(--primary);
  border-right-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 32px auto;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.loading-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  z-index: 250;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.loading-overlay.active { display: flex; }
.loading-text { margin-top: 16px; font-size: 14px; color: var(--text-secondary); }
.toast {
  position: fixed;
  top: calc(var(--header-height) + var(--safe-area-top) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: white;
  padding: 10px 18px;
  border-radius: 20px;
  font-size: 13px;
  z-index: 400;
  opacity: 0;
  transition: all 0.3s ease;
  max-width: calc(100% - 40px);
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.action-row {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.action-row .btn { flex: 1; min-width: 100px; }
.preview-image {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  border-radius: var(--radius-md);
  margin-top: 12px;
}
.preview-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.preview-item { width: 88px; height: 88px; border-radius: var(--radius-md); overflow: hidden; background: var(--border-light); position: relative; }
.preview-item img { width: 100%; height: 100%; object-fit: cover; }
.preview-item.add { display: flex; align-items: center; justify-content: center; color: var(--primary); background: rgba(0, 122, 255, 0.06); font-size: 26px; cursor: pointer; }
.preview-item.add:active { transform: scale(0.96); }
.preview-remove { position: absolute; top: 4px; right: 4px; width: 18px; height: 18px; border-radius: 50%; background: rgba(0,0,0,0.6); color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.preview-zoom { position: absolute; left: 4px; bottom: 4px; padding: 2px 6px; border-radius: 10px; background: rgba(0,0,0,0.5); color: #fff; font-size: 10px; }
.image-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: none; align-items: center; justify-content: center; z-index: 260; }
.image-modal.active { display: flex; }
.image-modal img { max-width: 92vw; max-height: 86vh; border-radius: var(--radius-md); background: #000; }
.image-modal-close { position: fixed; top: calc(var(--header-height) + 12px); right: 16px; width: 34px; height: 34px; border-radius: 50%; background: rgba(0,0,0,0.6); color: #fff; font-size: 18px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.preview-count { margin-top: 8px; font-size: 12px; color: var(--text-secondary); }
.file-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--background);
  border-radius: var(--radius-sm);
  margin-top: 12px;
}
.progress-card { background: var(--background); border-radius: var(--radius-sm); padding: 12px; margin-top: 12px; }
.progress-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; }
.progress-track { background: var(--border); border-radius: 6px; height: 6px; overflow: hidden; }
.progress-fill { height: 100%; width: 0%; background: var(--primary-gradient); transition: width 0.3s; }
.progress-detail { margin-top: 6px; font-size: 12px; color: var(--text-tertiary); }
.upload-card { overflow: hidden; max-height: 560px; opacity: 1; transform: translateY(0); transition: max-height 0.32s ease, opacity 0.24s ease, transform 0.32s ease, padding 0.32s ease, margin 0.32s ease, border-width 0.32s ease; }
.upload-card.upload-card-hidden { max-height: 0; opacity: 0; transform: translateY(-8px); padding-top: 0; padding-bottom: 0; margin-bottom: 0; border-width: 0; pointer-events: none; }
.file-icon { font-size: 32px; }
.file-name { font-size: 14px; color: var(--text-secondary); flex: 1; word-break: break-all; }
.history-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 0;
  margin: 0 -16px;
  padding: 0 16px;
  -webkit-overflow-scrolling: touch;
}
.history-scroll::-webkit-scrollbar { display: none; }
.history-item {
  flex-shrink: 0;
  width: 158px;
  padding: 14px;
  background: var(--card);
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: var(--card-shadow);
  border: none;
}
.history-item:active { transform: scale(0.97); }
.history-item-title { font-size: 13px; font-weight: 500; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-item-time { font-size: 11px; color: var(--text-tertiary); white-space: nowrap; }
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.page-title { font-size: 22px; font-weight: 700; color: var(--text-primary); }
.assignment-card {
  background: var(--card);
  border-radius: 18px;
  padding: 0;
  border: 0.5px solid rgba(0,0,0,0.06);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.06);
}
.assignment-card:hover { box-shadow: 0 2px 4px rgba(0,0,0,0.05), 0 8px 24px rgba(0,0,0,0.09); transform: translateY(-1px); }
.assignment-card:active { transform: translateY(0); box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 4px 14px rgba(0,0,0,0.06); }
.assignment-card-head { display: flex; align-items: flex-start; gap: 12px; padding: 16px 16px 14px; cursor: pointer; }
.assignment-card-head:active { opacity: 0.92; }
.assignment-card-chevron { font-size: 20px; color: var(--text-tertiary); line-height: 1; flex-shrink: 0; padding-left: 4px; margin-top: 3px; }
.assignment-card-actions { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 14px; background: var(--background); border-top: 0.5px solid var(--border-light); }
.assignment-primary-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.assignment-primary-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; border: none; border-radius: 14px; font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit; transition: background 0.15s, transform 0.1s; }
.assignment-primary-btn .ui-icon { width: 16px; height: 16px; }
.assignment-primary-collect { background: rgba(0,122,255,0.12); color: #007AFF; box-shadow: none; }
.assignment-primary-collect:active { background: rgba(0,122,255,0.18); transform: scale(0.98); }
.assignment-primary-collect .ui-icon { color: #007AFF; }
.assignment-primary-desk { background: rgba(88,86,214,0.08); color: #5856D6; }
.assignment-primary-desk:active { background: rgba(88,86,214,0.14); transform: scale(0.98); }
.assignment-secondary-btns { display: flex; align-items: stretch; justify-content: space-between; gap: 2px; padding-top: 2px; }
.assignment-mini-btn { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-height: unset; padding: 10px 4px; border: none; border-radius: 12px; background: transparent; color: var(--text-primary); font-size: 11px; font-weight: 600; cursor: pointer; font-family: inherit; transition: color 0.12s; }
.assignment-mini-btn .ui-icon { width: 18px; height: 18px; color: currentColor; opacity: 0.88; transition: color 0.12s, opacity 0.12s; }
.assignment-mini-btn span { line-height: 1.15; }
.assignment-mini-btn:hover { color: #007AFF; background: transparent; }
.assignment-mini-btn:hover .ui-icon { color: #007AFF; opacity: 1; }
.assignment-mini-btn:active { color: #0066DD; background: rgba(0,122,255,0.06); }
.assignment-mini-btn:active .ui-icon { color: #0066DD; opacity: 1; }
.assignment-mini-danger { color: var(--text-primary); }
.assignment-mini-danger:hover { color: #007AFF; background: transparent; }
.assignment-mini-danger:hover .ui-icon { color: #007AFF; opacity: 1; }
.assignment-mini-danger:active { color: #FF3B30; background: rgba(255,59,48,0.06); }
.assignment-mini-danger:active .ui-icon { color: #FF3B30; opacity: 1; }
.assignment-mini-review { color: #5856D6; }
.assignment-mini-review:hover { color: #5856D6; background: transparent; }
.assignment-mini-review:hover .ui-icon { color: #5856D6; opacity: 1; }
.assignment-mini-review:active { color: #4745B5; background: rgba(88,86,214,0.08); }
.assignment-mini-review.is-disabled, .assignment-mini-review.is-disabled:active { color: var(--text-tertiary); opacity: 0.55; cursor: default; }
.assignment-mini-review.is-disabled .ui-icon { color: var(--text-tertiary); opacity: 0.55; }
.review-ppt-sheet { max-height: 88vh; display: flex; flex-direction: column; overflow: hidden; }
#reviewPptSheet .review-ppt-sheet { max-height: min(88dvh, calc(100dvh - 16px)); }
@media (min-width: 900px) {
  #reviewPptSheet .review-ppt-sheet { max-width: min(92vw, 760px); max-height: min(92vh, 820px); }
}
.review-ppt-mode-seg { display: flex; gap: 0; padding: 3px; border-radius: 10px; background: var(--border-light); margin-bottom: 14px; }
.review-ppt-mode-btn { flex: 1; border: none; background: transparent; padding: 8px 10px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--text-secondary); cursor: pointer; font-family: inherit; }
.review-ppt-mode-btn.active { background: var(--card); color: var(--text-primary); box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
.review-ppt-custom-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.review-ppt-custom-row { display: flex; align-items: center; gap: 8px; }
.review-ppt-custom-input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--border-light); border-radius: 10px; font-size: 14px; font-family: inherit; background: var(--card); color: var(--text-primary); }
.review-ppt-custom-input:focus { outline: none; border-color: rgba(88,86,214,0.45); }
.review-ppt-custom-del { width: 32px; height: 32px; border: none; border-radius: 8px; background: rgba(255,59,48,0.1); color: #FF3B30; font-size: 18px; cursor: pointer; flex-shrink: 0; line-height: 1; }
.review-ppt-custom-add { align-self: flex-start; border: none; background: transparent; color: #5856D6; font-size: 13px; font-weight: 600; padding: 6px 0; cursor: pointer; font-family: inherit; }
.review-ppt-custom-hint { font-size: 12px; color: var(--text-tertiary); margin-top: 8px; }
.review-ppt-body { overflow-y: auto; flex: 1; padding: 8px 16px 16px; -webkit-overflow-scrolling: touch; min-height: 0; }
.review-ppt-footer { padding: 12px 16px calc(12px + var(--safe-area-bottom)); border-top: 1px solid var(--border-light); }
.review-ppt-footer .btn { margin: 0; text-decoration: none; display: flex; align-items: center; justify-content: center; font-size: 13px; padding-left: 8px; padding-right: 8px; }
.review-ppt-confirm-title { font-size: 18px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.review-ppt-confirm-sub { font-size: 13px; color: var(--text-secondary); margin-bottom: 14px; }
.review-ppt-confirm-desc { font-size: 14px; line-height: 1.55; color: var(--text-secondary); margin-bottom: 16px; }
.review-ppt-existing { margin-top: 4px; border-radius: 14px; background: rgba(88,86,214,0.06); overflow: hidden; }
.review-ppt-existing-head { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; }
.review-ppt-existing-toggle { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; padding: 0; border: none; background: transparent; cursor: pointer; font-family: inherit; text-align: left; }
.review-ppt-existing-label { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; color: #5856D6; }
.review-ppt-download-link { flex-shrink: 0; font-size: 13px; font-weight: 600; color: var(--primary); padding: 7px 12px; border-radius: 999px; background: rgba(0,122,255,0.1); text-decoration: none; white-space: nowrap; }
.review-ppt-download-link:active { background: rgba(0,122,255,0.16); }
.review-ppt-existing-chevron { font-size: 18px; color: var(--text-tertiary); transition: transform 0.2s; flex-shrink: 0; }
.review-ppt-existing-toggle.is-open .review-ppt-existing-chevron { transform: rotate(90deg); }
.review-ppt-existing-detail { padding: 0 12px 12px; border-top: 1px solid rgba(88,86,214,0.08); }
.review-ppt-existing-detail[hidden] { display: none !important; }
.review-ppt-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 20px; text-align: center; }
.review-ppt-loading-text { margin-top: 16px; font-size: 16px; font-weight: 600; color: var(--text-primary); }
.review-ppt-loading-sub { margin-top: 8px; font-size: 13px; color: var(--text-secondary); }
.review-ppt-result-meta { font-size: 13px; color: var(--text-secondary); margin-bottom: 12px; }
.review-ppt-issue-list { display: flex; flex-direction: column; gap: 12px; }
.review-ppt-issue-card { padding: 14px; border-radius: 14px; background: var(--border-light); }
.review-ppt-issue-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.review-ppt-issue-num { width: 22px; height: 22px; border-radius: 999px; background: rgba(88,86,214,0.14); color: #5856D6; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.review-ppt-issue-title { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.review-ppt-issue-desc { font-size: 13px; line-height: 1.5; color: var(--text-secondary); margin-bottom: 10px; }
.review-ppt-issue-examples { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.review-ppt-issue-examples.is-bad .review-ppt-excerpt { border-left: 3px solid #FF3B30; }
.review-ppt-issue-examples.is-good .review-ppt-excerpt { border-left: 3px solid #34C759; }
.review-ppt-excerpt { padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,0.72); }
.review-ppt-excerpt-text { font-size: 13px; line-height: 1.5; color: var(--text-primary); white-space: pre-wrap; word-break: break-word; }
.review-ppt-excerpt-name { margin-top: 6px; font-size: 12px; color: var(--text-tertiary); text-align: right; }
.review-ppt-error { padding: 40px 16px; text-align: center; }
.review-ppt-error-icon { opacity: 0.5; margin-bottom: 12px; }
.review-ppt-error-text { font-size: 14px; color: var(--text-secondary); line-height: 1.5; }
.assignment-detail-actions { display: flex; flex-direction: column; gap: 14px; width: 100%; margin-top: 16px; padding-top: 16px; border-top: 0.5px solid var(--border-light); }
.assignment-detail-actions .assignment-primary-btn { min-height: 40px; font-size: 13px; }
.assignment-detail-actions .assignment-mini-btn { padding: 8px 4px; font-size: 10px; }
.assignment-detail-actions .assignment-mini-btn .ui-icon { width: 16px; height: 16px; }
.correct-collect-card { text-align: center; padding: 14px; }
.correct-collect-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  aspect-ratio: 5 / 2;
  min-height: 148px;
  max-height: 220px;
  padding: 24px 20px;
  border: 1px solid rgba(0,122,255,0.14);
  border-radius: var(--radius-xl);
  background: rgba(0,122,255,0.06);
  box-shadow: 0 4px 16px rgba(0,122,255,0.07);
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}
.correct-collect-vf { position: absolute; inset: 0; pointer-events: none; }
.correct-collect-vf-c {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(0,122,255,0.3);
}
.correct-collect-vf-c.tl { top: 12px; left: 12px; border-right: none; border-bottom: none; border-radius: 5px 0 0 0; }
.correct-collect-vf-c.tr { top: 12px; right: 12px; border-left: none; border-bottom: none; border-radius: 0 5px 0 0; }
.correct-collect-vf-c.bl { bottom: 12px; left: 12px; border-right: none; border-top: none; border-radius: 0 0 0 5px; }
.correct-collect-vf-c.br { bottom: 12px; right: 12px; border-left: none; border-top: none; border-radius: 0 0 5px 0; }
.correct-collect-icon {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(0,122,255,0.1);
  box-shadow: 0 4px 12px rgba(0,122,255,0.1);
}
.correct-collect-icon .ui-icon { width: 32px; height: 32px; color: var(--primary); }
.correct-collect-label { position: relative; z-index: 1; font-size: 17px; font-weight: 600; color: var(--primary); letter-spacing: 0.02em; }
.correct-collect-btn:active { transform: scale(0.98); background: rgba(0,122,255,0.1); border-color: rgba(0,122,255,0.22); }
.correct-collect-btn:active .correct-collect-vf-c { border-color: rgba(0,122,255,0.42); }
.correct-collect-hint { font-size: 13px; color: var(--text-tertiary); margin-top: 12px; line-height: 1.45; }
.trial-photo-bar { display: none; gap: 10px; }
.trial-photo-btn { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 112px; border: none; border-radius: 18px; background: rgba(0,122,255,0.06); color: var(--text-primary); font-size: 15px; font-weight: 600; cursor: pointer; font-family: inherit; transition: background 0.15s, transform 0.1s; }
.trial-photo-btn .ui-icon { width: 28px; height: 28px; color: var(--primary); }
.trial-photo-btn:active { transform: scale(0.98); }
.trial-photo-camera { background: #007AFF; color: #fff; box-shadow: 0 4px 16px rgba(0,122,255,0.28); }
.trial-photo-camera .ui-icon { color: #fff; }
.trial-photo-camera:active { background: #0066DD; }
.trial-photo-album { background: var(--border-light); }
.trial-photo-album:active { background: var(--border); }
.sheet-export-footer { flex-shrink: 0; padding: 18px 20px 14px; border-top: 0.5px solid var(--border-light); background: var(--card); }
.sheet-export-footer-label { font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 12px; letter-spacing: -0.01em; }
.sheet-export-modes .export-mode-seg { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; padding: 4px; border-radius: 14px; background: rgba(120,120,128,0.06); }
.sheet-export-modes .export-mode-btn { flex: 1; min-width: 80px; padding: 11px 12px; border: none; border-radius: 11px; background: transparent; font-size: 13px; color: var(--text-secondary); cursor: pointer; font-weight: 500; transition: background 0.15s, color 0.15s, transform 0.1s; letter-spacing: 0.01em; }
.sheet-export-modes .export-mode-btn:hover:not(.active) { background: rgba(120,120,128,0.06); color: var(--text-primary); }
.sheet-export-modes .export-mode-btn.active { color: #007AFF; background: rgba(0,122,255,0.1); font-weight: 600; box-shadow: none; }
.sheet-export-modes .export-mode-btn:active { transform: scale(0.98); }
.export-student-scroll { min-height: 0; }
.btn-desk { background: linear-gradient(135deg, #5856D6, #7B61FF); color: #fff; border: none; font-weight: 600; }
.btn-desk:hover { filter: brightness(1.05); }
.btn-collect { background: #007AFF; color: #fff; border: none; font-weight: 600; box-shadow: 0 4px 14px rgba(0,122,255,0.24); }
.btn-collect:hover { filter: brightness(1.05); }
.btn-quiet { background: var(--border-light); color: var(--text-secondary); border: none; }
.btn-quiet:hover { background: var(--border); color: var(--text-primary); }
.submission-status { font-weight: 600; }
.submission-status-corrected { color: #5856D6; }
.submission-status-submitted { color: #34C759; }
.submission-status-pending { color: #FF3B30; }
.submission-status-processing { color: #FF9500; }
.submission-row-exemplar{background:linear-gradient(135deg,rgba(255,59,48,0.04) 0%,rgba(0,122,255,0.05) 100%)!important}
.submission-exemplar-star{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;margin-left:6px;vertical-align:middle}
.submission-exemplar-star svg{width:16px;height:16px;fill:url(#appExemplarGrad)}
.assignment-card-info { flex: 1; min-width: 0; }
.assignment-title-row { display: flex; align-items: center; gap: 14px; min-width: 0; min-height: 28px; }
.assignment-title { flex: 1; min-width: 0; font-size: 20px; font-weight: 700; line-height: 1.3; color: var(--text-primary); }
.assignment-stats { flex-shrink: 0; display: inline-flex; align-items: center; align-self: center; }
.assignment-stats .stats-pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; background: var(--border-light); border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--text-secondary); white-space: nowrap; }
.assignment-stats .stats-pill--zero { background: var(--border-light); color: var(--text-tertiary); }
.assignment-stats .stats-pill--active { background: rgba(52,199,89,0.14); color: var(--success); }
.assignment-stats .stats-pill--pending { background: rgba(255,149,0,0.14); color: var(--warning); }
.assignment-card-meta { font-size: 12px; color: var(--text-tertiary); margin-top: 6px; line-height: 1.4; }
.assignment-card-meta.has-pending { color: var(--text-secondary); }
.grade-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
}
.grade-good { background: rgba(52, 199, 89, 0.15); color: var(--success); }
.grade-medium { background: rgba(255, 149, 0, 0.15); color: var(--warning); }
.grade-poor { background: rgba(255, 59, 48, 0.15); color: var(--danger); }
.setting-item {
  display: flex;
  align-items: center;
  padding: 16px 18px;
  background: var(--card);
  border-radius: var(--radius-card);
  margin-bottom: 10px;
  cursor: pointer;
  border: none;
  box-shadow: var(--card-shadow);
  transition: background 0.15s ease;
}
.setting-item:active { background: rgba(0,0,0,0.02); }
.setting-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-right: 12px;
}
.setting-icon.green { background: rgba(52, 199, 89, 0.15); }
.setting-icon.blue { background: rgba(0, 122, 255, 0.12); }
.setting-icon.purple { background: rgba(0, 122, 255, 0.12); }
.setting-icon.pink { background: rgba(90, 200, 250, 0.15); }
.setting-icon.orange { background: rgba(255, 152, 0, 0.15); }
.setting-icon.gray { background: var(--border-light); }
.setting-content { flex: 1; }
.setting-title { font-size: 16px; font-weight: 500; }
.setting-subtitle { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.setting-arrow { color: var(--text-tertiary); }
.detail-header {
  background: var(--card);
  border-radius: var(--radius-card);
  padding: 24px 20px;
  margin-bottom: var(--space-section);
  text-align: center;
  border: none;
  box-shadow: var(--card-shadow);
}
.detail-title { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.detail-subtitle { font-size: 14px; color: var(--text-secondary); }
.detail-badges { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
.info-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}
.info-row:last-child { border-bottom: none; }
.info-label { font-size: 14px; color: var(--text-secondary); }
.info-value { font-size: 14px; font-weight: 500; }
.sub-page { display: none; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: var(--background); z-index: 50; overflow-y: auto; }
.sub-page.active { display: block; }
.sub-page-content { padding: 16px; padding-top: calc(var(--header-height) + var(--safe-area-top) + 12px); padding-bottom: calc(var(--tabbar-height) + var(--safe-area-bottom) + 16px); }

/* ==========================================
   连拍开关 (iOS 风格 toggle)
   ========================================== */
.burst-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  margin: 12px 0;
  background: var(--border-light);
  border-radius: 14px;
  border: none;
}
.burst-toggle-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.burst-toggle-label .burst-icon {
  font-size: 16px;
  line-height: 1;
}
.burst-toggle-hint {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 400;
}
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 51px;
  height: 31px;
  flex-shrink: 0;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #E9E9EB;
  transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 31px;
}
.toggle-slider:before {
  position: absolute;
  content: "";
  height: 27px;
  width: 27px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15), 0 1px 1px rgba(0, 0, 0, 0.06);
}
.toggle-switch input:checked + .toggle-slider {
  background-color: var(--success);
}
.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(20px);
}
.toggle-switch input:focus-visible + .toggle-slider {
  box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.3);
}
.sheet { padding: 0 0 calc(8px + var(--safe-area-bottom)); max-height: 92vh; display: flex; flex-direction: column; }
.sheet-header { padding: 16px 20px 8px; display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; }
.sheet-title { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; color: var(--text-primary); }
.sheet-close { width: 30px; height: 30px; border-radius: 50%; background: var(--border-light); border: none; cursor: pointer; font-size: 16px; color: var(--text-secondary); display: flex; align-items: center; justify-content: center; transition: background 0.15s; }
.sheet-close:active { background: var(--border); }
.sheet-body { flex: 1; overflow-y: auto; padding: 8px 16px 16px; -webkit-overflow-scrolling: touch; }
.sheet-section { background: var(--card); border-radius: var(--radius-xl); margin-bottom: 16px; overflow: hidden; box-shadow: var(--card-shadow); }
.sheet-section-tip { font-size: 12px; color: var(--text-tertiary); padding: 6px 4px 0; line-height: 1.5; }
.sheet-section-header { padding: 14px 16px 6px; }
.sheet-section-header .title { font-size: 14px; font-weight: 600; color: var(--text-primary); letter-spacing: -0.005em; }
.sheet-section-header .subtitle { font-size: 12px; color: var(--text-tertiary); margin-top: 2px; }
.sheet-row { padding: 12px 16px; border-top: 0.5px solid var(--border-light); display: flex; align-items: center; gap: 12px; min-height: 44px; }
.sheet-row:first-child { border-top: none; }
.sheet-row.column { flex-direction: column; align-items: stretch; gap: 8px; }
.sheet-row .label { font-size: 14px; color: var(--text-primary); flex-shrink: 0; min-width: 64px; font-weight: 500; }
.sheet-row .label-block { font-size: 13px; color: var(--text-secondary); font-weight: 600; letter-spacing: -0.005em; }
.sheet-row .value { flex: 1; text-align: right; color: var(--text-secondary); font-size: 14px; }
.sheet-row input.sheet-input, .sheet-row textarea.sheet-input, .sheet-row select.sheet-input { flex: 1; border: none; background: transparent; padding: 0; font-size: 15px; color: var(--text-primary); outline: none; font-family: inherit; }
.sheet-row textarea.sheet-input { min-height: 60px; resize: vertical; line-height: 1.5; }
.sheet-row input.sheet-input::placeholder, .sheet-row textarea.sheet-input::placeholder { color: var(--text-tertiary); }
.sheet-row select.sheet-input { appearance: none; text-align: right; cursor: pointer; }
.sheet-row .chev { color: var(--text-tertiary); font-size: 14px; }
.sheet-input-block { width: 100%; border: none; background: var(--border-light); padding: 10px 12px; border-radius: var(--radius-md); font-size: 14px; color: var(--text-primary); outline: none; font-family: inherit; transition: background 0.15s; }
.sheet-input-block:focus { background: #EEF1F5; }
textarea.sheet-input-block { min-height: 60px; resize: vertical; line-height: 1.5; }
.sheet-input-block::placeholder { color: var(--text-tertiary); }
.sheet-actions { padding: 12px 16px calc(12px + var(--safe-area-bottom)); background: var(--card); border-top: 0.5px solid var(--border-light); flex-shrink: 0; }
.sheet-actions .btn { width: 100%; padding: 12px 18px; border-radius: var(--radius-md); font-size: 15px; font-weight: 600; }
.sheet-actions-split { display: flex; flex-direction: row; gap: 10px; }
.sheet-actions-split .btn { flex: 1; width: auto; }
.segmented { display: flex; background: var(--border-light); border-radius: 9px; padding: 2px; gap: 2px; flex: 1; }
.segmented .seg { flex: 1; padding: 7px 8px; text-align: center; font-size: 13px; color: var(--text-secondary); border-radius: 7px; cursor: pointer; transition: background 0.18s, color 0.18s, transform 0.18s; user-select: none; white-space: nowrap; font-weight: 500; }
.segmented .seg:active { transform: scale(0.97); }
.segmented .seg.active { background: var(--card); color: var(--text-primary); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.06); }
.segmented.compact .seg { padding: 6px 6px; font-size: 12px; }
.toggle-switch.small { width: 40px; height: 24px; }
.toggle-switch.small .toggle-slider:before { height: 20px; width: 20px; }
.toggle-switch.small input:checked + .toggle-slider:before { transform: translateX(16px); }
.memory-card { background: linear-gradient(135deg, rgba(103, 80, 164, 0.06), rgba(0, 122, 255, 0.04)); border-radius: var(--radius-xl); padding: 18px; box-shadow: var(--card-shadow); margin-bottom: 20px; }
.memory-card .head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.memory-card .head .t { font-size: 14px; font-weight: 600; color: #6750A4; letter-spacing: -0.005em; }
.memory-card .head .s { font-size: 11px; color: var(--text-tertiary); }
.memory-card textarea { width: 100%; border: none; background: rgba(255, 255, 255, 0.6); border-radius: var(--radius-md); padding: 10px 12px; font-size: 14px; color: var(--text-secondary); resize: none; min-height: 76px; line-height: 1.6; outline: none; cursor: not-allowed; font-family: inherit; }
.memory-card .foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; gap: 8px; }
.memory-card .foot p { font-size: 12px; color: var(--text-secondary); margin: 0; line-height: 1.5; flex: 1; }
.memory-card .foot button { font-size: 13px; padding: 6px 10px; background: rgba(255, 255, 255, 0.6); border: none; border-radius: 8px; color: #6750A4; font-weight: 500; cursor: pointer; transition: background 0.15s; }
.memory-card .foot button:active { background: rgba(255, 255, 255, 0.9); }
.section-card { background: var(--card); border-radius: var(--radius-card); padding: 14px 16px; margin-bottom: 12px; box-shadow: var(--card-shadow); transition: box-shadow 0.2s; }
.section-card:focus-within { box-shadow: 0 0 0 2px rgba(0,122,255,0.18), var(--card-shadow); }
.section-card .row1 { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.section-card .row1 input { flex: 1; border: none; background: transparent; padding: 4px 0; font-size: 15px; font-weight: 600; color: var(--text-primary); outline: none; letter-spacing: -0.005em; }
.section-card .row1 input::placeholder { color: var(--text-tertiary); font-weight: 400; }
.section-card .row1 button { width: 28px; height: 28px; border: none; background: var(--border-light); border-radius: 50%; cursor: pointer; font-size: 12px; color: var(--text-secondary); display: flex; align-items: center; justify-content: center; transition: background 0.15s; }
.section-card .row1 button:active:not(:disabled) { background: var(--border); }
.section-card .row1 button:disabled { opacity: 0.35; cursor: not-allowed; }
.section-card .row1 button.danger { background: transparent; color: var(--danger); font-weight: 500; width: auto; padding: 0 8px; height: 28px; }
.section-card textarea { width: 100%; border: none; background: var(--border-light); border-radius: 8px; padding: 8px 10px; font-size: 13px; color: var(--text-primary); resize: vertical; min-height: 50px; outline: none; line-height: 1.5; font-family: inherit; transition: background 0.15s; }
.section-card textarea:focus { background: #EEF1F5; }
.section-card textarea::placeholder { color: var(--text-tertiary); }
.section-card .row3 { display: flex; align-items: center; gap: 14px; margin-top: 8px; font-size: 12px; color: var(--text-secondary); }
.section-card .row3 .grp { display: flex; align-items: center; gap: 6px; }
.section-card .row3 input[type=number] { width: 56px; padding: 3px 6px; border: 1px solid var(--border); border-radius: 6px; font-size: 12px; text-align: center; outline: none; background: var(--card); }
.section-card .row3 input[type=number]:focus { border-color: var(--primary); }
.preview-card { background: var(--background); border-radius: var(--radius-xl); padding: 16px 18px; box-shadow: var(--card-shadow); }
.preview-card .h { font-size: 12px; color: var(--text-tertiary); font-weight: 600; margin-bottom: 8px; letter-spacing: 0.02em; text-transform: none; }
.preview-card pre { white-space: pre-wrap; font-size: 13px; color: var(--text-secondary); margin: 0; font-family: inherit; line-height: 1.6; max-height: 220px; overflow: auto; }
.preview-card pre.empty { color: var(--text-tertiary); font-style: italic; }
.add-section-btn { width: 100%; background: rgba(0, 122, 255, 0.06); border: none; border-radius: var(--radius-card); padding: 14px; font-size: 14px; color: var(--primary); cursor: pointer; font-weight: 600; transition: background 0.15s; margin-top: 8px; }
.add-section-btn:active { background: rgba(0, 122, 255, 0.12); }
#addTemplateModal .tpl-editor-body { padding: 12px 20px 20px; }
#addTemplateModal .tpl-editor-meta { background: var(--card); border-radius: var(--radius-xl); padding: 16px 18px; box-shadow: var(--card-shadow); margin-bottom: 20px; display: flex; flex-direction: column; gap: 16px; }
#addTemplateModal .tpl-field { display: flex; flex-direction: column; gap: 8px; }
#addTemplateModal .tpl-field-label { font-size: 13px; font-weight: 600; color: var(--text-secondary); letter-spacing: -0.01em; }
#addTemplateModal .tpl-field-input { width: 100%; box-sizing: border-box; border: none; background: var(--border-light); border-radius: var(--radius-md); padding: 14px 16px; font-size: 17px; font-weight: 500; color: var(--text-primary); outline: none; font-family: inherit; min-height: 48px; transition: background 0.15s, box-shadow 0.15s; }
#addTemplateModal .tpl-field-input:focus { background: #EEF1F5; box-shadow: 0 0 0 3px rgba(0,122,255,0.14); }
#addTemplateModal .tpl-field-input::placeholder { color: var(--text-tertiary); font-weight: 400; }
#addTemplateModal .tpl-field-textarea { width: 100%; box-sizing: border-box; border: none; background: var(--border-light); border-radius: var(--radius-md); padding: 14px 16px; font-size: 15px; line-height: 1.55; color: var(--text-primary); resize: vertical; min-height: 132px; outline: none; font-family: inherit; transition: background 0.15s, box-shadow 0.15s; }
#addTemplateModal .tpl-field-textarea:focus { background: #EEF1F5; box-shadow: 0 0 0 3px rgba(0,122,255,0.14); }
#addTemplateModal .tpl-field-textarea::placeholder { color: var(--text-tertiary); }
#addTemplateModal .tpl-sep-seg { max-width: 240px; }
#addTemplateModal .tpl-editor-sections-intro { margin-bottom: 12px; padding: 0 2px; }
#addTemplateModal .tpl-editor-sections-title { font-size: 15px; font-weight: 600; color: var(--text-primary); letter-spacing: -0.01em; }
#addTemplateModal .tpl-editor-sections-sub { font-size: 13px; color: var(--text-tertiary); margin-top: 4px; line-height: 1.45; }
#addTemplateModal .tpl-sections-list { display: flex; flex-direction: column; gap: 16px; }
#addTemplateModal .tpl-sections-empty { font-size: 14px; color: var(--text-tertiary); text-align: center; padding: 28px 20px; background: var(--background); border-radius: var(--radius-xl); border: 0.5px solid var(--border-light); line-height: 1.5; }
#addTemplateModal .tpl-section-card { background: var(--card); border-radius: var(--radius-xl); padding: 16px 18px 14px; box-shadow: var(--card-shadow); display: flex; flex-direction: column; gap: 14px; }
#addTemplateModal .tpl-section-card:focus-within { box-shadow: 0 0 0 2px rgba(0,122,255,0.16), var(--card-shadow); }
#addTemplateModal .tpl-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#addTemplateModal .tpl-section-idx { font-size: 13px; font-weight: 600; color: var(--text-tertiary); }
#addTemplateModal .tpl-section-actions { display: flex; align-items: center; gap: 6px; }
#addTemplateModal .tpl-section-act { min-width: 44px; min-height: 36px; padding: 0 12px; border: none; background: var(--border-light); border-radius: 10px; font-size: 13px; font-weight: 500; color: var(--text-secondary); cursor: pointer; transition: background 0.15s, transform 0.15s; }
#addTemplateModal .tpl-section-act:active:not(:disabled) { background: var(--border); transform: scale(0.97); }
#addTemplateModal .tpl-section-act:disabled { opacity: 0.35; cursor: not-allowed; }
#addTemplateModal .tpl-section-act--danger { color: var(--danger); background: rgba(255,59,48,0.08); min-width: auto; }
#addTemplateModal .tpl-section-edit-row { display: flex; align-items: stretch; gap: 14px; }
#addTemplateModal .tpl-section-main { flex: 1; min-width: 0; }
#addTemplateModal .tpl-section-side { flex-shrink: 0; width: 120px; display: flex; flex-direction: column; gap: 14px; padding-top: 21px; }
#addTemplateModal .tpl-side-field { gap: 10px; }
#addTemplateModal .tpl-side-field .toggle-switch { align-self: flex-start; }
#addTemplateModal .tpl-more-num { width: 100%; box-sizing: border-box; padding: 12px 10px; border: none; background: var(--border-light); border-radius: var(--radius-md); font-size: 15px; text-align: center; outline: none; min-height: 44px; }
#addTemplateModal .tpl-more-num:focus { box-shadow: 0 0 0 3px rgba(0,122,255,0.14); }
#addTemplateModal .tpl-more-hint { font-size: 11px; color: var(--text-tertiary); line-height: 1.35; }
#addTemplateModal .tpl-add-section-btn { width: 100%; margin-top: 4px; background: rgba(0,122,255,0.06); border: none; border-radius: var(--radius-xl); padding: 16px; font-size: 15px; color: var(--primary); cursor: pointer; font-weight: 600; min-height: 48px; transition: background 0.15s; }
#addTemplateModal .tpl-add-section-btn:active { background: rgba(0,122,255,0.14); }
#addTemplateModal .tpl-preview-block { margin-top: 20px; background: var(--background); border-radius: var(--radius-xl); padding: 14px 16px 16px; border: 0.5px solid var(--border-light); }
#addTemplateModal .tpl-preview-title { font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 10px; }
#addTemplateModal .tpl-preview-pre { white-space: pre-wrap; font-size: 14px; color: var(--text-secondary); margin: 0; font-family: inherit; line-height: 1.6; max-height: 200px; overflow: auto; padding: 12px 14px; background: var(--card); border-radius: var(--radius-md); }
#addTemplateModal .tpl-preview-pre.empty { color: var(--text-tertiary); font-style: italic; background: var(--card); }
@media (max-width: 599px) {
  #addTemplateModal .tpl-section-edit-row { flex-direction: column; }
  #addTemplateModal .tpl-section-side { width: 100%; flex-direction: row; flex-wrap: wrap; padding-top: 0; }
  #addTemplateModal .tpl-side-field { flex: 1; min-width: 120px; }
}
@media (prefers-color-scheme: dark) {
  #addTemplateModal .tpl-field-input:focus,
  #addTemplateModal .tpl-field-textarea:focus { background: #2C2C2E; }
}
.modal-content.sheet { padding: 0; transform: translateY(28px); opacity: 0; transition: transform 0.46s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.36s ease; }
.re-correct-modal .re-correct-label-opt { font-size: 12px; font-weight: 400; color: var(--text-tertiary); margin-left: 4px; }
.re-correct-modal .re-correct-hint { font-size: 12px; line-height: 1.45; color: var(--text-tertiary); margin: 4px 0 8px; }
.re-correct-modal .re-correct-extra-block { margin-bottom: 4px; }
.re-correct-modal .re-correct-mode-block { margin-top: 4px; }
.re-correct-modal .re-correct-mode-options { display: flex; flex-direction: column; gap: 8px; }
.re-correct-modal .re-correct-mode-card { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; width: 100%; padding: 12px 14px; border: 1.5px solid var(--border-light); border-radius: 12px; background: var(--card); text-align: left; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.re-correct-modal .re-correct-mode-card:active { transform: scale(0.99); }
.re-correct-modal .re-correct-mode-card.active { border-color: rgba(0,122,255,0.45); background: rgba(0,122,255,0.06); }
.re-correct-modal .re-correct-mode-title { font-size: 14px; font-weight: 600; color: var(--text-primary); line-height: 1.35; }
.re-correct-modal .re-correct-mode-card.active .re-correct-mode-title { color: var(--primary); }
.re-correct-modal .re-correct-mode-tag { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 999px; font-size: 10px; font-weight: 600; color: var(--primary); background: rgba(0,122,255,0.12); vertical-align: middle; }
.re-correct-modal .re-correct-mode-desc { font-size: 12px; line-height: 1.45; color: var(--text-tertiary); }
.re-correct-modal .re-correct-remember-block { margin: 0 0 14px; }
.re-correct-modal .re-correct-remember { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-secondary); cursor: pointer; user-select: none; }
.re-correct-modal .re-correct-remember-hint { margin: 4px 0 0 26px; }
#reCorrectModal.modal-overlay { z-index: 400; }
#addTemplateModal.modal-overlay { z-index: 450; }
#reCorrectModal .re-correct-modal { max-height: min(88dvh, calc(100dvh - 16px)); overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.modal-overlay.active .modal-content.sheet { transform: translateY(0); opacity: 1; }
.export-mode-seg { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 12px; padding: 4px; border-radius: 14px; background: rgba(120,120,128,0.06); }
.export-mode-btn { flex: 1; min-width: 80px; padding: 11px 12px; border: none; border-radius: 11px; background: transparent; font-size: 13px; color: var(--text-secondary); cursor: pointer; font-weight: 500; transition: background 0.15s, color 0.15s, transform 0.1s; letter-spacing: 0.01em; }
.export-mode-btn:hover:not(.active) { background: rgba(120,120,128,0.06); color: var(--text-primary); }
.export-mode-btn.active { color: #007AFF; background: rgba(0,122,255,0.1); font-weight: 600; box-shadow: none; }
.export-mode-btn:active { transform: scale(0.98); }
.export-mode-hint { font-size: 12px; color: var(--text-tertiary); margin: 0; }
.ui-icon { width: 1.1em; height: 1.1em; display: inline-block; vertical-align: -0.16em; flex-shrink: 0; stroke-width: 1.75; }
.icon-mark { width: 44px; height: 44px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; background: rgba(0,122,255,0.1); color: var(--primary); }
.icon-mark .ui-icon { width: 24px; height: 24px; }
.page-kicker { font-size: 14px; color: var(--text-secondary); margin-top: 4px; line-height: 1.45; }
.app-sidebar-brand { display: none; }
.nav-chat-item { display: none; }
.setting-icon { color: var(--primary); }
.setting-icon .ui-icon { width: 20px; height: 20px; }
.search-box-icon .ui-icon { width: 16px; height: 16px; }
.upload-zone-icon { width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 18px; display: flex; align-items: center; justify-content: center; color: var(--primary); background: rgba(0,122,255,0.1); font-size: 0; }
.upload-zone-icon .ui-icon { width: 30px; height: 30px; }
.content-box-title { display: inline-flex; align-items: center; gap: 6px; }
.content-box-title .ui-icon { width: 16px; height: 16px; color: var(--primary); }
.empty-state { background: rgba(0, 122, 255, 0.03); border: none; }
.empty-icon { width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 20px; display: flex; align-items: center; justify-content: center; color: var(--primary); background: rgba(0,122,255,0.1); font-size: 0; }
.empty-icon .ui-icon { width: 30px; height: 30px; }
.empty-subtitle { font-size: 13px; color: var(--text-tertiary); line-height: 1.5; max-width: 280px; margin: -10px auto 18px; }
.list-meta-icon { display: inline-flex; align-items: center; gap: 4px; }
.list-meta-icon .ui-icon { width: 14px; height: 14px; }
button, input, select, textarea { font: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible { outline: 3px solid rgba(0,122,255,0.32); outline-offset: 2px; }
.btn { min-height: 44px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn-sm { min-height: 36px; padding: 8px 14px; }
.btn-danger { background: rgba(255,59,48,0.1); color: var(--danger); }
.btn-danger:hover { background: rgba(255,59,48,0.16); color: var(--danger); }
.btn-danger:active { background: rgba(255,59,48,0.22); }
.btn-delete-muted { background: transparent; color: var(--text-tertiary); border: none; }
.btn-delete-muted:hover { background: rgba(255,59,48,0.08); color: var(--danger); }
.btn-delete-muted:active { background: rgba(255,59,48,0.12); color: var(--danger); }
.btn-quiet-danger { background: var(--border-light); color: var(--text-secondary); border: none; }
.btn-quiet-danger:hover { background: rgba(255,59,48,0.08); color: var(--danger); }
.btn-quiet-danger .ui-icon { width: 14px; height: 14px; }
.export-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 4px 4px 12px; }
.export-toolbar .action-chip { display: inline-flex; align-items: center; justify-content: center; padding: 7px 12px; min-height: 32px; border-radius: 10px; border: none; background: rgba(120,120,128,0.08); color: var(--text-secondary); font-size: 12px; font-weight: 500; cursor: pointer; font-family: inherit; transition: background 0.15s, color 0.15s, transform 0.12s; }
.export-toolbar .action-chip:hover { background: rgba(120,120,128,0.12); color: var(--text-primary); }
.export-toolbar .action-chip.active { background: rgba(0,122,255,0.1); color: #007AFF; font-weight: 600; }
.export-toolbar .action-chip:active { transform: scale(0.97); }
.export-toolbar .input-field { height: 36px; padding: 6px 12px; font-size: 13px; flex: 1; min-width: 140px; }
.export-summary { font-size: 13px; color: var(--text-secondary); padding: 0 4px 8px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.export-summary strong { color: var(--text-primary); font-weight: 600; }
.export-section-title { font-size: 12px; font-weight: 600; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.04em; padding: 18px 4px 10px; display: flex; align-items: center; gap: 7px; }
.export-section-title::before { content: ''; width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; background: var(--text-tertiary); opacity: 0.45; }
.export-section--done { color: var(--text-secondary); }
.export-section--done::before { background: var(--success); opacity: 0.75; }
.export-section--pending { color: var(--text-secondary); }
.export-section--pending::before { background: var(--warning); opacity: 0.75; }
.export-section--absent::before { background: var(--text-tertiary); opacity: 0.35; }
.export-grid-section { grid-column: 1 / -1; padding-top: 4px; }
.export-grid-section:first-child { padding-top: 0; }
.export-student-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 2px 0 6px; }
.export-student-card { padding: 8px 10px; border: none; border-radius: 12px; box-shadow: none; cursor: pointer; background: rgba(120,120,128,0.08); transition: background 0.15s, transform 0.12s; min-height: 40px; display: flex; align-items: flex-start; }
.export-student-card:active { transform: scale(0.98); }
.export-student-card.disabled { background: rgba(120,120,128,0.04); opacity: 0.4; }
.export-student-card.checked { background: rgba(0,122,255,0.1); }
.export-student-card.checked.disabled { background: rgba(0,122,255,0.06); opacity: 0.52; }
.export-student-card-row { display: flex; flex-wrap: nowrap; align-items: flex-start; gap: 4px; min-width: 0; flex: 1; }
.export-student-card-id { flex: 0 0 auto; padding: 1px 0 0; font-size: 10px; font-weight: 600; color: var(--text-tertiary); font-variant-numeric: tabular-nums; line-height: 1.35; white-space: nowrap; }
.export-student-card-name { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; color: var(--text-primary); line-height: 1.35; white-space: normal; word-break: break-word; overflow-wrap: break-word; }
.export-student-card.checked .export-student-card-id { color: #007AFF; opacity: 0.75; }
.export-student-card.checked .export-student-card-name { color: #007AFF; }
@media (min-width: 400px) { .export-student-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; } }
@media (min-width: 520px) { .export-student-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; } }
@media (min-width: 640px) { .export-student-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; } }
@media (min-width: 720px) { #exportAssignmentModal .export-student-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; } }
#exportAssignmentModal .export-student-scroll { padding: 0 2px; }
#exportAssignmentModal .export-toolbar { padding-bottom: 14px; }
#exportAssignmentModal .export-summary { padding-bottom: 12px; }
.status-dot { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 500; }
.status-dot.success { background: rgba(52,199,89,0.12); color: var(--success); }
.status-dot.warn { background: rgba(255,149,0,0.12); color: var(--warning); }
.status-dot.muted { background: var(--border-light); color: var(--text-tertiary); }
.level-pill { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 500; }
.level-pill.good { background: rgba(52,199,89,0.12); color: var(--success); }
.level-pill.medium { background: rgba(0,122,255,0.1); color: var(--primary); }
.level-pill.poor { background: rgba(255,149,0,0.12); color: var(--warning); }
.export-empty { padding: 28px 16px; text-align: center; color: var(--text-tertiary); font-size: 13px; }
.template-preview-block { padding: 12px 14px; background: var(--background); border-radius: 14px; margin-top: 8px; border: none; }
.template-preview-block .h { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.template-preview-block .h .name { font-weight: 600; font-size: 13px; color: var(--text-primary); }
.template-preview-block .h .tag { font-size: 10px; padding: 1px 6px; border-radius: 4px; color: #fff; }
.template-preview-block .h .tag.system { background: var(--primary); }
.template-preview-block .h .tag.custom { background: var(--warning); }
.template-preview-block .body { font-size: 12px; color: var(--text-secondary); white-space: pre-wrap; line-height: 1.55; max-height: 200px; overflow-y: auto; }
.template-preview-block .body.empty { color: var(--text-tertiary); font-style: italic; }
.template-preview-block.compact { margin-top: 0; }
.template-preview-block .body.muted { max-height: none; overflow: visible; color: var(--text-tertiary); }
.collect-preflight-body { padding: 0 4px; }
.collect-preflight-lead { font-size: 14px; color: var(--text-primary); margin: 0 0 12px; line-height: 1.55; }
.collect-preflight-highlight { background: rgba(0,122,255,0.06); border: 1px solid rgba(0,122,255,0.14); border-radius: var(--radius-md); padding: 12px 14px; margin-bottom: 12px; }
.collect-preflight-badge { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--primary); margin-bottom: 6px; }
.collect-preflight-desc { font-size: 13px; color: var(--text-secondary); margin: 0; line-height: 1.55; }
.collect-preflight-hint { font-size: 12px; color: var(--text-tertiary); margin: 10px 0 0; line-height: 1.45; }
.collect-preflight-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.tab-label { font-size: 11px; }
.tab-item { min-height: 52px; border: none; background: transparent; font-family: inherit; }
.tab-item:focus-visible { outline: 3px solid rgba(0,122,255,0.28); outline-offset: -4px; border-radius: var(--radius-md); }
.card, .class-card, .setting-item, .list-item, .student-card, .detail-header, .assignment-detail-hero, .mine-profile-card { box-shadow: var(--card-shadow); }
.upload-zone, .search-box, .content-box, .progress-card { border: none; }
.toast { border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.18); }
.toast.info { background: rgba(44,44,46,0.92); }
.modal-content, .confirm-dialog { box-shadow: 0 -18px 48px rgba(0,0,0,0.16); }
@media (prefers-reduced-motion: reduce) {
  .modal-overlay, .modal-content, .confirm-overlay, .confirm-dialog { transition: none !important; }
  .modal-overlay.active .modal-content, .confirm-overlay.active .confirm-dialog { transform: none; opacity: 1; }
}
.empty-state { border-radius: var(--radius-xl); }
.empty-text { line-height: 1.5; }
@media (prefers-color-scheme: dark) {
  :root {
    --primary: #0A84FF;
    --primary-light: #64D2FF;
    --primary-dark: #409CFF;
    --primary-gradient: linear-gradient(135deg, #0A84FF 0%, #5E5CE6 100%);
    --accent: #64D2FF;
    --accent-warm: #FF9F0A;
    --success: #30D158;
    --warning: #FF9F0A;
    --danger: #FF453A;
    --background: #000000;
    --card: #1C1C1E;
    --text-primary: #F5F5F7;
    --text-secondary: #AEAEB2;
    --text-tertiary: #636366;
    --border: #38383A;
    --border-light: #2C2C2E;
    --shadow: rgba(0,0,0,0.35);
    --shadow-md: rgba(0,0,0,0.48);
  }
  .app-header { background: rgba(28,28,30,0.78); }
  .app-tabbar { background: rgba(28,28,30,0.78); }
  .loading-overlay { background: rgba(0,0,0,0.82); }
  .modal-overlay { background: rgba(0,0,0,0.52); }
  .confirm-overlay { background: rgba(0,0,0,0.52); }
  .sheet-actions { background: rgba(28,28,30,0.86); }
  .sheet-export-footer { background: rgba(28,28,30,0.9); }
  .chat-messages { background: var(--background); }
  .correct-collect-btn { background: rgba(10,132,255,0.12); border-color: rgba(10,132,255,0.22); box-shadow: 0 4px 16px rgba(0,0,0,0.2); }
  .correct-collect-vf-c { border-color: rgba(100,210,255,0.45); }
  .correct-collect-icon { background: rgba(255,255,255,0.1); border-color: rgba(10,132,255,0.18); box-shadow: 0 4px 12px rgba(0,0,0,0.18); }
  .export-student-card { background: rgba(120,120,128,0.14); }
  .export-student-card.disabled { background: rgba(120,120,128,0.08); }
  .export-student-card.checked { background: rgba(10,132,255,0.18); }
  .export-student-card.checked.disabled { background: rgba(10,132,255,0.1); }
  .export-student-card.checked .export-student-card-id { color: var(--primary-light); }
  .export-student-card.checked .export-student-card-name { color: var(--primary-light); }
  .export-toolbar .action-chip { background: rgba(120,120,128,0.14); }
  .export-toolbar .action-chip.active { background: rgba(10,132,255,0.18); color: var(--primary-light); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}
@media (min-width: 1024px) {
  .student-card { padding: 12px 14px; }
  .student-card-name { font-size: 16px; }
}
@media (min-width: 900px) {
  :root { --sidebar-width: 264px; --main-width: 1180px; --layout-width: calc(var(--sidebar-width) + var(--main-width)); --layout-left: max(0px, calc((100vw - var(--layout-width)) / 2)); --header-height: 64px; }
  .app-container:not(:has(.app-tabbar)) { max-width: none; box-shadow: none; }
  .app-container:not(:has(.app-tabbar)) .app-header { left: 0; right: 0; transform: none; max-width: none; }
  .app-container:not(:has(.app-tabbar)) .app-content { padding: calc(var(--header-height) + var(--safe-area-top) + 24px) 32px 56px; }
  .app-container:not(:has(.app-tabbar)) .app-content > *:not(.desk-shell):not(.collect-setup):not(.collect-turbo) { max-width: 960px; margin-left: auto; margin-right: auto; }
  .app-container { max-width: none; box-shadow: none; }
  .app-container:has(.app-tabbar) .app-header { display: none; }
  .app-container:has(.app-tabbar) .app-content { margin-left: calc(var(--layout-left) + var(--sidebar-width)); width: var(--main-width); padding: calc(var(--safe-area-top) + 32px) 0 56px; }
  .app-container:has(.app-tabbar) .tab-content { max-width: var(--main-width); padding: 0 clamp(24px, 3vw, 48px); margin: 0; }
  .app-tabbar { top: 0; bottom: 0; left: var(--layout-left); right: auto; width: var(--sidebar-width); height: 100vh; padding: calc(var(--safe-area-top) + 22px) 18px 22px; flex-direction: column; gap: 8px; background: rgba(255,255,255,0.86); border-right: 1px solid var(--border-light); border-top: none; align-items: stretch; box-shadow: 12px 0 36px rgba(0,0,0,0.04); transform: none; max-width: none; z-index: 101; }
  .app-sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 8px 8px 20px; margin-bottom: 8px; }
  .app-sidebar-brand .pipi-avatar-ring { box-shadow: 0 6px 18px rgba(0,122,255,0.24); }
  .app-sidebar-title { font-size: 16px; font-weight: 700; color: var(--text-primary); }
  .app-sidebar-subtitle { font-size: 12px; color: var(--text-secondary); margin-top: 1px; }
  .tab-item { flex: none; min-height: 48px; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 10px 12px; border-radius: var(--radius-lg); color: var(--text-secondary); }
  .tab-item.active { background: rgba(0,122,255,0.1); color: var(--primary); box-shadow: none; }
  .tab-icon { width: 24px; height: 24px; }
  .tab-label { font-size: 15px; }
  .nav-chat-item { display: flex; margin-top: auto; }
  .float-btn { display: none; }
  .page-title { font-size: 30px; letter-spacing: -0.02em; }
  .page-header { margin-bottom: 24px; }
  .card { border-radius: 22px; padding: 24px; }
  #tabCorrect .correct-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 12px; align-items: start; }
  #tabCorrect .correct-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
  #tabCorrect .correct-main > .page-header { margin-bottom: 0; }
  #tabCorrect .correct-main > .card { margin-bottom: 0; }
  #tabCorrect .correct-collect-btn { min-height: 180px; max-height: 240px; aspect-ratio: 2.4 / 1; }
  #tabCorrect .correct-collect-vf-c { width: 28px; height: 28px; }
  #tabCorrect .correct-collect-vf-c.tl, #tabCorrect .correct-collect-vf-c.tr { top: 16px; }
  #tabCorrect .correct-collect-vf-c.bl, #tabCorrect .correct-collect-vf-c.br { bottom: 16px; }
  #tabCorrect .correct-collect-vf-c.tl, #tabCorrect .correct-collect-vf-c.bl { left: 16px; }
  #tabCorrect .correct-collect-vf-c.tr, #tabCorrect .correct-collect-vf-c.br { right: 16px; }
  #tabCorrect .correct-collect-icon { width: 68px; height: 68px; border-radius: 20px; }
  #tabCorrect .correct-collect-icon .ui-icon { width: 36px; height: 36px; }
  #tabCorrect #historySection { position: sticky; top: 24px; margin-bottom: 0; align-self: start; }
  #tabCorrect #resultSection { display: flex; flex-direction: column; gap: 0; background: var(--card); border-radius: 22px; border: 1px solid var(--border-light); box-shadow: 0 1px 2px var(--shadow); overflow: hidden; }
  #tabCorrect #resultSection > .card { margin-bottom: 0; border: none; border-radius: 0; box-shadow: none; padding: 20px 24px; }
  #tabCorrect #resultSection > .card + .card { border-top: 1px solid var(--border-light); }
  #tabCorrect #attachToClassCard { margin-top: 0; }
  .history-scroll { display: block; margin: 0; padding: 0; overflow: visible; }
  .history-item { width: 100%; margin-bottom: 8px; }
  #classListView, #classDetailView, #assignmentDetailView, #mineMainView, #accountView, #correctionTemplateView { max-width: 980px; margin: 0 auto; }
  #classList, #studentList, #assignmentList, #submissionList { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
  #studentList .empty-state, #assignmentList .empty-state, #submissionList .empty-state, #classList .empty-state { grid-column: 1 / -1; }
  .student-card, .list-item, .class-card, .assignment-card, .setting-item { margin-bottom: 0; }
  #mineMainView { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  #mineMainView .page-header, #mineMainView #userInfoCard, #mineMainView .mine-section { grid-column: 1 / -1; }
  .assignment-stat-grid { gap: 12px; }
  .assignment-stat-value { font-size: 26px; }
  .modal-content { max-width: 560px; border-radius: var(--radius-xl); margin-bottom: 32px; padding-bottom: 24px; }
  .modal-content.wide { max-width: 760px; }
  .modal-content.sheet.wide { max-width: 760px; }
  #addTemplateModal .modal-content.sheet.wide { max-width: min(92vw, 880px); max-height: min(92vh, 900px); }
  #addTemplateModal .tpl-field-textarea { min-height: 160px; font-size: 16px; }
  #addTemplateModal .tpl-section-side { width: 132px; }
  #addTemplateModal .tpl-preview-pre { max-height: 280px; }
  .modal-overlay { align-items: center; }
  .modal-content, .modal-content.sheet { transform: translateY(16px) scale(0.97); }
  .modal-overlay.active .modal-content, .modal-overlay.active .modal-content.sheet { transform: translateY(0) scale(1); }
}
@media (min-width: 900px) and (prefers-color-scheme: dark) {
  .app-tabbar { background: rgba(28,28,30,0.88); }
  .app-container:has(.app-tabbar) .app-header { background: linear-gradient(180deg, rgba(0,0,0,0.92), rgba(0,0,0,0.62)); }
}

.page-body { padding: 20px 20px calc(var(--safe-area-bottom) + 88px); }
.page-body-narrow { max-width: 720px; margin: 0 auto; padding: 20px 20px 48px; line-height: 1.75; }
.detail-action-row { display: flex; gap: 12px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
#classList { display: flex; flex-direction: column; gap: 12px; }
.pick-card { padding: 14px 16px; margin-bottom: 10px; border-radius: var(--radius-card); border: none; background: var(--card); box-shadow: var(--card-shadow); cursor: pointer; transition: box-shadow 0.15s; }
.pick-card.is-active { background: rgba(0,122,255,0.04); box-shadow: 0 0 0 2px rgba(0,122,255,0.2), var(--card-shadow); }
.content-box { border: none; }
.correct-collect-card { margin-bottom: var(--space-section); }
/* === ICP 备案号页脚 === */
.app-footer {
  text-align: center;
  padding: 16px 16px 24px;
  font-size: 12px;
  color: var(--text-tertiary, #999);
}
.app-footer a {
  color: var(--text-tertiary, #999);
  text-decoration: none;
}
.app-footer a:hover {
  color: var(--primary, #4f46e5);
}
.writing-topic-section { background: rgba(0,122,255,0.03); border: 1px solid rgba(0,122,255,0.12); border-radius: var(--radius-md); padding: 12px; }
.writing-topic-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.writing-topic-hint { font-size: 12px; color: var(--text-tertiary); }
.writing-topic-toolbar { display: flex; gap: 8px; align-items: stretch; margin-bottom: 10px; }
.writing-topic-grade { flex: 1; min-width: 0; margin: 0; padding: 8px 10px; font-size: 14px; }
.writing-topic-list { display: flex; flex-wrap: wrap; gap: 8px; max-height: 168px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.writing-topic-chip { border: 1px solid var(--border-light); background: var(--card); color: var(--text-secondary); border-radius: 999px; padding: 6px 12px; font-size: 12px; line-height: 1.3; cursor: pointer; transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s; }
.writing-topic-chip:active { transform: scale(0.97); }
.writing-topic-chip.is-active { border-color: var(--primary); background: rgba(0,122,255,0.1); color: var(--primary); font-weight: 600; }
.writing-topic-empty { font-size: 12px; color: var(--text-tertiary); padding: 8px 0; }
