.nb-ai-home-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 30px;
  margin-top: 7px;
  margin-bottom: 8px;
  overflow: hidden;
  position: relative;
  z-index: 2;
}

.nb-ai-home-tags--compact {
  justify-content: center;
  padding: 0 4px;
}

.nb-ai-home-tags--hover {
  justify-content: flex-start;
  margin-top: 0;
  margin-bottom: 10px;
}

.nb-ai-home-tags span {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 28px;
  padding: 5px 12px;
  border: 1px solid rgba(255, 241, 160, 0.96);
  border-radius: 999px;
  background: linear-gradient(180deg, #fff176 0%, #ffc400 52%, #f59e0b 100%);
  color: #100a00;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.58),
    0 1px 0 rgba(255, 255, 255, 0.58) inset,
    0 5px 12px rgba(0, 0, 0, 0.44);
}

html:not(.dark) .nb-ai-home-tags span {
  border-color: rgba(180, 83, 9, 0.42);
  background: linear-gradient(180deg, #fff7ad 0%, #ffd43b 54%, #f59e0b 100%);
  color: #140c00;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.68);
  box-shadow:
    0 0 0 1px rgba(69, 26, 3, 0.26),
    0 1px 0 rgba(255, 255, 255, 0.72) inset,
    0 5px 13px rgba(120, 53, 15, 0.24);
}

.nb-ai-home-tags--compact span {
  max-width: calc(50% - 4px);
}

.nb-ai-home-tags--compact span:nth-child(n+3) {
  display: none;
}

@media (max-width: 640px) {
  .nb-ai-home-tags {
    gap: 5px;
    min-height: 26px;
    margin-top: 5px;
    margin-bottom: 6px;
  }

  .nb-ai-home-tags span {
    min-height: 24px;
    padding: 4px 9px;
    font-size: 12px;
  }
}
