header {
    padding: 1rem 0 2rem 0;
}
header h1 {
    margin: 0 auto;
}
.back-button {
    position: absolute !important;
    top: 1rem !important;
    left: 1rem !important;
    background: none !important;
    border: none !important;
	padding: 6px;
	color: #000;
}
main {
    text-align: center;
}
#products {
    display: flex;
    justify-content: center;
    flex-flow: row wrap;
    margin: 1rem 0;
}
.product {
	position: relative;
	min-width: 232px;
	margin: 1rem;
	padding: 1rem 1rem 0.125rem 1rem;
	color: #000;
	background-color: #fff;         
	box-shadow: 0 2px 6px 0 rgb(0 0 0 / 10%);
}
.product > span {
    display: block;
}
.product > span:first-of-type {
    font-weight: bold;
	text-transform: capitalize;
}
.product > span:last-of-type {
    margin-bottom: 0.75rem;
    font-size: 14px;
}
.product.deal::before {
	content: attr(data-savings);
	position: absolute;
	top: -11px;
	right: -11px;
	padding: 2px 6px;
	color: #2C1064;
	font-size: 12px;
	font-weight: bold;
	border-radius: 6px;
	background-color: #E1D4FA;
}
.app {
	margin-top: 1.5rem;
}
.app #products {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: 1fr 1fr;
	grid-template-rows: 1fr 1fr;
	margin: 1.75rem auto 1rem auto;
	max-width: 320px;
}
.app .product {
	min-width: auto;
	margin: 0;
	padding: 1rem 1rem 0.5rem 1rem;
	border-radius: 0.75rem;
	border: none;
	/*border: 3px solid #c0aaff;
	background-color: #f5eeff;*/
}
.app .product:last-child {
	grid-column: span 2;
	/*border: 3px solid #ddd2ff;*/
}
.app .product > span:first-of-type {
	margin-bottom: 0.5rem;
	font-size: 1rem;
}
.app .product > span:last-of-type {
	display: inline-block;
	background-color: #eae3ff;
	padding: 1px 8px 0;
	border-radius: 11px;
	white-space: nowrap;
}
.app .product.deal::before {
    color: #154a3e;
    background-color: #c2f3d0;
}
#products.subscribed {
	display: block;
	margin: 1.5rem auto;
	padding: 1rem 1.5rem;
	background-color: #fff;
}
#products.subscribed  h3 {
	margin-bottom: 0.5rem;
}
#products time {
	color: #6039a5;
	font-weight: bold;
}
#cancelLink {
	margin-top: 2rem;
	font-size: 14px;
	text-decoration: underline;
}
.app #cancelLink {
	display: none;
}
main ul {
    margin: 0.25rem auto 0;
    padding: 0 2rem;
    text-align: left;
}
#appTerms {
	display: none;
	position: relative;
	margin: 2.5rem 0 0 0;
}
#appTerms p:first-child {
	position: absolute;
	top: -1.75rem;
	left: 50%;
	white-space: nowrap;
	transform: translateX(-50%);
}
#appTerms p:first-child, p.purchase-error {
	color: #6039a5;
	font-size: 14px;
	font-weight: bold;
}
p.purchase-error {
	margin-bottom: 1rem;
}
#appTerms p.support {
	position: relative;
	top: auto;
	left: auto;
	white-space: normal;
	margin-bottom: 0.5rem;
	transform: none;
}
#restorePurchases.button:disabled {
	background: gray;
}
#appTerms #terms {
	margin-top: 1.5rem;
	font-size: 11px;
}
.purchase-login {
    display: none;
    width: fit-content;
    margin: 2rem auto 0 auto;
}
#termsLink {
	display: block;
	margin-top: 2rem;
}
#loadScreen {
	display: none;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	position: absolute;
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
	background-color: rgba(239,239,245,0.90);
	z-index: 999;
	text-align: center;
	padding: 1rem;
}
#loadScreen p {
	font-weight: bold;
}
#loadScreen svg {
	margin: 1rem auto auto;
	display: block;
	shape-rendering: auto;
}

body.dark {
	color: #EFEFEF;
	background-color: #121214;
}
.dark a {
	color: #9494ff;
}
.dark .button, .dark .back-button {
	color: #fff;
}
.dark .product, .dark #products.subscribed {
	color: #EFEFEF;
	background-color: #242428;
}
.dark .app .product > span:last-of-type {
	background-color: #4b3582;
}
.dark .app .product.deal::before {
	color: #daf7f0;
	background-color: #4e9161;
}
.dark #products time {
	color: #d6c2f9
}
.dark footer {
	background-color: #0e0e10;
}

@media only screen and (max-width: 352px) {
	.app #products {
		gap: 1.25rem 0.75rem;
	}
	.app .product {
		padding: 1rem 0.5rem 0.5rem 0.5rem;
	}
}