.note-editor-shell {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  min-height: calc(100vh - 64px);
}

.note-editor-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

.note-save-status {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.note-props-drawer {
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.note-props-drawer[hidden] {
  display: none;
}

.note-props-row {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  align-items: start;
}

.note-props-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  padding-top: 6px;
}

.note-props-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.note-props-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--border-subtle);
}

.note-editor-canvas {
  flex: 1;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  padding: 28px 34px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.note-editor-title {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.note-editor-body {
  flex: 1;
  width: 100%;
  min-height: calc(100vh - 280px);
  border: none;
  outline: none;
  resize: none;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text-primary);
}

@media (max-width: 720px) {
  .note-editor-canvas {
    padding: 18px 16px;
  }

  .note-props-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

.note-md-rendered {
  flex: 1;
  min-height: calc(100vh - 280px);
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: text;
  font-size: 0.96875rem;
  line-height: 1.65;
  color: var(--text-primary);
}

.note-md-rendered[hidden],
.note-editor-body[hidden] {
  display: none;
}

.md-placeholder {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.md-line {
  margin: 0;
  padding-left: calc(var(--md-indent, 0) * 18px);
}

.md-empty {
  height: 10px;
}

.md-h1 {
  font-size: 1.45rem;
  font-weight: 700;
  margin-top: 8px;
}

.md-h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 6px;
}

.md-h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: 4px;
}

.md-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.md-check input {
  margin-top: 5px;
  accent-color: var(--accent-primary);
  cursor: pointer;
}

.md-check.is-checked span {
  text-decoration: line-through;
  color: var(--text-muted);
}

.md-li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.md-bullet,
.md-num {
  color: var(--text-muted);
  font-weight: 600;
  flex-shrink: 0;
}

.md-quote {
  border-left: 3px solid var(--border-strong);
  padding-left: 12px;
  color: var(--text-secondary);
}

.md-code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: rgba(17, 18, 22, 0.06);
  padding: 1px 5px;
  border-radius: 4px;
}

.md-link {
  color: var(--status-info);
  text-decoration: underline;
}

.md-wikilink {
  color: var(--status-info);
  text-decoration: underline dotted;
  text-underline-offset: 2px;
  cursor: pointer;
}

.md-code-block {
  margin: 4px 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: rgba(17, 18, 22, 0.05);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.5;
  white-space: pre;
  -webkit-line-clamp: none;
}

.md-code-block code {
  font-family: inherit;
  white-space: pre;
}
