.teacher-page { max-width: 900px; }
.teacher-page [hidden] { display: none !important; }
.teacher-intro { display: flex; align-items: baseline; gap: 18px; padding: 18px 0 14px; }
.teacher-intro h1 { margin: 0; color: #194f3b; font: 700 1.75rem/1.2 "STKaiti", "KaiTi", serif; white-space: nowrap; }
.teacher-intro p { margin: 0; color: #667c72; font-size: .88rem; line-height: 1.5; }
.teacher-upload-card, .teacher-workspace, .teacher-results { padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.teacher-upload-card h2, .teacher-workspace h2, .teacher-results h2 { margin: 0 0 6px; color: var(--paper); font-size: 1.05rem; }
.teacher-upload-card p, .teacher-workspace p, .teacher-results p { margin: 0; color: #71877e; font-size: .8rem; line-height: 1.65; }
.teacher-upload-card kbd { padding: 1px 5px; font: inherit; background: #f5f9f6; border: 1px solid var(--line); border-radius: 4px; }
.teacher-drop-zone { display: grid; min-height: 210px; margin-top: 18px; padding: 26px; place-items: center; align-content: center; gap: 8px; color: #61776d; text-align: center; background: #f7fbf8; border: 2px dashed #b9d3c3; border-radius: 16px; outline: none; }
.teacher-drop-zone.is-dragging, .teacher-drop-zone:focus-visible { background: #edf6f0; border-color: var(--jade); box-shadow: 0 0 0 3px rgba(63,155,112,.14); }
.teacher-drop-zone > span { font-size: .78rem; }
.teacher-drop-icon { display: grid; width: 48px; height: 48px; place-items: center; color: var(--jade-dark); background: #e2f2e7; border-radius: 13px; font: 24px "KaiTi", serif; }
.teacher-drop-zone .lantern-button { margin-top: 8px; }
.teacher-workspace, .teacher-results { margin-top: 18px; }
.teacher-workspace-heading, .teacher-results-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.teacher-inline-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.teacher-preview-wrap { position: relative; width: fit-content; max-width: 100%; margin: 18px auto 0; overflow: hidden; background: #e8efea; border: 1px solid #bfd3c6; border-radius: 12px; touch-action: none; user-select: none; }
#teacher-preview { display: block; width: auto; max-width: 100%; max-height: 620px; }
.teacher-selection { position: absolute; min-width: 8px; min-height: 8px; border: 2px solid #fff; border-radius: 4px; box-shadow: 0 0 0 2px var(--jade-dark), 0 0 0 9999px rgba(15,37,28,.36); pointer-events: none; }
.teacher-match-button { width: 100%; margin-top: 14px; }
.teacher-result-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.teacher-result-card { display: grid; grid-template-columns: 56px minmax(0, 1fr); align-items: center; gap: 12px; min-width: 0; padding: 12px; background: #f8fbf8; border: 1px solid var(--line); border-radius: 13px; }
.teacher-result-card img { width: 56px; height: 56px; object-fit: contain; image-rendering: auto; background: #fff; border: 1px solid #d9e7de; border-radius: 10px; }
.teacher-result-card strong { display: block; color: var(--jade-dark); font-size: .94rem; line-height: 1.45; overflow-wrap: anywhere; }
.teacher-result-card span { display: block; margin-top: 4px; color: #789087; font-size: .72rem; line-height: 1.4; }
.xueba-rule { margin: -2px 0 16px; padding: 12px 15px; color: #5c756a; background: #edf6f0; border: 1px solid #c7ddd0; border-radius: 12px; font-size: .8rem; line-height: 1.7; }
@media (max-width: 680px) {
  .teacher-intro { flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px 0 12px; }
  .teacher-intro h1 { font-size: 1.5rem; }
  .teacher-upload-card, .teacher-workspace, .teacher-results { padding: 16px; border-radius: 16px; }
  .teacher-workspace-heading, .teacher-results-heading { display: block; }
  .teacher-inline-actions { justify-content: flex-start; margin-top: 12px; }
  .teacher-result-list { grid-template-columns: 1fr; }
  .teacher-result-card { grid-template-columns: 48px minmax(0, 1fr); }
  .teacher-result-card img { width: 48px; height: 48px; }
}
@media (max-width: 360px) {
  .teacher-drop-zone { min-height: 180px; padding: 18px 10px; }
  .teacher-inline-actions .lantern-button { flex: 1 1 auto; }
}
