/* Valja — navngivningsfest. Candy pastel party vibes. 🎈 */
:root {
	--pink: #ff6b9e;
	--pink-soft: #ffd3e2;
	--mint: #7be0b0;
	--mint-soft: #d3f5e6;
	--lilac: #b39dff;
	--lilac-soft: #e8e1ff;
	--peach: #ffb36b;
	--peach-soft: #ffe8d3;
	--sky: #7ec8f5;
	--sky-soft: #d8f0ff;
	--ink: #4a3358;
	--ink-soft: #8a6f9e;
	--card: #fffdf9;
	--shadow: 0 10px 30px -12px rgba(90, 60, 120, 0.35);
}

* {
	box-sizing: border-box;
}

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

body {
	font-family: "Fredoka", system-ui, sans-serif;
	color: var(--ink);
	background:
		linear-gradient(
			180deg,
			var(--sky-soft) 0%,
			#fff3f8 34%,
			#fffdf9 60%,
			var(--mint-soft) 100%
		),
		#fffdf9;
	background-attachment: fixed;
	overflow-x: hidden;
}

/* ── floating balloons ─────────────────────────────── */
#balloons {
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 0;
	overflow: hidden;
}
#balloons span {
	position: absolute;
	font-size: 2.6rem;
	opacity: 0.5;
	animation: floaty 12s ease-in-out infinite;
}
#balloons span:nth-child(1) {
	left: 4%;
	top: 8%;
	animation-delay: 0s;
}
#balloons span:nth-child(2) {
	left: 14%;
	top: 70%;
	animation-delay: 1.4s;
	font-size: 2rem;
}
#balloons span:nth-child(3) {
	left: 22%;
	top: 24%;
	animation-delay: 2.8s;
}
#balloons span:nth-child(4) {
	left: 30%;
	top: 82%;
	animation-delay: 4.2s;
	font-size: 1.8rem;
}
#balloons span:nth-child(5) {
	left: 68%;
	top: 12%;
	animation-delay: 1.9s;
	font-size: 2.2rem;
}
#balloons span:nth-child(6) {
	left: 78%;
	top: 68%;
	animation-delay: 3.3s;
}
#balloons span:nth-child(7) {
	left: 88%;
	top: 26%;
	animation-delay: 5s;
	font-size: 1.9rem;
}
#balloons span:nth-child(8) {
	left: 95%;
	top: 80%;
	animation-delay: 2.2s;
	font-size: 2.4rem;
}

@keyframes floaty {
	0%,
	100% {
		transform: translateY(0) rotate(-4deg);
	}
	50% {
		transform: translateY(-26px) rotate(5deg);
	}
}

/* ── hero ──────────────────────────────────────────── */
.hero {
	position: relative;
	z-index: 1;
	text-align: center;
	padding: 56px 18px 8px;
	max-width: 640px;
	margin: 0 auto;
}
.eyebrow {
	display: inline-block;
	background: var(--lilac-soft);
	color: var(--lilac);
	border: 2px solid var(--lilac);
	border-radius: 999px;
	padding: 5px 18px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	font-size: 0.8rem;
	margin: 0 0 14px;
}
h1 {
	font-family: "Baloo 2", "Fredoka", sans-serif;
	font-size: clamp(2.1rem, 7vw, 3.4rem);
	line-height: 1.15;
	margin: 0 0 6px;
}
h1 .name {
	background: linear-gradient(
		90deg,
		var(--pink),
		var(--lilac),
		var(--sky),
		var(--pink)
	);
	background-size: 300% 100%;
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	animation: shimmer 8s linear infinite;
}
@keyframes shimmer {
	to {
		background-position: 300% 0;
	}
}
.date {
	font-weight: 600;
	color: var(--ink-soft);
	margin: 4px 0 14px;
}
.note {
	background: var(--card);
	border: 2px solid var(--pink-soft);
	border-radius: 22px;
	padding: 14px 18px;
	box-shadow: var(--shadow);
	margin: 0 0 18px;
}
.cta {
	font-family: inherit;
	font-size: 1.15rem;
	font-weight: 700;
	color: #fff;
	background: linear-gradient(135deg, var(--pink), #ff8fb5);
	border: none;
	border-radius: 999px;
	padding: 15px 30px;
	cursor: pointer;
	box-shadow: 0 12px 26px -10px rgba(255, 90, 140, 0.6);
	transition:
		transform 0.15s ease,
		box-shadow 0.15s ease;
}
.cta:hover {
	transform: translateY(-2px) scale(1.02);
	box-shadow: 0 16px 30px -10px rgba(255, 90, 140, 0.7);
}
.cta.small {
	font-size: 1rem;
	padding: 11px 22px;
}
.stats {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin-top: 22px;
}
.stats span {
	background: var(--card);
	border: 2px solid var(--mint-soft);
	border-radius: 999px;
	padding: 6px 16px;
	font-weight: 600;
	font-size: 0.95rem;
	box-shadow: 0 6px 16px -8px rgba(90, 60, 120, 0.25);
}

/* ── gallery ───────────────────────────────────────── */
.gallery {
	position: relative;
	z-index: 1;
	max-width: 1060px;
	margin: 34px auto 0;
	padding: 0 14px 40px;
}
.gallery-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 16px;
}
.gallery-head h2 {
	font-family: "Baloo 2", "Fredoka", sans-serif;
	margin: 0;
	font-size: 1.7rem;
}
.sort {
	display: flex;
	gap: 8px;
}
.chip {
	font-family: inherit;
	font-size: 0.9rem;
	font-weight: 600;
	border: 2px solid var(--lilac);
	color: var(--lilac);
	background: transparent;
	border-radius: 999px;
	padding: 6px 14px;
	cursor: pointer;
	transition: all 0.15s ease;
}
.chip.active {
	background: var(--lilac);
	color: #fff;
}

.grid {
	columns: 2 210px;
	column-gap: 14px;
}
.card {
	display: inline-block;
	width: 100%;
	margin-bottom: 14px;
	break-inside: avoid;
	border-radius: 18px;
	overflow: hidden;
	background: var(--card);
	box-shadow: var(--shadow);
	cursor: pointer;
	transition:
		transform 0.18s ease,
		box-shadow 0.18s ease;
	border: 2px solid #fff;
}
.card:hover {
	transform: translateY(-4px);
	box-shadow: 0 18px 36px -14px rgba(90, 60, 120, 0.4);
}
.card .media {
	width: 100%;
	display: block;
	background: var(--lilac-soft);
	aspect-ratio: 4 / 3; /* stable card height before images load */
	object-fit: cover;
}
.card video.media {
	aspect-ratio: 16 / 9;
}
.card video {
	width: 100%;
	display: block;
}
.card .tile-placeholder {
	width: 100%;
	aspect-ratio: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	background: linear-gradient(135deg, var(--pink-soft), var(--lilac-soft));
	font-size: 2.4rem;
}
.card .tile-placeholder small {
	font-size: 0.8rem;
	color: var(--ink-soft);
}
.card .meta {
	padding: 9px 12px 11px;
}
.card .meta .who {
	font-weight: 700;
	font-size: 0.95rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}
.card .meta .who .hearts {
	font-size: 0.85rem;
	color: var(--pink);
	white-space: nowrap;
}
.card .meta .greeting {
	margin: 4px 0 0;
	font-size: 0.9rem;
	color: var(--ink-soft);
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}
.badge {
	position: absolute;
	top: 8px;
	left: 8px;
	background: rgba(255, 255, 255, 0.85);
	border-radius: 999px;
	padding: 3px 10px;
	font-size: 0.85rem;
	font-weight: 600;
	backdrop-filter: blur(4px);
}
.card-del {
	position: absolute;
	top: 8px;
	right: 8px;
	border: none;
	background: rgba(255, 255, 255, 0.92);
	border-radius: 50%;
	width: 34px;
	height: 34px;
	font-size: 0.95rem;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
	transition:
		transform 0.15s ease,
		background 0.15s ease;
}
.card-del:hover {
	background: #ffd9d9;
	transform: scale(1.1);
}
.card .mediawrap {
	position: relative;
}
.empty {
	text-align: center;
	padding: 50px 20px;
	color: var(--ink-soft);
}
.empty-bounce {
	font-size: 3.4rem;
	display: inline-block;
	animation: bounce 1.6s ease-in-out infinite;
}
@keyframes bounce {
	0%,
	100% {
		transform: translateY(0);
	}
	50% {
		transform: translateY(-14px);
	}
}
.loading {
	text-align: center;
	padding: 30px;
	color: var(--ink-soft);
}
.hidden {
	display: none !important;
}

/* ── upload sheet ──────────────────────────────────── */
.sheet-overlay {
	position: fixed;
	inset: 0;
	z-index: 40;
	background: rgba(74, 51, 88, 0.45);
	backdrop-filter: blur(4px);
	display: flex;
	align-items: flex-end;
	justify-content: center;
}
.sheet {
	position: relative;
	width: 100%;
	max-width: 560px;
	max-height: 88vh;
	overflow-y: auto;
	background: var(--card);
	border-radius: 26px 26px 0 0;
	padding: 26px 20px 34px;
	box-shadow: 0 -10px 50px rgba(0, 0, 0, 0.25);
	animation: slideup 0.25s ease;
}
@keyframes slideup {
	from {
		transform: translateY(40px);
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}
@media (min-width: 640px) {
	.sheet-overlay {
		align-items: center;
	}
	.sheet {
		border-radius: 26px;
	}
}
.sheet h2 {
	font-family: "Baloo 2", "Fredoka", sans-serif;
	margin: 0 0 18px;
	font-size: 1.5rem;
}
.sheet-x {
	position: absolute;
	top: 14px;
	right: 14px;
	border: none;
	background: var(--lilac-soft);
	color: var(--lilac);
	font-size: 1rem;
	font-weight: 700;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	cursor: pointer;
}
.field {
	display: block;
	margin-bottom: 14px;
}
.field span {
	display: block;
	font-weight: 600;
	font-size: 0.92rem;
	margin-bottom: 6px;
}
.field em {
	font-style: normal;
	color: var(--ink-soft);
	font-weight: 500;
}
.field input,
.field textarea {
	width: 100%;
	font-family: inherit;
	font-size: 1rem;
	color: var(--ink);
	border: 2px solid var(--lilac-soft);
	border-radius: 14px;
	padding: 11px 14px;
	background: #fff;
}
.field input:focus,
.field textarea:focus {
	outline: none;
	border-color: var(--lilac);
}
.pick-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 14px;
}
.pick {
	flex: 1 1 30%;
	min-width: 130px;
	font-family: inherit;
	font-size: 0.95rem;
	font-weight: 600;
	border: 2px solid var(--pink-soft);
	background: #fff;
	color: var(--ink);
	border-radius: 999px;
	padding: 10px 8px;
	cursor: pointer;
	transition: all 0.15s ease;
}
.pick:hover {
	border-color: var(--pink);
	transform: translateY(-1px);
}
.dropzone {
	border: 2px dashed var(--lilac);
	border-radius: 16px;
	background: var(--lilac-soft);
	color: var(--ink-soft);
	text-align: center;
	padding: 22px 12px;
	font-weight: 500;
	transition: all 0.15s ease;
}
.dropzone.over {
	border-color: var(--pink);
	background: var(--pink-soft);
	color: var(--ink);
}
.progress-list {
	margin-top: 14px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.progress-item {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 0.9rem;
}
.progress-item .bar {
	flex: 1;
	height: 10px;
	border-radius: 999px;
	background: var(--lilac-soft);
	overflow: hidden;
}
.progress-item .bar i {
	display: block;
	height: 100%;
	width: 0;
	background: linear-gradient(90deg, var(--pink), var(--lilac));
	transition: width 0.2s ease;
}
.progress-item .state {
	color: var(--ink-soft);
	font-weight: 600;
	min-width: 90px;
	text-align: right;
}

/* ── lightbox ──────────────────────────────────────── */
.lightbox {
	position: fixed;
	inset: 0;
	z-index: 50;
	background: rgba(30, 18, 40, 0.94);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	padding: 50px 12px 16px;
}
.lb-stage {
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: min(92vw, 900px);
	width: 100%;
	gap: 12px;
}
.lb-media {
	max-width: 100%;
	max-height: 68vh;
	display: flex;
	align-items: center;
	justify-content: center;
}
.lb-media img,
.lb-media video {
	max-width: 100%;
	max-height: 68vh;
	border-radius: 16px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
	background: #000;
}
.lb-caption {
	background: rgba(255, 255, 255, 0.1);
	border-radius: 16px;
	padding: 12px 18px;
	text-align: center;
	max-width: 100%;
	backdrop-filter: blur(6px);
}
.lb-name {
	margin: 0;
	font-weight: 700;
	color: #fff;
}
.lb-greeting {
	margin: 4px 0 0;
	color: #e6d9f2;
}
.lb-actions {
	display: flex;
	gap: 10px;
	justify-content: center;
	margin-top: 10px;
}
.lb-actions button,
.lb-actions a {
	font-family: inherit;
	font-size: 0.95rem;
	font-weight: 600;
	border: none;
	border-radius: 999px;
	padding: 8px 16px;
	cursor: pointer;
	text-decoration: none;
	background: #fff;
	color: var(--ink);
	transition: transform 0.15s ease;
}
.lb-actions button:hover,
.lb-actions a:hover {
	transform: scale(1.05);
}
.lb-heart.loved {
	background: linear-gradient(135deg, var(--pink), #ff8fb5);
	color: #fff;
}
.lb-delete {
	background: #ffd9d9 !important;
	color: #b32727 !important;
}
.lb-btn {
	position: fixed;
	z-index: 51;
	border: none;
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	font-size: 1.6rem;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	cursor: pointer;
	backdrop-filter: blur(4px);
}
.lb-btn:hover {
	background: rgba(255, 255, 255, 0.3);
}
.lb-btn.close {
	top: 14px;
	right: 14px;
}
.lb-btn.prev {
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
}
.lb-btn.next {
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
}

/* ── admin + toast ─────────────────────────────────── */
.admin-bar {
	position: fixed;
	bottom: 16px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 30;
	background: var(--ink);
	color: #fff;
	border-radius: 999px;
	padding: 8px 18px;
	display: flex;
	gap: 14px;
	align-items: center;
	font-size: 0.9rem;
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}
.admin-bar a {
	color: var(--mint);
	font-weight: 600;
	text-decoration: none;
}
.toast {
	position: fixed;
	bottom: 26px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 60;
	background: var(--ink);
	color: #fff;
	border-radius: 999px;
	padding: 12px 24px;
	font-weight: 600;
	box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4);
	animation: pop 0.25s ease;
	max-width: 90vw;
	text-align: center;
}
.toast.clickable {
	cursor: pointer;
}
.toast.clickable:hover {
	background: var(--pink);
}
.card.flash {
	outline: 3px solid var(--pink);
	outline-offset: 3px;
	animation: flashy 0.5s ease 3;
}
@keyframes flashy {
	0%,
	100% {
		box-shadow: var(--shadow);
	}
	50% {
		box-shadow: 0 0 0 10px rgba(255, 107, 158, 0.35);
	}
}
@keyframes pop {
	from {
		transform: translateX(-50%) scale(0.85);
		opacity: 0;
	}
	to {
		transform: translateX(-50%) scale(1);
		opacity: 1;
	}
}

/* ── confetti ──────────────────────────────────────── */
.confetti {
	position: fixed;
	z-index: 70;
	width: 10px;
	height: 14px;
	border-radius: 3px;
	pointer-events: none;
	animation: confetti-fall 2.4s ease-in forwards;
}
@keyframes confetti-fall {
	0% {
		transform: translateY(-10vh) rotate(0deg);
		opacity: 1;
	}
	100% {
		transform: translateY(105vh) rotate(720deg);
		opacity: 0;
	}
}

footer {
	position: relative;
	z-index: 1;
	text-align: center;
	padding: 18px 14px 30px;
	color: var(--ink-soft);
	font-size: 0.9rem;
}
footer a {
	color: var(--ink-soft);
}
