.history[id], .history [id] {
  scroll-margin-top: 6rem;
}

.history-links, .history-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.history-links, .history-channels {
  margin-top: 12px;
}

.history-group, .history-directory {
  margin-top: 20px;
}

.history-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.history-entry, .history-empty {
  padding: 12px 16px;
  overflow-wrap: anywhere;
}

.history-entry + .history-entry {
  border-top: 1px solid var(--line);
}

.history-entry:target {
  background: var(--surface-2);
}

.history-entry h4, .history-entry p {
  margin: 0 0 5px;
}

.history-entry p:last-child {
  margin: 0;
}

.history-empty {
  margin-top: 8px;
  border-inline-start: 2px solid var(--line-2);
}

.history-directory summary {
  cursor: pointer;
}
