.teacher-notes-guide {
  padding: 0.65rem 1.25rem;
  border-bottom: 1px solid var(--theme-divider);
  background: var(--theme-background, #fffdf8);
  color: var(--theme-text, #263238);
  font-size: 0.9rem;
  line-height: 1.6;
}

.teacher-notes-guide p { margin: 0; }
.mindmap-pan-hint { display: none; }
#annotation-guidance { font-weight: 650; }
.teacher-note-help, .word-note-help { font-size: 0.875rem; line-height: 1.6; }
.canvas-note-marker::before { content: "记"; }

.add-word-note-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  padding: 0.55rem 0.85rem;
  margin: 0.4rem 0;
  border: 1px dashed var(--theme-button-border, #aab8c2);
  border-radius: 0.5rem;
  background: transparent;
  color: var(--theme-text, #172234);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.add-word-note-btn:hover {
  background: rgba(48, 95, 114, 0.1);
  border-color: var(--theme-focus, #305f72);
  color: var(--theme-focus, #305f72);
}

.add-word-note-btn:focus-visible {
  outline: 2px solid var(--theme-focus, #305f72);
  outline-offset: 1px;
}

.word-note-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.word-note-header h3 {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--theme-text);
  letter-spacing: 0.04em;
}

.word-note-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--theme-button-border, #aab8c2);
  border-radius: 0.35rem;
  background: transparent;
  color: var(--theme-text, #172234);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.word-note-edit-btn:hover {
  background: rgba(48, 95, 114, 0.1);
  border-color: var(--theme-focus, #305f72);
  color: var(--theme-focus, #305f72);
}

.word-note-edit-btn:focus-visible {
  outline: 2px solid var(--theme-focus, #305f72);
  outline-offset: 1px;
}

.word-note-editor-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.15rem;
}

.word-note-editor-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--theme-text);
}

.word-note-close-btn {
  padding: 0.15rem 0.45rem !important;
  min-height: unset !important;
  border: none !important;
  background: transparent !important;
  color: var(--theme-text);
  font-size: 1rem;
  cursor: pointer;
  opacity: 0.7;
  line-height: 1;
}

.word-note-close-btn:hover {
  opacity: 1;
  color: var(--theme-focus);
}

.word-note-media-section {
  display: grid;
  gap: 0.45rem;
  padding: 0.55rem;
  border: 1px solid var(--theme-divider, #d3ccbd);
  border-radius: 0.4rem;
  background: rgba(0, 0, 0, 0.02);
}

.word-note-media-row {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  flex-wrap: wrap;
}

.word-note-file-label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--theme-button-border, #aab8c2);
  border-radius: 0.35rem;
  background: var(--theme-background, #fff);
  color: var(--theme-text);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.word-note-file-label:hover {
  border-color: var(--theme-focus);
  color: var(--theme-focus);
}

.word-note-file-label input[type="file"] {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.word-note-url-group {
  display: flex;
  gap: 0.35rem;
  flex: 1;
  min-width: 11rem;
}

.word-note-remote-url {
  flex: 1;
  min-width: 0;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--theme-divider, #aab8c2);
  border-radius: 0.35rem;
  background: var(--theme-background, #fff);
  color: var(--theme-text);
  font-size: 0.8rem;
}

.word-note-snapshot, .word-note-refresh {
  padding: 0.35rem 0.6rem !important;
  min-height: unset !important;
  border: 1px solid var(--theme-button-border, #aab8c2) !important;
  border-radius: 0.35rem;
  background: var(--theme-background, #fff) !important;
  color: var(--theme-text) !important;
  font-size: 0.8rem !important;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.word-note-snapshot:hover, .word-note-refresh:hover {
  border-color: var(--theme-focus) !important;
  color: var(--theme-focus) !important;
}

.word-note-refresh-row {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  flex-wrap: wrap;
}

.word-note-refresh-select-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--theme-text);
}

.word-note-refresh-media {
  padding: 0.25rem 0.4rem;
  border: 1px solid var(--theme-divider, #aab8c2);
  border-radius: 0.35rem;
  background: var(--theme-background, #fff);
  color: var(--theme-text);
  font-size: 0.8rem;
}

.word-note-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.word-note-save {
  padding: 0.4rem 1rem !important;
  min-height: unset !important;
  border: none !important;
  border-radius: 0.4rem;
  background: var(--theme-focus, #305f72) !important;
  color: #fff !important;
  font-weight: 700;
  cursor: pointer;
}

.word-note-cancel {
  padding: 0.4rem 0.8rem !important;
  min-height: unset !important;
  border: 1px solid var(--theme-button-border, #aab8c2) !important;
  border-radius: 0.4rem;
  background: transparent !important;
  color: var(--theme-text) !important;
  cursor: pointer;
}

.word-note-cancel:hover {
  border-color: var(--theme-focus) !important;
  color: var(--theme-focus) !important;
}

.word-note-delete {
  margin-left: auto;
  padding: 0.4rem 0.75rem !important;
  min-height: unset !important;
  border: 1px solid #e57373 !important;
  border-radius: 0.4rem;
  background: transparent !important;
  color: #d32f2f !important;
  cursor: pointer;
}

.word-note-delete:hover:not(:disabled) {
  background: rgba(211, 47, 47, 0.08) !important;
}

:is(.word-note-editor, #canvas-note-drawer, #profile-panel) :is(input, select, textarea) {
  max-width: 100%;
  min-width: 0;
  font: inherit;
}

:is(.word-note-editor, #canvas-note-drawer) textarea {
  padding: 0.65rem;
  line-height: 1.6;
  resize: vertical;
  background: var(--theme-background, #fff);
  color: var(--theme-text, #172234);
  border: 1px solid var(--theme-divider, #aab8c2);
  border-radius: 0.4rem;
}

:is(.word-note-editor, #canvas-note-drawer) textarea:focus {
  outline: 2px solid var(--theme-focus, #305f72);
  border-color: var(--theme-focus, #305f72);
}

:is(.word-note-editor, #canvas-note-drawer, #profile-panel) button {
  min-height: 2.5rem;
}

:is(.word-note-save, #canvas-note-save) {
  font-weight: 700;
}

@media (max-width: 600px) {
  .mindmap-pan-hint { display: block; margin: 0 0 0.75rem; font-size: 0.8rem; }
  .teacher-notes-guide { padding: 0.6rem 0.75rem; }
}
