.notes-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 12px;
  margin-bottom: var(--space-md);
}

.notes-search {
  flex: 1;
  min-width: 200px;
}

.notes-section + .notes-section {
  margin-top: var(--space-lg);
}

.notes-section .goals-category-title {
  margin-bottom: 10px;
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: var(--space-sm);
  align-items: start;
}

.notes-grid.is-masonry {
  grid-template-columns: repeat(var(--masonry-cols, 1), minmax(0, 1fr));
}

.notes-masonry-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  min-width: 0;
}

.notes-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.note-card {
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.note-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 4px 12px rgba(17, 18, 22, 0.04);
  transform: translateY(-1px);
}

.note-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.note-card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.note-pin-btn {
  width: 28px;
  height: 28px;
}

.note-pin-btn.is-pinned {
  color: #d97706;
}

.note-card-body {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-secondary);
  white-space: pre-line;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notes-list .note-card-body {
  -webkit-line-clamp: 2;
}

.note-card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.note-link-badge {
  background: rgba(17, 18, 22, 0.06);
  color: var(--text-primary);
}

.note-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.note-item-progress {
  background: rgba(13, 148, 136, 0.12);
  color: #0f766e;
}

.note-open-link {
  border: 1px solid transparent;
  font-family: inherit;
  cursor: pointer;
}

.note-open-link:hover {
  border-color: var(--border-strong);
}

.note-tint-default {
  background: var(--bg-base);
}

.note-tint-amber {
  background: #fffbeb;
  border-color: #fde68a;
}

.note-tint-blue {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.note-tint-green {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.note-tint-purple {
  background: #f5f3ff;
  border-color: #ddd6fe;
}

.note-tint-rose {
  background: #fff1f2;
  border-color: #fecdd3;
}

.note-modal {
  width: min(560px, calc(100vw - 32px));
}

.note-title-input {
  font-size: 1rem;
  font-weight: 600;
}

.note-md-input {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.5;
  resize: vertical;
}

.note-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.note-colors {
  display: flex;
  gap: 8px;
}

.note-color-dot {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  cursor: pointer;
}

.note-color-dot.is-active {
  box-shadow: 0 0 0 2px var(--bg-base), 0 0 0 4px var(--accent-primary);
}

.note-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.note-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.note-tag-chip button {
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0;
  font-size: 0.85rem;
  line-height: 1;
}

.note-link-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.note-card-thumb {
  width: 100%;
  max-height: 120px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  display: block;
}
.note-card-thumb:not([data-hydrated]) { display: none; }
.notes-list .note-card-thumb { max-width: 180px; max-height: 84px; }

.notes-trash-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 12px;
  padding: 10px 14px;
  margin-bottom: var(--space-md);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
}
.notes-trash-info { font-size: 0.8125rem; color: var(--text-secondary); }
.notes-trash-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.notes-trash-danger { background: var(--status-danger); border-color: var(--status-danger); color: #fff; }
.notes-trash-danger:hover { filter: brightness(0.95); }

