.note-layout {
  padding: var(--pad);
}

.note a {
  font-family: var(--font-family-serif);
}

.note-header {
/*  padding: 6rem 0 2rem 0; */
  max-width: 100%;
/*  text-align: center; */
  margin: 0 auto;
  font-family: var(--font-family-serif);
  font-size: 4rem;
  font-weight: 400;
}

/* TEXT BLOCKS */
.note [data-type="text"] {
  max-width: 80rem;
/*  margin: 0 auto;*/
}

/* SINGLE IMAGE BLOCKS */
.note [data-type="image"] {
  max-width: 100rem;
  margin: 0 auto;
}

.note [data-type="image"] img {
  border-radius: var(--radius);
}


/* GALLERY BLOCK WRAPPER */
.note [data-type="gallery"] {
  max-width: 100%;
  margin: 0 auto;
}

/* GALLERY LIST (UL) */
.note [data-type="gallery"] .gallery-grid {
  padding: 0;
  margin: 0;
  list-style: none;
}

/* Remove the inherited bottom padding for gallery items inside notes */
.note [data-type="gallery"] .gallery-grid.projects li {
  padding-bottom: 0 !important;
}


/* GRID LAYOUT FOR NOTE GALLERIES
   Uses the same column-grid/js-grid + --cols system as fungi/projects */
.note [data-type="gallery"] .gallery-grid.column-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
  gap: var(--gap);
  grid-auto-flow: dense;
  align-items: start; /* align all images to the top of their row */
}

/* GALLERY ITEMS */
.note [data-type="gallery"] .gallery-grid .gallery-item {
  margin: 0;
}

/* LINKS & IMAGES INSIDE GALLERIES */
.note [data-type="gallery"] .gallery-grid .gallery-item a.gallery {
  display: block;
}

.note [data-type="gallery"] .gallery-grid .gallery-item img {
  display: block;
  width: 100%;
  height: auto; /* keep original aspect ratio, no cropping */
}

/* FOOTER / TAGS / BLOG NAV – unchanged */
.note-footer {
  padding: 3rem 0;
  text-align: center;
}

.note-date {
  color: var(--color-text-grey);
  font-size: 1rem;
  letter-spacing: .1rem;
  color: var(--color-grey);
  text-transform: uppercase;
  padding-bottom: 0.5rem;
}

.note-tags {
  display: flex;
  margin-bottom: 1.5rem;
  justify-content: center;
}

.note-tags li {
  margin-right: .5rem;
}

.note-tags a {
  padding: 0.6rem var(--pad);
  border: 1px solid var(--color-grey);
  color: var(--color-grey);
  margin-right: .5rem;
  border-radius: 30px;
  text-decoration: none;
  font-size: var(--sf);
  text-transform: uppercase;
  letter-spacing: .05rem;
}

.note-tags a:hover {
  background: var(--color-black);
  color: var(--color-white);
}

.blog-prevnext {
  padding: var(--pad);
}

.blog-prevnext .img {
  display: none;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: var(--gap);
}

.blog-next {
  display: flex;
}

.blog-left {
  padding-right: 1.5rem;
}

.blog-prev {
  display: flex;
  justify-content: flex-end;
  justify-self: end;
}

.blog-right {
  padding-left: 1.5rem;
}

/* RESPONSIVE */
@media screen and (max-width: 60rem) {
  .note-header {
    padding: var(--pad) 0;
  }

  /* Optional: on small screens you can force 2 columns or 1 column if you prefer */
  .note [data-type="gallery"] .gallery-grid.column-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
