.text {
  font-size: var(--font-size);
  line-height: 24px;
}

.text .text-frag {
  text-overflow: ellipsis;
  white-space: pre-wrap;
  display: inline;
  overflow-wrap: anywhere;
}

.text .text-frag > a {
  color: var(--highlight);
  text-decoration: none;
}

.text .text-frag > a:hover {
  text-decoration: underline;
}

.text .text-frag .hashtag:hover {
  text-decoration: underline;
}

.text pre {
  margin: 0;
  overflow: scroll;
}

.text iframe[src*="youtube.com"] {
  aspect-ratio: 16/9;
}

.gallery {
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  display: grid;
  list-style: none;
  padding: 0;
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 768px) {
  .gallery {
    border-radius: 0.125rem;
    overflow: hidden;
  }
}

.gallery-item {
  display: block;
  position: relative;
  margin: 0;
}

.gallery-item div {
  height: 100%;
  margin: 0;
}

.gallery-item img {
  object-fit: cover;
  width: 100%;
  height: 100%;
  max-height: 100%;
  display: block;
  border-radius: 0;
}

.gallery:not(:first-child),
img:not(:first-child),
video:not(:first-child),
.link-preview-container:not(:first-child) {
  margin-top: 10px;
}
