/*
 * Default template: homepage sections below the hero.
 * Mobile first; wider layouts only kick in from 768px.
 */

.mw-section {
	position: relative;
	padding: 72px 20px;
	text-align: center;
	color: var(--mw-text);
	/* Skip layout/paint of sections until they are near the screen (big win on long pages on phones). */
	content-visibility: auto;
	contain-intrinsic-size: auto 900px;
}

.mw-section:nth-of-type(even) {
	background: var(--mw-paper-alt);
}

.mw-section > * {
	max-width: 560px;
	margin-left: auto;
	margin-right: auto;
}

/* ------------------------------------------------------------------ */
/* Shared: headings and buttons                                       */
/* ------------------------------------------------------------------ */

.mw-heading {
	margin-bottom: 32px;
}

.mw-heading__sprig {
	width: 26px;
	margin: 0 auto 10px;
}

.mw-heading__kicker {
	font-size: 16px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--mw-muted);
}

.mw-heading__title {
	margin: 4px 0 0;
	font-family: var(--mw-font-script);
	font-weight: 400;
	font-size: clamp(50px, 14vw, 72px);
	line-height: 1.1;
	color: var(--mw-ink);
}

.mw-buttons {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 10px;
	margin-top: 28px;
}

.mw-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	padding: 12px 24px;
	border: 1px solid var(--mw-accent);
	border-radius: 999px;
	font-size: 17px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--mw-ink);
	background: transparent;
	transition: background-color 0.2s, color 0.2s;
	-webkit-tap-highlight-color: transparent;
	font-weight: 600;
}

.mw-button--solid {
	border-color: var(--mw-ink);
	background: var(--mw-ink);
	color: #fff;
}

.mw-button--link {
	border-color: transparent;
	min-height: 44px;
	text-decoration: underline;
	text-underline-offset: 4px;
}

.mw-button:active {
	background: var(--mw-line);
}

.mw-button--solid:active {
	background: var(--mw-accent);
}

@media (min-width: 768px) {
	.mw-section {
		padding: 104px 32px;
	}

	.mw-buttons {
		flex-direction: row;
		justify-content: center;
		flex-wrap: wrap;
	}

	.mw-button:hover {
		background: var(--mw-line);
	}

	.mw-button--solid:hover {
		background: var(--mw-accent);
	}
}

/* ------------------------------------------------------------------ */
/* Countdown: deep sage band, photo under a green veil, gold-ruled panel */
/* ------------------------------------------------------------------ */

.mw-countdown {
	--mw-cd-text: #f5f2e9;
	--mw-cd-gold: #d8c9a1;
	--mw-cd-rule: rgba(216, 201, 161, 0.55);
	overflow: hidden;
	padding: 56px 16px;
	background: #34472f; /* Also the look while the photo loads. */
	color: var(--mw-cd-text);
}

.mw-section.mw-countdown {
	background: #34472f;
}

.mw-countdown__bg {
	position: absolute;
	inset: 0;
	max-width: none;
	margin: 0;
}

.mw-countdown__bg picture,
.mw-countdown__bg img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* The green veil: deep and even, so the photo is only a hint behind the gold. */
.mw-countdown__bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		radial-gradient(ellipse 70% 55% at 50% 45%, rgba(38, 54, 34, 0.72), rgba(28, 41, 25, 0.9)),
		linear-gradient(180deg, rgba(28, 41, 25, 0.35), rgba(28, 41, 25, 0.55));
}

/* Framed like a foil-printed card: fine double gold rule. */
.mw-countdown__panel {
	position: relative;
	max-width: 640px;
	padding: 44px 16px 40px;
	border: 1px solid var(--mw-cd-rule);
}

.mw-countdown__panel::after {
	content: "";
	position: absolute;
	inset: 6px;
	border: 1px solid rgba(216, 201, 161, 0.25);
	pointer-events: none;
}

/* Section heading, recoloured for the dark band. */
.mw-countdown .mw-heading {
	margin-bottom: 28px;
}

.mw-countdown .mw-heading__sprig .mw-svg {
	color: var(--mw-cd-gold);
}

.mw-countdown .mw-heading__kicker {
	color: var(--mw-cd-gold);
}

.mw-countdown .mw-heading__title {
	color: var(--mw-cd-text);
}

/* Numbers divided by slim gold rules instead of boxes. */
.mw-countdown__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	max-width: 520px;
}

.mw-countdown__unit {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 4px 2px;
}

.mw-countdown__unit + .mw-countdown__unit {
	border-left: 1px solid var(--mw-cd-rule);
}

.mw-countdown__value {
	display: inline-block; /* So the tick animation can move it. */
	font-size: clamp(42px, 12.5vw, 72px);
	font-weight: 400;
	line-height: 1;
	color: var(--mw-cd-text);
	font-variant-numeric: lining-nums tabular-nums;
}

.mw-countdown__label {
	margin-top: 10px;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--mw-cd-gold);
}

.mw-countdown__done {
	font-size: 26px;
	font-style: italic;
	color: var(--mw-cd-text);
}

/* Date and time, separated by a short gold rule. */
.mw-countdown__when {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	margin-top: 32px;
	font-size: 20px;
	line-height: 1.4;
	color: var(--mw-cd-text);
}

.mw-countdown__when span:first-child {
	font-style: italic;
	font-size: 23px;
}

.mw-countdown__when span:last-child {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 16px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--mw-cd-gold);
}

.mw-countdown__when span:last-child::before,
.mw-countdown__when span:last-child::after {
	content: "";
	width: 22px;
	height: 1px;
	background: var(--mw-cd-rule);
}

/* Narrow phones: a little more room so the labels never touch the gold rules. */
@media (max-width: 400px) {
	.mw-countdown__panel {
		padding-left: 8px;
		padding-right: 8px;
	}

	.mw-countdown__label {
		letter-spacing: 0.02em;
	}
}

.mw-countdown__cta {
	margin-top: 28px;
}

/* Gold outline button for dark backgrounds. */
.mw-button--gold {
	border-color: var(--mw-cd-gold);
	color: var(--mw-cd-text);
}

.mw-button--gold:active {
	background: rgba(216, 201, 161, 0.18);
}

@media (min-width: 768px) {
	.mw-countdown {
		padding: 96px 32px;
	}

	.mw-countdown__panel {
		padding: 60px 48px 52px;
	}

	.mw-button--gold:hover {
		background: rgba(216, 201, 161, 0.18);
	}
}

/* ------------------------------------------------------------------ */
/* Story: overlapping polaroids and a chapter timeline                */
/* ------------------------------------------------------------------ */

.mw-story {
	overflow: hidden;
}

/* Faint wreath watermark behind the section. */
.mw-story__watermark {
	position: absolute;
	top: 40px;
	right: -90px;
	width: 340px;
	max-width: none;
	margin: 0;
	opacity: 0.09;
	pointer-events: none;
}

.mw-story__watermark .mw-svg {
	color: var(--mw-ink);
}

/* Two polaroids overlapping, like a keepsake album. */
.mw-story__photos {
	display: grid;
	width: min(100%, 360px);
	margin-bottom: 40px;
}

.mw-story__photo {
	grid-area: 1 / 1;
	margin: 0;
	padding: 10px 10px 34px;
	background: #fff;
	box-shadow: 0 14px 34px rgba(47, 62, 42, 0.16), 0 2px 6px rgba(47, 62, 42, 0.08);
}

.mw-story__photo img {
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
}

.mw-story__photo--main {
	position: relative;
	width: 70%;
	justify-self: center;
	align-self: start; /* Keep its own height; do not stretch to the taller overlapping cell. */
	transform: rotate(-3deg);
}

/* A strip of tape holding the main photo. */
.mw-story__photo--main::before {
	content: "";
	position: absolute;
	top: -12px;
	left: 50%;
	width: 88px;
	height: 26px;
	margin-left: -44px;
	background: rgba(188, 202, 176, 0.75);
	transform: rotate(-4deg);
}

.has-second .mw-story__photo--main {
	justify-self: start;
	width: 66%;
}

/* The second photo floats gently: transform-only, so it costs nothing on phones. */
.mw-story__photo--second {
	z-index: 1;
	width: 52%;
	justify-self: end;
	align-self: end;
	margin-top: 42%;
	padding-bottom: 26px;
	transform: rotate(5deg);
	animation: mw-float 6s ease-in-out infinite;
}

@keyframes mw-float {
	0%,
	100% {
		transform: rotate(5deg) translateY(0);
	}
	50% {
		transform: rotate(3.5deg) translateY(-8px);
	}
}

/* Timeline: a fine line with a dot per chapter; text reads left to right. */
.mw-story__timeline {
	position: relative;
	margin-top: 0;
	margin-bottom: 0;
	padding: 0 0 0 40px;
	list-style: none;
	text-align: left;
}

.mw-story__line {
	position: absolute;
	top: 8px;
	bottom: 8px;
	left: 11px;
	width: 1px;
	background: linear-gradient(var(--mw-accent), rgba(127, 152, 112, 0.2));
}

.mw-story__chapter {
	position: relative;
}

.mw-story__chapter + .mw-story__chapter {
	margin-top: 32px;
}

.mw-story__dot {
	position: absolute;
	top: 9px;
	left: -35px;
	width: 13px;
	height: 13px;
	border: 1px solid var(--mw-accent);
	border-radius: 50%;
	background: var(--mw-paper);
	box-shadow: 0 0 0 4px var(--mw-paper);
}

.mw-story__dot::after {
	content: "";
	position: absolute;
	inset: 3px;
	border-radius: 50%;
	background: var(--mw-accent);
}

.mw-story__title {
	margin: 0 0 6px;
	font-size: 26px;
	font-style: italic;
	font-weight: 500;
	line-height: 1.2;
	color: var(--mw-ink);
}

.mw-story__chapter p {
	font-size: 22px;
	line-height: 1.65;
}

.mw-story__chapter:last-of-type p {
	font-style: italic;
	color: var(--mw-ink);
}

.mw-story__flourish {
	width: min(220px, 60vw);
	margin-top: 40px;
}

@media (min-width: 768px) {
	.mw-story__watermark {
		right: 5%;
		width: 460px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mw-story__photo--second {
		animation: none;
	}
}

/* ------------------------------------------------------------------ */
/* Details: the "details card" of a printed invitation                */
/* ------------------------------------------------------------------ */

.mw-details__card {
	position: relative;
	padding: 48px 20px 36px;
	border: 1px solid rgba(95, 122, 85, 0.4);
	background: rgba(255, 255, 255, 0.72);
	box-shadow: 0 18px 40px rgba(47, 62, 42, 0.08);
}

/* Inner rule of the double frame. */
.mw-details__card::before {
	content: "";
	position: absolute;
	inset: 6px;
	border: 1px solid rgba(95, 122, 85, 0.2);
	pointer-events: none;
}

.mw-details__corner {
	position: absolute;
	width: 76px;
	pointer-events: none;
}

.mw-details__corner--tl {
	top: 12px;
	left: 12px;
}

.mw-details__corner--br {
	right: 12px;
	bottom: 12px;
	transform: rotate(180deg);
}

/* Engraved date block: day of week | big day number | month, year below. */
.mw-details__dateblock {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	column-gap: 12px;
	margin: 0 auto 8px;
	color: var(--mw-ink);
}

.mw-details__dow,
.mw-details__month {
	padding: 7px 0;
	border-top: 1px solid rgba(95, 122, 85, 0.45);
	border-bottom: 1px solid rgba(95, 122, 85, 0.45);
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.mw-details__day {
	font-size: 66px;
	line-height: 1;
	font-variant-numeric: lining-nums;
}

.mw-details__year {
	grid-column: 1 / -1;
	margin-top: 8px;
	font-size: 17px;
	font-weight: 600;
	letter-spacing: 0.4em;
	color: var(--mw-muted);
	/* Balance the trailing letter-spacing so the year sits centred. */
	margin-right: -0.4em;
}

/* Program: time, title and note, separated by a small diamond. */
.mw-details__program {
	margin: 28px 0 0;
	padding: 0;
	list-style: none;
}

.mw-details__event {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
}

.mw-details__event + .mw-details__event::before {
	content: "";
	width: 9px;
	height: 9px;
	margin: 22px 0 24px;
	border: 1px solid var(--mw-accent);
	transform: rotate(45deg);
}

.mw-details__time {
	font-size: 36px;
	line-height: 1.1;
	color: var(--mw-ink);
	font-variant-numeric: lining-nums;
}

.mw-details__title {
	margin-top: 4px;
	font-size: 16px;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--mw-accent);
}

.mw-details__note {
	font-size: 20px;
	font-style: italic;
	color: var(--mw-text);
}

/* Venue, under a line-drawn church. */
.mw-details__venue {
	margin-top: 36px;
	padding-top: 30px;
	border-top: 1px solid rgba(95, 122, 85, 0.25);
}

.mw-details__church {
	width: 58px;
	margin: 0 auto 10px;
	color: var(--mw-accent);
}

.mw-details__venue-name {
	font-family: var(--mw-font-script);
	font-size: clamp(34px, 9.5vw, 44px);
	line-height: 1.2;
	color: var(--mw-ink);
}

.mw-details__address {
	margin-top: 6px;
	font-size: 17px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--mw-muted);
}

@media (min-width: 768px) {
	.mw-details__card {
		max-width: 620px;
		padding: 60px 56px 48px;
	}

	.mw-details__corner {
		width: 110px;
	}

	/* Side by side on wider screens. */
	.mw-details__program {
		display: flex;
		justify-content: center;
		align-items: flex-start;
	}

	.mw-details__event {
		flex: 1;
	}

	.mw-details__event + .mw-details__event {
		border-left: 1px solid rgba(95, 122, 85, 0.3);
	}

	.mw-details__event + .mw-details__event::before {
		display: none;
	}
}

/* ------------------------------------------------------------------ */
/* Dress code: arched panel, line-drawn attire, named swatches        */
/* ------------------------------------------------------------------ */

.mw-dress__arch {
	position: relative;
	max-width: 440px;
	padding: 72px 20px 40px;
	border: 1px solid rgba(95, 122, 85, 0.4);
	border-radius: 240px 240px 18px 18px;
	background: rgba(255, 255, 255, 0.72);
	box-shadow: 0 18px 40px rgba(47, 62, 42, 0.08);
}

/* Inner rule of the double arch. */
.mw-dress__arch::before {
	content: "";
	position: absolute;
	inset: 7px;
	border: 1px solid rgba(95, 122, 85, 0.2);
	border-radius: 232px 232px 12px 12px;
	pointer-events: none;
}

.mw-dress__code {
	font-size: 26px;
	font-style: italic;
	color: var(--mw-ink);
}

.mw-dress__figures {
	display: flex;
	justify-content: center;
	gap: 28px;
	margin: 26px 0 30px;
}

.mw-dress__figure {
	margin: 0;
	width: 104px;
}

.mw-dress__figure .mw-svg {
	width: 100%;
	color: var(--mw-accent);
}

.mw-dress__tint {
	fill: var(--mw-accent);
	opacity: 0.16;
}

.mw-dress__figure figcaption {
	margin-top: 10px;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--mw-muted);
}

.mw-dress__motif-label {
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--mw-accent);
}

.mw-dress__motif {
	margin-top: 2px;
	font-family: var(--mw-font-script);
	font-size: clamp(44px, 12vw, 58px);
	line-height: 1.15;
	color: var(--mw-ink);
}

.mw-dress__swatches {
	display: flex;
	justify-content: center;
	gap: 10px;
	margin: 18px auto 20px;
	padding: 0;
	list-style: none;
}

.mw-dress__swatches li {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 72px;
}

/* Swatch: colour with a white ring and a soft sheen, like a fabric button. */
.mw-dress__swatch {
	width: 50px;
	height: 50px;
	border-radius: 50%;
	background:
		radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.45), transparent 55%),
		var(--swatch);
	box-shadow: 0 0 0 4px #fff, 0 0 0 5px rgba(95, 122, 85, 0.25), 0 6px 14px rgba(47, 62, 42, 0.18);
}

.mw-dress__swatch-name {
	margin-top: 12px;
	font-size: 15px;
	font-style: italic;
	line-height: 1.2;
	color: var(--mw-text);
}

.mw-dress__note {
	font-size: 19px;
	font-style: italic;
	color: var(--mw-muted);
}

@media (min-width: 768px) {
	.mw-dress__arch {
		padding: 88px 40px 48px;
	}

	.mw-dress__figure {
		width: 130px;
	}

	.mw-dress__swatches li {
		width: 88px;
	}
}

/* ------------------------------------------------------------------ */
/* Entourage: one framed sheet, like a church program page            */
/* ------------------------------------------------------------------ */

.mw-entourage__sheet {
	position: relative;
	max-width: 620px;
	padding: 56px 20px 48px;
	border: 1px solid rgba(95, 122, 85, 0.4);
	background: rgba(255, 255, 255, 0.72);
	box-shadow: 0 18px 40px rgba(47, 62, 42, 0.08);
}

/* Inner rule of the double frame. */
.mw-entourage__sheet::before {
	content: "";
	position: absolute;
	inset: 6px;
	border: 1px solid rgba(95, 122, 85, 0.2);
	pointer-events: none;
}

.mw-entourage__corner {
	position: absolute;
	width: 80px;
	pointer-events: none;
}

.mw-entourage__corner--tl {
	top: 12px;
	left: 12px;
}

.mw-entourage__corner--br {
	right: 12px;
	bottom: 12px;
	transform: rotate(180deg);
}

/* Separator between groups: fine rules with a small diamond. */
.mw-entourage__sep {
	position: relative;
	display: block;
	width: 140px;
	height: 9px;
	margin: 34px auto;
	background:
		linear-gradient(rgba(95, 122, 85, 0.45), rgba(95, 122, 85, 0.45)) left center / 56px 1px no-repeat,
		linear-gradient(rgba(95, 122, 85, 0.45), rgba(95, 122, 85, 0.45)) right center / 56px 1px no-repeat;
}

.mw-entourage__sep::after {
	content: "";
	position: absolute;
	top: 0;
	left: 50%;
	width: 8px;
	height: 8px;
	margin-left: -4px;
	border: 1px solid var(--mw-accent);
	transform: rotate(45deg);
}

.mw-entourage__title {
	margin: 0 0 14px;
	font-family: var(--mw-font-script);
	font-size: clamp(34px, 9.5vw, 42px);
	font-weight: 400;
	line-height: 1.15;
	color: var(--mw-ink);
}

.mw-entourage__row + .mw-entourage__row {
	margin-top: 18px;
}

.mw-entourage__icon {
	width: 40px;
	margin: 0 auto 4px;
	color: var(--mw-accent);
}

.mw-entourage__role {
	margin-bottom: 4px;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--mw-accent);
}

/* Names stacked, joined by a small italic "&". */
.mw-entourage__names {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0;
}

.mw-entourage__name {
	font-size: 23px;
	line-height: 1.35;
	color: var(--mw-text);
}

.mw-entourage__amp {
	font-size: 18px;
	font-style: italic;
	line-height: 1.2;
	color: var(--mw-accent);
}

/* The couple, first and a little larger. */
.mw-entourage__group--lead .mw-entourage__name {
	font-size: 26px;
	color: var(--mw-ink);
}

@media (min-width: 768px) {
	.mw-entourage__sheet {
		padding: 72px 56px 60px;
	}

	.mw-entourage__corner {
		width: 110px;
	}

	/* Wider screens: pairs sit on one line. */
	.mw-entourage__names {
		flex-direction: row;
		flex-wrap: wrap;
		justify-content: center;
		align-items: baseline;
		gap: 0 10px;
	}
}

/* ------------------------------------------------------------------ */
/* Gallery + lightbox                                                 */
/* ------------------------------------------------------------------ */

/* Ambient glow in the colours of the photo in focus (set by JS as --ambient). */
.mw-gallery {
	--ambient: rgb(188, 202, 176);
	overflow: hidden;
}

.mw-gallery::before {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(ellipse 80% 55% at 50% 58%, var(--ambient), transparent 72%);
	opacity: 0.38;
	transition: opacity 0.6s;
	pointer-events: none;
}

.mw-gallery > * {
	position: relative;
}

/* Full-bleed stage so photos can peek in from both edges. */
.mw-section > .mw-gallery__stage {
	max-width: none;
	margin: 0 -20px;
}

/* Native swipe with snap: smooth on every phone, no scroll scripts. */
.mw-gallery__track {
	display: flex;
	gap: 14px;
	margin: 0;
	/* Extra bottom room so the photo shadow fades out instead of being cut off by the scroll area. */
	padding: 14px calc((100% - min(78vw, 420px)) / 2) 60px;
	list-style: none;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.mw-gallery__track::-webkit-scrollbar {
	display: none;
}

.mw-gallery__slide {
	flex: 0 0 min(78vw, 420px);
	scroll-snap-align: center;
	transform: scale(0.9);
	opacity: 0.5;
	transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.5s;
}

.mw-gallery__slide.is-active {
	transform: none;
	opacity: 1;
}

.mw-gallery__slide a {
	display: block;
	padding: 8px;
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 20px 44px rgba(47, 62, 42, 0.2), 0 3px 8px rgba(47, 62, 42, 0.08);
}

.mw-gallery__slide img {
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	border-radius: 14px;
}

/* Large, obvious controls for guests who don't swipe. */
.mw-gallery__controls {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 22px;
	margin-top: -30px;
}

.mw-gallery__arrow {
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	padding: 0 0 4px;
	border: 1px solid var(--mw-accent);
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.8);
	color: var(--mw-ink);
	font: 400 32px/1 var(--mw-font-serif);
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.mw-gallery__arrow:active {
	background: var(--mw-line);
}

.mw-gallery__arrow:disabled {
	opacity: 0.35;
}

.mw-gallery__counter {
	min-width: 88px;
	font-size: 20px;
	letter-spacing: 0.12em;
	color: var(--mw-ink);
	font-variant-numeric: lining-nums tabular-nums;
}

.mw-gallery__progress {
	width: min(220px, 60vw);
	height: 2px;
	margin: 16px auto 0;
	overflow: hidden;
	border-radius: 2px;
	background: rgba(95, 122, 85, 0.2);
}

.mw-gallery__progress span {
	display: block;
	height: 100%;
	background: var(--mw-accent);
	transform-origin: left;
	transform: scaleX(0.08);
	transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.mw-gallery__hint {
	margin-top: 14px;
	font-size: 16px;
	font-style: italic;
	color: var(--mw-muted);
}

@media (min-width: 768px) {
	.mw-section > .mw-gallery__stage {
		margin: 0 -32px;
	}

	.mw-gallery__track {
		gap: 24px;
	}

	.mw-gallery__arrow:hover {
		background: var(--mw-line);
	}
}

@media (prefers-reduced-motion: reduce) {
	.mw-gallery__slide,
	.mw-gallery__progress span {
		transition: none;
	}
}

.mw-lightbox {
	width: 100%;
	max-width: 100%;
	height: 100%;
	max-height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: rgba(24, 32, 22, 0.94);
	overscroll-behavior: contain;
}

.mw-lightbox::backdrop {
	background: transparent;
}

.mw-lightbox[open] {
	display: grid;
	place-items: center;
}

.mw-lightbox img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	touch-action: pan-y;
}

.mw-lightbox button {
	position: absolute;
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}

.mw-lightbox__close {
	top: calc(12px + env(safe-area-inset-top));
	right: 12px;
}

.mw-lightbox__prev,
.mw-lightbox__next {
	top: 50%;
	margin-top: -24px;
}

.mw-lightbox__prev {
	left: 8px;
}

.mw-lightbox__next {
	right: 8px;
}

/* ------------------------------------------------------------------ */
/* Closing finale: deep sage band, bookending the countdown           */
/* ------------------------------------------------------------------ */

.mw-section.mw-closing {
	--mw-cd-text: #f5f2e9;
	--mw-cd-gold: #d8c9a1;
	--mw-cd-rule: rgba(216, 201, 161, 0.55);
	overflow: hidden;
	padding: 56px 16px calc(110px + env(safe-area-inset-bottom));
	background: #34472f;
	color: var(--mw-cd-text);
}

.mw-closing__bg {
	position: absolute;
	inset: 0;
	max-width: none;
	margin: 0;
}

.mw-closing__bg picture,
.mw-closing__bg img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.mw-closing__bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		radial-gradient(ellipse 70% 55% at 50% 40%, rgba(38, 54, 34, 0.74), rgba(28, 41, 25, 0.92)),
		linear-gradient(180deg, rgba(28, 41, 25, 0.35), rgba(28, 41, 25, 0.6));
}

/* Gold double-ruled panel, like the countdown. */
.mw-closing__panel {
	position: relative;
	max-width: 600px;
	padding: 48px 18px 44px;
	border: 1px solid var(--mw-cd-rule);
}

.mw-closing__panel::after {
	content: "";
	position: absolute;
	inset: 6px;
	border: 1px solid rgba(216, 201, 161, 0.25);
	pointer-events: none;
}

.mw-closing__wreath {
	position: relative;
	display: grid;
	place-items: center;
	width: 200px;
	margin: 0 auto 30px;
}

.mw-closing__wreath.has-photo {
	width: 230px;
}

.mw-closing__wreath .mw-svg {
	position: relative;
	color: var(--mw-cd-gold);
}

/* Round photo sitting inside the wreath. */
.mw-closing__photo {
	position: absolute;
	inset: 21%;
	overflow: hidden;
	border-radius: 50%;
	box-shadow: 0 0 0 3px rgba(216, 201, 161, 0.5), 0 10px 26px rgba(0, 0, 0, 0.35);
}

.mw-closing__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.mw-closing__wreath span {
	position: absolute;
	font-family: var(--mw-font-script);
	font-size: 44px;
	color: var(--mw-cd-text);
}

/* The verse as a quotation, with large gold quote marks. */
.mw-closing__quote {
	position: relative;
	margin: 0 auto;
	padding: 26px 8px 0;
	max-width: 24ch;
}

.mw-closing__quote::before {
	content: "\201C";
	position: absolute;
	top: -18px;
	left: 50%;
	transform: translateX(-50%);
	font-size: 76px;
	line-height: 1;
	color: var(--mw-cd-gold);
	opacity: 0.8;
}

.mw-closing__quote p {
	font-size: 25px;
	font-style: italic;
	line-height: 1.5;
	color: var(--mw-cd-text);
}

.mw-closing__quote cite {
	display: block;
	margin-top: 12px;
	font-size: 15px;
	font-style: normal;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--mw-cd-gold);
}

.mw-closing__message {
	margin-top: 30px;
	padding-top: 26px;
	border-top: 1px solid rgba(216, 201, 161, 0.3);
	font-size: 21px;
	font-style: italic;
	color: var(--mw-cd-text);
	opacity: 0.92;
}

.mw-closing__names {
	margin-top: 14px;
	font-family: var(--mw-font-script);
	font-size: clamp(58px, 16vw, 76px);
	line-height: 1.1;
	color: var(--mw-cd-text);
}

.mw-closing__names span {
	font-size: 0.6em;
	color: var(--mw-cd-gold);
}

/* Date between fine gold rules. */
.mw-closing__date {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 14px;
	margin-top: 10px;
	font-size: 20px;
	font-weight: 600;
	letter-spacing: 0.24em;
	color: var(--mw-cd-text);
	font-variant-numeric: lining-nums;
}

.mw-closing__date::before,
.mw-closing__date::after {
	content: "";
	width: 34px;
	height: 1px;
	background: var(--mw-cd-rule);
}

.mw-closing__place {
	margin-top: 8px;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--mw-cd-gold);
}

.mw-closing__top {
	gap: 8px; /* Space before the arrow. */
	margin-top: 32px;
}

@media (min-width: 768px) {
	.mw-section.mw-closing {
		padding-top: 96px;
	}

	.mw-closing__panel {
		padding: 60px 48px 52px;
	}
}

/* ------------------------------------------------------------------ */
/* Music player                                                       */
/* ------------------------------------------------------------------ */

.mw-music {
	position: fixed;
	right: 12px;
	bottom: calc(12px + env(safe-area-inset-bottom));
	z-index: 90;
}

.mw-music[hidden] {
	display: none;
}

.mw-music__toggle {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 48px;
	padding: 6px 16px 6px 6px;
	border: 1px solid var(--mw-line);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.92);
	box-shadow: 0 6px 20px rgba(47, 62, 42, 0.18);
	color: var(--mw-ink);
	font: inherit;
	text-align: left;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.mw-music__icon,
.mw-music__bars {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--mw-ink);
	color: #fff;
}

.mw-music__icon svg {
	width: 18px;
	height: 18px;
}

.mw-music__bars {
	display: none;
	grid-auto-flow: column;
	gap: 3px;
	align-items: end;
	padding: 11px 10px;
}

.mw-music__bars i {
	display: block;
	width: 3px;
	height: 100%;
	border-radius: 2px;
	background: #fff;
	transform-origin: bottom;
	animation: mw-eq 0.9s ease-in-out infinite;
}

.mw-music__bars i:nth-child(2) {
	animation-delay: 0.2s;
}

.mw-music__bars i:nth-child(3) {
	animation-delay: 0.4s;
}

.mw-music.is-playing .mw-music__icon {
	display: none;
}

.mw-music.is-playing .mw-music__bars {
	display: grid;
}

.mw-music__text {
	display: flex;
	flex-direction: column;
	line-height: 1.2;
}

.mw-music__label {
	font-size: 14px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--mw-muted);
}

.mw-music__song {
	font-size: 18px;
}

/* Collapse to just the round button once scrolled, so it never covers content. */
.mw-music.is-compact .mw-music__toggle {
	padding-right: 6px;
}

.mw-music.is-compact .mw-music__text {
	display: none;
}

@keyframes mw-eq {
	0%,
	100% {
		transform: scaleY(0.3);
	}
	50% {
		transform: scaleY(1);
	}
}

@media (prefers-reduced-motion: reduce) {
	.mw-music__bars i {
		animation: none;
	}
}
