src/components/decklist/decklist-groups.module.css
.container {
  container-type: inline-size;
}

.title {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: var(--text-xs);
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--palette-2);
}

.subtitle {
  font-size: var(--text-2xs);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.375rem;
  font-family: var(--font-family-ui);
  color: var(--text);
  font-weight: 400;
  line-height: 1;
}

.label {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.group-quantity {
  font-size: 0.625rem;
  font-weight: 400;
  margin-left: 0.0625rem;
  background: var(--palette-1);
  display: inline-block;
  line-height: 1;
  padding: 0.0625rem 0.1875rem;
  border-radius: var(--rounded);
}

.group-extra-info {
  font-weight: 400;
  font-size: 0.625rem;
}

.grid {
  --scan-spacing: 1rem;

  display: grid;
  column-gap: 1rem;
  align-items: flex-end;
  row-gap: calc(var(--scan-spacing) * var(--scan-levels));
  padding-block: calc(var(--scan-spacing) * var(--scan-levels));
  width: 100%;

  grid-template-columns: 1fr;

  @container (min-width: 20rem) {
    grid-template-columns: repeat(2, 1fr);
  }

  @container (min-width: 33rem) {
    grid-template-columns: repeat(3, 1fr);
  }

  @container (min-width: 45rem) {
    grid-template-columns: repeat(4, 1fr);
  }

  @container (min-width: 60rem) {
    grid-template-columns: repeat(5, 1fr);
  }

  @container (min-width: 72rem) {
    grid-template-columns: repeat(6, 1fr);
  }
}

.grid > * {
  list-style: none;
}

.scan-images {
  position: relative;
}

.scan-images img:not(:global(.external-icon)) {
  width: 100%;
  cursor: pointer;
}

.scan-images > *:not:not(:last-child) img:not(:global(.external-icon)) {
  filter: drop-shadow(0 -2px 2px rgba(8, 10, 12, 0.7));
}

.scan-images > *:first-child img:not(:global(.external-icon)) {
  box-shadow: var(--shadow-md);
}

.scan-images > *:not(:first-child) {
  position: absolute;
  z-index: calc(var(--scan-level) * -1);
  top: calc(var(--scan-level) * var(--scan-spacing) * -1);
  left: 0;
}

.container.scans .title {
  font-size: var(--text-base);
}

.container.scans .subtitle {
  font-size: var(--text-sm);
}
