.tpb-topics {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin-top: -0.2rem;
  margin-bottom: 1.15rem;
}

.tpb-topics-label {
  flex: 0 0 auto;
  padding-top: 0.4rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tpb-topics-list,
.tpb-post-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tpb-topic-link,
.tpb-post-topics a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0.35rem 0.72rem;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  font-size: 0.8rem;
  font-weight: 750;
}

.tpb-topic-link:hover,
.tpb-topic-link.is-active,
.tpb-post-topics a:hover {
  border-color: var(--ring);
  color: var(--text);
  background: var(--accent-soft);
}

.tpb-post-topics {
  margin: 0.2rem 0 0.85rem;
}

.tpb-post-topics a {
  min-height: 30px;
  padding: 0.25rem 0.62rem;
  font-size: 0.75rem;
}

@media (max-width: 640px) {
  .tpb-topics {
    display: block;
    overflow: hidden;
  }

  .tpb-topics-label {
    display: block;
    padding: 0 0 0.45rem;
  }

  .tpb-topics-list {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.3rem;
    scrollbar-width: thin;
  }

  .tpb-topic-link {
    flex: 0 0 auto;
  }
}
