/* Note editor: the same light-blue palette and local fonts as the reading pages. */
.editor-toolbar, .editor-toolbar-buttons, .editor-insert { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.editor-toolbar { justify-content: space-between; padding-bottom: 20px; border-bottom: 1px solid var(--color-border); }
.editor-picker { min-width: 0; flex: 1 1 280px; max-width: 430px; }
.editor-picker label { display: block; font-size: 14px; margin-bottom: 6px; }
.editor-picker select { width: 100%; padding: 10px 12px; color: var(--color-text); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); }
.editor-help { margin: 20px 0 8px; color: var(--color-muted); font-size: 14px; }
.editor-status { font-size: 14px; min-height: 26px; color: var(--color-brand); }
.editor-local-panel, .editor-local-help { margin-top: 20px; padding: 16px 20px; border: 1px solid var(--color-border); background: var(--color-wash); border-radius: var(--radius); font-size: 14px; }
.editor-local-panel p, .editor-local-help p { margin-bottom: 8px; }
.editor-sync-controls { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; }
.editor-sync-controls label { display: flex; align-items: center; gap: 8px; }
.editor-sync-status { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 12em; overflow: auto; margin-top: 10px; color: var(--color-muted); font-size: 13px; }
#editor-file-path { overflow-wrap: anywhere; }
.editor-insert { padding-block: 12px; border-block: 1px solid var(--color-border); align-items: center; }
.editor-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; margin-top: 24px; }
.editor-pane { min-width: 0; }
.editor-pane > h2 { font-size: 18px; margin-bottom: 12px; }
#editor-source { display: block; width: 100%; height: 72vh; min-height: 480px; resize: vertical; padding: 20px; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); color: var(--color-text); font: 14px/1.85 var(--font-code); tab-size: 4; }
.editor-preview { height: 72vh; min-height: 480px; overflow: auto; padding: 20px; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); font-size: 17px; overflow-wrap: anywhere; }
.editor-preview .editor-preview-title { margin-top: 0; font-size: 24px; }
.editor-errors { white-space: pre-wrap; font-size: 13px; overflow-wrap: anywhere; color: var(--color-muted); margin-top: 12px; }
.editable-math { cursor: pointer; }
.editable-math:hover, .editable-math:focus-visible { background: var(--color-wash); }
.editable-math.block { border-radius: var(--radius); }
.editor-formula-panel, .editor-draft-notice { padding: 24px; background: var(--color-wash); border: 1px solid var(--color-border); border-radius: var(--radius); margin-top: 24px; }
.editor-formula-panel h2 { font-size: 21px; }
.editor-formula-panel label { display: block; margin-bottom: 8px; font-size: 14px; }
#editor-formula { width: 100%; min-height: 120px; padding: 12px; color: var(--color-text); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); font: 14px/1.8 var(--font-code); resize: vertical; }
.editor-formula-panel .math { overflow-x: auto; }
.latex-statement { margin-block: 24px; }
.latex-qed { text-align: right; }
.prose figure { margin: 24px 0; }
.prose figcaption { color: var(--color-muted); font: 13px/1.8 var(--font-ui); margin-top: 12px; }
.note-editor button:disabled, .note-editor select:disabled { cursor: wait; opacity: .6; }
@media (max-width: 900px) {
  .editor-workspace { grid-template-columns: minmax(0, 1fr); }
  #editor-source, .editor-preview { height: 56vh; min-height: 320px; }
}
@media (max-width: 640px) {
  .editor-toolbar-buttons { gap: 8px; }
  .editor-toolbar-buttons .button { padding: 9px 12px; font-size: 13px; }
  #editor-source, .editor-preview { padding: 14px; }
  .editor-preview { font-size: 16px; }
  .editor-formula-panel, .editor-draft-notice { padding: 16px; }
}
