.history-list {
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
}
.history-list::-webkit-scrollbar { width: 6px; }
.history-list::-webkit-scrollbar-track { background: transparent; }
.history-list::-webkit-scrollbar-thumb {
  background: var(--cream-dark);
  border-radius: 3px;
}
.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--cream);
  border-radius: 14px;
  margin-bottom: 8px;
  border-left: 4px solid var(--teal);
  gap: 12px;
}
.history-item-info { flex: 1; min-width: 0; }
.history-date {
  font-family: 'Klee One', serif;
  font-weight: 400;
  font-size: 13px;
  color: var(--ink-soft);
}
.history-page {
  font-family: 'Klee One', serif;
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
  margin-top: 2px;
}
.history-time {
  font-family: 'Klee One', serif;
  font-weight: 600;
  font-size: 18px;
  color: var(--teal);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.delete-btn {
  background: none;
  border: none;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 18px;
  padding: 4px 8px;
  opacity: 0.4;
  transition: opacity 0.2s;
}
.delete-btn:hover { opacity: 1; color: var(--rose); }
.empty-state {
  text-align: center;
  padding: 24px 16px;
  color: var(--ink-soft);
  font-size: 14px;
}
.empty-state .big-emoji {
  font-size: 48px;
  display: block;
  margin-bottom: 8px;
  opacity: 0.5;
}

/* Per-session notes */
.history-item {
  flex-wrap: wrap;
}
.history-item-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}
.history-note {
  flex: 1 1 100%;
  margin-top: 8px;
  background: var(--paper);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--ink);
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border-left: 3px solid var(--plum);
}
.history-note-body { flex: 1; min-width: 0; word-break: break-word; }
.history-note-author {
  font-family: 'Klee One', serif;
  font-weight: 600;
  color: var(--plum);
  margin-right: 4px;
}
.history-note-edit {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  color: var(--ink-soft);
  opacity: 0.5;
  padding: 0 4px;
  transition: opacity 0.2s;
  flex-shrink: 0;
}
.history-note-edit:hover { opacity: 1; }

.note-add-btn {
  flex: 1 1 100%;
  margin-top: 6px;
  background: none;
  border: 1.5px dashed var(--cream-dark);
  border-radius: 10px;
  padding: 8px 12px;
  font-family: 'Klee One', serif;
  font-size: 12px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}
.note-add-btn:hover {
  border-color: var(--plum);
  color: var(--plum);
  background: rgba(155, 107, 176, 0.05);
}

/* Inline editor */
.note-editor {
  flex: 1 1 100%;
  margin-top: 8px;
  background: var(--paper);
  border-radius: 12px;
  padding: 12px;
  border: 2px solid var(--plum);
  box-shadow: 0 2px 8px rgba(155, 107, 176, 0.2);
}
.note-author-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.author-chip {
  font-family: 'Klee One', serif;
  font-size: 12px;
  padding: 6px 14px;
  border: 1.5px solid var(--cream-dark);
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.15s;
}
.author-chip:hover { border-color: var(--plum); }
.author-chip.selected {
  background: linear-gradient(135deg, #b888c9 0%, var(--plum) 100%);
  color: white;
  border-color: var(--plum);
  box-shadow: 0 2px 6px rgba(155, 107, 176, 0.35);
}
.note-textarea {
  font-family: 'Klee One', serif;
  font-size: 14px;
  width: 100%;
  min-height: 70px;
  padding: 10px 12px;
  border: 1.5px solid var(--cream-dark);
  border-radius: 10px;
  background: var(--cream);
  color: var(--ink);
  outline: none;
  resize: vertical;
  line-height: 1.4;
  margin-bottom: 8px;
}
.note-textarea:focus { border-color: var(--plum); }
.note-editor-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
