body[data-page="home"] main > [hidden] {
  display: none;
}

body[data-page="home"] main > .home-library-preview {
  padding-top: 48px;
  padding-bottom: 52px;
}

.library-preview-link {
  display: grid;
  gap: 8px;
  max-width: 700px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  background: var(--paper);
  transition: border-color .18s ease, transform .18s ease;
}

.library-preview-link:hover {
  transform: translateY(-2px);
  border-color: var(--red);
}

.library-preview-link h3 {
  margin: 0;
  font: 500 20px/1.3 var(--serif);
}

.library-preview-summary {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font: 12px/1.7 var(--hindi);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.library-preview-count {
  color: var(--red);
  font-size: 10px;
  font-weight: 700;
}

body[data-page="home"] main > .home-image-gallery {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  width: min(1100px, 85.8%);
  margin: 0 auto 48px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.home-image-gallery-stage {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 12px;
  min-width: 0;
}

.home-image-gallery-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 360px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--white);
  box-shadow: 0 8px 22px rgba(41, 43, 40, .09);
  object-fit: contain;
}

.home-image-gallery-caption {
  position: static;
  inset: auto;
  display: grid;
  gap: 5px;
  padding: 0;
  background: transparent;
  color: var(--ink);
  text-align: center;
  pointer-events: none;
}

.home-image-gallery-caption strong {
  font: 500 17px/1.45 var(--serif);
}

.home-image-gallery-caption span {
  color: var(--muted);
  font: 12px/1.7 var(--hindi);
}

.home-image-gallery-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.home-image-gallery-controls button {
  display: grid;
  place-items: center;
  width: 40px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--white);
  color: var(--red);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.home-image-gallery-controls button:hover {
  border-color: var(--red);
  background: var(--paper);
}

.work-card-bottom {
  min-width: 0;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px 10px;
}

.work-card-bottom > .writer-credit {
  min-width: 0;
  flex: 1 1 112px;
  overflow-wrap: anywhere;
}

.work-card-actions {
  min-width: 0;
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
}

.work-card-bottom .work-card-actions a {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.4;
  text-align: end;
}

@media (max-width: 700px) {
  body[data-page="home"] main > .home-image-gallery {
    width: 90%;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    margin-bottom: 32px;
  }

  .home-image-gallery-controls {
    grid-column: 1;
    grid-row: 2;
    flex-direction: row;
    justify-content: center;
  }

  .home-image-gallery-image {
    max-height: 55vh;
  }

  .work-card-bottom > .writer-credit {
    flex-basis: 100%;
  }

  .work-card-actions {
    flex: 1 1 100%;
    justify-content: space-between;
  }
}