.mk-magnit-history {
	box-sizing: border-box;
	width: 100%;
	max-width: 1200px;
	margin: 2.5rem auto;
	padding: 0 15px;
}

.mk-magnit-history section + section {
	margin-top: 2.5rem;
}

.mk-magnit-history__header {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 1rem;
}

.mk-magnit-history__header h2 {
	margin: 0;
	line-height: 1.25;
	font-size: clamp(1.25rem, 2.6vw, 1.875rem);
}

.mk-magnit-history__clear {
	background: transparent;
	border: 0;
	color: inherit;
	cursor: pointer;
	padding: 0.25rem 0;
	font: inherit;
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.mk-magnit-history__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: clamp(0.75rem, 2vw, 1.5rem);
	margin: 0;
	padding: 0;
	list-style: none;
}

.mk-magnit-history__card {
	min-width: 0;
}

.mk-magnit-history__card a {
	display: block;
	height: 100%;
	color: inherit;
	font-weight: 600;
	line-height: 1.4;
	overflow-wrap: anywhere;
}

.mk-magnit-history__card a:hover span {
	text-decoration: underline;
}

.mk-magnit-history__card a:focus-visible,
.mk-magnit-history__clear:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 4px;
}

.mk-magnit-history__card img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: contain;
	margin-bottom: 0.5rem;
}

@media (max-width: 720px) {
	.mk-magnit-history__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
