: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%;
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.22);
  flex-shrink: 0;
}
.pipi-avatar-ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.pipi-avatar-ring--header { width: 36px; height: 36px; }
.pipi-says { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; background: rgba(0, 122, 255, 0.06); color: var(--text-secondary, #3c3c43); font-size: 13px; line-height: 1.45; }
.pipi-says[hidden] { display: none; }
.pipi-says-avatar { width: 22px; height: 22px; box-shadow: 0 2px 6px rgba(0, 122, 255, 0.18); }
.pipi-says-text { flex: 1; min-width: 0; }
.pipi-says-ai { margin-left: 4px; font-size: 8.5px; font-weight: 600; letter-spacing: 0.04em; color: var(--text-tertiary, #8e8e93); opacity: 0.75; vertical-align: super; line-height: 0; }
.pipi-says-cta { flex-shrink: 0; border: none; background: rgba(0, 122, 255, 0.12); color: var(--primary, #007aff); font-size: 12.5px; font-weight: 600; padding: 5px 10px; border-radius: 999px; cursor: pointer; }
.pipi-says-cta:active { background: rgba(0, 122, 255, 0.22); }
.pipi-says--collect { margin: 0 16px 10px; }
.pipi-peak { position: fixed; top: calc(var(--header-height) + var(--safe-area-top) + 8px); left: 50%; transform: translateX(-50%) translateY(-8px); width: min(440px, calc(100% - 24px)); z-index: 180; display: none; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 16px; background: rgba(255,255,255,0.94); box-shadow: 0 10px 28px rgba(22,24,29,0.12); border: 1px solid rgba(0,122,255,0.14); }
.pipi-peak.is-on { display: flex; transform: translateX(-50%) translateY(0); }
.pipi-peak-avatar { width: 32px; height: 32px; margin-top: 1px; box-shadow: 0 3px 8px rgba(0,122,255,0.22); }
.pipi-peak-copy { flex: 1; min-width: 0; }
.pipi-peak-title { font-size: 14px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.02em; }
.pipi-peak-body { margin-top: 2px; font-size: 12.5px; line-height: 1.45; color: var(--text-secondary); }
.pipi-peak-dismiss { flex-shrink: 0; border: none; background: rgba(0,122,255,0.12); color: var(--primary); font-size: 12.5px; font-weight: 600; padding: 6px 10px; border-radius: 999px; cursor: pointer; margin-top: 2px; }
.pipi-peak-dismiss:active { background: rgba(0,122,255,0.22); }
.pipi-peak-sheet { z-index: 380; }
.pipi-peak-sheet .confirm-dialog { max-width: 320px; text-align: center; }
.pipi-peak-sheet .pipi-peak-sheet-avatar { width: 56px; height: 56px; margin: 0 auto 12px; box-shadow: 0 6px 16px rgba(0,122,255,0.24); }
.pipi-peak-sheet .confirm-message { margin-bottom: 16px; }
.pipi-avatar-ring--sidebar { width: 42px; height: 42px; }
.pipi-avatar-ring--chat-head { width: 36px; height: 36px; }
.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 .sub-header-title { flex: 1; min-width: 0; }
.sub-header .sub-header-actions { margin-left: auto; }
.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; }
.support-card { display: flex; align-items: center; gap: 12px; margin: 0 0 28px; padding: 14px 16px; border-radius: var(--radius-card); background: linear-gradient(135deg, rgba(255,149,0,0.14), rgba(255,59,48,0.08)); border: 1px solid rgba(255,149,0,0.22); color: var(--text-primary); text-decoration: none; transition: transform 0.15s ease; }
.support-card:active { transform: scale(0.98); }
.support-card-ava { flex-shrink: 0; border-radius: 50%; background: var(--card); padding: 4px; box-sizing: border-box; }
.support-card-main { flex: 1; min-width: 0; }
.support-card-title { font-size: 16px; font-weight: 700; }
.support-card-sub { margin-top: 2px; font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
.support-card-btn { flex-shrink: 0; padding: 7px 14px; border-radius: 999px; background: var(--accent-warm, #FF9500); color: #fff; font-size: 13px; font-weight: 700; }
.llm-notice { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; padding: 12px 16px; border-radius: 16px; background: linear-gradient(135deg, rgba(77,107,254,0.12), rgba(110,91,255,0.08)); border: 1px solid rgba(77,107,254,0.24); color: var(--text-primary); text-decoration: none; transition: transform 0.15s ease; }
.llm-notice[hidden] { display: none; }
.llm-notice.model-busy-notice { background: linear-gradient(135deg, rgba(255,176,32,0.18), rgba(255,122,69,0.08)); border-color: rgba(224,122,18,0.4); }
.llm-notice.model-busy-notice .llm-notice-tag { background: #e07a12; }
.llm-notice-go[hidden] { display: none; }
.llm-notice:active { transform: scale(0.99); }
.llm-notice-tag { flex-shrink: 0; padding: 3px 8px; border-radius: 6px; background: #4D6BFE; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; }
.llm-notice-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.llm-notice-t { font-size: 14.5px; font-weight: 700; }
.llm-notice-d { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
.llm-notice-go { flex-shrink: 0; font-size: 13px; font-weight: 650; color: #4D6BFE; white-space: nowrap; }
.llm-notice-x { flex-shrink: 0; width: 28px; height: 28px; margin: -4px -8px -4px -4px; border: none; border-radius: 50%; background: transparent; color: var(--text-tertiary, #9aa0aa); font-size: 20px; line-height: 1; cursor: pointer; }
.llm-notice-x[hidden] { display: none; }
.llm-notice-x:active { background: rgba(0,0,0,0.06); }
@media (max-width: 480px) { .llm-notice { flex-wrap: wrap; position: relative; padding-right: 36px; } .llm-notice-go { margin-left: auto; } .llm-notice-x { position: absolute; top: 8px; right: 8px; margin: 0; } }
.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; }
#accountView { padding-bottom: 48px; }
.account-danger {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 8px 4px 0;
  padding: 20px 2px 4px;
  border-top: 1px solid var(--border-light);
}
.account-danger-copy { flex: 1; min-width: 0; }
.account-danger-title { font-size: 14px; font-weight: 600; color: var(--danger); line-height: 1.3; }
.account-danger-sub { font-size: 12px; color: var(--text-tertiary); line-height: 1.5; margin-top: 4px; }
.account-danger-btn {
  flex-shrink: 0;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 59, 48, 0.28);
  background: transparent;
  color: var(--danger);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.account-danger-btn:hover { background: rgba(255, 59, 48, 0.06); }
.account-danger-btn:active { background: rgba(255, 59, 48, 0.12); transform: scale(0.97); }
.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);
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.assignment-stat-item:active { opacity: 0.88; }
.assignment-stat-item.is-active { background: rgba(0,122,255,0.1); box-shadow: 0 0 0 2px rgba(0,122,255,0.28); }
.assignment-stat-item.is-submit.is-active { background: rgba(52,199,89,0.12); box-shadow: 0 0 0 2px rgba(52,199,89,0.32); }
.assignment-stat-item.is-correct.is-active { background: rgba(88,86,214,0.12); box-shadow: 0 0 0 2px rgba(88,86,214,0.32); }
.assignment-stat-item.is-muted.is-active { background: rgba(22,24,29,0.06); box-shadow: 0 0 0 2px rgba(22,24,29,0.14); }
.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); }
@media (max-width: 899px) {
  #submissionList { display: flex; flex-direction: column; gap: 12px; }
}
.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-list { gap: 12px; }
.base-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; padding: 10px 16px; border-radius: 14px; background: var(--card); font-size: 14px; color: var(--text-primary); }
.base-bar > span:first-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.base-bar small { font-size: 12px; color: var(--text-secondary); }
.base-bar.is-on { background: rgba(0,122,255,0.06); }
.base-bar-acts { display: flex; gap: 16px; }
.base-undo { flex-basis: 100%; font-size: 13px; color: var(--text-secondary); }
.base-undo .af-link { font-size: 13px; }
.base-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; border-radius: 14px; background: var(--card); }
.base-row-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 600; }
.base-chips { display: flex; gap: 6px; flex: none; }
.base-chip { min-width: 52px; height: 32px; padding: 0 10px; border: 1px solid var(--border); border-radius: 16px; background: var(--card); color: var(--text-secondary); font-family: inherit; font-size: 13px; cursor: pointer; }
.base-chip.is-on { border-color: var(--primary); background: rgba(0,122,255,0.1); color: var(--primary); font-weight: 600; }
.base-chip.is-on.is-high { border-color: #34C759; background: rgba(52,199,89,0.12); color: #248A3D; }
.base-chip.is-on.is-low { border-color: #FF9500; background: rgba(255,149,0,0.12); color: #C93400; }
.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); }
.student-card-collect { flex-shrink: 0; border: none; border-radius: 999px; background: rgba(0,122,255,0.1); color: var(--primary); font-size: 12px; font-weight: 700; padding: 6px 10px; cursor: pointer; font-family: inherit; line-height: 1.2; }
.student-card-collect:active { transform: scale(0.96); background: rgba(0,122,255,0.16); }
.student-card-desk { flex-shrink: 0; border: none; border-radius: 999px; background: rgba(88,86,214,0.1); color: #5856d6; font-size: 12px; font-weight: 700; padding: 6px 10px; cursor: pointer; font-family: inherit; line-height: 1.2; }
.student-card-desk:active { transform: scale(0.96); background: rgba(88,86,214,0.16); }
.student-card.student-card--roster { align-items: center; gap: 10px; padding: 10px 12px; }
.student-card.student-card--roster .student-card-main { display: flex; flex-direction: column; gap: 6px; }
.student-card-head { display: flex; align-items: flex-start; gap: 6px; min-width: 0; }
.student-card.student-card--roster .student-card-name { flex: 1; min-width: 0; white-space: normal; overflow: visible; text-overflow: unset; word-break: break-word; }
.student-card.student-card--roster .student-level-tag { margin-top: 1px; }
.student-card-foot { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px 8px; min-width: 0; }
.student-card.student-card--roster .student-card-meta { flex: 1 1 auto; min-width: min(100%, max-content); margin-top: 0; white-space: nowrap; overflow: visible; text-overflow: unset; }
.student-card-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; margin-left: auto; }
.student-card.student-card--roster .student-card-collect,
.student-card.student-card--roster .student-card-desk { padding: 5px 8px; }
.student-card.student-card--roster .student-card-edit { width: 30px; height: 30px; }
.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); }
.roster-pick { display: flex; flex-direction: column; gap: 12px; }
.roster-pick-lead { margin: 0; font-size: 14px; line-height: 1.5; color: var(--text-secondary); }
.roster-pick-btns { display: flex; gap: 8px; }
.roster-pick-btns .btn { flex: 1; }
.roster-preview-hint { margin: 0 0 10px; font-size: 13px; line-height: 1.45; color: var(--text-secondary); }
.roster-preview-list { display: flex; flex-direction: column; gap: 8px; max-height: 42vh; overflow: auto; margin-bottom: 12px; }
.roster-row { display: flex; gap: 8px; align-items: center; }
.roster-row .roster-id { width: 72px; flex: 0 0 72px; text-align: center; }
.roster-row .roster-name { flex: 1; min-width: 0; }
.roster-del { width: 36px; height: 36px; border: none; border-radius: 50%; background: var(--border-light); color: var(--text-tertiary); display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.roster-del .ui-icon { width: 14px; height: 14px; }
.roster-add-row { border: none; background: transparent; color: var(--primary); font-size: 14px; font-weight: 600; padding: 6px 0; text-align: left; cursor: pointer; font-family: inherit; }
.roster-preview-actions { display: flex; gap: 8px; }
.roster-preview-actions .btn { flex: 1; }
.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: none; }
.class-detail-header .class-header-settings { font-size: 13px; padding: 4px 0 4px 0; 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 {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 11px;
  background: var(--border-light);
  flex-shrink: 0;
}
.class-seg-thumb {
  position: absolute;
  top: 3px;
  left: 0;
  height: calc(100% - 6px);
  width: 46px;
  border-radius: 8px;
  background: var(--card);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  pointer-events: none;
  transform: translate3d(3px,0,0);
  will-change: transform, width;
}
.class-seg-btn {
  position: relative;
  z-index: 1;
  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: color 0.18s;
  white-space: nowrap;
}
.class-seg-btn.active { background: transparent; color: var(--text-primary); box-shadow: none; }
.class-swipe { overflow: hidden; width: 100%; touch-action: pan-y; }
.class-swipe-track { display: flex; align-items: flex-start; width: 100%; transform: translate3d(-100%,0,0); will-change: transform; }
.class-swipe-track.is-animating { transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1); }
.class-swipe-track.is-dragging { transition: none; }
.class-swipe-page { flex: 0 0 100%; width: 100%; min-width: 0; }
.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); }
.stu-list-filter { display: flex; align-items: center; gap: 2px; width: fit-content; max-width: 100%; margin: 0 0 14px; padding: 3px; border-radius: 12px; background: var(--border-light); }
.stu-filter-btn { border: none; background: transparent; color: var(--text-secondary); font-size: 13px; font-weight: 600; padding: 7px 14px; border-radius: 9px; cursor: pointer; font-family: inherit; line-height: 1.2; white-space: nowrap; }
.stu-filter-btn.active { background: var(--card); color: var(--text-primary); box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.stu-filter-btn:active { transform: scale(0.98); }
.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-desk { background: rgba(88,86,214,0.1); color: #5856d6; border: none; font-weight: 600; box-shadow: none; }
.student-action-desk:active { background: rgba(88,86,214,0.16); filter: none; }
.student-action-growth { background: color-mix(in srgb, var(--success) 10%, transparent); color: var(--success); border: none; font-weight: 600; box-shadow: none; }
.student-action-growth:active { background: color-mix(in srgb, var(--success) 18%, transparent); filter: none; }
.student-header-actions .btn { padding-left: 12px; padding-right: 12px; }
@media (max-width: 480px) { .student-header-actions { flex-wrap: nowrap; gap: 6px; } .student-header-actions .btn { padding-left: 11px; padding-right: 11px; } }
.student-header-actions .btn { padding-left: 12px; padding-right: 12px; }
@media (max-width: 480px) { .student-header-actions { flex-wrap: nowrap; gap: 6px; } .student-header-actions .btn { padding-left: 11px; padding-right: 11px; } }
.student-action-soft { background: rgba(0,122,255,0.08); color: var(--primary); border: none; font-weight: 600; box-shadow: none; }
.student-action-soft:active { background: rgba(0,122,255,0.14); filter: none; }
.student-header-links { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 10px; }
.student-link { padding: 6px 4px; border: none; background: none; font-family: inherit; font-size: 13px; color: var(--text-tertiary); cursor: pointer; }
.student-link:active { opacity: 0.6; }
.student-link.is-danger:active { color: var(--danger); opacity: 1; }
.student-link-dot { color: var(--text-tertiary); font-size: 13px; }
.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; }
@supports (-webkit-touch-callout: none) {
  .input-field, .sheet-row input.sheet-input, .sheet-row textarea.sheet-input, .sheet-row select.sheet-input, .focus-ask-input { font-size: 16px; }
}
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; }
.donggan-gate { z-index: 420; }
.donggan-gate .confirm-dialog { max-width: 320px; }
.donggan-gate .confirm-message { margin-bottom: 14px; }
.donggan-gate-icon { font-size: 40px; line-height: 1; margin-bottom: 10px; }
.donggan-gate-ways { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; padding: 10px 12px; border-radius: var(--radius); background: var(--border-light); text-align: left; }
.donggan-gate-way { font-size: 13px; color: var(--text-secondary); line-height: 1.4; }
.donggan-gate-way b { color: var(--text-primary); font-weight: 600; margin-right: 4px; }
a.donggan-gate-way { text-decoration: none; }
.donggan-gate-actions .btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.float-btn { display: none !important; }
.app-header-tools { position: absolute; right: max(12px, env(safe-area-inset-right, 0px)); bottom: 0; height: var(--header-height); display: flex; align-items: center; gap: 8px; z-index: 2; }
.header-chat-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: none; background: var(--border-light); border-radius: var(--radius-lg); font-size: 14px; font-weight: 600; color: var(--text-secondary); cursor: pointer; font-family: inherit; -webkit-tap-highlight-color: transparent; white-space: nowrap; box-shadow: 0 1px 3px var(--shadow); }
.header-chat-btn .ui-icon { width: 18px; height: 18px; }
.header-chat-btn:active { transform: scale(0.97); opacity: 0.85; }
.sub-header-actions { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; }
.class-detail-header .sub-header-actions,
.assignment-detail-header .sub-header-actions { justify-self: end; }
.page-header-actions { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; }
.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 { pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.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.88); display: none; align-items: center; justify-content: center; z-index: 260; overflow: hidden; }
.image-modal.active { display: flex; }
.image-modal img { max-width: 92vw; max-height: 86vh; border-radius: var(--radius-md); background: #000; transform-origin: 0 0; transition: transform 0.16s ease; cursor: zoom-in; user-select: none; -webkit-user-drag: none; touch-action: none; }
.image-modal img.is-zoomed { cursor: grab; border-radius: 0; }
.image-modal img.is-dragging { transition: none; cursor: grabbing; }
.image-modal-hint { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); padding: 6px 14px; border-radius: 999px; background: rgba(0,0,0,0.55); color: rgba(255,255,255,0.85); font-size: 12px; pointer-events: none; white-space: nowrap; font-variant-numeric: tabular-nums; }
.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.is-compact { border-radius: 16px; box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.assignment-card.is-compact:hover { transform: none; box-shadow: 0 1px 2px rgba(0,0,0,0.05), 0 4px 12px rgba(0,0,0,0.06); }
.assignment-card.is-compact .assignment-card-head { padding: 14px 14px 13px 16px; align-items: center; }
.assignment-card.is-compact .assignment-card-chevron { margin-top: 0; }
.assignment-card.is-compact .assignment-title { font-size: 17px; font-weight: 600; }
.assignment-card.is-compact .assignment-card-meta { margin-top: 3px; }
.assignment-earlier-label { margin: 10px 4px -2px; font-size: 13px; font-weight: 600; color: var(--text-tertiary); }
.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-excerpt-fix { margin-top: 6px; font-size: 13px; line-height: 1.5; color: var(--primary, #007aff); font-weight: 500; }
.review-ppt-excerpt-fix.is-good { color: var(--success, #34c759); }
.review-ppt-outline { margin: 0 0 14px; padding: 0 0 0 18px; font-size: 13px; line-height: 1.7; color: var(--text-secondary); }
.review-ppt-outline li { margin: 0; }
.review-ppt-cost { display: flex; align-items: baseline; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--bg-secondary, #f5f5f7); margin-bottom: 14px; }
.review-ppt-cost-num { font-size: 16px; font-weight: 600; color: var(--text-primary); }
.review-ppt-cost-note { font-size: 12px; color: var(--text-tertiary); }
.review-ppt-deck-summary { font-size: 14px; line-height: 1.6; color: var(--text-primary); padding: 10px 12px; border-radius: 10px; background: var(--bg-secondary, #f5f5f7); margin-bottom: 12px; }
.review-ppt-deck-sec { margin-bottom: 12px; }
.review-ppt-deck-title { font-size: 12px; font-weight: 600; color: var(--text-tertiary); margin-bottom: 6px; }
.review-ppt-tp { font-size: 13px; line-height: 1.55; padding: 8px 10px; border-radius: 8px; background: rgba(0, 122, 255, 0.06); margin-bottom: 6px; }
.review-ppt-tp b { color: var(--primary, #007aff); }
.review-ppt-result-tip { margin-top: 10px; font-size: 12px; color: var(--text-tertiary); text-align: center; }
.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-status-failed { color: #FF3B30; }
.submission-status-hold { color: #FF9500; }
.submission-status-running, .submission-status-queued { color: #007AFF; }
.submission-status-offpeak { color: #5856D6; }
.submission-status-no_balance { color: #FF3B30; }
.submission-status-waiting { color: var(--text-secondary); }
.correct-queue-note { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 10px 10px 10px 12px; border-radius: 12px; background: rgba(0,122,255,0.06); font-size: 13px; line-height: 1.5; color: var(--text-secondary); }
.correct-queue-note .ui-icon { flex-shrink: 0; width: 16px; height: 16px; color: var(--primary); }
.correct-queue-note-text { flex: 1; min-width: 0; }
.correct-queue-note-btn { flex-shrink: 0; padding: 6px 12px; border: none; border-radius: 10px; background: var(--primary); color: #fff; font-size: 13px; font-weight: 600; font-family: inherit; cursor: pointer; }
.correct-queue-note-btn:active { opacity: 0.8; }
.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); }
.assignment-other-grade { margin: 14px 4px 4px; text-align: center; }
.assignment-other-grade-toggle { background: none; border: 1px dashed var(--border, #e5e5ea); border-radius: 10px; padding: 8px 14px; font-size: 13px; color: var(--text-secondary); cursor: pointer; }
.assignment-other-grade-toggle:hover { color: var(--primary); border-color: var(--primary); }
.assignment-other-grade-hint { font-size: 12px; color: var(--text-tertiary); margin-top: 6px; line-height: 1.5; }
.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.red { background: rgba(255, 59, 48, 0.12); color: #FF3B30; }
.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);
}
.toggle-switch input:disabled + .toggle-slider { cursor: default; }
.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-action-footer { flex-shrink: 0; padding: 12px 16px calc(14px + var(--safe-area-bottom)); border-top: 0.5px solid var(--border-light); background: var(--card); }
.modal-content.sheet.sticky-action { overflow: hidden; max-height: min(90vh, 100dvh); padding-bottom: 0; }
.tpl-select-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.tpl-select-head .input-label { margin: 0; }
.tpl-custom-link { font-size: 12px; color: var(--primary); background: none; border: none; padding: 0; cursor: pointer; text-decoration: none; white-space: nowrap; font-weight: 500; font-family: inherit; }
a.tpl-custom-link, button.tpl-custom-link { color: var(--primary); }
.tpl-custom-link:hover { text-decoration: underline; }
.input-help { font-size: 12px; color: var(--text-tertiary); margin: 4px 0 8px; line-height: 1.45; }
.assign-format-hint { margin-top: 8px; padding: 10px 12px; border-radius: var(--radius-md); background: rgba(255,149,0,0.08); border: 1px solid rgba(255,149,0,0.28); font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
.assign-format-hint-act { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }
.assign-detect-hint { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; font-size: 12px; line-height: 1.5; }
.assign-detect-line { display: flex; align-items: flex-start; gap: 6px; padding: 8px 10px; border-radius: var(--radius-md); background: rgba(52,199,89,0.08); border: 1px solid rgba(52,199,89,0.25); color: var(--text-secondary); }
.assign-detect-line svg { width: 14px; height: 14px; flex: none; margin-top: 2px; color: var(--success, #34c759); }
.assign-detect-line.muted { background: var(--border-light); border-color: transparent; color: var(--text-tertiary); }
.assign-detect-line.muted svg { color: var(--text-tertiary); }
.assign-detect-hint[hidden], .assign-opt-row[hidden], .assign-opt-detail[hidden], .assign-opt-text[hidden], .corr-meta-line[hidden], .batch-trial-row[hidden] { display: none; }
.assign-opts-card { background: var(--card); border: 1px solid var(--border-light); border-radius: 14px; overflow: hidden; }
.assign-opt-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 50px; padding: 9px 16px; border-top: 0.5px solid var(--border-light); }
.assign-opts-card > .assign-opt-row:first-child { border-top: none; }
.assign-opt-row-sub { padding-left: 32px; min-height: 46px; }
.assign-opt-row-sub .assign-opt-label { font-size: 14px; color: var(--text-secondary); font-weight: 400; }
.assign-opt-label { flex: 0 1 auto; min-width: 0; font-size: 15px; color: var(--text-primary); font-weight: 500; line-height: 1.35; }
.assign-opt-sub { display: block; font-size: 13px; color: var(--text-secondary); font-weight: 400; margin-top: 3px; line-height: 1.4; }
.assign-opts-card .segmented.compact .seg { font-size: 13px; padding: 7px 6px; }
.assign-opt-sub:empty { display: none; }
.assign-opt-ctrl { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.assign-opt-ctrl-col { flex: 1; flex-direction: column; align-items: flex-end; gap: 8px; }
.assign-opt-unit { font-size: 14px; color: var(--text-secondary); }
.assign-opt-sep { width: 1px; height: 16px; background: var(--border-light); margin: 0 6px; }
.assign-opt-num { width: 60px; padding: 6px 8px; border: none; border-radius: 8px; background: var(--border-light); color: var(--text-primary); font-size: 15px; font-weight: 500; text-align: center; font-family: inherit; outline: none; -moz-appearance: textfield; appearance: textfield; transition: box-shadow 0.15s; }
.assign-opt-num-static { min-width: 28px; padding: 6px 2px; font-size: 15px; font-weight: 600; color: var(--text-primary); text-align: center; }
.assign-opt-num:focus { box-shadow: 0 0 0 2px rgba(0,122,255,0.35); }
.assign-opt-num::placeholder { color: var(--text-tertiary); font-weight: 400; font-size: 13px; }
.assign-opt-num::-webkit-inner-spin-button, .assign-opt-num::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.assign-opt-select { flex: 1; min-width: 0; max-width: 60%; margin-left: auto; border: none; background: transparent; padding: 4px 22px 4px 0; font-size: 15px; color: var(--primary); text-align: right; font-family: inherit; outline: none; cursor: pointer; 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='%23C7C7CC' d='M4 2l4 4-4 4z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 4px center; }
.assign-opt-ctrl-col .assign-opt-select { max-width: 100%; }
.assign-opt-text { width: 100%; max-width: 260px; padding: 8px 10px; border: 1px solid var(--border-light); border-radius: 10px; background: var(--card); color: var(--text-primary); font-size: 14px; font-family: inherit; outline: none; }
.assign-opt-text:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,122,255,0.1); }
.assign-opt-ratio { max-width: 116px; text-align: center; font-variant-numeric: tabular-nums; letter-spacing: 0.5px; }
.assign-opt-row .assign-opt-seg { flex: none; width: 216px; margin-left: auto; }
.assign-opt-row .assign-opt-seg-wide { width: 252px; }
.assign-opt-row-block { flex-wrap: wrap; align-items: flex-start; }
.assign-opt-row-block .assign-opt-label { padding-top: 8px; }
.assign-opt-row-block .assign-opt-seg-wide { width: 100%; min-width: 0; margin: 4px 0 0; }
@media (max-width: 480px) {
  .assign-opt-row { padding: 9px 14px; }
  .assign-opt-row-sub { padding-left: 28px; }
  .assign-opt-row .assign-opt-seg { width: 190px; }
  .assign-opt-row .assign-opt-seg-wide { width: 220px; }
  .assign-opt-row-block .assign-opt-seg-wide { width: 100%; }
  .assign-opt-num { width: 56px; }
}
.modal-content.af-sheet, .af-sheet .sheet-header, .af-sheet .sheet-action-footer { background: var(--background); }
.af-sheet .sheet-action-footer { border-top-color: rgba(0,0,0,0.06); }
.af-titles { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; margin-right: 12px; }
.af-subtitle { width: 100%; padding: 0; border: none; background: transparent; font-family: inherit; font-size: 13px; color: var(--text-secondary); -webkit-text-fill-color: var(--text-secondary); opacity: 1; text-overflow: ellipsis; outline: none; }
.af { display: flex; flex-direction: column; gap: 24px; padding-bottom: 4px; }
.af-main, .af-side { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.af-head { display: flex; align-items: baseline; gap: 8px; padding: 0 4px 8px; font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.af-head-note { font-weight: 400; }
.af-card { background: var(--card); border-radius: 14px; overflow: hidden; }
.af-card-pad { padding: 12px; }
.af-group-req .af-card:focus-within { box-shadow: 0 0 0 2px rgba(0,122,255,0.3); }
.af-foot { margin: 8px 4px 0; font-size: 13px; line-height: 1.5; color: var(--text-secondary); }
.af-req { display: block; width: 100%; min-height: 200px; max-height: 56vh; padding: 14px 16px; border: none; outline: none; resize: vertical; background: transparent; color: var(--text-primary); font-family: inherit; font-size: 15px; line-height: 1.65; }
.af-req::placeholder { color: var(--text-tertiary); }
.af-title-input { display: block; width: 100%; margin-top: 12px; padding: 11px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); color: var(--text-primary); font-family: inherit; font-size: 16px; font-weight: 600; outline: none; }
.af-title-input::placeholder { font-weight: 400; color: var(--text-tertiary); }
.af-title-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,122,255,0.12); }
.af .assign-opts-card { border: none; }
.af .assign-detect-hint, .af .assign-format-hint { font-size: 13px; }
.af-tpl-row { position: relative; flex-wrap: wrap; align-items: flex-start; min-height: 0; padding-top: 4px; padding-bottom: 10px; }
.af-tpl-fold { flex: 1 1 100%; min-width: 0; }
.af-tpl-row .af-link { position: absolute; top: 4px; right: 16px; }
.af-tpl-fold .template-preview-block .h .tag { flex: none; white-space: nowrap; }
.af-tpl-fold summary { list-style: none; cursor: pointer; padding: 4px 0; font-size: 14px; color: var(--primary); }
.af-tpl-fold summary::-webkit-details-marker { display: none; }
.af-tpl-fold[open] summary { color: var(--text-secondary); }
.af-tpl-fold .template-preview-block { margin-top: 4px; background: var(--background); }
.af-link { flex: none; padding: 4px 0; border: none; background: none; color: var(--primary); font-family: inherit; font-size: 14px; cursor: pointer; white-space: nowrap; }
.af-strength-desc { margin: 8px 2px 0; font-size: 13px; line-height: 1.5; color: var(--text-secondary); }
.af-carry { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 8px; margin: 0 4px -8px; font-size: 13px; color: var(--text-secondary); }
.af-carry span { color: var(--text-primary); }
.af-carry .af-link { margin-left: auto; font-size: 13px; }
.af-chips { display: inline-flex; gap: 4px; margin-right: 8px; }
.af-chip { min-width: 34px; height: 28px; padding: 0 6px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text-secondary); font-family: inherit; font-size: 13px; font-variant-numeric: tabular-nums; cursor: pointer; }
.af-chip.is-on { border-color: var(--primary); background: rgba(0,122,255,0.08); color: var(--primary); font-weight: 600; }
@media (max-width: 420px) { .af-chips .af-chip:nth-child(n+5) { display: none; } }
.af-req-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 4px 0; }
.af-req-chips-k { font-size: 12px; color: var(--text-tertiary); margin-right: 2px; }
.af-req-chips[hidden], .af-carry[hidden], .tpl-lib[hidden], .tpl-sec-tip[hidden], .base-bar[hidden] { display: none; }
.af-req-chip { height: auto; min-height: 28px; max-width: 100%; padding: 4px 10px; border-radius: 14px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.af-req-chip::before { content: '+ '; color: var(--primary); }
@media (min-width: 900px) {
  .modal-overlay .modal-content.sheet.af-sheet { max-width: min(94vw, 1040px); max-height: min(92vh, 980px); }
  .af-sheet .sheet-header { padding: 18px 24px 10px; }
  .af-sheet .sheet-body { padding: 8px 24px 20px; }
  .af { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
  .af-sticky { position: sticky; top: 0; }
  .af-sticky .af-req { min-height: 360px; height: calc(min(92vh, 980px) - 280px); max-height: none; }
  .af-sheet .sheet-action-footer { display: flex; justify-content: flex-end; padding: 12px 24px 14px; }
  .af-sheet .sheet-action-footer .btn-block { width: 240px; }
}
@media (min-width: 640px) and (max-width: 899px) and (max-height: 560px) {
  .modal-overlay .modal-content.sheet.af-sheet { max-width: 96vw; max-height: 96dvh; }
  .af-sheet .sheet-header { padding-top: 10px; padding-bottom: 4px; }
  .af { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
  .af-sticky { position: sticky; top: 0; }
  .af-sticky .af-req { min-height: 120px; height: calc(96dvh - 230px); max-height: none; }
  .af-sheet .sheet-action-footer { padding-top: 8px; padding-bottom: calc(8px + var(--safe-area-bottom)); }
}
@media (prefers-color-scheme: dark) {
  .af-sheet .sheet-action-footer { border-top-color: rgba(255,255,255,0.08); }
}
.corr-sum { background: var(--card); border: 1px solid var(--border-light); border-radius: var(--radius-md); padding: 10px 12px; font-size: 13px; line-height: 1.5; text-align: left; }
.corr-sum-loading { color: var(--text-tertiary); font-size: 12px; }
.corr-sum-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.corr-sum-title { font-weight: 600; color: var(--text-primary); }
.corr-sum-row { display: flex; gap: 10px; padding: 6px 0; border-top: 1px solid rgba(0,0,0,0.05); }
.corr-sum-k { flex: none; width: 60px; color: var(--text-tertiary); font-size: 12px; padding-top: 1px; }
.corr-sum-v { flex: 1; min-width: 0; color: var(--text-primary); word-break: break-word; }
.corr-sum-tag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 4px; font-size: 11px; background: var(--border-light); color: var(--text-secondary); vertical-align: 1px; }
.corr-sum-tpl { margin-top: 4px; }
.corr-sum-tpl summary { font-size: 12px; color: var(--primary); cursor: pointer; list-style: none; }
.corr-sum-tpl summary::-webkit-details-marker { display: none; }
.corr-sum-tpl pre { margin: 6px 0 0; padding: 8px 10px; background: var(--border-light); border-radius: var(--radius-sm); font-size: 12px; white-space: pre-wrap; font-family: inherit; color: var(--text-secondary); max-height: 160px; overflow: auto; }
.corr-sum-reqtext { white-space: pre-wrap; line-height: 1.55; }
.corr-sum-reqtext.is-folded { max-height: calc(1.55em * 6); overflow: hidden; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
.corr-sum-more { margin-top: 2px; padding: 0; border: none; background: none; color: var(--primary); font-size: 12px; font-family: inherit; cursor: pointer; }
.corr-sum-muted { color: var(--text-tertiary); }
.corr-sum-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.corr-sum-chip { padding: 1px 8px; border-radius: 999px; background: rgba(0,122,255,0.08); color: var(--primary); font-size: 12px; }
.corr-sum-note { margin-top: 4px; font-size: 11px; color: var(--text-tertiary); }
.corr-meta-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0 0 8px; font-size: 12px; color: var(--text-tertiary); line-height: 1.4; }
.corr-meta-line svg, .corr-meta-line [data-icon] svg { width: 13px; height: 13px; flex: none; }
.corr-meta-when { margin-left: auto; white-space: nowrap; }
.batch-trial-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 0 14px; font-size: 12px; color: var(--text-tertiary); }
.batch-trial-row .btn { white-space: nowrap; }
.tpl-editor-lead { font-size: 13px; color: var(--text-secondary); line-height: 1.5; margin: 0 0 12px; padding: 10px 12px; background: rgba(0,122,255,0.06); border-radius: var(--radius-md); }
.template-page-lead { font-size: 13px; color: var(--text-secondary); line-height: 1.5; margin: 0 16px 12px; }
.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-row .label .sheet-row-sub { display: block; font-size: 11px; color: var(--text-tertiary); font-weight: 400; margin-top: 2px; }
.sheet-row select.tc-grade-select { color: var(--primary); }
.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); }
.tpl-sheet .af-card:focus-within { box-shadow: 0 0 0 2px rgba(0,122,255,0.3); }
.tpl-sheet .tpl-editor-lead { margin: 0; }
.tpl-start-list { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x proximity; padding: 2px 2px 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tpl-start-list::-webkit-scrollbar { display: none; }
.tpl-start { flex: none; width: 172px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1.5px solid transparent; border-radius: 14px; background: var(--card); text-align: left; font-family: inherit; cursor: pointer; transition: border-color 0.15s, background 0.15s, transform 0.15s; }
.tpl-start:active { transform: scale(0.98); }
.tpl-start.is-on { border-color: var(--primary); background: rgba(0,122,255,0.06); }
.tpl-start-name { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--text-primary); }
.tpl-start.is-on .tpl-start-name { color: var(--primary); }
.tpl-start-name em { flex: none; padding: 1px 6px; border-radius: 999px; background: rgba(52,199,89,0.12); color: var(--success, #34c759); font-size: 11px; font-style: normal; font-weight: 600; }
.tpl-start-secs { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; line-height: 1.4; color: var(--text-secondary); }
.tpl-name-input { display: block; width: 100%; padding: 13px 16px; border: none; outline: none; background: transparent; color: var(--text-primary); font-family: inherit; font-size: 17px; font-weight: 600; }
.tpl-name-input::placeholder { font-weight: 400; color: var(--text-tertiary); }
.tpl-sheet .tpl-sections-list { display: flex; flex-direction: column; gap: 12px; }
.tpl-sheet .tpl-sections-empty { padding: 28px 20px; border-radius: 14px; background: var(--card); text-align: center; font-size: 15px; color: var(--text-secondary); }
.tpl-sec { padding: 0 16px; border-radius: 14px; background: var(--card); transition: box-shadow 0.15s; }
.tpl-sec:focus-within { box-shadow: 0 0 0 2px rgba(0,122,255,0.3); }
.tpl-sec-head { display: flex; align-items: center; gap: 10px; min-height: 52px; border-bottom: 0.5px solid var(--border-light); }
.tpl-sec-no { flex: none; display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 13px; font-weight: 600; }
.tpl-sec-title { flex: 1; min-width: 0; padding: 12px 0; border: none; outline: none; background: transparent; color: var(--text-primary); font-family: inherit; font-size: 17px; font-weight: 600; }
.tpl-sec-title::placeholder { font-weight: 400; color: var(--text-tertiary); }
.tpl-sec-acts { flex: none; display: flex; gap: 2px; margin-right: -8px; }
.tpl-sec-act { width: 36px; height: 36px; border: none; border-radius: 50%; background: transparent; color: var(--text-secondary); font-family: inherit; font-size: 17px; cursor: pointer; transition: background 0.15s; }
.tpl-sec-act:hover:not(:disabled), .tpl-sec-act:active:not(:disabled) { background: var(--border-light); }
.tpl-sec-act:disabled { opacity: 0.25; cursor: default; }
.tpl-sec-act.is-danger { color: var(--danger); font-size: 20px; }
.tpl-sec-label { padding: 12px 0 6px; font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.tpl-sec-hint { display: block; width: 100%; min-height: 76px; padding: 10px 12px; border: none; outline: none; border-radius: 10px; background: var(--background); color: var(--text-primary); font-family: inherit; font-size: 15px; line-height: 1.6; resize: vertical; }
.tpl-sec-hint::placeholder { color: var(--text-tertiary); }
.tpl-sec-tip { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; padding: 8px 12px; border-radius: 10px; background: rgba(255,149,0,0.08); font-size: 13px; line-height: 1.55; color: var(--text-secondary); }
.tpl-sec-tip-acts { display: flex; gap: 16px; }
.tpl-sec-tip .af-link { font-size: 13px; padding: 2px 0; }
.tpl-sec-tip .af-link.is-quiet { color: var(--text-tertiary); }
.tpl-sec-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; min-height: 52px; padding: 6px 0; }
.tpl-sec-opt { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--text-primary); }
.tpl-sec-num { width: 68px; padding: 7px 8px; border: none; outline: none; border-radius: 8px; background: var(--background); color: var(--text-primary); font-family: inherit; font-size: 15px; text-align: center; }
.tpl-sec-num:focus { box-shadow: 0 0 0 2px rgba(0,122,255,0.3); }
.tpl-sec-unit { color: var(--text-secondary); }
.tpl-sheet .tpl-add-section-btn { width: 100%; min-height: 50px; margin-top: 12px; border: none; border-radius: 14px; background: var(--card); color: var(--primary); font-family: inherit; font-size: 16px; font-weight: 600; cursor: pointer; transition: background 0.15s; }
.tpl-sheet .tpl-add-section-btn:active { background: rgba(0,122,255,0.08); }
.tpl-lib { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 4px 0; }
.tpl-lib-k { font-size: 12px; color: var(--text-tertiary); margin-right: 2px; }
.tpl-sheet .tpl-advanced-pane { min-height: 0; gap: 0; }
.tpl-sheet .tpl-advanced-pane .af-card { padding: 8px; }
.tpl-mode-link { align-self: flex-start; margin: -12px 4px 0; }
.tpl-preview-head { align-items: center; justify-content: space-between; }
.tpl-preview-seg { flex: none; width: 196px; }
#addTemplateModal .tpl-preview-render, #addTemplateModal .tpl-skeleton-render { max-height: none; padding: 0; border: none; border-radius: 0; background: transparent; overflow-y: auto; }
#addTemplateModal .tpl-preview-render[hidden], #addTemplateModal .tpl-skeleton-render[hidden], #addTemplateModal .tpl-skeleton-legend[hidden] { display: none; }
#addTemplateModal .tpl-skeleton-render { font-size: 14px; line-height: 1.7; color: var(--text-primary); }
#addTemplateModal .tpl-sk-line { white-space: pre-wrap; word-break: break-word; }
#addTemplateModal .tpl-slot { display: inline; background: rgba(255,149,0,0.14); color: #8A5A00; border-radius: 4px; padding: 0 4px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
#addTemplateModal .tpl-sk-limits { margin-top: 10px; padding-top: 8px; border-top: 0.5px solid var(--border-light); font-size: 13px; color: var(--text-secondary); }
.confirm-overlay.above-sheet { z-index: 500; }
.confirm-overlay.above-chat { z-index: 1300; }
.tpl-sheet .sheet-body, #addTemplateModal .tpl-preview-render, #addTemplateModal .tpl-skeleton-render { overflow-anchor: none; }
.tpl-start-list.is-scroll { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
@media (min-width: 900px) {
  #addTemplateModal .tpl-preview-render, #addTemplateModal .tpl-skeleton-render { max-height: calc(min(92vh, 980px) - 260px); }
}
@media (min-width: 640px) and (max-width: 899px) and (max-height: 560px) {
  #addTemplateModal .tpl-preview-render, #addTemplateModal .tpl-skeleton-render { max-height: calc(96dvh - 200px); }
}
@media (prefers-color-scheme: dark) {
  #addTemplateModal .tpl-slot { background: rgba(255,159,10,0.2); color: #FFB340; }
}
.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; }
.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: hidden; }
#reCorrectModal .sheet-body { min-height: 0; }
@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); }
.template-preview-block.compact { margin-top: 0; }
.template-preview-block .body.muted { max-height: none; overflow: visible; color: var(--text-tertiary); }
#collectPreflightModal.modal-overlay { z-index: 400; }
.collect-preflight-body { padding: 0 4px; }
.collect-preflight-template { margin: 12px 0 0; }
.collect-preflight-template .input-field { margin: 0; }
.collect-preflight-lead { font-size: 14px; color: var(--text-primary); margin: 0 0 12px; line-height: 1.55; }
.collect-preflight-highlight { display: block; width: 100%; text-align: left; font: inherit; cursor: pointer; 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; color: inherit; }
.collect-preflight-highlight:focus-visible { outline: 3px solid rgba(0,122,255,0.28); outline-offset: 2px; }
.collect-preflight-highlight.is-off { background: rgba(60,60,67,0.06); border-color: rgba(60,60,67,0.12); }
.collect-preflight-highlight.is-off .collect-preflight-badge { color: var(--text-tertiary); }
.collect-preflight-highlight.is-off .collect-preflight-desc { color: var(--text-tertiary); }
.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 !important; }
  .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; }
  #studentList .base-bar { 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; }
  .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; }
.page-body-centered { text-align: center; }
.about-list { display: inline-block; text-align: left; padding-left: 20px; margin: 0 auto 24px; color: var(--text-secondary); }
.about-section { border-top: 1px solid var(--border-color, #eee); padding-top: 24px; margin-bottom: 24px; max-width: 560px; margin-left: auto; margin-right: auto; }
.about-section:last-child { margin-bottom: 0; }
.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; }
.content-box.essay-render { white-space: normal; }
.essay-render .cm-p { margin: 0 0 10px; font-family: 'Songti SC', 'SimSun', serif; font-size: 11pt; line-height: 1.75; }
.essay-render .cm-p.cm-indent { text-indent: 2em; }
.essay-render .cm-p.cm-title { text-align: center; font-weight: 700; font-size: 13pt; margin: 6px 0 12px; }
.essay-render .cm-p.cm-section { font-weight: 600; }
.essay-render .cm-p.cm-section:not(:first-child) { margin-top: 16px; }
.essay-render .cm-empty { color: var(--text-tertiary); }
.ai-note { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 11px; color: var(--text-tertiary); }
.ai-note .ui-icon { width: 13px; height: 13px; flex-shrink: 0; }
/* === 游客浏览提示横幅 === */
.auth-banner { position: fixed; left: 50%; bottom: calc(72px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 1200; display: flex; align-items: center; gap: 10px; max-width: min(560px, calc(100vw - 24px)); padding: 10px 12px 10px 16px; background: rgba(22,24,29,0.88); color: #fff; border-radius: 999px; box-shadow: 0 12px 32px -8px rgba(0,0,0,0.4); backdrop-filter: blur(12px); animation: authBannerIn .35s ease; }
@keyframes authBannerIn { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
.auth-banner-text { font-size: 13px; line-height: 1.4; }
.auth-banner-btn { flex-shrink: 0; padding: 7px 14px; border-radius: 999px; background: var(--primary-gradient, #007aff); color: #fff; font-size: 13px; font-weight: 600; text-decoration: none; }
.auth-banner-close { flex-shrink: 0; width: 26px; height: 26px; border: none; border-radius: 50%; background: rgba(255,255,255,0.14); color: rgba(255,255,255,0.8); font-size: 15px; line-height: 1; cursor: pointer; }
/* === 班级学情 === */
.insight-loading { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 36px 0; font-size: 14px; color: var(--text-secondary); }
.insight-loading-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); animation: insightPulse 1s ease infinite; }
@keyframes insightPulse { 0%, 100% { opacity: 0.3; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.1); } }
.insight-progress { padding: 14px 16px; border-radius: 14px; background: var(--border-light); margin-bottom: 14px; }
.insight-progress-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; }
.insight-progress-head strong { font-size: 15px; color: var(--text-primary); }
.insight-bar { height: 6px; border-radius: 999px; background: rgba(0,122,255,0.1); overflow: hidden; }
.insight-bar.big { height: 8px; }
.insight-bar-fill { height: 100%; border-radius: 999px; background: var(--primary-gradient, #007aff); transition: width .4s ease; }
.insight-section { margin-bottom: 14px; }
.insight-section-title { font-size: 12px; font-weight: 600; color: var(--text-tertiary); letter-spacing: 0.4px; margin-bottom: 8px; }
.insight-issue { margin-bottom: 10px; }
.insight-issue-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.insight-issue-tag { font-size: 14px; font-weight: 500; color: var(--text-primary); }
.insight-issue-count { font-size: 12px; color: var(--text-tertiary); }
.insight-row { display: flex; align-items: baseline; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border-light); }
.insight-row:last-child { border-bottom: none; }
.insight-row-name { font-size: 14px; font-weight: 500; color: var(--text-primary); flex-shrink: 0; }
.insight-row-sub { font-size: 12px; color: var(--text-tertiary); }
.insight-exemplar { padding: 10px 12px; border-radius: 12px; background: rgba(52,199,89,0.07); margin-bottom: 8px; }
.insight-exemplar-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.insight-exemplar-why { font-size: 11px; color: var(--success, #34c759); }
.insight-snippet { font-size: 12px; line-height: 1.6; color: var(--text-secondary); }
.insight-empty-line { font-size: 13px; color: var(--text-tertiary); padding: 6px 0; }
.insight-cta { width: 100%; margin-top: 4px; }
.insight-cta:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.insight-footnote { text-align: center; font-size: 11px; color: var(--text-tertiary); margin-top: 10px; }
.insight-stats { font-size: 12px; color: var(--text-tertiary); margin-top: 6px; }
.insight-highlight .insight-snippet { color: var(--text-primary); font-size: 13px; }
.insight-highlight .insight-exemplar-head { margin-top: 4px; }
.insight-typos { display: flex; flex-wrap: wrap; gap: 6px; }
.insight-typo { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 8px; background: rgba(255, 59, 48, 0.08); font-size: 12px; }
.insight-typo b { font-weight: 600; color: var(--danger, #ff3b30); }
.insight-typo i { font-style: normal; font-size: 11px; color: var(--text-tertiary); }
.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);
}
.app-footer-ai { margin-bottom: 6px; opacity: 0.85; }
.app-footer-ai span { border-bottom: 1px dotted currentColor; cursor: help; }
.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; }
/* === 方案B · 晨雾玻璃统一主题 === */
:root { --background: #F0F2F9; --radius-card: 22px; --glass-bg: rgba(255,255,255,0.62); --glass-border: rgba(255,255,255,0.75); }
body::before {
  content: '';
  position: fixed;
  inset: -12%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(42% 42% at 14% 6%, rgba(0,122,255,0.14), transparent 72%),
    radial-gradient(38% 38% at 88% 10%, rgba(88,86,214,0.12), transparent 72%),
    radial-gradient(34% 34% at 62% 98%, rgba(255,110,196,0.08), transparent 72%);
}
.app-container { background: transparent; box-shadow: none; }
.app-header { background: rgba(255,255,255,0.6); border-bottom: 1px solid rgba(255,255,255,0.65); }
.card, .class-card, .setting-item, .student-card, .mine-profile-card, .assignment-detail-hero, .assignment-card, .pick-card, .detail-header {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
}
.card, .class-card, .setting-item, .student-card, .mine-profile-card, .assignment-detail-hero, .assignment-card, .detail-header { box-shadow: 0 10px 30px -18px rgba(22,24,29,0.2); }
.empty-state { background: rgba(255,255,255,0.4); border: 1px dashed rgba(22,24,29,0.12); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-radius: var(--radius-card); }
.btn { border-radius: 999px; }
.btn-primary { box-shadow: 0 8px 20px -6px rgba(0,122,255,0.5); }
.btn-secondary { background: rgba(255,255,255,0.72); border: 1px solid rgba(22,24,29,0.08); }
.btn-secondary:hover, .btn-secondary:active { background: rgba(255,255,255,0.92); }
.assignment-primary-btn { border-radius: 999px; }
.header-chat-btn { border-radius: 999px; background: var(--glass-bg); border: 1px solid var(--glass-border); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 2px 8px rgba(22,24,29,0.06); }
.page-title { font-weight: 800; letter-spacing: -0.03em; }
.sub-header-title { font-weight: 700; letter-spacing: -0.01em; }
.search-box { background: rgba(255,255,255,0.62); border: 1px solid rgba(255,255,255,0.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-radius: 999px; }
@media (min-width: 900px) {
  .app-tabbar { background: rgba(255,255,255,0.55); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); border-right: 1px solid rgba(255,255,255,0.6); }
}
@media (prefers-color-scheme: dark) {
  :root { --glass-bg: rgba(30,32,38,0.6); --glass-border: rgba(255,255,255,0.09); }
  body::before {
    background:
      radial-gradient(42% 42% at 14% 6%, rgba(10,132,255,0.16), transparent 72%),
      radial-gradient(38% 38% at 88% 10%, rgba(94,92,230,0.14), transparent 72%),
      radial-gradient(34% 34% at 62% 98%, rgba(255,110,196,0.06), transparent 72%);
  }
  .app-header { background: rgba(20,20,24,0.6); border-bottom-color: rgba(255,255,255,0.08); }
  .card, .class-card, .setting-item, .student-card, .mine-profile-card, .assignment-detail-hero, .assignment-card, .pick-card, .detail-header { background: var(--glass-bg); border-color: var(--glass-border); }
  .empty-state { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.12); }
  .btn-secondary { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.12); color: var(--text-primary); }
  .btn-secondary:hover, .btn-secondary:active { background: rgba(255,255,255,0.16); }
  .btn-outline { background: rgba(10,132,255,0.18); color: var(--primary-light); }
  .btn-outline:hover, .btn-outline:active { background: rgba(10,132,255,0.28); }
  .header-chat-btn { background: var(--glass-bg); border-color: var(--glass-border); }
  .pipi-peak { background: rgba(28,28,32,0.92); border-color: rgba(10,132,255,0.28); box-shadow: 0 10px 28px rgba(0,0,0,0.32); }
  .pipi-peak-dismiss { background: rgba(10,132,255,0.22); color: #64B5FF; }
  .search-box { background: rgba(30,32,38,0.6); border-color: rgba(255,255,255,0.09); }
  @media (min-width: 900px) {
    .app-tabbar { background: rgba(20,20,24,0.65); border-right-color: rgba(255,255,255,0.08); }
  }
}
.collect-boot{position:fixed;inset:0;z-index:360;display:flex;align-items:center;justify-content:center;background:#0c0c0e;color:#fff}
.collect-boot[hidden]{display:none!important}
.collect-boot-card{display:flex;flex-direction:column;align-items:center;gap:16px;padding:24px;text-align:center}
.collect-boot-spin{width:28px;height:28px;border-radius:50%;border:3px solid rgba(255,255,255,.25);border-top-color:#fff;animation:collectBootSpin .7s linear infinite}
.collect-boot-text{font-size:16px;font-weight:600;line-height:1.45}
@keyframes collectBootSpin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.collect-boot-spin{animation:none}}
