.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.choco-memory-match {
	--memory-shell: #0f1a46;
	--memory-shell-soft: #182a64;
	--memory-ink: #1f1712;
	--memory-card: #fffaf2;
	--memory-accent: #c07a42;
	--memory-accent-dark: #6b3916;
	--memory-card-front: #4d2317;
	--memory-card-front-dark: #2f140d;
	--memory-line: #d8c2aa;
	--memory-shadow: 0 24px 50px rgba(7, 14, 40, 0.35);
	background:
		radial-gradient(140% 80% at 10% -10%, #31458c 0%, transparent 56%),
		radial-gradient(120% 90% at 90% 110%, #21346f 0%, transparent 52%),
		linear-gradient(160deg, var(--memory-shell), var(--memory-shell-soft));
	border: 0;
	border-radius: 0;
	box-shadow: var(--memory-shadow);
	box-sizing: border-box;
	display: grid;
	gap: 1rem;
	margin: 0;
	max-width: none;
	padding: 1.2rem;
	width: 100%;
}

.choco-memory-match__history {
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 16px;
	box-sizing: border-box;
	color: #edf2ff;
	padding: 0.85rem 1rem;
}

.choco-memory-match__eyebrow {
	color: #f5b36e;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	margin: 0 0 0.25rem;
	text-transform: uppercase;
}

.choco-memory-match__history h2 {
	color: #ffffff;
	font-size: 1.05rem;
	line-height: 1.35;
	margin: 0;
}

.choco-memory-match__history p {
	color: rgba(237, 242, 255, 0.94);
	font-size: 0.95rem;
	line-height: 1.45;
	margin: 0.35rem 0 0;
}

.choco-memory-match__game {
	background: linear-gradient(180deg, #fffdf9, #fff8ec);
	border: 1px solid var(--memory-line);
	border-radius: 22px;
	box-sizing: border-box;
	color: #2f1f17;
	margin: 0 auto;
	width: 100%;
	padding: 1.2rem;
	max-width: 650px !important;
}

.choco-memory-match__header {
	align-items: start;
	display: flex;
	gap: 1rem;
	justify-content: space-between;
	margin-bottom: 0.9rem;
}

.choco-memory-match__game h2 {
	color: #2f1f17;
	font-size: clamp(1.75rem, 3vw, 2.15rem);
	letter-spacing: -0.01em;
	line-height: 1.08;
	margin: 0;
}

.choco-memory-match__instructions {
	color: #423226;
	font-size: 0.98rem;
	line-height: 1.5;
	margin: 0 0 1rem;
	max-width: 58ch;
}

.choco-memory-match__reset {
	appearance: none;
	background: linear-gradient(135deg, var(--memory-accent), #db9253);
	border: 0;
	border-radius: 999px;
	color: #fff;
	cursor: pointer;
	font-size: 0.92rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	padding: 0.7rem 1.1rem;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.choco-memory-match__reset:hover {
	box-shadow: 0 10px 18px rgba(192, 122, 66, 0.24);
	transform: translateY(-1px);
}

.choco-memory-match__stats {
	display: grid;
	gap: 0.65rem;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin-bottom: 0.9rem;
}

.choco-memory-match__stats p {
	align-items: center;
	background: rgba(255, 255, 255, 0.82);
	border: 1px solid rgba(107, 57, 22, 0.12);
	border-radius: 14px;
	display: flex;
	font-size: 0.96rem;
	gap: 0.35rem;
	margin: 0;
	min-height: 3.85rem;
	overflow: hidden;
	padding: 0.75rem 0.9rem;
	white-space: nowrap;
}

.choco-memory-match__stats strong {
	flex: 0 0 auto;
}

.choco-memory-match__stats span {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
}

.choco-memory-match__board {
	background: #fbf3e7;
	border: 1px solid rgba(107, 57, 22, 0.13);
	border-radius: 18px;
	box-sizing: border-box;
	display: flex;
	flex-wrap: wrap;
	gap: 0.8rem;
	margin: 0 auto;
	max-width: 650px;
	padding: 0.8rem;
	width: 100%;
}

.choco-memory-card {
	appearance: none;
	background: transparent;
	border: 0;
	border-radius: 16px;
	box-shadow: none;
	cursor: pointer;
	display: block;
	flex: 0 0 calc((100% - 2.4rem) / 4);
	min-height: 0;
	min-width: 0;
	overflow: hidden;
	padding: 0;
	position: relative;
	transform: none !important;
	transition: none !important;
	user-select: none;
	width: calc((100% - 2.4rem) / 4);
}

.choco-memory-card::before {
	content: "";
	display: block;
	padding-top: 140%;
}

.choco-memory-match__board > .choco-memory-card,
.choco-memory-match__board > .choco-memory-card:hover,
.choco-memory-match__board > .choco-memory-card:focus,
.choco-memory-match__board > .choco-memory-card:active,
.choco-memory-match__board > .choco-memory-card:focus-visible {
	background: transparent !important;
	border: 0 !important;
	border-radius: 16px !important;
	box-sizing: border-box !important;
	font-size: 0 !important;
	letter-spacing: normal !important;
	line-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	text-transform: none !important;
	vertical-align: top !important;
}

.choco-memory-card[disabled] {
	cursor: default;
}

.choco-memory-match__board > .choco-memory-card,
.choco-memory-match__board > .choco-memory-card:hover,
.choco-memory-match__board > .choco-memory-card:focus,
.choco-memory-match__board > .choco-memory-card:active {
	box-sizing: border-box !important;
	display: block !important;
	flex: 0 0 calc((100% - 2.4rem) / 4) !important;
	height: auto !important;
	margin: 0 !important;
	max-width: none !important;
	min-width: 0 !important;
	padding-top: 0 !important;
	width: calc((100% - 2.4rem) / 4) !important;
}

.choco-memory-card:hover,
.choco-memory-card:active,
.choco-memory-card:focus,
.choco-memory-card:focus-visible {
	transform: none !important;
	transition: none !important;
}

.choco-memory-card__surface {
	border-radius: inherit;
	box-sizing: border-box;
	display: flex;
	inset: 0;
	overflow: hidden;
	position: absolute;
	transform: none !important;
	transition: none !important;
	width: 100%;
	height: 100%;
}

.choco-memory-card__surface--logo {
	align-items: center;
	background:
		radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.12), transparent 26%),
		linear-gradient(180deg, var(--memory-card-front), var(--memory-card-front-dark));
	border: 1px solid rgba(255, 255, 255, 0.14);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.12),
		inset 0 0 0 1px rgba(201, 121, 58, 0.08);
	justify-content: center;
}

.choco-memory-card__surface--art {
	background: var(--memory-card);
	border: 1px solid rgba(107, 57, 22, 0.14);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
	flex-direction: column;
	gap: 0.45rem;
	padding: 0.5rem;
}

.choco-memory-card__brand-mark {
	max-width: 98px;
	opacity: 0.9;
	pointer-events: none;
	position: relative;
	width: 60%;
}

.choco-memory-card__media {
	background: #ffffff;
	border-radius: 12px;
	box-shadow: inset 0 0 0 1px rgba(107, 57, 22, 0.1);
	display: block;
	flex: 1 1 auto;
	height: 100%;
	line-height: 0;
	min-height: 0;
	min-width: 0;
	overflow: hidden;
	position: relative;
	width: 100%;
}

.choco-memory-card__media img {
	inset: 0;
	border-radius: 12px;
	display: block;
	height: 100%;
	max-width: 100%;
	min-width: 0;
	object-fit: contain;
	position: absolute;
	width: 100%;
}

.choco-memory-card,
.choco-memory-card *,
.choco-memory-card *::before,
.choco-memory-card *::after {
	animation: none !important;
}

.choco-memory-card__label {
	background: rgba(22, 16, 12, 0.76);
	border-radius: 999px;
	color: #fff;
	display: block;
	font-size: 0.76rem;
	font-weight: 700;
	line-height: 1.2;
	max-width: 100%;
	min-width: 0;
	overflow: hidden;
	padding: 0.3rem 0.5rem;
	text-align: center;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.choco-memory-card__surface--art.choco-memory-card__surface--matched::after {
	background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(168, 238, 194, 0.25));
	content: "";
	inset: 0;
	position: absolute;
}

.choco-memory-card:focus-visible,
.choco-memory-match__reset:focus-visible {
	outline: 3px solid #141414;
	outline-offset: 3px;
}

.choco-memory-match__completion {
	background: #fff;
	border: 1px solid var(--memory-line);
	border-radius: 14px;
	margin-top: 0.9rem;
	padding: 0.9rem 1rem;
}

.choco-memory-match__completion h3 {
	margin: 0 0 0.35rem;
}

.choco-memory-match__completion p {
	margin: 0;
}

.choco-memory-match__modal[hidden] {
	display: none;
}

.choco-memory-match__modal {
	inset: 0;
	position: fixed;
	z-index: 9999;
}

.choco-memory-match__modal-backdrop {
	background: rgba(8, 14, 36, 0.72);
	inset: 0;
	position: absolute;
}

.choco-memory-match__modal-dialog {
	background:
		radial-gradient(120% 90% at 18% 0%, rgba(61, 86, 173, 0.24) 0%, transparent 46%),
		radial-gradient(120% 120% at 100% 100%, rgba(36, 56, 122, 0.32) 0%, transparent 52%),
		linear-gradient(160deg, #101a45, #1a2b69);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 24px;
	box-shadow: 0 28px 64px rgba(8, 14, 36, 0.5);
	box-sizing: border-box;
	color: #ffffff;
	left: 50%;
	max-width: min(92vw, 640px);
	padding: 1.35rem 1.35rem 1.2rem;
	position: absolute;
	top: 50%;
	transform: translate(-50%, -50%);
	width: 100%;
}

.choco-memory-match__modal-dialog h3 {
	color: #f7fbff;
	font-weight: 800;
	letter-spacing: -0.02em;
	text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
	font-size: clamp(1.55rem, 3vw, 2rem);
	line-height: 1.08;
	margin: 0 0 0.9rem;
	padding-right: 2rem;
}

.choco-memory-match__modal-close {
	appearance: none;
	background: rgba(255, 255, 255, 0.1);
	border: 0;
	border-radius: 12px;
	color: #ffffff;
	cursor: pointer;
	font-size: 2rem;
	line-height: 1;
	padding: 0.1rem 0.45rem 0.22rem;
	position: absolute;
	right: 1rem;
	top: 0.8rem;
}

.choco-memory-match__modal-close:focus-visible {
	outline: 3px solid #ffffff;
	outline-offset: 3px;
}

.choco-memory-match__modal-loading {
	margin-bottom: 1rem;
}

.choco-memory-match__modal-loading p {
	color: rgba(237, 242, 255, 0.9);
	font-size: 0.95rem;
	margin: 0 0 0.55rem;
}

.choco-memory-match__progress {
	background: rgba(107, 57, 22, 0.1);
	border-radius: 999px;
	height: 12px;
	overflow: hidden;
	width: 100%;
}

.choco-memory-match__progress span {
	background: linear-gradient(90deg, var(--memory-accent), #ecb067);
	border-radius: inherit;
	display: block;
	height: 100%;
	transition: width 0.2s ease;
	width: 8%;
}

.choco-memory-match__modal-media {
	background: #ffffff;
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 18px;
	overflow: hidden;
	padding: 0.4rem;
}

.choco-memory-match__modal-video {
	background: #ffffff;
	border-radius: 14px;
	display: block;
	height: auto;
	width: 100%;
}

.choco-memory-match__modal-copy {
	color: rgba(255, 255, 255, 0.92);
	font-size: 1rem;
	line-height: 1.45;
	margin: 0.9rem 0 0;
	text-align: center;
}

body.choco-memory-modal-open {
	overflow: hidden;
}

@media (max-width: 860px) {
	.choco-memory-match__stats {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 720px) {
	.choco-memory-match {
		padding: 0.9rem;
	}

	.choco-memory-match__game {
		padding: 0.95rem;
	}

	.choco-memory-match__header {
		flex-direction: column;
	}

	.choco-memory-match__board {
		gap: 0.45rem;
		max-width: none;
		padding: 0.45rem;
	}

	.choco-memory-match__modal-dialog {
		padding: 1.1rem 1rem 1rem;
	}

	.choco-memory-card,
	.choco-memory-match__board > .choco-memory-card,
	.choco-memory-match__board > .choco-memory-card:hover,
	.choco-memory-match__board > .choco-memory-card:focus,
	.choco-memory-match__board > .choco-memory-card:active {
		flex-basis: calc((100% - 1.35rem) / 4) !important;
		width: calc((100% - 1.35rem) / 4) !important;
	}

	.choco-memory-card__surface--art {
		gap: 0.25rem;
		padding: 0.28rem;
	}

	.choco-memory-card__media,
	.choco-memory-card__media img {
		border-radius: 8px;
	}

	.choco-memory-card__label {
		font-size: 0.5rem;
		padding: 0.18rem 0.22rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.choco-memory-match__reset {
		transition: none;
	}
}
