& {
	--default-link-color: rgb(0, 0, 204);
	--link-color: var(--default-link-color);

	@media (prefers-color-scheme: dark) {
		--default-link-color: #acc0da;
	}

	// Geckium You
	&[gksystheme="you"]:not([gkthemed], [gkchrthemed]) {
		link-color: hsl(var(--you-h), var(--you-s), calc(var(--you-l) - 18%));

		@media (prefers-color-scheme: dark) {
			link-color: hsl(var(--you-h), calc(var(--you-s) - 31%), calc(var(--you-l-dark) + 18%));
		}
	}

	// Custom theme support
	// lwtheme
	&[gkthemed]:not([gkchrthemed]) {
		--link-color: var(--newtab-text-primary-color);
	}

	&[geckium-choice="one"] {
		@media only screen and (max-width: 882px) {
			#mostvisitedtiles .thumbnail {
				height: 113px;
				width: 150px;
			}
		}
	}

	&[gkthemed][gkchrthemed] {
		--link-color: var(--chrtheme-ntp-section-link, var(--default-link-color));
	}

	// GTK+
	&[gksystheme="gtk"]:not([gkthemed], [gkchrthemed]) {
		--link-color: FieldText;
	}
}

#mostvisited {
	padding-block-end: 12px;
}

#mostvisitedintro {
	position: relative;
}

.most-visited-text {
	position: absolute;
	margin: 15px;
	padding: 20px;
	background-color: white;
	box-shadow: 5px 5px 10px rgb(204, 204, 204);
}

#mostvisitedtiles {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;

	.thumbnail-title {
		margin-block-start: 6px;
		padding: 1px 0px 4px 0;
		color: var(--link-color);

		image {
			width: 16px;
			height: 16px;
			margin-inline-end: 6px;
		}

		label {
			white-space: nowrap;
			overflow: hidden;
			text-overflow: ellipsis;
		}
	}

	.thumbnail {
		background-position: top center;
		background-size: cover;
		background-color: rgb(238, 238, 238);
		border: 1px solid rgb(204, 204, 204);
		height: 136px;
		width: 195px;

		transition-property: height, width;
		transition-duration: .12s;
	}
}

.manage {
	all: unset;

	color: rgb(119, 119, 204);
	line-height: 19pt;
	margin-left: 5px;
	margin-right: 5px;
	text-decoration: underline;
	cursor: pointer;
}