/* jrake.com memorial - shared tokens + the public page */

@font-face {
	font-family: 'Cormorant Garamond';
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url('/fonts/cormorant-garamond-latin-500-normal.woff2') format('woff2');
}
@font-face {
	font-family: 'Cormorant Garamond';
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url('/fonts/cormorant-garamond-latin-600-normal.woff2') format('woff2');
}
@font-face {
	font-family: 'Cormorant Garamond';
	font-style: italic;
	font-weight: 500;
	font-display: swap;
	src: url('/fonts/cormorant-garamond-latin-500-italic.woff2') format('woff2');
}

:root {
	color-scheme: dark;
	--bg: #0a0a0d;
	--bg-2: #101015;
	--card: #15151b;
	--card-2: #1b1b23;
	--line: #272731;
	--line-2: #34343f;
	--text: #eeedf2;
	--muted: #a7a5b2;
	--faint: #75737f;
	--pink: #ff4fa3;
	--pink-2: #ff7dbb;
	--pink-soft: rgba(255, 79, 163, 0.13);
	--blue: #5b8cff;
	--danger: #ff6b6b;
	--ok: #3ddc97;
	--radius: 18px;
	--radius-sm: 12px;
	--serif: 'Cormorant Garamond', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
	--sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	--shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.7);
	--gutter: clamp(16px, 4vw, 32px);
}

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

html {
	scroll-behavior: smooth;
	scroll-padding-top: 72px;
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 16px/1.6 var(--sans);
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

img {
	display: block;
	max-width: 100%;
}

a {
	color: var(--pink-2);
}

h1,
h2,
h3 {
	margin: 0;
	font-weight: 600;
}

button,
input,
textarea {
	font: inherit;
	color: inherit;
}

[hidden] {
	display: none !important;
}

:focus-visible {
	outline: 2px solid var(--pink);
	outline-offset: 3px;
}

.ico {
	width: 18px;
	height: 18px;
	flex: none;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.7;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* ---------- buttons ---------- */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 10px 20px;
	border: 1px solid transparent;
	border-radius: 999px;
	background: var(--card-2);
	color: var(--text);
	font-weight: 600;
	font-size: 15px;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s, transform 0.15s, box-shadow 0.15s, opacity 0.15s;
	-webkit-tap-highlight-color: transparent;
}

.btn:active {
	transform: translateY(1px);
}

.btn.primary {
	background: linear-gradient(135deg, #ff5aa9, #e8338a);
	color: #fff;
	box-shadow: 0 8px 24px -10px rgba(255, 79, 163, 0.75);
}

.btn.primary:hover {
	box-shadow: 0 10px 30px -8px rgba(255, 79, 163, 0.9);
}

.btn.ghost {
	background: rgba(255, 255, 255, 0.04);
	border-color: var(--line-2);
}

.btn.ghost:hover {
	border-color: var(--pink);
	background: var(--pink-soft);
}

.btn.danger {
	background: transparent;
	border-color: rgba(255, 107, 107, 0.45);
	color: var(--danger);
}

.btn.danger:hover {
	background: rgba(255, 107, 107, 0.1);
}

.btn-sm {
	min-height: 36px;
	padding: 6px 14px;
	font-size: 14px;
}

.btn-lg {
	min-height: 52px;
	padding: 12px 28px;
	font-size: 16px;
}

.btn:disabled {
	opacity: 0.55;
	cursor: default;
	transform: none;
}

.spinner {
	display: inline-block;
	width: 18px;
	height: 18px;
	border: 2px solid rgba(255, 255, 255, 0.18);
	border-top-color: var(--pink);
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
	flex: none;
}

.btn .spinner {
	width: 16px;
	height: 16px;
	border-color: rgba(255, 255, 255, 0.35);
	border-top-color: #fff;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

/* ---------- top navigation ---------- */

.topnav {
	position: fixed;
	inset: 0 0 auto;
	z-index: 40;
	display: flex;
	align-items: center;
	gap: 20px;
	height: 60px;
	padding: 0 var(--gutter);
	padding-top: env(safe-area-inset-top);
	background: rgba(10, 10, 13, 0.82);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	border-bottom: 1px solid var(--line);
	transform: translateY(-100%);
	visibility: hidden;
	transition: transform 0.3s ease, visibility 0s 0.3s;
}

.topnav.show {
	transform: none;
	visibility: visible;
	transition: transform 0.3s ease;
}

.topnav.at-share .btn {
	visibility: hidden;
}

.topnav-name {
	font-family: var(--serif);
	font-size: 22px;
	font-weight: 600;
	color: var(--text);
	text-decoration: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.topnav-links {
	display: flex;
	gap: 22px;
	margin-left: auto;
}

.topnav-links a {
	color: var(--muted);
	text-decoration: none;
	font-size: 15px;
}

.topnav-links a:hover {
	color: var(--text);
}

/* ---------- hero ---------- */

.hero {
	position: relative;
	overflow: hidden;
	isolation: isolate;
}

.hero-bg {
	position: absolute;
	inset: -40px;
	z-index: -1;
	background: url('/assets/img/jrake-blur.webp') center 40% / cover no-repeat;
	filter: blur(40px) saturate(1.3);
	opacity: 0.45;
}

.hero-bg::after {
	content: '';
	position: absolute;
	inset: 0;
	background: radial-gradient(ellipse at 30% 40%, rgba(10, 10, 13, 0.2), rgba(10, 10, 13, 0.92) 70%), linear-gradient(to bottom, transparent 60%, var(--bg));
}

.hero-inner {
	display: grid;
	grid-template-columns: minmax(300px, 460px) minmax(0, 560px);
	align-items: center;
	justify-content: center;
	gap: clamp(32px, 6vw, 80px);
	max-width: 1180px;
	min-height: min(100vh, 980px);
	margin: 0 auto;
	padding: 80px var(--gutter);
}

.hero-photo {
	position: relative;
	margin: 0;
	border-radius: 24px;
	overflow: hidden;
	aspect-ratio: 1086 / 1448;
	box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.06), 0 0 80px -20px rgba(255, 79, 163, 0.35);
	animation: rise 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hero-text {
	animation: rise 1.1s 0.15s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.tagline {
	margin: 0 0 6px;
	color: var(--pink-2);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.22em;
	text-transform: uppercase;
}

.name {
	font-family: var(--serif);
	font-weight: 500;
	font-size: clamp(48px, 7vw, 92px);
	line-height: 0.98;
	letter-spacing: -0.01em;
	text-wrap: balance;
}

.dates {
	margin: 14px 0 0;
	font-family: var(--serif);
	font-size: clamp(20px, 2.4vw, 26px);
	color: var(--muted);
	letter-spacing: 0.04em;
}

.dates:empty {
	display: none;
}

.rule {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 160px;
	margin: 26px 0;
}

.rule::before,
.rule::after {
	content: '';
	flex: 1;
	height: 1px;
	background: linear-gradient(90deg, transparent, var(--pink));
}

.rule::after {
	background: linear-gradient(90deg, var(--pink), transparent);
}

.rule span {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--pink);
	box-shadow: 0 0 12px var(--pink);
}

.intro {
	margin: 0;
	font-size: clamp(17px, 1.6vw, 19px);
	line-height: 1.7;
	color: #d6d4dd;
	white-space: pre-line;
	max-width: 52ch;
}

.hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 32px;
}

.hero-counts {
	margin: 22px 0 0;
	min-height: 1.6em;
	color: var(--faint);
	font-size: 14px;
}

@keyframes rise {
	from {
		opacity: 0;
		transform: translateY(18px);
	}
}

/* ---------- sections ---------- */

main {
	max-width: 760px;
	margin: 0 auto;
	padding: 0 var(--gutter);
}

.section {
	padding: 40px 0;
}

.section-head {
	display: flex;
	align-items: baseline;
	gap: 14px;
	margin-bottom: 22px;
}

.section h2 {
	font-family: var(--serif);
	font-weight: 500;
	font-size: clamp(34px, 5vw, 44px);
	line-height: 1.1;
}

.count {
	color: var(--faint);
	font-size: 15px;
}

.card {
	background: linear-gradient(180deg, var(--card), #121217);
	border: 1px solid var(--line);
	border-radius: var(--radius);
}

.list-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 36px 0;
	color: var(--muted);
}

.loading-line {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--muted);
}

.empty {
	padding: 32px 24px;
	text-align: center;
	color: var(--muted);
}

.empty p {
	margin: 0 0 16px;
}

.empty p:last-child {
	margin: 0;
}

.more-wrap {
	display: flex;
	justify-content: center;
	margin-top: 20px;
}

.more-wrap:empty,
.more-wrap:has(> [hidden]:only-child) {
	margin: 0;
}

/* ---------- funeral service ---------- */

.service {
	padding-top: 8px;
}

.service-card {
	display: flex;
	gap: 20px;
	padding: 26px;
	position: relative;
	overflow: hidden;
}

.service-card::before {
	content: '';
	position: absolute;
	inset: 0 auto 0 0;
	width: 3px;
	background: linear-gradient(var(--pink), transparent);
}

.service-icon {
	flex: none;
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: var(--pink-soft);
}

.service-icon svg {
	width: 26px;
	height: 26px;
	fill: none;
	stroke: var(--pink-2);
	stroke-width: 1.7;
	stroke-linejoin: round;
}

.service-icon svg path {
	fill: rgba(255, 79, 163, 0.35);
	animation: flicker 3.2s ease-in-out infinite;
	transform-origin: 16px 14px;
}

@keyframes flicker {
	0%, 100% { transform: scale(1); opacity: 1; }
	45% { transform: scale(0.94, 1.04); opacity: 0.85; }
	70% { transform: scale(1.03, 0.97); }
}

.service-body {
	flex: 1;
	min-width: 0;
}

.service-body h2 {
	font-size: 30px;
	margin-bottom: 8px;
}

.service-text {
	margin: 0 0 16px;
	white-space: pre-line;
	color: #dcdae3;
	font-size: 17px;
}

.service-text.pending {
	color: var(--muted);
	font-size: 16px;
}

.notify-form {
	margin-top: 6px;
	padding-top: 18px;
	border-top: 1px solid var(--line);
	animation: fade 0.25s ease;
}

.notify-done {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--ok);
	font-weight: 600;
	margin: 4px 0 0;
}

/* ---------- memories ---------- */

.memories {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.memory {
	padding: 22px 22px 20px;
	animation: fade 0.4s ease both;
}

.memory-head {
	display: flex;
	align-items: center;
	gap: 12px;
}

.avatar {
	flex: none;
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	font-weight: 700;
	font-size: 15px;
	color: #fff;
	background: var(--av, var(--pink));
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.memory-who {
	min-width: 0;
}

.memory-who h3 {
	font-size: 16px;
	font-weight: 650;
	line-height: 1.3;
	overflow-wrap: anywhere;
}

.memory-who time {
	color: var(--faint);
	font-size: 13px;
}

.memory-msg {
	margin: 14px 0 0;
	font-size: 17px;
	line-height: 1.7;
	color: #e2e0e8;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

.memory-msg.clamped {
	max-height: 13.6em;
	overflow: hidden;
	-webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent);
	mask-image: linear-gradient(to bottom, #000 70%, transparent);
}

.read-more {
	margin-top: 6px;
	padding: 4px 0;
	border: 0;
	background: none;
	color: var(--pink-2);
	font-weight: 600;
	cursor: pointer;
}

.pics {
	display: grid;
	gap: 6px;
	margin-top: 16px;
	border-radius: var(--radius-sm);
	overflow: hidden;
}

.pics.n1 {
	grid-template-columns: 1fr;
}

.pics.n2,
.pics.n4 {
	grid-template-columns: repeat(2, 1fr);
}

.pics.n3,
.pics.nmany {
	grid-template-columns: repeat(3, 1fr);
}

.pic {
	position: relative;
	display: block;
	padding: 0;
	border: 0;
	background: var(--card-2);
	cursor: zoom-in;
	aspect-ratio: 1;
	overflow: hidden;
}

.pics.n1 .pic {
	aspect-ratio: auto;
	max-height: 560px;
}

.pic img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease, opacity 0.4s;
	opacity: 0;
}

.pic img.loaded {
	opacity: 1;
}

.pics.n1 .pic img {
	max-height: 560px;
	object-fit: contain;
	background: #000;
}

.pic:hover img {
	transform: scale(1.03);
}

.pic .more-count {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	background: rgba(0, 0, 0, 0.55);
	font-size: 24px;
	font-weight: 700;
	color: #fff;
}

/* ---------- gallery ---------- */

.gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 6px;
}

.gallery .pic {
	border-radius: 10px;
	animation: fade 0.4s ease both;
}

@keyframes fade {
	from {
		opacity: 0;
	}
}

/* ---------- share form ---------- */

.share-card {
	padding: clamp(22px, 4vw, 36px);
	box-shadow: var(--shadow);
	position: relative;
	overflow: hidden;
}

.share-card::before {
	content: '';
	position: absolute;
	inset: -1px -1px auto;
	height: 140px;
	background: radial-gradient(ellipse at 50% -20%, rgba(255, 79, 163, 0.22), transparent 70%);
	pointer-events: none;
}

.share-head {
	position: relative;
	margin-bottom: 24px;
}

.share-head p {
	margin: 8px 0 0;
	color: var(--muted);
}

.field {
	display: flex;
	flex-direction: column;
	gap: 7px;
	margin-bottom: 18px;
	min-width: 0;
}

.field > span {
	font-size: 14px;
	font-weight: 600;
	color: #d4d2db;
}

.field em,
legend em {
	font-style: normal;
	font-weight: 500;
	color: var(--faint);
	margin-left: 6px;
	font-size: 13px;
}

input[type='text'],
input[type='email'],
input[type='tel'],
input[type='password'],
input[type='search'],
textarea {
	width: 100%;
	min-height: 48px;
	padding: 12px 14px;
	border: 1px solid var(--line-2);
	border-radius: var(--radius-sm);
	background: #0e0e13;
	font-size: 16px;
	transition: border-color 0.15s, box-shadow 0.15s;
}

textarea {
	resize: vertical;
	min-height: 130px;
	line-height: 1.6;
}

input::placeholder,
textarea::placeholder {
	color: #5f5d68;
}

input:focus,
textarea:focus {
	outline: none;
	border-color: var(--pink);
	box-shadow: 0 0 0 3px rgba(255, 79, 163, 0.2);
}

.field.invalid input,
.field.invalid textarea {
	border-color: var(--danger);
}

.field-row.two {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

.hint {
	margin: 0 0 16px;
	color: var(--muted);
	font-size: 14.5px;
}

.contact {
	margin: 6px 0 18px;
	padding: 18px 18px 2px;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: rgba(255, 255, 255, 0.015);
}

.contact legend {
	padding: 0 8px;
	margin-left: -8px;
	font-weight: 650;
	font-size: 15px;
}

.hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.form-error {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	margin: 0 0 16px;
	padding: 12px 14px;
	border-radius: var(--radius-sm);
	background: rgba(255, 107, 107, 0.1);
	border: 1px solid rgba(255, 107, 107, 0.3);
	color: #ffb4b4;
	font-size: 15px;
}

.form-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

#share-submit {
	width: 100%;
}

/* photo picker */

.dropzone {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	padding: 24px 16px;
	border: 1.5px dashed var(--line-2);
	border-radius: var(--radius-sm);
	background: rgba(255, 255, 255, 0.02);
	text-align: center;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s;
}

.dropzone:hover,
.dropzone.drag {
	border-color: var(--pink);
	background: var(--pink-soft);
}

.dropzone:focus-within {
	border-color: var(--pink);
	box-shadow: 0 0 0 3px rgba(255, 79, 163, 0.2);
}

.dropzone input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.dropzone svg {
	width: 34px;
	height: 34px;
	margin-bottom: 4px;
	fill: none;
	stroke: var(--pink-2);
	stroke-width: 1.6;
	stroke-linejoin: round;
	stroke-linecap: round;
}

.dropzone strong {
	font-size: 16px;
}

.dropzone small {
	color: var(--faint);
	font-size: 13.5px;
}

.only-mouse {
	display: none;
}

@media (hover: hover) and (pointer: fine) {
	.only-touch {
		display: none;
	}
	.only-mouse {
		display: inline;
	}
}

.thumbs {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
	gap: 8px;
	margin-top: 10px;
}

.thumbs:empty {
	display: none;
}

.thumb {
	position: relative;
	aspect-ratio: 1;
	border-radius: 10px;
	overflow: hidden;
	background: var(--card-2);
	animation: fade 0.25s ease;
}

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

.thumb .noprev {
	display: grid;
	place-items: center;
	height: 100%;
	color: var(--faint);
	font-size: 12px;
	padding: 6px;
	text-align: center;
	overflow-wrap: anywhere;
}

.thumb-state {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	background: rgba(0, 0, 0, 0.55);
	transition: opacity 0.3s;
}

.thumb.done .thumb-state {
	opacity: 0;
	pointer-events: none;
}

.thumb-progress {
	position: absolute;
	left: 8px;
	right: 8px;
	bottom: 8px;
	height: 4px;
	border-radius: 2px;
	background: rgba(255, 255, 255, 0.2);
	overflow: hidden;
}

.thumb-progress i {
	display: block;
	height: 100%;
	width: 0;
	background: var(--pink);
	transition: width 0.2s;
}

.thumb.error .thumb-state {
	background: rgba(60, 0, 10, 0.75);
}

.thumb-retry {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	padding: 6px;
	border: 0;
	background: none;
	color: #ffc2c2;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.25;
	cursor: pointer;
	text-align: center;
}

.thumb-retry svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
}

.thumb-remove {
	position: absolute;
	top: 5px;
	right: 5px;
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.7);
	color: #fff;
	cursor: pointer;
	z-index: 2;
}

.thumb-remove svg {
	width: 14px;
	height: 14px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.2;
	stroke-linecap: round;
}

.thumb-ok {
	position: absolute;
	left: 6px;
	bottom: 6px;
	display: grid;
	place-items: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--ok);
	color: #04130c;
	opacity: 0;
	transform: scale(0.6);
	transition: opacity 0.3s, transform 0.3s;
}

.thumb.done .thumb-ok {
	opacity: 1;
	transform: none;
}

.thumb-ok svg {
	width: 13px;
	height: 13px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.6;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* thank-you */

.thanks {
	text-align: center;
	padding: 20px 0 6px;
	animation: fade 0.4s ease;
	outline: none;
}

.thanks-icon {
	display: grid;
	place-items: center;
	width: 64px;
	height: 64px;
	margin: 0 auto 16px;
	border-radius: 50%;
	background: var(--pink-soft);
}

.thanks-icon svg {
	width: 30px;
	height: 30px;
	fill: var(--pink);
	animation: beat 1.6s ease-in-out 2;
}

@keyframes beat {
	0%, 100% { transform: scale(1); }
	30% { transform: scale(1.15); }
	60% { transform: scale(0.97); }
}

.thanks h3 {
	font-family: var(--serif);
	font-weight: 500;
	font-size: 34px;
	margin-bottom: 8px;
}

.thanks p {
	margin: 0 auto 12px;
	max-width: 46ch;
	color: #d4d2db;
}

.thanks .btn {
	margin-top: 10px;
}

.thanks-contact {
	color: var(--muted) !important;
	font-size: 15px;
}

/* ---------- footer, floating button ---------- */

.footer {
	padding: 60px var(--gutter) calc(110px + env(safe-area-inset-bottom));
	text-align: center;
	color: var(--faint);
	font-size: 14px;
}

.footer p {
	margin: 0;
}

.footer-name {
	font-family: var(--serif);
	font-size: 26px;
	color: var(--muted);
	margin-bottom: 4px !important;
}

.fab {
	position: fixed;
	left: 50%;
	bottom: calc(18px + env(safe-area-inset-bottom));
	z-index: 30;
	transform: translateX(-50%);
	box-shadow: 0 12px 30px -6px rgba(0, 0, 0, 0.8), 0 8px 24px -10px rgba(255, 79, 163, 0.8);
	animation: pop 0.3s ease;
}

.fab:active {
	transform: translateX(-50%) translateY(1px);
}

@keyframes pop {
	from {
		opacity: 0;
		transform: translate(-50%, 20px);
	}
}

/* ---------- lightbox ---------- */

.lightbox {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: flex;
	flex-direction: column;
	background: rgba(4, 4, 6, 0.96);
	animation: fade 0.2s ease;
	touch-action: pan-y pinch-zoom;
}

.lb-stage {
	position: relative;
	flex: 1;
	min-height: 0;
	display: grid;
	place-items: center;
	padding: 56px 64px 8px;
}

.lb-stage img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	border-radius: 6px;
	transition: opacity 0.2s, transform 0.25s;
	user-select: none;
	-webkit-user-drag: none;
}

.lb-stage img.loading {
	opacity: 0.25;
}

.lb-spinner {
	position: absolute;
	inset: 0;
	display: none;
	place-items: center;
	pointer-events: none;
}

.lb-stage.busy .lb-spinner {
	display: grid;
}

.lb-bar {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 12px 20px calc(14px + env(safe-area-inset-bottom));
}

.lb-caption {
	flex: 1;
	min-width: 0;
	color: var(--muted);
	font-size: 14px;
}

.lb-caption strong {
	color: var(--text);
}

.lb-tools {
	display: flex;
	align-items: center;
	gap: 12px;
}

.lb-count {
	color: var(--faint);
	font-size: 14px;
	font-variant-numeric: tabular-nums;
}

.lb-btn {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	cursor: pointer;
	transition: background 0.15s;
}

.lb-btn:hover {
	background: rgba(255, 255, 255, 0.16);
}

.lb-btn svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.9;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.lb-close {
	position: absolute;
	top: calc(10px + env(safe-area-inset-top));
	right: 10px;
}

.lb-prev,
.lb-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
}

.lb-prev {
	left: 10px;
}

.lb-next {
	right: 10px;
}

/* ---------- toasts ---------- */

.toasts {
	position: fixed;
	left: 50%;
	bottom: calc(84px + env(safe-area-inset-bottom));
	z-index: 200;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	width: min(92vw, 440px);
	transform: translateX(-50%);
	pointer-events: none;
}

.toast {
	padding: 12px 18px;
	border-radius: 14px;
	background: #24242d;
	border: 1px solid var(--line-2);
	box-shadow: var(--shadow);
	font-size: 15px;
	animation: pop-in 0.25s ease;
	pointer-events: auto;
}

.toast.error {
	border-color: rgba(255, 107, 107, 0.5);
	color: #ffc9c9;
}

.toast.success {
	border-color: rgba(61, 220, 151, 0.45);
}

@keyframes pop-in {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
}

/* ---------- small screens ---------- */

@media (max-width: 860px) {
	.topnav-links {
		display: none;
	}

	.topnav .btn {
		margin-left: auto;
	}

	.hero-inner {
		grid-template-columns: 1fr;
		gap: 0;
		min-height: 0;
		padding: 0 0 30px;
	}

	.hero-photo {
		border-radius: 0;
		box-shadow: none;
		aspect-ratio: auto;
		height: min(74vh, 118vw);
		-webkit-mask-image: linear-gradient(to bottom, #000 50%, rgba(0, 0, 0, 0.35) 80%, transparent 100%);
		mask-image: linear-gradient(to bottom, #000 50%, rgba(0, 0, 0, 0.35) 80%, transparent 100%);
	}

	.hero-photo img {
		object-position: 40% 35%;
	}

	.hero-text {
		position: relative;
		margin-top: -84px;
		padding: 0 var(--gutter);
		text-align: center;
		text-shadow: 0 2px 18px rgba(0, 0, 0, 0.9);
	}

	.rule {
		margin: 22px auto;
	}

	.intro {
		margin: 0 auto;
	}

	.hero-actions {
		justify-content: center;
	}

	.hero-actions .btn {
		flex: 1 1 200px;
	}

	.hero-bg {
		display: none;
	}
}

@media (max-width: 560px) {
	.section {
		padding: 30px 0;
	}

	.service-card {
		flex-direction: column;
		gap: 14px;
		padding: 22px 20px;
	}

	.field-row.two {
		grid-template-columns: 1fr;
		gap: 0;
	}

	.memory {
		padding: 18px 16px 16px;
	}

	.memory-msg {
		font-size: 16.5px;
	}

	.gallery {
		grid-template-columns: repeat(3, 1fr);
		gap: 4px;
	}

	.gallery .pic {
		border-radius: 6px;
	}

	.lb-stage {
		padding: 56px 0 4px;
	}

	.lb-prev,
	.lb-next {
		display: none;
	}

	.contact {
		padding: 16px 14px 2px;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation: none !important;
		transition: none !important;
	}

	html {
		scroll-behavior: auto;
	}
}

/* ---------- confirm dialog (shared) ---------- */

.modal-back {
	position: fixed;
	inset: 0;
	z-index: 150;
	display: grid;
	place-items: center;
	padding: 20px;
	background: rgba(0, 0, 0, 0.7);
	animation: fade 0.15s ease;
}

.modal {
	width: min(100%, 420px);
	padding: 24px;
	border-radius: var(--radius);
	background: var(--card);
	border: 1px solid var(--line-2);
	box-shadow: var(--shadow);
}

.modal h3 {
	font-size: 19px;
	margin-bottom: 8px;
}

.modal p {
	margin: 0 0 6px;
	color: var(--muted);
}

.modal-actions {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	margin-top: 20px;
}
