.notes-recent-notes {
  display: grid;
  gap: 10px;
  background: transparent;
  box-shadow: none;
  color: inherit;
}

.notes-recent-notes-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.notes-recent-notes-heading,
.notes-recent-notes-empty {
  margin: 0;
}

.notes-recent-notes-heading { font-size: 1rem; }
.notes-recent-notes-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.notes-recent-note { display: grid; }
.notes-recent-note-title,
.notes-recent-notes-all {
  color: inherit;
  text-decoration: none;
}

.notes-recent-note-title { font-weight: 650; line-height: 1.35; }
.notes-recent-notes-all { font-size: 0.82rem; }
.notes-recent-note-title:hover,
.notes-recent-note-title:focus-visible,
.notes-recent-notes-all:hover,
.notes-recent-notes-all:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.notes-recent-notes-empty {
  color: var(--muted, currentColor);
  font-size: 0.86rem;
}

.notes-page {
  display: grid;
  gap: 18px;
}

.notes-page[hidden] { display: none; }

.notes-workspace {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.4fr);
  gap: 18px;
  align-items: start;
}

.notes-directory,
.notes-detail {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line, rgba(0, 0, 0, 0.12));
  border-radius: 18px;
  background: var(--surface, #fff);
}

.notes-detail[hidden] {
  display: none;
}

.notes-directory-item {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-strong, #fff) 82%, transparent);
  color: inherit;
  text-align: left;
}

.notes-directory-item[aria-current="true"] {
  outline: 2px solid currentColor;
  outline-offset: 1px;
}

.notes-directory-item small { color: var(--muted, currentColor); }

.notes-detail-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.notes-detail-actions,
.notes-link-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.notes-links {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.notes-link-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--line, rgba(0, 0, 0, 0.12));
}

.notes-link-open {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 650;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.notes-link-empty { color: var(--muted, currentColor); }

.home-notes-card .notes-recent-notes { min-width: 0; }
.home-notes-card[data-editing="true"] .notes-recent-note-title,
.home-notes-card[data-editing="true"] .notes-recent-notes-all {
  pointer-events: none;
}

.ben-query-source {
  display: grid;
  gap: 6px;
  padding: 10px 0;
}

.ben-query-source p { margin: 0; color: var(--muted, currentColor); }
.ben-query-source pre {
  max-width: min(76vw, 720px);
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.notes-detail-heading h2,
.notes-detail-body { margin: 0; }

.notes-detail-body {
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.notes-history {
  display: grid;
  gap: 8px;
  padding-left: 22px;
}

.home-masthead-actions {
  display: flex;
  gap: 8px;
}

/* 最近记下：主页卡片与笔记页目录共用同一渲染器，只按表面调密度。 */
.notes-recent-notes-feed {
  background: transparent;
  box-shadow: none;
}

.notes-recent-notes-feed .notes-recent-note {
  display: grid;
  gap: 3px;
}

.notes-recent-note-summary,
.notes-recent-note-meta {
  margin: 0;
  color: var(--muted, currentColor);
  font-size: 0.82rem;
  line-height: 1.45;
}

.notes-recent-note-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.notes-recent-note-time { white-space: nowrap; }

.notes-recent-note-archived {
  padding: 0 6px;
  border: 1px solid var(--line, rgba(0, 0, 0, 0.12));
  border-radius: 999px;
  font-size: 0.72rem;
}

.notes-tag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.notes-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 8px;
  border: 1px solid var(--line, rgba(0, 0, 0, 0.12));
  border-radius: 999px;
  font-size: 0.76rem;
  line-height: 1.6;
}

.notes-tag-chip[data-new-candidate="true"] {
  border-style: dashed;
}

.notes-tag-chip-new {
  padding: 0 4px;
  border-radius: 999px;
  background: color-mix(in srgb, currentColor 14%, transparent);
  font-size: 0.68rem;
}

.notes-tag-chip-empty {
  color: var(--muted, currentColor);
  font-size: 0.76rem;
  list-style: none;
}

.notes-recent-notes-footer {
  display: grid;
  gap: 4px;
}

.notes-recent-notes-hint {
  margin: 0;
  color: var(--muted, currentColor);
  font-size: 0.76rem;
  line-height: 1.5;
}

.notes-recent-notes-feed[data-notes-surface="detail"] .notes-recent-notes-list { gap: 10px; }
.notes-recent-notes-feed[data-notes-surface="detail"] .notes-recent-note-title {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-strong, #fff) 82%, transparent);
}

.notes-confirmation-card {
  display: grid;
  gap: 8px;
}

.notes-confirmation-boundary {
  margin: 0;
  color: var(--muted, currentColor);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.notes-confirmation-title { margin: 0; }

.notes-confirmation-body,
.notes-confirmation-original-text {
  margin: 0;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.notes-confirmation-summary {
  margin: 0;
  color: var(--muted, currentColor);
  font-size: 0.86rem;
}

.notes-confirmation-original summary { cursor: pointer; }

.notes-confirmation-change-note,
.notes-confirmation-delete-notice {
  margin: 0;
  color: var(--muted, currentColor);
  font-size: 0.86rem;
}

.notes-confirmation-delete-notice {
  padding: 8px 10px;
  border-radius: 10px;
  background: color-mix(in srgb, currentColor 5%, transparent);
}

.notes-confirmation-diff {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.notes-confirmation-diff-item {
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  border-left: 2px solid var(--line, rgba(0, 0, 0, 0.16));
}

.notes-confirmation-diff-label {
  color: var(--muted, currentColor);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.notes-confirmation-diff-before,
.notes-confirmation-diff-after {
  margin: 0;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.notes-confirmation-diff-before {
  color: var(--muted, currentColor);
  text-decoration: line-through;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
}

.notes-confirmation-diff-empty {
  color: var(--muted, currentColor);
  font-size: 0.86rem;
}

.notes-query-answer {
  display: grid;
  gap: 12px;
}

.notes-query-answer-text {
  margin: 0;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.notes-query-sources {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.notes-query-source-card {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line, rgba(0, 0, 0, 0.12));
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
}

.notes-query-source-card:hover,
.notes-query-source-card:focus-visible {
  background: color-mix(in srgb, currentColor 6%, transparent);
}

.notes-query-source-time,
.notes-query-source-summary,
.notes-query-sources-empty {
  color: var(--muted, currentColor);
  font-size: 0.82rem;
}

.notes-query-answer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.notes-query-capture-hint {
  color: var(--muted, currentColor);
  font-size: 0.82rem;
}

@media (max-width: 720px) {
  .notes-workspace { grid-template-columns: 1fr; }
}
