:root {
	color-scheme: dark;
	background: #050305;
	font-family: Georgia, "Times New Roman", serif;
	font-synthesis: none;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

* {
	box-sizing: border-box;
}

html,
body {
	min-width: 280px;
	min-height: 100%;
	margin: 0;
}

body {
	min-height: 100vh;
	min-height: 100svh;
	overflow: hidden;
	background: #050305;
}

#falling-hearts {
	position: fixed;
	 z-index: 0;
	 inset: 0;
	 width: 100%;
	 height: 100%;
	 pointer-events: none;
}

.scene {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100svh;
	align-items: center;
	justify-content: center;
	gap: clamp(12px, 2.2vh, 22px);
	padding: 16px 12px 28px;
	overflow: hidden;
}

.heart-stage {
	width: min(94vw, 860px, 88svh);
	aspect-ratio: 1.08;
	filter: drop-shadow(0 0 22px rgb(242 64 133 / 18%));
}

#word-heart {
	display: block;
	width: 100%;
	height: 100%;
}

.photo-frame {
	position: fixed;
	top: 50%;
	transform: translateY(-50%);
	width: min(22vw, 180px);
	max-width: 180px;
	aspect-ratio: 0.82;
	margin: 0;
	padding: 8px;
	border: 1px solid rgb(255 177 208 / 50%);
	border-radius: 22px;
	background: rgb(255 255 255 / 3%);
	box-shadow: 0 18px 38px rgb(255 118 171 / 16%), inset 0 0 0 1px rgb(255 255 255 / 8%);
	backdrop-filter: blur(2px);
	z-index: 2;
	transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.photo-frame--left {
	left: clamp(12px, 3vw, 48px);
}

.photo-frame--right {
	right: clamp(12px, 3vw, 48px);
}

.photo-frame--pulse {
	top: 14%;
	right: clamp(90px, 20vw, 300px);
	width: min(18vw, 140px);
	aspect-ratio: 0.82;
	padding: 6px;
	opacity: 0;
	pointer-events: none;
	animation: photo-pulse 2s linear infinite;
}

.photo-frame--pulse img {
	object-fit: contain;
}

.photo-frame--accent-free {
	top: 14%;
	left: clamp(90px, 20vw, 300px);
	width: min(18vw, 140px);
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: 0 12px 30px rgb(0 0 0 / 45%);
	backdrop-filter: none;
}

.photo-frame--accent-free::before {
	display: none;
}

.photo-frame--accent-free img {
	border-radius: 16px;
}

.photo-frame--cat {
	right: clamp(90px, 20vw, 300px);
	left: auto;
	aspect-ratio: 1;
}

.photo-frame--bottom-right {
	top: auto;
	right: clamp(12px, 3vw, 48px);
	bottom: clamp(18px, 4vh, 40px);
	width: clamp(88px, 18vw, 150px);
	aspect-ratio: 1.14;
	border-color: transparent;
	box-shadow: 0 12px 30px rgb(0 0 0 / 45%);
	background: transparent;
	backdrop-filter: none;
}

.photo-frame--sticker {
	padding: 8px;
	border: 1px solid rgb(255 177 208 / 55%);
	border-radius: 50%;
	background: #ffeaf2;
	box-shadow: 0 12px 30px rgb(255 118 171 / 24%);
}

.photo-frame--bottom-right::before {
	display: none;
}

.photo-frame--bottom-right img {
	object-fit: contain;
	border-radius: 14px;
}

.photo-frame--sticker img {
	border-radius: 50%;
	filter: none;
}

.photo-frame--extra {
	top: 76%;
	left: clamp(72px, 17vw, 220px);
	width: clamp(88px, 16vw, 132px);
	padding: 0;
	border-color: transparent;
	background: transparent;
	box-shadow: 0 12px 30px rgb(0 0 0 / 45%);
	backdrop-filter: none;
}

.photo-frame--extra::before {
	display: none;
}

.photo-frame--extra img {
	border-radius: 16px;
}

.photo-frame::before {
	content: "";
	position: absolute;
	inset: 7px;
	border: 1px solid rgb(255 255 255 / 18%);
	border-radius: 16px;
	pointer-events: none;
}

.photo-frame:hover {
	transform: translateY(-50%) scale(1.04);
	box-shadow: 0 22px 42px rgb(255 118 171 / 22%), inset 0 0 0 1px rgb(255 255 255 / 10%);
	border-color: rgb(255 177 208 / 70%);
}

.photo-frame--bottom-right:hover {
	transform: translateY(-6px) scale(1.04);
}

.photo-frame img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 14px;
	filter: saturate(1.08) contrast(1.05) brightness(1.02);
}

.photo-frame--cutout,
.photo-frame--cutout:hover {
	box-shadow: none;
}

.photo-frame--cutout::before {
	display: none;
}

.photo-frame--cutout img {
	border-radius: 0;
	object-fit: contain;
	filter: drop-shadow(0 8px 12px rgb(0 0 0 / 30%));
}

@keyframes photo-pulse {
	0%, 100% {
		opacity: 0;
	}
	30%, 55% {
		opacity: 1;
	}
	85% {
		opacity: 0;
	}
}

.replay-button {
	display: inline-flex;
	min-height: 46px;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 0 20px;
	border: 1px solid rgb(255 177 208 / 55%);
	border-radius: 999px;
	background: rgb(255 120 173 / 9%);
	color: #ffe5ef;
	font: 600 15px Georgia, "Times New Roman", serif;
	cursor: pointer;
	transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.replay-button span {
	color: #ff78ad;
	font: 22px/1 Georgia, "Times New Roman", serif;
}

.replay-button:hover {
	transform: translateY(-2px);
	border-color: #ffb1d0;
	background: rgb(255 120 173 / 16%);
	box-shadow: 0 0 20px rgb(242 64 133 / 18%);
}

.replay-button:focus-visible {
	outline: 2px solid #fff0f6;
	outline-offset: 4px;
}

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

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}

	.photo-frame--pulse {
		animation: none;
		opacity: 1;
	}
}
