.bs-memory-page {
	min-height: calc(100vh - 72px);
	padding: clamp(38px, 6vw, 80px) 0;
	background:
		radial-gradient(circle at 8% 12%, rgba(255, 47, 145, .18), transparent 24rem),
		radial-gradient(circle at 91% 82%, rgba(200, 71, 255, .2), transparent 27rem),
		#1a0b16;
}

.bs-memory { max-width: 1040px; margin: 0 auto; color: #fff7f0; }
.bs-memory-screen { display: none; }
.bs-memory-screen.is-visible { display: block; }
.bs-memory-intro, .bs-memory-round, .bs-memory-finish { max-width: 710px; margin: 0 auto; text-align: center; }
.bs-memory .kicker { margin-bottom: 16px; color: #ff2f91; }
.bs-memory-intro-icon, .bs-memory-round-icon { display: grid; width: 88px; height: 88px; margin: 0 auto 23px; border: 2px solid #ff4c26; border-radius: 50%; background: #3a102b; box-shadow: 7px 8px 0 #ff2f91; place-items: center; font-size: 47px; transform: rotate(-8deg); }
.bs-memory-intro h1 { margin: 0; font-family: var(--font-display); font-size: clamp(60px, 10vw, 110px); font-weight: 400; line-height: .84; letter-spacing: .015em; text-transform: uppercase; }
.bs-memory-intro h1 span, .bs-memory-intro h1 strong { display: block; }
.bs-memory-intro h1 strong { color: #ff2f91; font-weight: 400; }
.bs-memory-lead { max-width: 650px; margin: 27px auto 24px; color: #e6bccf; font-size: 17px; line-height: 1.7; }
.bs-memory-level-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 auto 30px; }
.bs-memory-level-list span { min-width: 75px; padding: 9px 12px; border: 1px solid rgba(255, 185, 219, .34); border-radius: 99px; color: #ffdce9; background: rgba(100, 27, 73, .45); font-size: 12px; font-weight: 900; letter-spacing: .06em; }
.bs-memory-main-button { margin: 0 auto; }
.bs-memory-back, .bs-memory-restart, .bs-memory-quit { display: inline-block; margin-top: 25px; border: 0; color: #eac4d6; background: transparent; font-size: 12px; font-weight: 900; letter-spacing: .08em; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.bs-memory-play { max-width: 980px; margin: 0 auto; }
.bs-memory-topbar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 670px; margin: 0 auto 22px; }
.bs-memory-topbar div { padding: 12px 14px; border: 1px solid rgba(255, 185, 219, .28); border-radius: 14px; text-align: center; background: rgba(76, 23, 60, .63); }
.bs-memory-topbar span, .bs-memory-round-stats span { display: block; color: #e6adca; font-size: 10px; font-weight: 900; letter-spacing: .14em; }
.bs-memory-topbar strong { display: block; margin-top: 4px; color: #fff7f0; font-size: 17px; }
.bs-memory-board-wrap { max-width: 850px; margin: 0 auto; padding: clamp(12px, 2vw, 22px); border: 1px solid rgba(255, 185, 219, .24); border-radius: 24px; background: rgba(48, 14, 39, .63); box-shadow: 0 25px 50px rgba(0, 0, 0, .22); }
.bs-memory-board { display: grid; grid-template-columns: repeat(var(--memory-columns, 2), minmax(0, 1fr)); gap: clamp(7px, 1.2vw, 13px); }
.bs-memory-card { position: relative; aspect-ratio: 1 / 1; min-width: 0; padding: 0; border: 0; border-radius: 14px; perspective: 700px; background: transparent; cursor: pointer; }
.bs-memory-card:focus-visible { outline: 3px solid #ffdf58; outline-offset: 3px; }
.bs-memory-card[disabled] { cursor: default; }
.bs-memory-card-inner { position: absolute; inset: 0; border-radius: inherit; transition: transform .36s cubic-bezier(.2, .75, .2, 1); transform-style: preserve-3d; }
.bs-memory-card.is-flipped .bs-memory-card-inner, .bs-memory-card.is-matched .bs-memory-card-inner { transform: rotateY(180deg); }
.bs-memory-card-face { position: absolute; inset: 0; display: grid; border: 1px solid rgba(255, 213, 234, .42); border-radius: inherit; backface-visibility: hidden; place-items: center; }
.bs-memory-card-back { color: #ff8cc3; background: linear-gradient(135deg, #671949, #351027); box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .035); font-family: var(--font-display); font-size: clamp(24px, 4.4vw, 42px); }
.bs-memory-card-back::after { content: '✦'; color: #ff2f91; text-shadow: 3px 3px 0 #47112e; }
.bs-memory-card-front { background: linear-gradient(145deg, #ffdfec, #ffc4dc); color: #4d0f34; font-size: clamp(25px, 4.8vw, 48px); transform: rotateY(180deg); }
.bs-memory-card.is-matched .bs-memory-card-front { border-color: #ffdf58; background: linear-gradient(145deg, #fff2b0, #ffd35b); box-shadow: 0 0 20px rgba(255, 207, 66, .35); }
.bs-memory-comment { min-height: 29px; margin: 19px auto 0; color: #ffd7e8; font-family: var(--font-script); font-size: clamp(23px, 3vw, 30px); line-height: 1.1; text-align: center; }
.bs-memory-quit { display: block; margin-right: auto; margin-left: auto; }
.bs-memory-round h2, .bs-memory-finish h2 { margin: 0; color: #ff2f91; font-family: var(--font-display); font-size: clamp(58px, 8vw, 88px); font-weight: 400; line-height: .88; text-transform: uppercase; }
.bs-memory-round > p:not(.kicker), .bs-memory-finish > p:not(.kicker) { max-width: 590px; margin: 23px auto 24px; color: #e6bccf; font-size: 17px; line-height: 1.7; }
.bs-memory-round-stats { width: min(260px, 100%); margin: 0 auto 27px; padding: 13px 20px; border: 1px solid rgba(255, 185, 219, .34); border-radius: 15px; background: rgba(91, 26, 65, .62); }
.bs-memory-round-stats strong { display: block; margin-top: 4px; color: #fff7f0; font-size: 28px; }

@media (max-width: 640px) {
	.bs-memory-page { padding-top: 30px; }
	.bs-memory-topbar { gap: 6px; }
	.bs-memory-topbar div { padding: 10px 5px; }
	.bs-memory-topbar strong { font-size: 14px; }
	.bs-memory-board { --memory-columns: 4 !important; gap: 7px; }
	.bs-memory-board-wrap { padding: 10px; border-radius: 18px; }
	.bs-memory-card { border-radius: 9px; }
	.bs-memory-card-face { border-radius: 9px; }
	.bs-memory-card-back { font-size: 23px; }
	.bs-memory-card-front { font-size: 26px; }
}
