/* 作业检查页样式 */
.hw {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.back-link {
  color: #2f6fd6;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.85);
  padding: 6px 12px;
  border-radius: 999px;
}

.card {
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.card h3 { font-size: 15px; color: #2f6fd6; margin-bottom: 10px; }

/* 照片区 */
.photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #f3f8ff;
  border: 2px dashed #c9d9ee;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.photo img { width: 100%; height: 100%; object-fit: contain; }
.photo-empty { text-align: center; color: #8a94a6; font-size: 14px; }
.photo-empty .material-hint { font-size: 40px; margin-bottom: 6px; }

.btn-row { display: flex; gap: 10px; margin-top: 4px; }
.ctrl-btn {
  border: 2px solid #dbe7f5;
  background: #fff;
  color: #2f6fd6;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 999px;
  cursor: pointer;
}
.ai-btn {
  border: none;
  background: linear-gradient(135deg, #4a9eff, #2f6fd6);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 9px 20px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(47, 111, 214, 0.35);
}
.ai-btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* 进度条 */
.ocr-progress { margin-top: 12px; }
.bar {
  width: 100%;
  height: 10px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}
.bar-inner {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #4a9eff, #3ecf8e);
  border-radius: 999px;
  transition: width 0.2s;
}
.ocr-status { margin-top: 6px; font-size: 12px; color: #6b7280; }

.hint { margin-top: 10px; font-size: 12px; color: #9ca3af; line-height: 1.6; }

/* 文本框 */
textarea {
  width: 100%;
  border: 2px solid #dbe7f5;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 15px;
  line-height: 1.7;
  font-family: inherit;
  outline: none;
  resize: vertical;
  box-sizing: border-box;
}
textarea:focus { border-color: #4a9eff; }

/* 检查按钮与结果 */
.big-btn {
  width: 100%;
  border: none;
  background: linear-gradient(135deg, #a78bfa, #7c3aed);
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  padding: 14px 0;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35);
}
.big-btn:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }
.big-btn:active:not(:disabled) { transform: scale(0.97); }

.advice {
  background: #f3f8ff;
  border: 2px solid #dbe7f5;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 15px;
  line-height: 1.8;
  white-space: pre-wrap;
  color: #374151;
}
.advice.error { background: #fee2e2; border-color: #fecaca; color: #b91c1c; }

/* 视觉直批按钮 + 说明 */
.big-btn.vision {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  box-shadow: 0 4px 12px rgba(109, 40, 217, 0.35);
  margin-bottom: 8px;
}
.vision-note {
  font-size: 12px;
  color: #8a94a6;
  text-align: center;
  margin: -2px 0 12px;
}

/* 备用路径折叠区 */
.hw-spare {
  border: 1px dashed #dbe7f5;
  border-radius: 16px;
  padding: 10px 14px;
  margin-top: 14px;
  background: #fbfdff;
}
.hw-spare summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: #6b7280;
  user-select: none;
  list-style: none;
}
.hw-spare summary::-webkit-details-marker { display: none; }
.hw-spare summary::before { content: '▶ '; font-size: 10px; }
.hw-spare[open] summary::before { content: '▼ '; }
.hw-spare .spare-inner {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
