& {
	--default-tile-background: rgb(242,242,242);
	--tile-background: var(--default-tile-background);
	--tile-background-disabled: var(--tile-background);
	--tile-border-color-normal: rgba(150,150,150,.3137254901960784);
	--tile-border-color-hot: rgba(150,150,150,1);
	--tile-close-background-color-normal: rgba(90,90,90,.7);
	--tile-close-background-color-hot: rgb(90,90,90);
	--tile-close-background-color-active: rgb(66,133,244);
	--tile-thumbnail-background-color: white;
	--default-thumbnail-container-color: black;

	@media (prefers-color-scheme: dark) {
		--default-tile-background: rgb(51, 51, 51);
		--thumbnail-container-color: white;
	}

	&[style*="--chrtheme-ntp-logo-alternate: 1"],
	&[style*="--lwt-gkntp-logo-alternate: 1"] {
		--default-tile-background: rgb(51, 51, 51);
		--default-thumbnail-container-color: white;

		&[geckium-choice="fortyseven"][icon-ntp] .mv-tile {
			color: rgb(170, 170, 170);
		}
	}


	// Custom theme support
	&[gkthemed]:not([gkchrthemed])[footer-themable="true"] {
		--tile-background: var(--toolbar-bgcolor, var(--lwt-accent-color));
		--tile-border-color-normal: color-mix(
			in srgb,
			var(--toolbar-bgcolor, var(--lwt-accent-color)) 90%,
			white
		);
		--tile-border-color-hot: color-mix(
			in srgb,
			var(--toolbar-bgcolor, var(--lwt-accent-color)) 80%,
			white
		);
		--tile-close-background-color-active: var(--thumbnail-container-color);
		--thumbnail-container-color: var(--link-color, --default-link-color);
	}

	&[geckium-choice="fortyseven"],
	&[geckium-choice="sixtyeight"] {
		@media only screen and (max-width: 862px) {
			#mv-tiles {
				grid-template-columns: repeat(3, minmax(0, 1fr));
			}

			.mv-tile:nth-child(7),
			.mv-tile:nth-child(8) {
				display: none;
			}
		}

		@media only screen and (max-width: 693px) {
			#mv-tiles {
				grid-template-columns: repeat(2, minmax(0, 1fr));
			}

			.mv-tile:nth-child(5),
			.mv-tile:nth-child(6) {
				display: none;
			}
		}
	}
}

&:not([icon-ntp]) {
	#mv-tiles {
		gap: 16px;
	}
	
	.mv-tile {
		box-shadow: none;
		width: auto;

		position: relative;
		border-radius: 2px;
		height: 126px;
		padding-inline: 3px;
		text-decoration: none;
		color: var(--thumbnail-container-color);
		font-size: 9pt;
		transition-duration: 200ms;
		transition-property: border, box-shadow;
	
		&[disabled] {
			background: var(--tile-background-disabled);
		}
		&:not([disabled]) {
			border: 1px solid var(--tile-border-color-normal);
			background: var(--tile-background);
	
			&:hover,
			&:focus {
				border-color: var(--tile-border-color-hot);
				box-shadow: 0 1px 2px 0 rgba(0,0,0,0.1), 0 4px 8px 0 rgba(0,0,0,0.2);
				
				.mv-pin,
				.mv-x {
					opacity: 1;
					transition-delay: 500ms;
				}
			}
		}
	
		button {
			all: unset;
		}
	
		.title-container {
			height: 31px;
			align-items: center;
			padding-inline-start: 4px;
		}
	
		.mv-favicon {
			margin-inline-end: 9px;
		}
	
		.mv-title {
			position: static;
			height: auto;
			text-align: start;

			overflow: hidden;
			white-space: nowrap;
			width: 100%;
			mask-image: linear-gradient(
				to right,
				#000,
				#000,
				100px,
				transparent
			);
		}

		.mv-pin,
		.mv-x {
			position: absolute;
			top: 0;
			width: 32px;
			height: 32px;
			opacity: 0;
			transition: opacity 150ms;

			&::after {
				content: "";
				display: block;
				width: 100%;
				height: 100%;
				mask-position: center;
				mask-repeat: no-repeat;
				background-color: var(--tile-close-background-color-normal);
			}

			&:not([disabled]) {
				&:hover,
				&:focus {
					transition: none;
	
					&::after {
						background-color: var(--tile-close-background-color-hot);
					}
				}
	
				&:active {
					&::after {
						background-color: var(--tile-close-background-color-active)
					}
				}
			}
		}

		.mv-pin {
			left: 0;
			background: var(--tile-background);

			&::after {
				mask-image: url("chrome://userchrome/content/pages/newTabHome/assets/chrome-47/imgs/pin_3_mask.svg");
			}
		}

		&[pinned="true"] {
			.mv-pin {
				&::after {
					background-color: var(--tile-close-background-color-active);
				}
			}
		}
	
		.mv-x {
			right: 0;
			background: linear-gradient(
				to left,
				var(--tile-background) 60%,
				transparent
			);
	
			&::after {
				mask-image: url("chrome://userchrome/content/pages/newTabHome/assets/chrome-47/imgs/close_3_mask.png");
			}
		}
	
		.mv-thumb {
			position: static;

			background-color: var(--tile-thumbnail-background-color);
			background-position: top center;
			background-size: cover;
			height: 94px;
			width: 148px;
		}
	}
}
&[geckium-choice="fortyseven"] {
	&[icon-ntp] {
		#mv-tiles {
			gap: 24px;
			width: 433px;
		}
	
		.mv-tile {
			box-shadow: none;
			width: auto;
			background: transparent;
			border: 0;
			border-radius: 0;
			height: auto;

			position: relative;
			display: flex;
			flex-direction: column;
			align-items: center;
			color: rgb(126,126,126);
			text-decoration: none;
			text-align: center;
			font-size: 9pt;
			width: 84px;
	
			@media (prefers-color-scheme: dark) {
				color: rgb(170, 170, 170);
			}
	
			&:not([disabled]) {
				&:hover,
				&:focus {
					.mv-pin,
					.mv-x {
						opacity: 1;
						transition-delay: 500ms;
					}
				}
			}
	
			&[style="list-style-image: url(chrome://userchrome/content/assets/img/chrome-1/toolbar/grayfolder.png)"] {
				.mv-favicon {
					display: none;
				}
	
				&::before {
					content: attr(data-letter);
					display: flex;
					border-radius: 4px;
					font-size: 15pt;
					color: white;
					align-items: center;
					justify-content: center;
					background-color: rgb(128,128,128);
				}
			}
	
			.mv-favicon,
			&::before {
				width: 48px;
				height: 48px;
				margin-block-end: 8px;
			}
	
			.mv-title {
				position: static;
				height: auto;
				white-space: unset;
				width: auto;

				height: 29px;
				overflow: hidden;
			}

			.mv-pin,
			.mv-x {
				all: unset;
	
				position: absolute;
				top: -8px;
				right: 10px;
				height: 16px;
				width: 16px;
				background: black;
				opacity: 0;
		
				transition: opacity 150ms;

				&::after {
					content: "";
					display: block;
					width: 100%;
					height: 100%;
					mask-position: center;
					mask-repeat: no-repeat;
					mask-size: 8px;
					background-color: white;
				}

				&:not([disabled]) {
					&:hover,
					&:focus {
						transition: none;
					}
				}
			}

			.mv-pin::after {
				mask-image: url("chrome://userchrome/content/pages/newTabHome/assets/chrome-47/imgs/pin_3_mask.svg");
			}
	
			.mv-x::after {
				mask-image: url("chrome://userchrome/content/pages/newTabHome/assets/chrome-47/imgs/close_3_mask.png");
			}
		}
	}
}