/* Keep the approved artwork above each card's copy at every screen width.
   Load after the shared layout styles; asset choices, borders and type stay intact. */
.collection-tabs > button,
.collection-tabs > .collection-preview,
.cards > .card,
.news-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  height: auto;
  min-height: 0;
  max-height: none;
}

.collection-tabs > button,
.collection-tabs > .collection-preview,
.cards > .card {
  padding-top: 0;
}

.collection-tabs > button::after,
.collection-tabs > .collection-preview::after,
.cards > .card::after {
  display: none;
}

.collection-tabs .collection-visual,
.cards > .card > .card-art,
.news-card > .news-card-image {
  display: block;
  position: relative;
  inset: auto;
  order: -1;
  flex: 0 0 auto;
  width: 100%;
  min-width: 0;
  max-width: none;
  height: auto;
  min-height: 0;
  max-height: none;
  aspect-ratio: 16 / 9;
  margin: 0;
  z-index: 0;
  overflow: hidden;
}

/* Fill the top frame edge to edge with the original glass-art files.
   Cover keeps proportions intact and removes pale side gaps. */
.collection-tabs .collection-visual.scene-art,
.cards > .card > .card-art.scene-art {
  background-color: #e6f5fc;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.collection-tabs .collection-visual > img,
.cards > .card > .card-art > img,
.news-card > .news-card-image > img,
.collection-tabs > button:hover .collection-visual > img,
.news-card:hover > .news-card-image > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: none;
}

.news-card > .news-card-image {
  border-right: 0;
  border-bottom: 6px solid var(--news-accent, var(--green));
}

.collection-tabs .collection-copy,
.cards > .card > .card-top,
.cards > .card > .card-body,
.news-card > .news-card-content {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: auto;
  max-height: none;
}

/* Home previews keep the same leaf badge and labels as library collections. */
.home-collections .collection-preview .collection-copy {
  display: grid !important;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 7px 14px;
}

.home-collections .collection-preview .collection-copy .collection-icon {
  display: grid !important;
  grid-column: 1;
  grid-row: 1 / 5;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 9px;
  margin: 0;
  border-radius: 50%;
  background: var(--green);
  color: #000;
}

.home-collections .collection-preview .collection-copy > span:not(.collection-icon),
.home-collections .collection-preview .collection-copy > strong {
  grid-column: 2;
  min-width: 0;
}

.home-collections .collection-preview .collection-copy .card-kind {
  display: block;
}

@media (max-width: 700px) {
  .home-collections .collection-tabs {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-collections .collection-preview .collection-copy {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 7px 12px;
  }

  .home-collections .collection-preview .collection-copy .collection-icon {
    width: 36px;
    height: 36px;
    padding: 6px;
  }

  .home-collections .collection-preview .collection-icon svg {
    width: 24px;
    height: 24px;
  }
}
