/* ==========================================================================
   Peyvand — invitation page
   Colours and fonts come from CSS variables set on <body> per invitation:
   --pv-primary --pv-accent --pv-bg --pv-surface --pv-text --pv-envelope
   --pv-font-display --pv-font-body
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html.pvi-lock { overflow: hidden; }

.pvi-body {
	--pv-muted: color-mix(in srgb, var(--pv-text) 62%, transparent);
	--pv-line: color-mix(in srgb, var(--pv-accent) 35%, transparent);
	--pv-tint: color-mix(in srgb, var(--pv-primary) 8%, var(--pv-surface));
	--pvi-radius: 22px;
	--pvi-pattern: none;
	--pvi-corner: none;
	--pvi-flourish: none;
	margin: 0;
	min-height: 100vh;
	background: var(--pv-bg);
	background-image: var(--pvi-pattern);
	background-attachment: fixed;
	color: var(--pv-text);
	font-family: var(--pv-font-body);
	font-size: 16px;
	line-height: 1.95;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
}

.pvi-body img { max-width: 100%; height: auto; display: block; }
.pvi-body a { color: inherit; }
.pvi-body button { font: inherit; color: inherit; cursor: pointer; }
.pvi-body :focus-visible { outline: 2px solid var(--pv-accent); outline-offset: 3px; }
.pv-icon { width: 1.2em; height: 1.2em; flex: none; }

/* Page column: phone-width card centred on larger screens. */
.pvi {
	position: relative;
	max-width: 620px;
	margin: 0 auto;
	background: var(--pv-surface);
	min-height: 100vh;
	box-shadow: 0 0 0 1px var(--pv-line), 0 30px 80px -30px color-mix(in srgb, var(--pv-primary) 45%, transparent);
	overflow: hidden;
	padding-bottom: 84px;
}
@media (min-width: 700px) {
	.pvi { margin: 32px auto; min-height: auto; border-radius: 28px; }
}

/* ------------------------------------------------------------------ hero */
.pvi-hero {
	position: relative;
	min-height: min(100svh, 860px);
	display: grid;
	place-items: center;
	text-align: center;
	padding: 110px 28px 110px;
	background:
		radial-gradient(120% 70% at 50% 0%, color-mix(in srgb, var(--pv-primary) 14%, transparent), transparent 70%),
		var(--pvi-hero-bg, none) center / cover no-repeat;
	isolation: isolate;
}
@media (min-width: 700px) { .pvi-hero { min-height: 820px; } }
.pvi-hero[style*="--pvi-hero-bg"]::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, color-mix(in srgb, var(--pv-surface) 55%, transparent), color-mix(in srgb, var(--pv-surface) 88%, transparent));
	z-index: -1;
}
.pvi-hero__frame {
	position: absolute;
	inset: 18px;
	border: 1px solid var(--pv-line);
	border-radius: 18px;
	pointer-events: none;
}
.pvi-hero__frame::after {
	content: "";
	position: absolute;
	inset: 6px;
	border: 1px solid color-mix(in srgb, var(--pv-accent) 18%, transparent);
	border-radius: 14px;
}
.pvi-hero__inner { position: relative; z-index: 1; max-width: 460px; }
.pvi-hero__opening {
	margin: 0 0 18px;
	font-size: 14px;
	letter-spacing: .02em;
	color: var(--pv-muted);
}
.pvi-hero__guest {
	display: inline-block;
	margin: 0 0 22px;
	padding: 6px 18px;
	border-radius: 999px;
	background: var(--pv-tint);
	font-size: 14px;
}
.pvi-hero__guest strong { color: var(--pv-primary); }

.pvi-ornament {
	position: absolute;
	left: 50%;
	width: 220px;
	height: 70px;
	transform: translateX(-50%);
	background: var(--pvi-flourish) center / contain no-repeat;
	pointer-events: none;
}
.pvi-ornament--top { top: 34px; }
.pvi-ornament--bottom { bottom: 34px; transform: translateX(-50%) scaleY(-1); }
.pvi-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		var(--pvi-corner) top 18px right 18px / 130px no-repeat,
		var(--pvi-corner) bottom 18px left 18px / 130px no-repeat;
	pointer-events: none;
	z-index: 0;
}
.pvi-hero::after { transform: none; }

.pvi-names {
	margin: 0;
	font-family: var(--pv-font-display);
	font-weight: 700;
	font-size: clamp(44px, 13vw, 76px);
	line-height: 1.5;
	color: var(--pv-primary);
	display: flex;
	flex-direction: column;
	align-items: center;
}
.pvi-names__and {
	font-size: .45em;
	line-height: 1;
	color: var(--pv-accent);
	margin: -.1em 0;
}
.pvi-latin {
	margin: 10px 0 0;
	font-family: 'PV Script', cursive;
	font-size: 30px;
	line-height: 1.2;
	color: var(--pv-accent);
}
.pvi-date {
	margin: 28px auto 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
	align-items: center;
	padding: 16px 26px;
	border-top: 1px solid var(--pv-line);
	border-bottom: 1px solid var(--pv-line);
}
.pvi-date__line { font-size: 19px; font-weight: 700; }
.pvi-date__time, .pvi-date__venue { display: inline-flex; align-items: center; gap: 6px; color: var(--pv-muted); font-size: 15px; }
.pvi-poem {
	margin: 30px auto 0;
	padding: 0;
	font-family: 'PV Nastaliq', var(--pv-font-display);
	font-size: 19px;
	line-height: 2.5;
	color: var(--pv-text);
}
.pvi-poem span { display: block; }
.pvi-poem cite { display: block; margin-top: 4px; font-family: var(--pv-font-body); font-style: normal; font-size: 13px; color: var(--pv-muted); }
.pvi-scroll {
	position: absolute;
	bottom: 70px;
	left: 50%;
	transform: translateX(-50%);
	width: 42px;
	height: 42px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	border: 1px solid var(--pv-line);
	color: var(--pv-primary);
	animation: pvi-bob 2.4s ease-in-out infinite;
	z-index: 2;
}
@keyframes pvi-bob { 50% { transform: translate(-50%, 8px); } }

/* ------------------------------------------------------------------ sections */
.pvi-section { position: relative; padding: 64px 26px; text-align: center; }
.pvi-section + .pvi-section { border-top: 1px dashed var(--pv-line); }
.pvi-section--card { background: var(--pv-tint); }
.pvi-head { margin-bottom: 30px; }
.pvi-eyebrow {
	display: block;
	margin-bottom: 4px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .04em;
	color: var(--pv-accent);
}
.pvi-title {
	margin: 0;
	font-family: var(--pv-font-display);
	font-size: clamp(30px, 8vw, 40px);
	font-weight: 700;
	line-height: 1.6;
	color: var(--pv-primary);
}
.pvi-flourish {
	display: block;
	width: 140px;
	height: 26px;
	margin: 6px auto 0;
	background: var(--pvi-flourish) center / contain no-repeat;
}
.pvi-lead { max-width: 460px; margin: -10px auto 24px; color: var(--pv-muted); }
.pvi-center { text-align: center; }
.pvi-empty { color: var(--pv-muted); font-size: 15px; }

.pv-reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s ease, transform .9s ease; }
.pv-reveal.is-visible { opacity: 1; transform: none; }

/* Intro */
.pvi-portrait {
	margin: 0 auto 30px;
	width: min(320px, 82%);
	aspect-ratio: 4 / 5;
	border-radius: 999px 999px 24px 24px;
	overflow: hidden;
	border: 6px solid var(--pv-surface);
	box-shadow: 0 0 0 1px var(--pv-line), 0 24px 50px -20px color-mix(in srgb, var(--pv-primary) 55%, transparent);
}
.pvi-portrait img { width: 100%; height: 100%; object-fit: cover; }
.pvi-intro__text { max-width: 470px; margin: 0 auto; font-size: 17px; line-height: 2.2; }
.pvi-families { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 30px 0 0; }
.pvi-family { padding: 16px; border-radius: 16px; background: var(--pv-tint); }
.pvi-family strong { display: block; font-family: var(--pv-font-display); font-size: 24px; color: var(--pv-primary); line-height: 1.6; }
.pvi-family span { font-size: 14px; color: var(--pv-muted); }
.pvi-hosts { margin: 22px 0 0; font-size: 15px; color: var(--pv-muted); }

/* Countdown */
.pvi-countdown__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 440px; margin: 10px auto 0; direction: rtl; }
.pvi-countdown__grid div {
	padding: 16px 4px 10px;
	border-radius: 18px;
	background: var(--pv-primary);
	color: var(--pv-surface);
	box-shadow: 0 14px 28px -16px var(--pv-primary);
}
.pvi-countdown__grid span { display: block; font-size: clamp(26px, 8vw, 38px); font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pvi-countdown__grid small { font-size: 13px; opacity: .85; }
.pvi-countdown__date { margin: 18px 0 0; color: var(--pv-muted); }
.pvi-countdown__done { max-width: 420px; margin: 8px auto 0; }

/* Couple */
.pvi-couple { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 12px; }
.pvi-person__photo {
	width: 100%;
	aspect-ratio: 3 / 4;
	border-radius: 999px 999px 20px 20px;
	overflow: hidden;
	background: var(--pv-tint);
	display: grid;
	place-items: center;
	box-shadow: 0 0 0 1px var(--pv-line);
}
.pvi-person__photo img { width: 100%; height: 100%; object-fit: cover; }
.pvi-person__initial { font-family: var(--pv-font-display); font-size: 64px; color: var(--pv-primary); }
.pvi-person__role { display: block; margin-top: 14px; font-size: 13px; color: var(--pv-accent); }
.pvi-person__name { margin: 0; font-family: var(--pv-font-display); font-size: 30px; color: var(--pv-primary); line-height: 1.6; }
.pvi-person p { margin: 4px 0 0; font-size: 14px; color: var(--pv-muted); }
.pvi-couple__heart { align-self: center; margin-top: -30%; color: var(--pv-accent); font-size: 28px; animation: pvi-beat 1.6s ease-in-out infinite; }
@keyframes pvi-beat { 10%, 30% { transform: scale(1.18); } 20% { transform: scale(1); } }

/* Story */
.pvi-timeline { list-style: none; margin: 0; padding: 0; position: relative; text-align: start; }
.pvi-timeline::before { content: ""; position: absolute; top: 0; bottom: 0; right: 17px; width: 2px; background: linear-gradient(var(--pv-line), transparent); }
.pvi-moment { position: relative; padding-right: 54px; margin-bottom: 26px; }
.pvi-moment__dot {
	position: absolute; right: 0; top: 4px;
	width: 36px; height: 36px; border-radius: 50%;
	display: grid; place-items: center;
	background: var(--pv-surface); color: var(--pv-accent);
	box-shadow: 0 0 0 1px var(--pv-line);
}
.pvi-moment__card { padding: 18px; border-radius: 18px; background: var(--pv-tint); }
.pvi-moment__card img { border-radius: 12px; margin-bottom: 12px; aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.pvi-moment__when { font-size: 13px; color: var(--pv-accent); font-weight: 600; }
.pvi-moment h3 { margin: 2px 0 4px; font-size: 18px; color: var(--pv-primary); }
.pvi-moment p { margin: 0; font-size: 15px; color: var(--pv-muted); }

/* Events */
.pvi-events { display: grid; gap: 22px; text-align: start; }
.pvi-event {
	display: grid;
	grid-template-columns: 74px 1fr;
	gap: 18px;
	padding: 22px;
	border-radius: var(--pvi-radius);
	background: var(--pv-surface);
	box-shadow: 0 0 0 1px var(--pv-line), 0 20px 40px -28px color-mix(in srgb, var(--pv-primary) 50%, transparent);
}
.pvi-event__date {
	align-self: start;
	display: grid;
	place-items: center;
	padding: 10px 4px;
	border-radius: 16px;
	background: var(--pv-primary);
	color: var(--pv-surface);
	text-align: center;
	line-height: 1.2;
}
.pvi-event__day { font-size: 30px; font-weight: 800; }
.pvi-event__month { font-size: 13px; }
.pvi-event__title { margin: 0 0 6px; font-family: var(--pv-font-display); font-size: 26px; color: var(--pv-primary); line-height: 1.6; }
.pvi-event__facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: 15px; }
.pvi-event__facts li { display: flex; align-items: center; gap: 8px; }
.pvi-event__facts .pv-icon { color: var(--pv-accent); }
.pvi-event__address { margin: 8px 0 0; font-size: 14px; color: var(--pv-muted); }
.pvi-event__note { margin: 8px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--pv-tint); font-size: 14px; }
.pvi-map {
	margin: 14px 0 0;
	aspect-ratio: 16 / 9;
	border-radius: 14px;
	overflow: hidden;
	background: var(--pv-tint) var(--pvi-pattern);
	display: grid;
	place-items: center;
}
.pvi-map iframe { width: 100%; height: 100%; border: 0; }
.pvi-map__load { display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; border: 0; border-radius: 999px; background: var(--pv-surface); box-shadow: 0 0 0 1px var(--pv-line); }
@media (max-width: 420px) {
	.pvi-event { grid-template-columns: 1fr; }
	.pvi-event__date { justify-self: start; grid-auto-flow: column; gap: 8px; padding: 8px 14px; }
	.pvi-event__day { font-size: 22px; }
}

.pvi-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.pvi-chips--soft { margin-top: 8px; }
.pvi-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 14px;
	border-radius: 999px;
	border: 1px solid var(--pv-line);
	background: var(--pv-surface);
	font-size: 14px;
	text-decoration: none;
	transition: background .2s, color .2s, border-color .2s;
}
.pvi-chip:hover { border-color: var(--pv-primary); color: var(--pv-primary); }
.pvi-chip--solid { background: var(--pv-primary); border-color: var(--pv-primary); color: var(--pv-surface); }
.pvi-chip--solid:hover { color: var(--pv-surface); filter: brightness(1.08); }
.pvi-chip--soft { background: var(--pv-tint); border-color: transparent; }

/* Schedule */
.pvi-schedule { list-style: none; margin: 0 auto; padding: 0; max-width: 440px; text-align: start; }
.pvi-schedule li { display: grid; grid-template-columns: 70px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--pv-line); }
.pvi-schedule time { font-weight: 800; color: var(--pv-primary); font-size: 18px; }
.pvi-schedule strong { display: block; }
.pvi-schedule span { font-size: 14px; color: var(--pv-muted); }

/* Gallery */
.pvi-video { margin-bottom: 18px; border-radius: 18px; overflow: hidden; aspect-ratio: 16 / 9; background: #000; }
.pvi-video iframe, .pvi-video video { width: 100%; height: 100%; border: 0; display: block; }
.pvi-gallery { columns: 2; column-gap: 10px; }
.pvi-gallery__item { display: block; margin-bottom: 10px; border-radius: 14px; overflow: hidden; break-inside: avoid; }
.pvi-gallery__item img { transition: transform .5s ease; }
.pvi-gallery__item:hover img { transform: scale(1.04); }

/* Notes */
.pvi-notes { display: grid; gap: 12px; text-align: start; }
.pvi-note { display: flex; gap: 14px; padding: 16px; border-radius: 16px; background: var(--pv-tint); text-decoration: none; }
.pvi-note .pv-icon { color: var(--pv-accent); font-size: 22px; margin-top: 4px; }
.pvi-note strong { display: block; color: var(--pv-primary); }
.pvi-note p { margin: 0; font-size: 15px; }
.pvi-note--link { box-shadow: 0 0 0 1px var(--pv-primary); }

/* ------------------------------------------------------------------ forms */
.pvi-form { display: grid; gap: 16px; max-width: 480px; margin: 0 auto; text-align: start; }
.pvi-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 460px) { .pvi-row { grid-template-columns: 1fr; } }
.pvi-field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.pvi-field small { font-weight: 400; color: var(--pv-muted); }
.pvi-field input, .pvi-field textarea, .pvi-stepper input {
	width: 100%;
	padding: 12px 14px;
	border-radius: 14px;
	border: 1px solid var(--pv-line);
	background: var(--pv-surface);
	color: var(--pv-text);
	font: inherit;
	font-weight: 400;
}
.pvi-field input:focus, .pvi-field textarea:focus { outline: none; border-color: var(--pv-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pv-primary) 18%, transparent); }
.pvi-choices { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; }
.pvi-choices legend { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.pvi-choice { position: relative; display: block; }
.pvi-choice input { position: absolute; opacity: 0; }
.pvi-choice span {
	display: block;
	padding: 12px 16px;
	border-radius: 14px;
	border: 1px solid var(--pv-line);
	background: var(--pv-surface);
	transition: all .2s;
}
.pvi-choice span::before { content: "○"; margin-left: 10px; color: var(--pv-accent); }
.pvi-choice input:checked + span { border-color: var(--pv-primary); background: var(--pv-primary); color: var(--pv-surface); }
.pvi-choice input:checked + span::before { content: "●"; color: inherit; }
.pvi-choice input:focus-visible + span { outline: 2px solid var(--pv-accent); outline-offset: 2px; }
.pvi-stepper { display: grid; grid-template-columns: 48px 1fr 48px; gap: 8px; }
.pvi-stepper button { border: 1px solid var(--pv-line); border-radius: 14px; background: var(--pv-surface); font-size: 22px; }
.pvi-stepper input { text-align: center; }
.pvi-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.pvi-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 14px 26px;
	border: 0;
	border-radius: 999px;
	background: var(--pv-primary);
	color: var(--pv-surface) !important;
	font-weight: 700;
	text-decoration: none;
	box-shadow: 0 16px 30px -16px var(--pv-primary);
	transition: transform .15s, filter .2s;
}
.pvi-btn:hover { filter: brightness(1.08); }
.pvi-btn:active { transform: scale(.98); }
.pvi-btn[disabled] { opacity: .6; cursor: progress; }
.pvi-btn--ghost { background: transparent; color: var(--pv-primary) !important; box-shadow: inset 0 0 0 1px var(--pv-primary); }
.pvi-status { margin: 0; min-height: 1.5em; font-size: 15px; text-align: center; }
.pvi-status.is-success { color: #15803d; font-weight: 600; }
.pvi-status.is-error { color: #b91c1c; }
.pvi-deadline { display: inline-flex; gap: 6px; align-items: center; margin: -8px 0 22px; font-size: 14px; color: var(--pv-accent); }
.pvi-closed { padding: 14px; border-radius: 14px; background: var(--pv-surface); }
.pvi-form.is-done [type="submit"] { display: none; }

.pvi-upload { position: relative; display: block; cursor: pointer; }
.pvi-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.pvi-upload__box {
	display: flex; align-items: center; justify-content: center; gap: 8px;
	padding: 18px; border-radius: 14px; border: 1.5px dashed var(--pv-line);
	color: var(--pv-muted); font-size: 14px;
}
.pvi-upload__preview { margin-top: 10px; max-height: 220px; width: auto; border-radius: 12px; }

/* Wishes */
.pvi-wishes { columns: 2 220px; column-gap: 14px; margin-top: 34px; text-align: start; }
.pvi-wish {
	break-inside: avoid;
	margin: 0 0 14px;
	padding: 16px;
	border-radius: 18px;
	background: var(--pv-surface);
	box-shadow: 0 0 0 1px var(--pv-line);
	transition: opacity .3s, transform .3s;
}
.pvi-wish.is-removed { opacity: 0; transform: scale(.96); }
.pvi-wish__photo { display: block; margin: -16px -16px 12px; border-radius: 18px 18px 0 0; overflow: hidden; }
.pvi-wish > img { border-radius: 12px; margin-bottom: 10px; }
.pvi-wish__text { margin: 0; font-size: 15px; line-height: 2; white-space: normal; }
.pvi-wish__meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; font-size: 13px; color: var(--pv-muted); }
.pvi-wish__meta strong { color: var(--pv-primary); }
.pvi-like { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border: 0; border-radius: 999px; background: var(--pv-tint); font-size: 13px; }
.pvi-like.is-liked { color: #e11d48; }
.pvi-like.is-liked .pv-icon { fill: currentColor; }

/* Gifts */
.pvi-gifts { display: grid; gap: 14px; }
.pvi-bank {
	display: grid;
	gap: 6px;
	padding: 22px;
	border-radius: 20px;
	text-align: start;
	color: var(--pv-surface);
	background: linear-gradient(135deg, var(--pv-primary), color-mix(in srgb, var(--pv-primary) 55%, var(--pv-accent)));
	box-shadow: 0 20px 40px -24px var(--pv-primary);
}
.pvi-bank__name { font-weight: 700; opacity: .9; }
.pvi-bank__number, .pvi-bank__sheba {
	display: inline-flex; align-items: center; justify-content: space-between; gap: 10px;
	padding: 8px 12px; border: 0; border-radius: 12px;
	background: rgba(255, 255, 255, .14); color: inherit;
	font-size: 20px; letter-spacing: .08em; font-variant-numeric: tabular-nums; text-align: left;
}
.pvi-bank__sheba { font-size: 13px; letter-spacing: .02em; }
.pvi-bank__owner { font-size: 14px; opacity: .85; }

/* Share */
.pvi-share { display: grid; gap: 22px; justify-items: center; }
.pvi-share__buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pvi-qr { margin: 0; display: grid; gap: 10px; justify-items: center; }
.pvi-qr__code canvas { width: 180px; height: 180px; border-radius: 16px; box-shadow: 0 0 0 1px var(--pv-line); }
.pvi-qr figcaption { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--pv-muted); }

/* Footer */
.pvi-footer { position: relative; padding: 90px 26px 40px; text-align: center; background: var(--pv-tint); }
.pvi-footer .pvi-ornament--top { top: 20px; }
.pvi-footer__closing { margin: 0; color: var(--pv-muted); }
.pvi-footer__names { margin: 6px 0 0; font-family: var(--pv-font-display); font-size: 34px; color: var(--pv-primary); line-height: 1.6; }
.pvi-footer__date { margin: 0; font-size: 14px; color: var(--pv-accent); }
.pvi-credit { margin: 30px 0 0; font-size: 12px; opacity: .7; }
.pvi-credit a { text-decoration: none; }

/* Dock */
.pvi-dock {
	position: fixed;
	bottom: max(12px, env(safe-area-inset-bottom));
	left: 50%;
	transform: translateX(-50%);
	z-index: 40;
	display: flex;
	gap: 2px;
	padding: 6px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--pv-surface) 88%, transparent);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	box-shadow: 0 0 0 1px var(--pv-line), 0 18px 40px -18px rgba(0, 0, 0, .35);
}
.pvi-dock a {
	display: grid;
	justify-items: center;
	gap: 0;
	min-width: 56px;
	padding: 6px 10px 4px;
	border-radius: 999px;
	font-size: 11px;
	line-height: 1.6;
	text-decoration: none;
	color: var(--pv-muted);
}
.pvi-dock a.is-active { background: var(--pv-primary); color: var(--pv-surface); }
.pvi-has-envelope .pvi-dock { animation: pvi-fade-in .6s 2.2s both; }

/* Music */
.pvi-music {
	position: fixed;
	top: max(16px, env(safe-area-inset-top));
	left: 16px;
	z-index: 41;
	width: 46px; height: 46px;
	display: grid; place-items: center;
	border: 0; border-radius: 50%;
	background: var(--pv-primary); color: var(--pv-surface);
	box-shadow: 0 10px 24px -10px var(--pv-primary);
}
@media (min-width: 700px) { .pvi-music { left: calc(50% - 300px); top: 48px; } }
.pvi-music__on { display: none; }
.pvi-music.is-playing .pvi-music__on { display: grid; animation: pvi-spin 6s linear infinite; }
.pvi-music.is-playing .pvi-music__off { display: none; }
@keyframes pvi-spin { to { transform: rotate(360deg); } }

/* Lightbox & toast */
.pvi-lightbox { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, .86); }
.pvi-lightbox[hidden] { display: none; }
.pvi-lightbox img { max-height: 88vh; width: auto; border-radius: 12px; }
.pvi-lightbox__close { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .15); color: #fff !important; display: grid; place-items: center; }
.pvi-toast {
	position: fixed; bottom: 96px; left: 50%; z-index: 70;
	transform: translate(-50%, 20px);
	padding: 10px 20px; border-radius: 999px;
	background: var(--pv-text); color: var(--pv-surface);
	font-size: 14px; opacity: 0; pointer-events: none;
	transition: opacity .25s, transform .25s;
}
.pvi-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* Particles */
.pvi-effects { position: fixed; inset: 0; z-index: 30; pointer-events: none; overflow: hidden; }
.pvi-particle {
	position: absolute;
	top: -40px;
	opacity: 0;
	animation: pvi-fall linear infinite;
	will-change: transform;
}
.pvi-particle.is-burst { animation-iteration-count: 1; }
.pvi-particle--confetti { color: hsl(var(--hue) 80% 60%); }
.pvi-particle--hearts { color: color-mix(in srgb, var(--pv-primary) 70%, #e11d48); }
.pvi-particle--stars { color: var(--pv-accent); }
.pvi-particle--snow { color: #fff; text-shadow: 0 0 6px rgba(0, 0, 0, .15); }
@keyframes pvi-fall {
	0% { opacity: 0; transform: translate3d(0, 0, 0) rotate(0); }
	10% { opacity: .9; }
	90% { opacity: .8; }
	100% { opacity: 0; transform: translate3d(var(--drift), 110vh, 0) rotate(540deg); }
}
@keyframes pvi-fade-in { from { opacity: 0; } to { opacity: 1; } }

/* Locked (password) */
.pvi-locked { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.pvi-card { max-width: 420px; padding: 34px; border-radius: 24px; background: var(--pv-surface); text-align: center; box-shadow: 0 0 0 1px var(--pv-line); }
.pvi-locked__icon { font-size: 40px; color: var(--pv-accent); }
.pvi-card input[type="password"] { width: 100%; padding: 12px; border-radius: 12px; border: 1px solid var(--pv-line); margin: 8px 0; }
.pvi-card input[type="submit"] { padding: 12px 26px; border: 0; border-radius: 999px; background: var(--pv-primary); color: var(--pv-surface); font: inherit; }

/* ==========================================================================
   Envelope
   ========================================================================== */
.pve {
	--env: var(--pv-envelope, var(--pv-primary));
	position: fixed;
	inset: 0;
	z-index: 100;
	display: grid;
	place-items: center;
	padding: 24px;
	background-color: var(--pv-bg);
	background-image: var(--pvi-pattern), radial-gradient(90% 60% at 50% 40%, color-mix(in srgb, var(--env) 18%, var(--pv-bg)), var(--pv-bg));
	overflow-y: auto;
	transition: opacity .7s ease, visibility .7s;
}
.pve.is-open { opacity: 0; visibility: hidden; }
.pve__stage { display: grid; justify-items: center; gap: 30px; width: 100%; max-width: 420px; perspective: 1400px; }
.pve__envelope {
	position: relative;
	width: min(340px, 84vw);
	aspect-ratio: 1.45;
	filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .22));
	animation: pve-float 4s ease-in-out infinite;
}
@keyframes pve-float { 50% { transform: translateY(-8px) rotate(-.6deg); } }
.pve__back, .pve__front, .pve__flap { position: absolute; inset: 0; border-radius: 10px; }
.pve__back { background: color-mix(in srgb, var(--env) 82%, #000); }
.pve__front {
	z-index: 3;
	background:
		linear-gradient(to top right, color-mix(in srgb, var(--env) 92%, #fff) 49.6%, transparent 50%) left bottom / 50.4% 100% no-repeat,
		linear-gradient(to top left, color-mix(in srgb, var(--env) 92%, #fff) 49.6%, transparent 50%) right bottom / 50.4% 100% no-repeat,
		linear-gradient(to top, var(--env) 50%, transparent 50%) bottom / 100% 100% no-repeat;
	clip-path: polygon(0 0, 50% 52%, 100% 0, 100% 100%, 0 100%);
	border-radius: 10px;
}
.pve__flap {
	z-index: 4;
	transform-origin: top center;
	background: linear-gradient(to bottom, color-mix(in srgb, var(--env) 75%, #fff), var(--env));
	clip-path: polygon(0 0, 100% 0, 50% 58%);
	transition: transform .9s cubic-bezier(.6, 0, .3, 1), z-index 0s .45s;
	backface-visibility: hidden;
}
.pve__letter {
	position: absolute;
	z-index: 2;
	left: 7%;
	right: 7%;
	top: 8%;
	height: 84%;
	border-radius: 8px;
	background: var(--pv-surface) var(--pvi-pattern);
	display: grid;
	place-items: center;
	text-align: center;
	box-shadow: 0 0 0 1px var(--pv-line);
	transition: transform 1s cubic-bezier(.3, .8, .3, 1) .55s;
}
.pve__letter-names { font-family: var(--pv-font-display); font-size: 26px; color: var(--pv-primary); line-height: 1.6; padding: 0 10px; }
.pve__letter-names small { color: var(--pv-accent); font-size: .6em; }
.pve__seal {
	position: absolute;
	z-index: 5;
	left: 50%;
	top: 50%;
	width: 74px;
	height: 74px;
	margin: -37px 0 0 -37px;
	border: 0;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background:
		radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .35), transparent 45%),
		radial-gradient(circle, color-mix(in srgb, var(--pv-accent) 88%, #7f1d1d) 58%, color-mix(in srgb, var(--pv-accent) 70%, #000) 100%);
	box-shadow: 0 6px 14px rgba(0, 0, 0, .3), inset 0 -3px 6px rgba(0, 0, 0, .25), inset 0 0 0 5px rgba(255, 255, 255, .12);
	color: #fff !important;
	font-family: 'PV Script', var(--pv-font-display);
	font-size: 20px;
	line-height: 1;
	transition: transform .5s ease, opacity .4s ease;
	animation: pve-pulse 2.4s ease-in-out infinite;
}
.pve__seal span { max-width: 58px; overflow: hidden; white-space: nowrap; text-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
@keyframes pve-pulse { 50% { box-shadow: 0 6px 14px rgba(0, 0, 0, .3), 0 0 0 10px color-mix(in srgb, var(--pv-accent) 22%, transparent), inset 0 -3px 6px rgba(0, 0, 0, .25); } }
.pve__caption { max-width: 100%; text-align: center; overflow-wrap: anywhere; }
.pve__to { margin: 0; color: var(--pv-muted); font-size: 15px; }
.pve__guest { margin: 2px 0 0; font-family: var(--pv-font-display); font-size: 26px; color: var(--pv-primary); line-height: 1.6; }
.pve__hint {
	margin-top: 14px;
	padding: 10px 22px;
	border: 1px solid var(--pv-line);
	border-radius: 999px;
	background: var(--pv-surface);
	font-size: 14px;
	animation: pvi-fade-in 1s .8s both;
}
.pve.is-opening .pve__envelope { animation: none; }
.pve.is-opening .pve__seal { transform: scale(.4) rotate(-20deg); opacity: 0; animation: none; }
.pve.is-opening .pve__flap { transform: rotateX(180deg); z-index: 1; }
.pve.is-opening .pve__letter { transform: translateY(-62%); z-index: 6; }
@media (prefers-reduced-motion: reduce) {
	.pve__envelope, .pve__seal, .pvi-scroll, .pvi-couple__heart { animation: none; }
	.pv-reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   Skins: ornaments and personality. Palette comes from the invitation settings.
   ========================================================================== */
.pv-skin-classic {
	--pvi-pattern: url("../images/ornaments/classic-pattern.svg");
	--pvi-corner: url("../images/ornaments/classic-corner.svg");
	--pvi-flourish: url("../images/ornaments/classic-flourish.svg");
}
.pv-skin-classic .pvi-hero__frame { border-width: 2px; border-color: var(--pv-accent); border-radius: 160px 160px 18px 18px; }
.pv-skin-classic .pvi-hero__frame::after { border-radius: 150px 150px 14px 14px; }

.pv-skin-minimal {
	--pvi-flourish: url("../images/ornaments/minimal-flourish.svg");
	--pvi-radius: 6px;
}
.pv-skin-minimal .pvi-names { font-weight: 300; letter-spacing: -.01em; }
.pv-skin-minimal .pvi-hero { background: var(--pvi-hero-bg, none) center / cover no-repeat, var(--pv-surface); }
.pv-skin-minimal .pvi-hero__frame { border-radius: 0; }
.pv-skin-minimal .pvi-hero__frame::after { display: none; }
.pv-skin-minimal .pvi-countdown__grid div { border-radius: 4px; box-shadow: none; }
.pv-skin-minimal .pvi-btn, .pv-skin-minimal .pvi-chip, .pv-skin-minimal .pvi-dock, .pv-skin-minimal .pvi-dock a { border-radius: 4px; }
.pv-skin-minimal .pvi-portrait, .pv-skin-minimal .pvi-person__photo { border-radius: 4px; }

.pv-skin-garden {
	--pvi-pattern: url("../images/ornaments/garden-pattern.svg");
	--pvi-corner: url("../images/ornaments/garden-corner.svg");
	--pvi-flourish: url("../images/ornaments/garden-flourish.svg");
	--pvi-radius: 28px;
}
.pv-skin-garden .pvi-hero::after { background-size: 190px; }

.pv-skin-royal {
	--pvi-pattern: url("../images/ornaments/royal-pattern.svg");
	--pvi-corner: url("../images/ornaments/royal-corner.svg");
	--pvi-flourish: url("../images/ornaments/royal-flourish.svg");
}
.pv-skin-royal .pvi-hero {
	background: var(--pvi-hero-bg, none) center / cover no-repeat, radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--pv-primary) 92%, #fff), var(--pv-primary));
	color: #f8f1df;
}
.pv-skin-royal .pvi-hero .pvi-names, .pv-skin-royal .pvi-hero .pvi-poem { color: var(--pv-accent); }
.pv-skin-royal .pvi-hero .pvi-hero__opening, .pv-skin-royal .pvi-hero .pvi-date__time, .pv-skin-royal .pvi-hero .pvi-date__venue, .pv-skin-royal .pvi-hero .pvi-poem cite { color: color-mix(in srgb, #f8f1df 75%, transparent); }
.pv-skin-royal .pvi-hero__frame { border-color: var(--pv-accent); border-width: 2px; }
.pv-skin-royal .pvi-scroll { color: var(--pv-accent); border-color: var(--pv-accent); }

.pv-skin-boho {
	--pvi-pattern: url("../images/ornaments/boho-pattern.svg");
	--pvi-corner: url("../images/ornaments/boho-corner.svg");
	--pvi-flourish: url("../images/ornaments/boho-flourish.svg");
	--pvi-radius: 8px;
}
.pv-skin-boho .pvi-hero__frame { border-style: dashed; border-radius: 6px; }
.pv-skin-boho .pvi-portrait { border-radius: 200px 200px 8px 8px; }

.pv-skin-night {
	--pvi-pattern: url("../images/ornaments/night-pattern.svg");
	--pvi-corner: url("../images/ornaments/night-corner.svg");
	--pvi-flourish: url("../images/ornaments/night-flourish.svg");
	--pv-line: color-mix(in srgb, var(--pv-primary) 30%, transparent);
	color-scheme: dark;
}
.pv-skin-night .pvi { box-shadow: 0 0 0 1px var(--pv-line), 0 30px 90px -20px #000; }
.pv-skin-night .pvi-countdown__grid div, .pv-skin-night .pvi-event__date { color: var(--pv-bg); }
.pv-skin-night .pvi-btn { color: var(--pv-bg) !important; }
.pv-skin-night .pvi-chip--solid { color: var(--pv-bg); }
.pv-skin-night .pvi-choice input:checked + span { color: var(--pv-bg); }
.pv-skin-night .pvi-bank { color: var(--pv-bg); }
.pv-skin-night .pvi-music, .pv-skin-night .pvi-dock a.is-active { color: var(--pv-bg); }

/* ==========================================================================
   Couple panel (?manage=)
   ========================================================================== */
.pvm-body { background: var(--pv-bg); }
.pvm { max-width: 1040px; margin: 0 auto; padding: 28px 18px 80px; }
.pvm-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.pvm-head h1 { margin: 0; font-family: var(--pv-font-display); font-size: 36px; color: var(--pv-primary); line-height: 1.5; }
.pvm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 22px; }
.pvm-stats div { padding: 16px; border-radius: 18px; background: var(--pv-surface); box-shadow: 0 0 0 1px var(--pv-line); }
.pvm-stats strong { display: block; font-size: 28px; color: var(--pv-primary); line-height: 1.3; }
.pvm-stats span { font-size: 13px; color: var(--pv-muted); }
.pvm-card { margin-bottom: 22px; padding: 22px; border-radius: 22px; background: var(--pv-surface); box-shadow: 0 0 0 1px var(--pv-line); }
.pvm-card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.pvm-card__head h2 { margin: 0; font-size: 20px; }
.pvm-table-wrap { overflow-x: auto; }
.pvm-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pvm-table th, .pvm-table td { padding: 10px; border-bottom: 1px solid var(--pv-line); text-align: start; vertical-align: top; }
.pvm-table th { font-size: 13px; color: var(--pv-muted); font-weight: 600; }
.pvm-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--pv-tint); font-size: 12px; white-space: nowrap; }
.pvm-pill--ok, .is-yes .pvm-pill { background: #dcfce7; color: #166534; }
.is-no .pvm-pill { background: #fee2e2; color: #991b1b; }
.is-maybe .pvm-pill { background: #fef9c3; color: #854d0e; }
.pvm-wishes { margin-top: 0; columns: 3 240px; }
.pvm-actions { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.pvm-guests { list-style: none; margin: 0; padding: 0; }
.pvm-guests li { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--pv-line); }
.pvm-guests__actions { display: flex; gap: 6px; }
