* {
	box-sizing: border-box;
}

:root {
	color-scheme: dark;
	--bg-1: #180b20;
	--bg-2: #2d112f;
	--bg-3: #5c2146;
	--text: #fff6fb;
	--muted: rgba(255, 240, 247, 0.8);
	--glass: rgba(255, 255, 255, 0.12);
	--glass-border: rgba(255, 255, 255, 0.18);
	--accent: #ffb6d9;
	--accent-strong: #ffd0e8;
	--shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	min-height: 100vh;
	font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
	color: var(--text);
	background:
		radial-gradient(circle at top, rgba(255, 182, 217, 0.18), transparent 42%),
		linear-gradient(135deg, var(--bg-1), var(--bg-2) 52%, var(--bg-3));
	overflow-x: hidden;
}

body::before {
	content: "";
	position: fixed;
	inset: 0;
	background:
		radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.08), transparent 18%),
		radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.06), transparent 20%),
		radial-gradient(circle at 50% 80%, rgba(255, 255, 255, 0.05), transparent 22%);
	pointer-events: none;
}

.hero {
	position: relative;
	min-height: 100vh;
	display: grid;
	place-items: center;
	padding: 32px 20px;
	overflow: hidden;
}

.gradient-orb {
	position: absolute;
	border-radius: 50%;
	filter: blur(10px);
	opacity: 0.65;
	animation: drift 14s ease-in-out infinite;
}

.orb-one {
	width: 34vw;
	height: 34vw;
	min-width: 240px;
	min-height: 240px;
	top: -8%;
	left: -6%;
	background: radial-gradient(circle, rgba(255, 163, 210, 0.45), rgba(255, 163, 210, 0.05) 65%, transparent 70%);
}

.orb-two {
	width: 28vw;
	height: 28vw;
	min-width: 200px;
	min-height: 200px;
	right: -4%;
	bottom: 8%;
	animation-delay: -5s;
	background: radial-gradient(circle, rgba(255, 212, 229, 0.32), rgba(255, 212, 229, 0.04) 62%, transparent 72%);
}

.hero-card {
	position: relative;
	z-index: 2;
	width: min(760px, 100%);
	padding: clamp(28px, 5vw, 56px);
	border: 1px solid var(--glass-border);
	border-radius: 32px;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.08));
	box-shadow: var(--shadow);
	backdrop-filter: blur(18px);
	-webkit-backdrop-filter: blur(18px);
	text-align: center;
}

.eyebrow,
.wish-label {
	margin: 0 0 16px;
	letter-spacing: 0.28em;
	text-transform: uppercase;
	font-size: 0.76rem;
	color: var(--accent-strong);
}

h1,
h2 {
	margin: 0;
	font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
	line-height: 0.95;
	letter-spacing: -0.03em;
}

h1 {
	font-size: clamp(3rem, 10vw, 6.8rem);
}

.accent {
	color: var(--accent);
}

.typing-line {
	min-height: 2.4em;
	margin: 18px auto 0;
	max-width: 42ch;
	font-size: clamp(1rem, 2.5vw, 1.2rem);
	line-height: 1.7;
	color: var(--muted);
}

.cursor {
	display: inline-block;
	width: 0.55em;
	height: 1.05em;
	margin-left: 0.08em;
	border-radius: 999px;
	vertical-align: -0.2em;
	background: var(--accent-strong);
	animation: blink 1s steps(2, start) infinite;
}

.message-card {
	width: min(560px, 100%);
	margin: 32px auto 0;
	padding: 22px 24px;
	border-radius: 24px;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.16);
	color: var(--text);
}

.message-card p,
.wish-section p {
	margin: 0;
	font-size: 1rem;
	line-height: 1.8;
	color: var(--muted);
}

.scroll-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-top: 30px;
	padding: 14px 26px;
	border-radius: 999px;
	text-decoration: none;
	color: #2a0f22;
	background: linear-gradient(135deg, #ffd9e9, #ffb8d7);
	box-shadow: 0 12px 24px rgba(255, 180, 212, 0.25);
	transition: transform 180ms ease, box-shadow 180ms ease;
}

.scroll-btn:hover,
.scroll-btn:focus-visible {
	transform: translateY(-2px);
	box-shadow: 0 16px 28px rgba(255, 180, 212, 0.32);
}

.wish-section {
	min-height: 100vh;
	display: grid;
	place-items: center;
	padding: 80px 20px;
	background: linear-gradient(180deg, rgba(17, 7, 21, 0.9), rgba(18, 8, 24, 1));
}

.wish-inner {
	width: min(720px, 100%);
	padding: clamp(24px, 4vw, 40px);
	border-radius: 28px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	background: rgba(255, 255, 255, 0.06);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	text-align: center;
}

h2 {
	font-size: clamp(2rem, 6vw, 4rem);
	margin-bottom: 18px;
}

.letter-section {
	padding: 100px 20px 110px;
	background:
		radial-gradient(circle at top, rgba(255, 209, 228, 0.1), transparent 30%),
		linear-gradient(180deg, rgba(10, 5, 14, 1), rgba(22, 10, 24, 0.98));
}

.letter-shell {
	width: min(860px, 100%);
	margin: 0 auto;
	padding: clamp(28px, 5vw, 56px);
	border-radius: 32px;
	border: 1px solid rgba(255, 255, 255, 0.14);
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.32);
	opacity: 0;
	transform: translateY(28px) scale(0.98);
	transition: opacity 700ms ease, transform 700ms ease;
}

.letter-shell.is-visible {
	opacity: 1;
	transform: translateY(0) scale(1);
}

.letter-shell h2 {
	max-width: 14ch;
	margin-bottom: 20px;
}

.letter-typewriter {
	min-height: 2.8em;
	max-width: 48ch;
	margin: 0 0 24px;
	font-size: clamp(1.06rem, 2.6vw, 1.3rem);
	line-height: 1.9;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
	color: rgba(255, 241, 248, 0.86);
}

.letter-card {
	padding: clamp(22px, 4vw, 34px);
	border-radius: 28px;
	background: rgba(10, 6, 14, 0.36);
	border: 1px solid rgba(255, 255, 255, 0.12);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
	animation: fadeInSoft 1s ease both;
	animation-delay: 180ms;
}

.letter-card p {
	margin: 0;
	font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
	font-size: clamp(1.05rem, 2.2vw, 1.35rem);
	line-height: 1.95;
	color: rgba(255, 245, 250, 0.92);
}

.letter-card p + p {
	margin-top: 18px;
}

.letter-signoff {
	font-size: 0.92rem !important;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--accent-strong) !important;
}

.letter-cursor {
	height: 1.15em;
	vertical-align: -0.18em;
}

.gallery-section {
	padding: 88px 20px 112px;
	background:
		radial-gradient(circle at top, rgba(255, 190, 220, 0.08), transparent 32%),
		linear-gradient(180deg, rgba(18, 8, 24, 1), rgba(10, 5, 14, 1));
}

.gallery-shell {
	width: min(1180px, 100%);
	margin: 0 auto;
}

.gallery-heading {
	max-width: 720px;
	margin-bottom: 34px;
}

.gallery-heading p:last-child {
	max-width: 60ch;
	margin-top: 14px;
	font-size: 1rem;
	line-height: 1.8;
	color: var(--muted);
}

.gallery-grid {
	column-count: 3;
	column-gap: 22px;
}

.gallery-item {
	display: inline-block;
	width: 100%;
	margin: 0 0 22px;
	padding: 0;
	border: 0;
	background: transparent;
	text-align: left;
	break-inside: avoid;
	cursor: pointer;
	border-radius: 26px;
	overflow: hidden;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
	transform: translateY(18px);
	opacity: 0;
	animation: fadeRise 700ms ease forwards;
}

.gallery-item:nth-child(2n) {
	animation-delay: 120ms;
}

.gallery-item:nth-child(3n) {
	animation-delay: 240ms;
}

.gallery-item:nth-child(4n) {
	animation-delay: 360ms;
}

.gallery-item:nth-child(5n) {
	animation-delay: 480ms;
}

.gallery-media {
	position: relative;
	aspect-ratio: 3 / 4;
	background: transparent;
	overflow: hidden;
	padding: 0;
	border: 0;
}

.gallery-media.tall {
	aspect-ratio: 4 / 5;
}

.gallery-media.wide {
	aspect-ratio: 4 / 3;
}

.gallery-media img {
	position: absolute;
	inset: 16px;
	width: calc(100% - 32px);
	height: calc(100% - 32px);
	object-fit: cover;
	border-radius: 20px;
	transition: transform 420ms ease, filter 420ms ease, opacity 320ms ease, translate 420ms ease;
	filter: saturate(1.03) contrast(1.02);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 18px 30px rgba(0, 0, 0, 0.18);
}

.gift-photo {
	opacity: 0;
	transform: translateY(24px) scale(0.94);
	filter: saturate(0.96) contrast(0.98);
}

.gallery-item.is-open .gift-photo {
	opacity: 1;
	transform: translateY(0) scale(1);
}

.gallery-item:hover .gift-photo,
.gallery-item:focus-visible .gift-photo {
	filter: saturate(1.06) contrast(1.04);
}

.gallery-item.is-popped {
	animation: popCard 620ms cubic-bezier(0.18, 1, 0.32, 1);
}

.gallery-item.is-popped .gift-photo {
	transform: translateY(0) scale(1.02);
}

.gallery-media::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background:
		linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent 45%),
		linear-gradient(225deg, rgba(255, 255, 255, 0.08), transparent 38%);
	pointer-events: none;
}

.gallery-media::after {
	content: "";
	position: absolute;
	inset: 14px;
	border-radius: 24px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.06);
	pointer-events: none;
}

.gift-shadow {
	position: absolute;
	left: 8%;
	right: 8%;
	bottom: 5%;
	height: 10%;
	border-radius: 999px;
	background: radial-gradient(closest-side, rgba(0, 0, 0, 0.22), transparent 72%);
	filter: blur(8px);
	opacity: 0.9;
	pointer-events: none;
}

.gift-base,
.gift-lid {
	position: absolute;
	left: 6%;
	right: 6%;
	border-radius: 24px;
	border: 1px solid rgba(255, 255, 255, 0.16);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 18px 30px rgba(0, 0, 0, 0.18);
	background: linear-gradient(180deg, var(--box-lid), var(--box-base));
	overflow: hidden;
	transition: transform 560ms cubic-bezier(0.18, 1, 0.32, 1), opacity 320ms ease;
	will-change: transform;
	pointer-events: none;
}

.gift-base {
	left: 10%;
	right: 10%;
	top: 42%;
	bottom: 8%;
	background: linear-gradient(180deg, color-mix(in srgb, var(--box-base) 74%, white 26%), var(--box-base));
	border-radius: 22px 22px 26px 26px;
}

.gift-lid {
	left: 8%;
	right: 8%;
	top: 14%;
	height: 28%;
	z-index: 2;
	transform-origin: center top;
	background: linear-gradient(180deg, color-mix(in srgb, var(--box-lid) 86%, white 14%), var(--box-lid));
}

.gallery-item.is-open .gift-lid {
	transform: translateY(-22px) rotate(-14deg);
	opacity: 0.96;
}

.gallery-item.is-open .gift-base {
	transform: translateY(4px);
}

.gift-ribbon {
	position: absolute;
	z-index: 3;
	pointer-events: none;
}

.gift-ribbon-horizontal {
	left: 8%;
	right: 8%;
	top: 50%;
	height: 16px;
	transform: translateY(-50%);
	background: linear-gradient(180deg, var(--box-ribbon), color-mix(in srgb, var(--box-ribbon) 78%, var(--box-base) 22%));
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
	filter: drop-shadow(0 0 10px var(--box-glow));
}

.gift-ribbon-vertical {
	top: 12%;
	bottom: 8%;
	left: 50%;
	width: 16px;
	transform: translateX(-50%);
	background: linear-gradient(180deg, var(--box-ribbon), color-mix(in srgb, var(--box-ribbon) 74%, var(--box-base) 26%));
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
	filter: drop-shadow(0 0 10px var(--box-glow));
}

.gift-bow {
	position: absolute;
	left: 50%;
	top: 12%;
	z-index: 4;
	width: 88px;
	height: 64px;
	transform: translate(-50%, -58%);
	background:
		radial-gradient(circle at 26% 46%, color-mix(in srgb, var(--box-ribbon) 88%, white 12%) 0 16%, transparent 17%),
		radial-gradient(circle at 74% 46%, color-mix(in srgb, var(--box-ribbon) 88%, white 12%) 0 16%, transparent 17%),
		radial-gradient(circle at 50% 68%, rgba(255, 255, 255, 0.98) 0 12%, transparent 13%);
	filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.2));
	pointer-events: none;
}

.gift-bow::before,
.gift-bow::after {
	content: "";
	position: absolute;
	top: 16px;
	width: 34px;
	height: 22px;
	border-radius: 50% 50% 44% 44%;
	background: linear-gradient(180deg, color-mix(in srgb, var(--box-ribbon) 88%, white 12%), var(--box-ribbon));
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.gallery-item.is-open .gift-photo,
.gallery-item.is-open .gift-photo:hover,
.gallery-item.is-open .gift-photo:focus-visible {
	filter: saturate(1.04) contrast(1.03);
}

.gallery-item.is-open .gift-base,
.gallery-item.is-open .gift-shadow {
	opacity: 1;
}

.gallery-item:not(.is-open) .gift-photo {
	pointer-events: none;
}

.gift-bow::before {
	left: 0;
	transform: rotate(-18deg);
}

.gift-bow::after {
	right: 0;
	transform: rotate(18deg);
}

.lightbox {
	position: fixed;
	inset: 0;
	z-index: 20;
	display: grid;
	place-items: center;
	padding: 20px;
	background: rgba(6, 3, 10, 0.78);
	backdrop-filter: blur(22px);
	-webkit-backdrop-filter: blur(22px);
	opacity: 0;
	pointer-events: none;
	transition: opacity 220ms ease;
}

.lightbox.is-open {
	opacity: 1;
	pointer-events: auto;
}

.lightbox-frame {
	width: min(92vw, 980px);
	margin: 0;
	border-radius: 30px;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.07);
	border: 1px solid rgba(255, 255, 255, 0.14);
	box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
	transform: translateY(16px) scale(0.98);
	transition: transform 280ms ease;
}

.lightbox.is-open .lightbox-frame {
	transform: translateY(0) scale(1);
}

.lightbox-frame img {
	display: block;
	width: 100%;
	height: min(76vh, 760px);
	object-fit: contain;
	background: #0f0714;
}

.lightbox-frame figcaption {
	padding: 16px 18px 18px;
	font-size: 0.95rem;
	line-height: 1.7;
	color: var(--muted);
	background: linear-gradient(180deg, rgba(12, 6, 16, 0.06), rgba(12, 6, 16, 0.32));
}

.lightbox-close,
.lightbox-nav {
	position: absolute;
	z-index: 1;
	display: inline-grid;
	place-items: center;
	border: 0;
	color: var(--text);
	background: rgba(255, 255, 255, 0.12);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2);
	cursor: pointer;
	transition: transform 180ms ease, background 180ms ease;
}

.lightbox-close:hover,
.lightbox-nav:hover,
.lightbox-close:focus-visible,
.lightbox-nav:focus-visible {
	transform: scale(1.05);
	background: rgba(255, 255, 255, 0.18);
}

.lightbox-close {
	top: 18px;
	right: 18px;
	width: 48px;
	height: 48px;
	border-radius: 999px;
	font-size: 2rem;
	line-height: 1;
}

.lightbox-nav {
	top: 50%;
	width: 54px;
	height: 54px;
	border-radius: 50%;
	font-size: 2rem;
	transform: translateY(-50%);
}

.lightbox-prev {
	left: 18px;
}

.lightbox-next {
	right: 18px;
}

body.lightbox-lock {
	overflow: hidden;
}

@keyframes fadeRise {
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

@keyframes popCard {
	0% {
		transform: scale(1);
	}
	35% {
		transform: scale(1.03) rotate(-1deg);
	}
	60% {
		transform: scale(0.995) rotate(1deg);
	}
	100% {
		transform: scale(1);
	}
}

@keyframes fadeInSoft {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.game-section {
	padding: 96px 20px 120px;
	background:
		radial-gradient(circle at top, rgba(255, 197, 221, 0.1), transparent 28%),
		linear-gradient(180deg, rgba(22, 10, 24, 0.98), rgba(8, 4, 10, 1));
}

.game-shell {
	width: min(1180px, 100%);
	margin: 0 auto;
	display: grid;
	grid-template-columns: 0.95fr 1.25fr;
	gap: 28px;
	align-items: start;
}

.game-copy {
	padding: clamp(16px, 3vw, 28px);
}

.game-copy h2 {
	max-width: 14ch;
	margin-bottom: 18px;
}

.game-copy p:last-child {
	max-width: 58ch;
	font-size: 1rem;
	line-height: 1.8;
	color: var(--muted);
}

.game-frame {
	position: relative;
	padding: 18px;
	border-radius: 32px;
	border: 1px solid rgba(255, 255, 255, 0.14);
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.05));
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	box-shadow: 0 30px 90px rgba(0, 0, 0, 0.34);
}

.game-hud {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 14px;
	padding: 14px 16px;
	border-radius: 20px;
	background: rgba(10, 6, 14, 0.42);
	border: 1px solid rgba(255, 255, 255, 0.12);
	font-size: 0.95rem;
	color: rgba(255, 245, 250, 0.92);
}

.game-hud strong {
	color: var(--accent-strong);
}

.game-hud button {
	padding: 10px 16px;
	border: 0;
	border-radius: 999px;
	background: linear-gradient(135deg, #ffd8e8, #ffb9d8);
	color: #2a0f22;
	font: inherit;
	cursor: pointer;
}

.game-hud button:hover,
.game-hud button:focus-visible {
	filter: brightness(1.04);
}

#birthday-canvas {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	border-radius: 26px;
	background:
		radial-gradient(circle at top, rgba(255, 195, 220, 0.18), transparent 35%),
		linear-gradient(180deg, #210f22, #130816 62%, #0c0710);
	border: 1px solid rgba(255, 255, 255, 0.1);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
	touch-action: none;
}

.game-instructions {
	margin: 12px 2px 0;
	font-size: 0.92rem;
	color: var(--muted);
}

.birthday-toast {
	min-height: 1.8em;
	margin-top: 10px;
	padding: 0 4px;
	font-size: 0.96rem;
	color: var(--accent-strong);
	text-align: center;
	transition: opacity 220ms ease, transform 220ms ease;
}

.birthday-toast.is-hidden {
	opacity: 0;
	transform: translateY(6px);
}

.heart-particles {
	position: absolute;
	inset: 0;
	pointer-events: none;
	overflow: hidden;
	z-index: 1;
}

.heart {
	position: absolute;
	bottom: -10vh;
	font-size: var(--size);
	color: rgba(255, 197, 221, 0.82);
	text-shadow: 0 0 18px rgba(255, 167, 204, 0.35);
	opacity: 0;
	animation: floatUp var(--duration) linear forwards;
	transform: translate3d(0, 0, 0);
}

.heart::before {
	content: "♥";
}

@keyframes floatUp {
	0% {
		transform: translate3d(0, 0, 0) scale(0.65) rotate(0deg);
		opacity: 0;
	}
	10% {
		opacity: 1;
	}
	100% {
		transform: translate3d(var(--drift), -120vh, 0) scale(1.2) rotate(20deg);
		opacity: 0;
	}
}

@keyframes drift {
	0%,
	100% {
		transform: translate3d(0, 0, 0) scale(1);
	}
	50% {
		transform: translate3d(18px, -24px, 0) scale(1.08);
	}
}

@keyframes blink {
	0%,
	49% {
		opacity: 1;
	}
	50%,
	100% {
		opacity: 0;
	}
}

@media (max-width: 640px) {
	.hero {
		padding: 20px 14px;
	}

	.hero-card {
		padding: 26px 18px 30px;
		border-radius: 24px;
	}

	.message-card,
	.wish-inner {
		border-radius: 20px;
	}

	.typing-line {
		min-height: 3.4em;
	}

	.scroll-btn {
		width: 100%;
	}

	.gallery-section {
		padding: 64px 14px 88px;
	}

	.gallery-grid {
		column-count: 1;
	}

	.gallery-item {
		margin-bottom: 16px;
		border-radius: 22px;
	}

	.letter-section {
		padding: 72px 14px 84px;
	}

	.letter-shell {
		border-radius: 24px;
		padding: 24px 18px 28px;
	}

	.letter-card {
		border-radius: 20px;
	}

	.game-section {
		padding: 72px 14px 90px;
	}

	.game-shell {
		grid-template-columns: 1fr;
	}

	.game-frame {
		padding: 14px;
		border-radius: 24px;
	}

	.game-hud {
		gap: 10px;
		padding: 12px 14px;
		border-radius: 16px;
	}

	#birthday-canvas {
		border-radius: 20px;
	}

	.lightbox {
		padding: 12px;
	}

	.lightbox-frame {
		width: 100%;
		border-radius: 22px;
	}

	.lightbox-close {
		top: 12px;
	right: 12px;
	}

	.lightbox-nav {
		top: auto;
		bottom: 14px;
		transform: none;
	}

	.lightbox-prev {
		left: 14px;
	}

	.lightbox-next {
		right: 14px;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation: none !important;
		transition: none !important;
	}
}
