/* Base sizing remains available for measurement and no-JavaScript fallback.
   The enhancement below redistributes the same box without changing its size. */
#templates .template-card .tags,
#templates .template-card .template-info > p,
#templates .template-card .art-label,
#lower-home .featured-card .template-info > p,
#lower-home .featured-card .art-label {
  visibility: hidden;
}
#templates .template-card .template-info > h3 {
  order: -1;
}
#templates .template-card .card-actions,
#lower-home .featured-card .card-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}
#templates .template-card .card-actions .button,
#lower-home .featured-card .card-actions .button {
  min-width: 0;
  padding-inline: 8px;
  text-align: center;
}

/* Original card heights come from the existing responsive layout, not constants. */
#catalog-grid.expanded-covers > .template-card,
#featured-track.expanded-covers > .featured-card {
  box-sizing: border-box;
  height: var(--original-card-height);
  gap: 0;
  padding: 0;
  overflow: hidden;
}
#catalog-grid.expanded-covers > .template-card > .template-art,
#featured-track.expanded-covers > .featured-card > .template-art {
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  margin: 0;
  border-radius: 0;
}
#catalog-grid.expanded-covers .template-art iframe,
#featured-track.expanded-covers .template-art iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
#catalog-grid.expanded-covers .template-info,
#featured-track.expanded-covers .template-info {
  flex: 0 0 auto;
  padding: 16px 18px 18px;
}
#catalog-grid.expanded-covers .template-info > .tags,
#catalog-grid.expanded-covers .template-info > p,
#featured-track.expanded-covers .template-info > p {
  display: none;
}
#catalog-grid.expanded-covers .template-info > h3,
#featured-track.expanded-covers .template-info > h3 {
  margin: 0 0 12px;
}
