.tezos-gallery__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-block-end: 1rem;
}
.tezos-gallery__filters input[type="search"] {
  flex: 1 1 12rem;
}
.tezos-gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tezos-gallery__card a {
  display: block;
  text-decoration: none;
  color: inherit;
}
.tezos-gallery__card img,
.tezos-gallery__placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #8881;
}
.tezos-gallery__title {
  display: block;
  margin-block-start: 0.4rem;
  font-weight: 600;
}
.tezos-gallery__meta,
.tezos-gallery__count {
  font-size: 0.85em;
  opacity: 0.7;
}
.tezos-gallery__nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-block-end: 1rem;
}
.tezos-gallery__media iframe,
.tezos-gallery__media video,
.tezos-gallery__media img {
  display: block;
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border: 0;
}
.tezos-gallery__media iframe {
  aspect-ratio: 1;
}
.tezos-gallery__facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.25rem 1rem;
}
.tezos-gallery__facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.tezos-gallery__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0;
  list-style: none;
}
.tezos-gallery__tags li {
  padding: 0.1rem 0.5rem;
  border-radius: 1rem;
  background: #8882;
  font-size: 0.85em;
}
.tezos-gallery__live {
  position: relative;
}
.tezos-gallery__run {
  position: absolute;
  inset-block-end: 1rem;
  inset-inline-start: 50%;
  transform: translateX(-50%);
  padding: 0.5rem 1rem;
  border: 0;
  border-radius: 2rem;
  background: #000c;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}
.tezos-gallery__description summary {
  cursor: pointer;
  margin-block-end: 0.5rem;
}

/* Project page. Colours derive from the theme's text colour. */
.tezos-gallery--artwork {
  --tg-line: color-mix(in srgb, currentColor 15%, transparent);
  --tg-soft: color-mix(in srgb, currentColor 5%, transparent);
  --tg-muted: color-mix(in srgb, currentColor 60%, transparent);
}
.tg-back {
  display: inline-block;
  margin-block-end: 1.5rem;
  font-size: 0.9em;
}
.tg-intro {
  display: grid;
  grid-template-columns: minmax(0, 18rem) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
  padding-block-end: 2.5rem;
  margin-block-end: 2rem;
  border-block-end: 1px solid var(--tg-line);
}
@media (max-width: 40rem) {
  .tg-intro {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}
.tg-intro__cover {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  box-shadow: 0 1px 2px #0002, 0 12px 32px -12px #0004;
}
.tg-intro__kicker {
  margin: 0;
  color: var(--tg-muted);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.tg-intro__title {
  margin: 0.4rem 0 0;
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.tg-intro__artist {
  margin: 0.5rem 0 0;
  font-style: italic;
}
.tg-intro__description {
  max-width: 40rem;
  margin-block-start: 1.5rem;
}
.tg-intro__text {
  line-height: 1.65;
}
.tg-intro__description.is-clamped .tg-intro__text {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tg-intro__more {
  margin-block-start: 0.4rem;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}
.tg-facts {
  display: flex;
  flex-wrap: wrap;
  margin: 1.75rem 0;
}
.tg-facts > div {
  padding-inline: 1.25rem;
  border-inline-start: 1px solid var(--tg-line);
}
.tg-facts > div:first-child {
  padding-inline-start: 0;
  border: 0;
}
.tg-facts dt {
  color: var(--tg-muted);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tg-facts dd {
  margin: 0.2rem 0 0;
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
}
.tg-link-button {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: inherit;
  text-decoration: none;
}
.tg-link-button:hover {
  background: var(--tg-soft);
}

.tg-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: end;
  margin-block-end: 2rem;
}
.tg-toolbar__search {
  flex: 1 1 14rem;
  padding: 0.5rem 0;
  border: 0;
  border-block-end: 1px solid var(--tg-line);
  background: none;
  color: inherit;
  font: inherit;
}
.tg-toolbar__search:focus {
  outline: none;
  border-block-end-color: currentColor;
}
.tg-toolbar__sort {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  color: var(--tg-muted);
  font-size: 0.9em;
}
.tg-toolbar__sort select {
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
}

.tg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  gap: 2.5rem 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tg-card[hidden] {
  display: none;
}
.tg-card__media {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--tg-soft);
}
.tg-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.4s ease;
}
.tg-card__media:hover img {
  transform: scale(1.04);
}
.tg-card__caption {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.1rem 0.6rem;
  margin-block-start: 0.75rem;
}
.tg-card__number {
  grid-row: span 2;
  color: var(--tg-muted);
  font-size: 0.85em;
  font-variant-numeric: tabular-nums;
  line-height: 1.6;
}
.tg-card__title {
  color: inherit;
  text-decoration: none;
  line-height: 1.4;
}
.tg-card__title:hover {
  text-decoration: underline;
}
.tg-card__meta {
  color: var(--tg-muted);
  font-size: 0.8em;
}
.tg-card__meta a {
  color: inherit;
}

/* Token page: two columns, compact details */
.tezos-gallery__token {
  display: grid;
  gap: 2rem;
}
@media (min-width: 900px) {
  .tezos-gallery__token {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    align-items: start;
  }
  .tezos-gallery__media {
    position: sticky;
    top: 1.5rem;
  }
}
.tezos-gallery__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
}
.tezos-gallery__info {
  font-size: 0.9rem;
  line-height: 1.55;
}
.tezos-gallery__info h2 {
  margin: 0 0 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.6;
}
.tezos-gallery__section {
  margin-block-start: 1.75rem;
}
.tezos-gallery__description {
  max-width: 60ch;
}
.tezos-gallery__features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tezos-gallery__features li {
  display: flex;
  flex-direction: column;
  padding: 0.4rem 0.6rem;
  border: 1px solid #8883;
  border-radius: 6px;
  line-height: 1.25;
}
.tezos-gallery__features span {
  font-size: 0.68rem;
  opacity: 0.6;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tezos-gallery__features strong {
  font-size: 0.82rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.tezos-gallery__facts--small {
  font-size: 0.8rem;
  gap: 0.15rem 1rem;
}
.tezos-gallery__facts--small dt {
  opacity: 0.6;
}
.tezos-gallery__holders {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}
.tezos-gallery__tags {
  margin-block-start: 1rem;
}

/* Token page title: artwork name + iteration number */
.tezos-gallery__header {
  margin-block-end: 1.75rem;
}
.tezos-gallery__name {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.9rem;
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 700;
}
.tezos-gallery__number {
  font-weight: 400;
  opacity: 0.45;
  font-variant-numeric: tabular-nums;
}
.tezos-gallery--token .tezos-gallery__nav {
  font-size: 0.85rem;
  opacity: 0.8;
}
.tezos-gallery__description-box summary {
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.6;
}
.tezos-gallery__description-box .tezos-gallery__description {
  margin-block-start: 0.75rem;
  font-size: 0.85rem;
}
.tezos-gallery__info > :first-child {
  margin-block-start: 0;
}
