:root {
	--bg: #faf7f2;
	--bg-warm: #fdfaf5;
	--surface: #ffffff;
	--fg: #1c1b1a;
	--fg-muted: #6b6864;
	--fg-soft: #a39e96;
	--accent-warm: #d4a574;
	--accent-tallit: #2c4a87;
	--live-dot: #d97706;
	--frame-matte: #ffffff;
	--accent-soft: #ece6dc;
	--shadow-sm: 0 1px 3px rgba(80, 50, 30, 0.05),
		0 1px 2px rgba(80, 50, 30, 0.03);
	--shadow-lg: 0 14px 36px rgba(80, 50, 30, 0.10),
		0 6px 16px rgba(80, 50, 30, 0.06);
	--radius: 10px;
	--radius-inner: 6px;
	--font: "Assistant", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
		system-ui, "Helvetica Neue", Arial, sans-serif;
}

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

html,
body {
	margin: 0;
	padding: 0;
	color: var(--fg);
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.5;
	-webkit-text-size-adjust: 100%;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body {
	min-height: 100vh;
	min-height: 100dvh;
	background:
		radial-gradient(ellipse at top, var(--bg-warm) 0%, var(--bg) 70%)
		no-repeat fixed;
}

/* ---------------- Hero ---------------- */

.hero {
	position: relative;
	padding: 1.75rem 1.25rem 1.25rem;
	border-bottom: 2px solid rgba(44, 74, 135, 0.55);
	overflow: hidden;
}

.hero-inner {
	position: relative;
	max-width: 1400px;
	margin: 0 auto;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	z-index: 2;
}

.hero-content {
	flex: 1 1 auto;
	min-width: 0;
}

.hero-overline {
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--fg-soft);
	letter-spacing: 0.02em;
	margin: 0 0 0.375rem;
}

.hero h1 {
	font-family: var(--font);
	font-weight: 700;
	font-size: clamp(1.5rem, 5vw, 2.125rem);
	color: var(--fg);
	margin: 0 0 0.4rem;
	letter-spacing: 0;
	line-height: 1.15;
}

.hero .date {
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--fg-muted);
	margin: 0;
	letter-spacing: 0.01em;
}

.date-sep {
	color: var(--fg-soft);
	margin: 0 0.25rem;
}

.date-gregorian {
	font-weight: 500;
	color: var(--fg-muted);
	font-variant-numeric: tabular-nums;
	margin-inline-start: 0.15rem;
	unicode-bidi: isolate;
}

/* Decorative sparkles behind the hero text */
.hero-decor {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 1;
	max-width: 1400px;
	margin: 0 auto;
}

.sparkle {
	position: absolute;
	fill: var(--accent-warm);
	opacity: 0.22;
}

.sparkle-1 {
	top: 18%;
	left: 8%;
	width: 14px;
	height: 14px;
}

.sparkle-2 {
	top: 55%;
	left: 22%;
	width: 9px;
	height: 9px;
	opacity: 0.18;
}

.sparkle-3 {
	top: 25%;
	left: 42%;
	width: 11px;
	height: 11px;
	opacity: 0.16;
}

.sparkle-4 {
	top: 12%;
	left: 60%;
	width: 16px;
	height: 16px;
}

.sparkle-5 {
	top: 70%;
	left: 75%;
	width: 10px;
	height: 10px;
	opacity: 0.18;
}

/* Live counter pill */
.hero-meta {
	flex: 0 0 auto;
}

.live-pill {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding-block: 0.4rem;
	padding-inline-start: 0.7rem;
	padding-inline-end: 0.85rem;
	background: var(--surface);
	border-radius: 999px;
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--fg);
	box-shadow: var(--shadow-sm);
	white-space: nowrap;
}

.live-dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--live-dot);
	box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.5);
	animation: live-pulse 2s ease-in-out infinite;
}

.live-count {
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.live-sep {
	color: var(--fg-soft);
}

.live-label {
	color: var(--fg-muted);
	font-weight: 500;
}

@keyframes live-pulse {
	0%, 100% {
		transform: scale(1);
		box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.4);
	}
	50% {
		transform: scale(1.08);
		box-shadow: 0 0 0 6px rgba(217, 119, 6, 0);
	}
}

/* ---------------- Layout ---------------- */

main {
	padding: 1rem 0.75rem 0;
	max-width: 1400px;
	margin: 0 auto;
}

/* ---------------- Masonry grid (CSS columns) ---------------- */

.grid {
	column-count: 2;
	column-gap: 0.625rem;
}

@media (min-width: 640px) {
	.grid {
		column-count: 3;
		column-gap: 0.75rem;
	}
}

@media (min-width: 1024px) {
	.grid {
		column-count: 4;
		column-gap: 0.875rem;
	}
}

@media (min-width: 1400px) {
	.grid {
		column-count: 5;
	}
}

/* ---------------- Card (framed-print look) ---------------- */

.card {
	display: block;
	width: 100%;
	margin: 0 0 0.625rem;
	padding: 4px;
	break-inside: avoid;
	border-radius: var(--radius);
	background: var(--frame-matte);
	box-shadow: var(--shadow-sm);
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: transform 220ms ease, box-shadow 220ms ease;
	animation: photo-in 520ms ease both;
	animation-delay: calc(var(--i, 0) * 35ms);
	opacity: 0;
}

@media (min-width: 640px) {
	.card {
		margin-bottom: 0.75rem;
		padding: 5px;
	}
}

@media (min-width: 1024px) {
	.card {
		margin-bottom: 0.875rem;
		padding: 6px;
	}
}

.card img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: var(--radius-inner);
}

@keyframes photo-in {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (hover: hover) {
	.card:hover {
		transform: translateY(-3px) rotate(0.5deg);
		box-shadow: var(--shadow-lg);
	}
	.card:nth-child(even):hover {
		transform: translateY(-3px) rotate(-0.5deg);
	}
}

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

/* ---------------- Lightbox (CSS-only :target) ---------------- */

.lightbox {
	display: none;
}

.lightbox:target {
	display: flex;
	position: fixed;
	inset: 0;
	background: rgba(28, 27, 26, 0.95);
	z-index: 100;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	animation: lightbox-in 200ms ease;
}

.lightbox-backdrop {
	position: absolute;
	inset: 0;
	z-index: 1;
	cursor: zoom-out;
}

.lightbox-figure {
	position: relative;
	z-index: 2;
	max-width: 100%;
	max-height: 100%;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 1rem;
	align-items: center;
}

.lightbox-figure img {
	max-width: 100%;
	max-height: calc(100vh - 6rem);
	max-height: calc(100dvh - 6rem);
	object-fit: contain;
	border-radius: var(--radius);
}

.lightbox-actions {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.875rem;
}

.lightbox-row {
	display: flex;
	gap: 0.625rem;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
}

.lightbox-share {
	display: flex;
	gap: 0.5rem;
	align-items: center;
	color: var(--bg);
}

.share-label {
	font-size: 0.8125rem;
	font-weight: 500;
	color: rgba(250, 247, 242, 0.7);
	margin-inline-end: 0.25rem;
}

.share-btn {
	width: 40px;
	height: 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	color: var(--bg);
	background: rgba(250, 247, 242, 0.12);
	text-decoration: none;
	transition: background-color 180ms ease, transform 180ms ease;
}

.share-btn svg {
	width: 20px;
	height: 20px;
}

.share-btn:hover,
.share-btn:focus-visible {
	background: rgba(250, 247, 242, 0.24);
	transform: translateY(-1px);
	outline: none;
}

.share-whatsapp:hover,
.share-whatsapp:focus-visible {
	background: #25d366;
	color: white;
}

.share-telegram:hover,
.share-telegram:focus-visible {
	background: #229ed9;
	color: white;
}

.share-email:hover,
.share-email:focus-visible {
	background: var(--bg);
	color: var(--fg);
}

.like-btn {
	min-height: 44px;
	min-width: 4.5rem;
	padding: 0.5rem 1rem;
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-family: var(--font);
	font-size: 0.9375rem;
	font-weight: 500;
	color: var(--bg);
	background: transparent;
	border: 1px solid rgba(250, 247, 242, 0.4);
	border-radius: 999px;
	cursor: pointer;
	transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.like-btn:hover,
.like-btn:focus-visible {
	background: rgba(250, 247, 242, 0.12);
	outline: none;
}

.like-icon {
	width: 18px;
	height: 18px;
}

.like-btn--liked {
	color: #ef4444;
	border-color: #ef4444;
	background: rgba(239, 68, 68, 0.12);
}

.like-btn--liked:hover,
.like-btn--liked:focus-visible {
	background: rgba(239, 68, 68, 0.2);
}

.like-count {
	font-variant-numeric: tabular-nums;
	font-weight: 600;
	min-width: 1ch;
	text-align: center;
}

/* ---------------- Empty state ---------------- */

.empty-state {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 4rem 1.5rem;
	text-align: center;
	color: var(--fg-muted);
}

.empty-state-icon {
	width: 56px;
	height: 56px;
	color: var(--fg-soft);
	margin-bottom: 1rem;
}

.empty-state-title {
	font-size: 1.125rem;
	font-weight: 600;
	color: var(--fg);
	margin: 0 0 0.5rem;
}

.empty-state-hint {
	font-size: 0.9375rem;
	color: var(--fg-muted);
	margin: 0;
}

.lightbox-btn {
	min-height: 44px;
	min-width: 7.5rem;
	padding: 0.625rem 1.5rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-family: var(--font);
	font-size: 0.9375rem;
	font-weight: 500;
	border-radius: 999px;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 180ms ease, color 180ms ease,
		transform 180ms ease;
	border: none;
}

.lightbox-btn--primary {
	background: var(--bg);
	color: var(--fg);
}

.lightbox-btn--primary:hover,
.lightbox-btn--primary:focus-visible {
	background: var(--surface);
	transform: translateY(-1px);
	outline: none;
}

.lightbox-close {
	background: transparent;
	color: var(--bg);
	border: 1px solid rgba(250, 247, 242, 0.4);
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
	background: rgba(250, 247, 242, 0.12);
	outline: none;
}

@keyframes lightbox-in {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

/* ---------------- Load more button ---------------- */

.load-more-wrap {
	display: flex;
	justify-content: center;
	padding: 2rem 1rem 2.5rem;
}

.load-more {
	min-height: 48px;
	min-width: 12rem;
	padding: 0.75rem 2rem;
	font-family: var(--font);
	font-size: 0.9375rem;
	font-weight: 500;
	color: var(--fg);
	background: var(--accent-soft);
	border: none;
	border-radius: 999px;
	cursor: pointer;
	letter-spacing: 0;
	transition: background-color 180ms ease, transform 180ms ease;
}

.load-more:hover,
.load-more:focus-visible {
	background: #e0d9cc;
	transform: translateY(-1px);
	outline: none;
}

.load-more:active {
	transform: translateY(0);
}

.htmx-request.load-more,
.htmx-request .load-more {
	opacity: 0.6;
	cursor: wait;
}

/* ---------------- Footer ---------------- */

.footer {
	padding: 1rem 1rem 2.5rem;
	text-align: center;
}

.footer p {
	margin: 0;
	font-size: 0.8125rem;
	font-style: italic;
	color: var(--fg-soft);
	letter-spacing: 0.02em;
}

.footer-photographer {
	color: var(--fg-muted);
	font-style: normal;
	font-weight: 500;
}

/* ---------------- Upload page ---------------- */

.back-link {
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--fg-muted);
	text-decoration: none;
	padding: 0.4rem 0.8rem;
	background: var(--surface);
	border-radius: 999px;
	box-shadow: var(--shadow-sm);
	transition: color 180ms ease, transform 180ms ease;
}

.back-link:hover,
.back-link:focus-visible {
	color: var(--fg);
	transform: translateY(-1px);
	outline: none;
}

.upload-form {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	max-width: 720px;
	margin: 1.5rem auto 0;
	padding: 0 0.5rem;
}

.upload-drop {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.625rem;
	padding: 2.5rem 1.5rem;
	background: var(--surface);
	border: 2px dashed rgba(80, 50, 30, 0.18);
	border-radius: var(--radius);
	cursor: pointer;
	transition: border-color 200ms ease, background-color 200ms ease;
	text-align: center;
}

.upload-drop:hover,
.upload-drop:focus-within {
	border-color: var(--live-dot);
	background: #fffdf8;
}

.upload-drop input[type="file"] {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
}

.upload-icon {
	width: 36px;
	height: 36px;
	color: var(--fg-muted);
}

.upload-drop-text {
	font-size: 1rem;
	font-weight: 600;
	color: var(--fg);
}

.upload-drop-hint {
	font-size: 0.8125rem;
	color: var(--fg-muted);
}

.upload-progress {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	width: 100%;
	height: 6px;
	border: none;
	border-radius: 3px;
	background: var(--accent-soft);
	overflow: hidden;
}

.upload-progress::-webkit-progress-bar {
	background: var(--accent-soft);
	border-radius: 3px;
}

.upload-progress::-webkit-progress-value {
	background: var(--live-dot);
	border-radius: 3px;
	transition: width 200ms ease;
}

.upload-progress::-moz-progress-bar {
	background: var(--live-dot);
	border-radius: 3px;
}

.upload-submit {
	min-height: 48px;
	padding: 0.75rem 2rem;
	font-family: var(--font);
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--surface);
	background: var(--fg);
	border: none;
	border-radius: 999px;
	cursor: pointer;
	transition: background-color 180ms ease, transform 180ms ease;
}

.upload-submit:hover,
.upload-submit:focus-visible {
	background: #2c2a28;
	transform: translateY(-1px);
	outline: none;
}

.htmx-request.upload-submit,
.htmx-request .upload-submit {
	opacity: 0.6;
	cursor: wait;
}

.upload-status {
	max-width: 720px;
	margin: 1.5rem auto;
	padding: 0 0.5rem;
}

.upload-result {
	padding: 1rem 1.25rem;
	border-radius: var(--radius);
	font-size: 0.9375rem;
	margin-bottom: 0.75rem;
}

.upload-result--ok {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	background: #ecfdf5;
	color: #065f46;
	font-weight: 500;
}

.upload-result-icon {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
}

.upload-result--errors {
	background: #fef2f2;
	color: #991b1b;
}

.upload-result-title {
	margin: 0 0 0.5rem;
	font-weight: 600;
}

.upload-result-list {
	margin: 0;
	padding-inline-start: 1.25rem;
	font-size: 0.875rem;
}

.upload-result-list li {
	margin-bottom: 0.25rem;
}

/* ---------------- Blessing editor (full-screen, mobile-first) ---------------- */

.back-link--accent { color: var(--accent-tallit); font-weight: 600; }

.be {
	position: fixed;
	inset: 0;
	z-index: 10;
	overflow: hidden;
	background: var(--bg);
}

.be-stage { position: absolute; inset: 0; background: #fff; }
.be-stage .canvas-container { position: absolute !important; inset: 0; }
/* Canvases MUST stay transparent — an opaque upper (interaction) canvas would
   hide committed strokes on the lower canvas. */
.be-stage canvas { background: transparent !important; touch-action: none; }

/* shared icon stroke styling */
.be svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---- Top bar ---- */
.be-topbar {
	position: absolute;
	inset: 0 0 auto 0;
	z-index: 20;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: calc(env(safe-area-inset-top, 0px) + 0.55rem) 0.7rem 0.55rem;
	background: linear-gradient(to bottom, rgba(250, 247, 242, 0.94), rgba(250, 247, 242, 0));
	pointer-events: none;
}
.be-topbar > * { pointer-events: auto; }
.be-title {
	flex: 1; min-width: 0; text-align: center;
	font-weight: 700; font-size: 1rem; color: var(--fg);
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.be-icon {
	flex: none; width: 44px; height: 44px;
	display: inline-flex; align-items: center; justify-content: center;
	border-radius: 50%;
	background: var(--surface); border: none; color: var(--fg);
	box-shadow: var(--shadow-sm);
	cursor: pointer; text-decoration: none;
	-webkit-tap-highlight-color: transparent;
	transition: transform 160ms ease, background-color 160ms ease;
}
.be-icon:active { transform: scale(0.92); }
.be-icon svg { width: 22px; height: 22px; }

/* ---- Save pill ---- */
.be-save {
	flex: none;
	display: inline-flex; align-items: center; gap: 0.4rem;
	height: 44px; padding: 0 1.1rem;
	border: none; border-radius: 999px;
	background: var(--accent-tallit); color: #fff;
	font-family: var(--font); font-size: 0.95rem; font-weight: 600;
	box-shadow: 0 4px 14px rgba(44, 74, 135, 0.35);
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: transform 160ms ease, background-color 160ms ease;
}
.be-save:active { transform: scale(0.96); }
.be-save svg { width: 20px; height: 20px; }

/* ---- Bottom cluster (panel above dock) ---- */
.be-bottom {
	position: absolute;
	z-index: 20;
	left: 0; right: 0;
	bottom: calc(env(safe-area-inset-bottom, 0px) + 0.7rem);
	display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
	padding: 0 0.6rem;
	pointer-events: none;
}
.be-bottom > * { pointer-events: auto; }

/* All tools visible at once: the dock wraps to a second row instead of
   hiding buttons behind a horizontal scroll. */
.be-dock {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
	gap: 0.2rem;
	max-width: 100%;
	padding: 0.4rem 0.5rem;
	background: rgba(255, 255, 255, 0.94);
	-webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
	border-radius: 26px;
	box-shadow: var(--shadow-lg);
}

.be-divider { flex: none; width: 1px; height: 26px; background: var(--accent-soft); margin: 0 0.2rem; }

.be-tool {
	flex: none; width: 46px; height: 46px;
	display: inline-flex; align-items: center; justify-content: center;
	border-radius: 50%;
	background: transparent; border: none; color: var(--fg);
	cursor: pointer; -webkit-tap-highlight-color: transparent;
	transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}
.be-tool svg { width: 23px; height: 23px; }
.be-tool:active { transform: scale(0.9); }
.be-tool.is-active { background: var(--accent-tallit); color: #fff; }
.be-tool--ghost { color: var(--fg-muted); }
.be-tool--danger { color: #dc2626; }
.be-color-dot { width: 22px; height: 22px; border-radius: 50%; background: #1c1b1a; border: 2px solid rgba(0, 0, 0, 0.18); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55); }
.be-tool--color.is-active { background: var(--accent-tallit); }
.be-tool--color.is-active .be-color-dot { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9); border-color: rgba(255, 255, 255, 0.7); }

/* ---- Options panel (in-flow above the dock) ---- */
.be-panel {
	width: 100%;
	max-width: 520px;
	padding: 0.7rem 0.85rem;
	background: rgba(255, 255, 255, 0.96);
	-webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
	border-radius: var(--radius);
	box-shadow: var(--shadow-lg);
	animation: be-pop 180ms ease;
}
@keyframes be-pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.be-row { display: flex; align-items: center; gap: 0.5rem; overflow-x: auto; scrollbar-width: none; }
.be-row::-webkit-scrollbar { display: none; }
.be-row--wrap { flex-wrap: wrap; justify-content: center; }
.be-row--sizes { margin-top: 0.6rem; justify-content: center; gap: 0.75rem; }

.be-swatch {
	flex: none; width: 34px; height: 34px;
	border-radius: 50%; background: var(--c, #000);
	border: 2px solid rgba(0, 0, 0, 0.12); cursor: pointer; padding: 0;
	transition: transform 140ms ease, box-shadow 140ms ease;
}
.be-swatch.is-active { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--accent-tallit); transform: scale(1.08); }

.be-size {
	flex: none; width: 44px; height: 44px;
	display: inline-flex; align-items: center; justify-content: center;
	border-radius: 50%; background: var(--bg); border: 1px solid var(--accent-soft); cursor: pointer;
}
.be-size.is-active { background: var(--accent-soft); border-color: var(--accent-tallit); }
.be-size span { width: var(--s, 12px); height: var(--s, 12px); border-radius: 50%; background: var(--fg); display: block; }



.be-shape {
	flex: none; width: 48px; height: 48px;
	display: inline-flex; align-items: center; justify-content: center;
	background: var(--bg); border: 1px solid var(--accent-soft); border-radius: 12px; color: var(--fg); cursor: pointer;
	transition: transform 140ms ease;
}
.be-shape svg { width: 26px; height: 26px; }
.be-shape:active { transform: scale(0.9); }

/* ---- Save sheet ---- */
.be-sheet { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
/* a class-level display would otherwise override the [hidden] attribute */
.be-sheet[hidden] { display: none; }
.be-sheet-backdrop { position: absolute; inset: 0; background: rgba(28, 27, 26, 0.5); animation: be-fade 180ms ease; }
.be-sheet-card {
	position: relative; z-index: 1;
	width: 100%; max-width: 520px;
	background: var(--surface);
	border-radius: var(--radius) var(--radius) 0 0;
	padding: 1.5rem 1.25rem calc(env(safe-area-inset-bottom, 0px) + 1.5rem);
	box-shadow: var(--shadow-lg);
	animation: be-slide-up 240ms cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes be-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes be-slide-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
.be-sheet-title { margin: 0 0 1rem; font-size: 1.15rem; font-weight: 700; color: var(--fg); text-align: center; }
.be-name {
	width: 100%; min-height: 50px; padding: 0.7rem 1rem; margin-bottom: 0.5rem;
	font-family: var(--font); font-size: 1rem; color: var(--fg);
	background: var(--bg); border: 1px solid var(--accent-soft); border-radius: var(--radius); text-align: center;
}
.be-name:focus-visible { outline: none; border-color: var(--accent-tallit); }
.be-save-result { text-align: center; }
.be-sheet-actions { display: flex; gap: 0.6rem; margin-top: 1rem; }
.be-btn {
	flex: 1; min-height: 50px; padding: 0 1rem;
	font-family: var(--font); font-size: 1rem; font-weight: 600;
	border: none; border-radius: 999px; cursor: pointer;
	transition: transform 160ms ease, background-color 160ms ease;
}
.be-btn:active { transform: scale(0.97); }
.be-btn--ghost { background: var(--accent-soft); color: var(--fg); }
.be-btn--primary { background: var(--accent-tallit); color: #fff; }
.htmx-request.be-btn--primary { opacity: 0.6; cursor: wait; }

.blessing-error { margin: 0; padding: 0.7rem 1rem; background: #fef2f2; color: #991b1b; border-radius: var(--radius); font-size: 0.9rem; font-weight: 500; }

/* ---------------- Blessing wall cards ---------------- */

.card {
	position: relative;
}

.card-author {
	position: absolute;
	inset-inline: 4px;
	bottom: 4px;
	padding: 0.3rem 0.6rem;
	background: linear-gradient(to top, rgba(28, 27, 26, 0.72), rgba(28, 27, 26, 0));
	color: #fff;
	font-size: 0.75rem;
	font-weight: 500;
	border-radius: 0 0 var(--radius-inner) var(--radius-inner);
	text-align: center;
}

.lightbox-author {
	margin: 0;
	color: var(--bg);
	font-size: 0.9375rem;
	font-weight: 500;
}

/* ---------------- Reduced motion ---------------- */

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
	.card {
		opacity: 1 !important;
		transform: none !important;
	}
	.live-dot {
		animation: none !important;
		box-shadow: 0 0 0 0 transparent !important;
	}
}
