:root {
	--bg: #f3e3d6;
	--bg-soft: #ede0d2;
	--ink: #15110d;
	--muted: #4d4239;
	--rule: #b8a08d;
	--rule-soft: #d2bda9;
	--card: #faf2e9;
	--ok: #3e5f44;
	--err: #8c2e22;
	--maxw: 960px;
	--maxw-form: 560px;
	--maxw-prose: 620px;
}

* { box-sizing: border-box; }

html, body {
	margin: 0;
	padding: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
	font-size: 20px;
	font-weight: 500;
	line-height: 1.6;
}

.page {
	max-width: var(--maxw);
	margin: 0 auto;
	padding: 3rem 2rem 2.5rem;
}

@media (max-width: 600px) {
	.page { padding: 2rem 1.25rem 2rem; }
}

.page--centered {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.page-footer {
	margin-top: 4rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--rule-soft);
	text-align: center;
	font-family: 'Cormorant Garamond', serif;
}

.page-footer p { margin: 0.4rem 0; font-size: 1.05rem; font-weight: 500; }

.footer-monogram {
	font-family: 'Cinzel', serif;
	font-size: clamp(1.6rem, 3.4vw, 2.2rem);
	font-weight: 500;
	letter-spacing: 0.08em;
	text-decoration: underline;
	text-underline-offset: 0.18em;
	text-decoration-thickness: 1px;
	color: var(--ink);
	margin: 1rem 0 0.4rem !important;
}

a { color: var(--ink); }

/* --- Masthead --- */
.masthead { text-align: center; }

.masthead-title {
	font-family: 'Cinzel', serif;
	font-weight: 500;
	font-size: clamp(2.2rem, 6.5vw, 4rem);
	letter-spacing: 0.06em;
	margin: 0 0 1.4rem;
	line-height: 1.05;
}

.masthead-title .plus {
	font-weight: 400;
	margin: 0 0.15em;
	font-size: 0.95em;
}

.masthead-subtitle {
	font-family: 'Cormorant Garamond', serif;
	text-transform: uppercase;
	letter-spacing: 0.18em;
	font-size: 0.85rem;
	font-weight: 600;
	margin: 0.4rem 0;
	color: var(--ink);
}

.masthead-subtitle.countdown { font-weight: 700; }
.masthead-subtitle--secondary { margin-top: 1.2rem; }

.primary-nav {
	margin: 1.8rem 0 0.5rem;
	display: flex;
	justify-content: center;
	gap: 1.4rem;
	flex-wrap: wrap;
}

.primary-nav a {
	font-family: 'Cormorant Garamond', serif;
	font-style: italic;
	font-size: 1.15rem;
	font-weight: 500;
	color: var(--ink);
	text-decoration: none;
	border-bottom: 1px solid transparent;
	padding-bottom: 0.15rem;
	transition: border-color 0.15s ease;
}

.primary-nav a.is-active { border-bottom-color: var(--ink); }
.primary-nav a:hover { border-bottom-color: var(--muted); }

/* --- Content --- */
.content { margin-top: 1.5rem; }

h1, h2, h3 {
	font-family: 'Cinzel', serif;
	font-weight: 500;
	letter-spacing: 0.05em;
	color: var(--ink);
}

h1 { font-size: 1.8rem; margin: 0 0 0.8rem; }
h2 { font-size: 1.3rem; margin: 1.6rem 0 0.6rem; letter-spacing: 0.08em; text-transform: uppercase; }
h3 { font-size: 1.05rem; margin: 0.6rem 0 0.3rem; }

p { margin: 0.7rem 0; }

.muted { color: var(--muted); }
.small { font-size: 0.95rem; }
.lede { font-size: 1.2rem; font-weight: 500; color: var(--ink); }

.visually-hidden {
	position: absolute; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); white-space: nowrap;
}

/* --- Hero photo --- */
.hero-photo {
	position: relative;
	margin: 1.5rem 0;
	aspect-ratio: 16 / 11;
	background: linear-gradient(135deg, #d4c5b8, #c5b29f);
	border: 1px solid var(--rule-soft);
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 0 1rem;
	color: var(--bg);
	font-family: 'Cormorant Garamond', serif;
	font-style: italic;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	font-size: 0.85rem;
	overflow: hidden;
}

.hero-photo.is-filled { background: var(--ink); padding: 0; }

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

.hero-photo--wide { aspect-ratio: 21 / 9; }

@media (max-width: 600px) {
	.hero-photo--wide { aspect-ratio: 16 / 10; }
}

/* --- Inline upload affordance (admin only) --- */
.hero-photo-form {
	position: absolute;
	inset: 0;
	margin: 0;
	pointer-events: none;
}

.hero-photo-btn {
	position: absolute;
	top: 0.85rem;
	left: 50%;
	transform: translateX(-50%);
	display: inline-block;
	cursor: pointer;
	pointer-events: auto;
	border: 1px solid rgba(255, 255, 255, 0.85);
	padding: 0.4rem 0.85rem;
	background: rgba(21, 17, 13, 0.6);
	color: #fff;
	font-family: 'Cormorant Garamond', serif;
	font-style: italic;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	font-size: 0.8rem;
	opacity: 0;
	transition: opacity 0.15s ease;
	z-index: 2;
}

.hero-photo.is-editable.is-filled::after {
	content: '';
	position: absolute;
	inset: 0;
	background: rgba(21, 17, 13, 0);
	pointer-events: none;
	transition: background 0.15s ease;
	z-index: 1;
}

.hero-photo.is-editable:hover .hero-photo-btn { opacity: 1; }
.hero-photo.is-editable.is-filled:hover::after { background: rgba(21, 17, 13, 0.25); }

/* Always show button when no photo yet */
.hero-photo.is-editable:not(.is-filled) .hero-photo-btn { opacity: 1; }

/* --- Custom resize handle (vertical only) --- */
.hero-photo-resize {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 22px;
	cursor: ns-resize;
	background: linear-gradient(to top, rgba(21, 17, 13, 0.7), rgba(21, 17, 13, 0));
	z-index: 4;
	touch-action: none;
}

.hero-photo-resize::after {
	content: '';
	position: absolute;
	bottom: 6px;
	left: 50%;
	transform: translateX(-50%);
	width: 60px;
	height: 4px;
	border-radius: 2px;
	background: rgba(255, 255, 255, 0.95);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.hero-photo.is-resizing { user-select: none; }
.hero-photo.is-resizing img { pointer-events: none; }

/* --- Editable text --- */
.editable-text {
	white-space: pre-wrap;
	margin: 0.7rem 0;
	overflow-wrap: anywhere;
	word-break: break-word;
	max-width: 100%;
}
/* Long URLs need to break MID-character, not just at word boundaries.
   break-all is the most aggressive option — without it the link is
   forced onto a single line and pushes the page wider than the viewport. */
.editable-text a {
	word-break: break-all;
	overflow-wrap: anywhere;
}

.editable-text.is-placeholder {
	color: var(--muted);
	font-style: italic;
}

.editable-text.is-editable-mode {
	cursor: text;
	border-radius: 2px;
	padding: 0.1rem 0.25rem;
	margin-left: -0.25rem;
	margin-right: -0.25rem;
	transition: background 0.15s ease;
}

.editable-text.is-editable-mode:hover {
	background: rgba(21, 17, 13, 0.06);
	outline: 1px dashed rgba(21, 17, 13, 0.25);
}

.editable-text-edit {
	margin: 0.7rem 0;
}

.editable-textarea {
	width: 100%;
	min-height: 6rem;
	font-family: inherit;
	font-size: inherit;
	line-height: inherit;
	padding: 0.6rem 0.85rem;
	border: 1px solid var(--rule);
	background: var(--card);
	color: var(--ink);
	resize: vertical;
}

.editable-text-actions {
	margin-top: 0.4rem;
	display: flex;
	gap: 0.5rem;
}

.editable-text-actions button {
	padding: 0.4rem 0.95rem;
	font-family: 'Cormorant Garamond', serif;
	font-style: italic;
	font-size: 0.9rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	cursor: pointer;
	border: 1px solid var(--ink);
	background: var(--ink);
	color: var(--bg);
}

.editable-text-actions button.cancel {
	background: transparent;
	color: var(--ink);
}

/* --- Full-bleed background photo (home page) --- */
body.has-hero-bg { background: transparent; }

.hero-bg {
	position: fixed;
	inset: 0;
	z-index: 0;
	background:
		linear-gradient(rgba(243, 227, 214, 0.55), rgba(243, 227, 214, 0.35)),
		linear-gradient(135deg, #d4c5b8, #c5b29f);
	display: flex;
	align-items: flex-end;
	justify-content: flex-end;
	padding: 1.25rem;
	overflow: hidden;
	pointer-events: none;
}

.hero-bg.is-filled { background: var(--ink); }

.hero-bg-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hero-bg-caption {
	color: rgba(255, 255, 255, 0.7);
	font-family: 'Cormorant Garamond', serif;
	font-style: italic;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	font-size: 0.7rem;
	z-index: 1;
}

.hero-bg-form {
	position: absolute;
	bottom: 1.25rem;
	left: 1.25rem;
	z-index: 2;
	pointer-events: auto;
	margin: 0;
}

.hero-bg-btn {
	display: inline-block;
	padding: 0.5rem 0.9rem;
	border: 1px solid rgba(255, 255, 255, 0.85);
	background: rgba(21, 17, 13, 0.6);
	color: #fff;
	font-family: 'Cormorant Garamond', serif;
	font-style: italic;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	font-size: 0.8rem;
	cursor: pointer;
}

body.has-hero-bg .page { position: relative; z-index: 1; }

/* --- Admin editing banner --- */
.admin-edit-banner {
	position: sticky;
	top: 0;
	z-index: 10;
	background: var(--ink);
	color: var(--bg);
	padding: 0.55rem 1rem;
	text-align: center;
	font-family: 'Cormorant Garamond', serif;
	font-style: italic;
	font-size: 0.95rem;
	letter-spacing: 0.04em;
}

.admin-edit-banner a { color: var(--bg); margin-left: 0.4rem; }
.admin-edit-banner a:hover { color: #fff; }

.photo-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1rem;
	margin: 1.5rem 0;
}

.photo-grid--two { grid-template-columns: repeat(2, 1fr); }

.photo-grid .hero-photo { margin: 0; aspect-ratio: 4 / 5; }

@media (max-width: 720px) {
	.photo-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
	.photo-grid { grid-template-columns: 1fr; gap: 0.75rem; }
	.photo-grid .hero-photo { aspect-ratio: 16 / 11; }
}

/* --- Event summary (the two-column block at the bottom) --- */
.event-summary {
	display: grid;
	grid-template-columns: 1fr 1px 1fr;
	align-items: center;
	margin: 2.5rem 0 1.5rem;
	text-align: center;
}

.event-summary + .event-summary {
	margin-top: 0.5rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--rule-soft);
}

.event-summary .col {
	padding: 1.8rem 0.5rem;
	font-family: 'Cinzel', serif;
	font-size: clamp(1.15rem, 2.6vw, 1.75rem);
	letter-spacing: 0.06em;
	line-height: 1.45;
	font-weight: 500;
}

.event-summary .col .line { display: block; }

.event-summary .divider {
	background: var(--ink);
	align-self: stretch;
	width: 1px;
	opacity: 0.6;
}

.event-detail {
	text-align: center;
	margin-top: -0.5rem;
	font-size: 1.15rem;
	font-weight: 500;
	color: var(--ink);
}

.event-detail em { color: var(--muted); font-size: 1rem; font-weight: 500; }

/* --- Forms --- */
input[type="text"],
input[type="password"],
input[type="email"],
select,
textarea {
	font-family: 'Cormorant Garamond', serif;
	font-size: 1.1rem;
	font-weight: 500;
	padding: 0.7rem 0.85rem;
	border: 1px solid var(--rule);
	border-radius: 2px;
	background: var(--card);
	color: var(--ink);
	width: 100%;
}

input:focus, select:focus, textarea:focus {
	outline: none;
	border-color: var(--ink);
	box-shadow: 0 0 0 1px var(--ink);
}

textarea { resize: vertical; }

::placeholder { color: var(--muted); font-style: italic; opacity: 0.85; }

label { display: block; font-family: 'Cormorant Garamond', serif; font-weight: 500; }

/* --- Buttons --- */
.btn, button.btn, input[type="submit"].btn {
	display: inline-block;
	background: var(--ink);
	color: var(--bg);
	border: none;
	padding: 0.75rem 1.7rem;
	font-family: 'Cormorant Garamond', serif;
	font-size: 1.05rem;
	font-weight: 600;
	font-style: italic;
	letter-spacing: 0.06em;
	cursor: pointer;
	border-radius: 2px;
	text-transform: uppercase;
}

.btn:hover { background: #2d2620; }

.btn-link {
	background: none;
	border: none;
	color: var(--ink);
	cursor: pointer;
	font-family: 'Cormorant Garamond', serif;
	font-style: italic;
	font-size: 1rem;
	font-weight: 500;
	padding: 0;
	text-decoration: underline;
}

.btn-link.danger { color: var(--err); }

/* --- Public landing --- */
.public-intro {
	text-align: center;
	margin-top: 1.5rem;
}

.public-intro .lede {
	font-style: italic;
	font-size: 1.25rem;
	font-weight: 500;
	color: var(--ink);
	margin-bottom: 1.8rem;
}

.code-form {
	display: flex;
	gap: 0.5rem;
	max-width: 420px;
	margin: 1rem auto;
	align-items: stretch;
}

.code-form input[type="text"] {
	flex: 1 1 auto;
	min-width: 0;
	text-transform: lowercase;
	text-align: center;
	letter-spacing: 0.08em;
}

.code-form .btn { flex: 0 0 auto; white-space: nowrap; }

/* --- Flashes --- */
.flashes { margin: 1rem 0; display: grid; gap: 0.5rem; }
.flash {
	padding: 0.8rem 1.1rem;
	border: 1px solid var(--rule);
	background: var(--card);
	font-style: italic;
	font-weight: 500;
	font-size: 1.05rem;
	color: var(--ink);
}
.flash--success {
	border-color: rgba(166, 184, 150, 0.7);
	background: linear-gradient(135deg, #f4ebda 0%, #faf2e9 100%);
	color: var(--ink);
	font-size: 1.25rem;
	font-style: italic;
	text-align: center;
	padding: 1.4rem 1.6rem;
	border-radius: 8px;
	box-shadow: 0 6px 20px rgba(166, 184, 150, 0.25);
	letter-spacing: 0.01em;
	line-height: 1.45;
}
.flash--error { border-color: var(--err); color: var(--err); }

/* --- RSVP form --- */
.rsvp-form {
	display: grid;
	gap: 1.25rem;
	max-width: var(--maxw-form);
	margin: 0 auto;
}

.guest-card {
	background: var(--card);
	border: 1px solid var(--rule);
	border-radius: 3px;
	padding: 1.5rem 1.6rem;
}

.guest-card.has-error {
	border-color: var(--err);
	background: #f7e8e1;
}

.guest-card-name {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	flex-wrap: wrap;
	font-family: 'Cinzel', serif;
	font-size: 1.1rem;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ink);
	padding-bottom: 0.85rem;
	margin-bottom: 1.1rem;
	border-bottom: 1px solid var(--rule-soft);
}

.guest-card-name .name-text { line-height: 1.2; }

.field-errors {
	margin: 0 0 1rem;
	padding-left: 1.3rem;
	color: var(--err);
	font-size: 1rem;
	font-weight: 500;
	font-style: italic;
}

.rsvp-row { margin-bottom: 1.1rem; }
.rsvp-row:last-child { margin-bottom: 0; }

.rsvp-row.name-fields {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.75rem;
}

@media (max-width: 480px) {
	.rsvp-row.name-fields { grid-template-columns: 1fr; }
}

.rsvp-row.attendance {
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
}

.rsvp-event-label,
.rsvp-field-label {
	display: block;
	font-family: 'Cinzel', serif;
	font-size: 0.85rem;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ink);
	margin-bottom: 0.4rem;
}

.rsvp-event-label { margin-bottom: 0; }

.rsvp-options {
	display: flex;
	gap: 0.6rem;
}

.rsvp-option {
	flex: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.55rem;
	padding: 0.7rem 1rem;
	border: 1px solid var(--rule);
	background: var(--bg);
	cursor: pointer;
	font-family: 'Cormorant Garamond', serif;
	font-size: 1.1rem;
	font-weight: 500;
	color: var(--ink);
	border-radius: 2px;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
	user-select: none;
}

.rsvp-option:hover { border-color: var(--ink); background: var(--bg-soft); }

.rsvp-option:focus-within {
	outline: 2px solid var(--ink);
	outline-offset: 2px;
}

.rsvp-option input {
	margin: 0;
	width: 1rem;
	height: 1rem;
	accent-color: var(--ink);
	cursor: pointer;
}

.rsvp-option.is-selected {
	background: var(--ink);
	color: var(--bg);
	border-color: var(--ink);
}

.rsvp-option.is-selected input { accent-color: var(--bg); }

.rsvp-field { display: block; }

.rsvp-actions {
	display: flex;
	justify-content: center;
	margin-top: 0.5rem;
}

.tag {
	display: inline-block;
	font-family: 'Cormorant Garamond', serif;
	font-size: 0.78rem;
	font-weight: 600;
	font-style: italic;
	padding: 0.1rem 0.55rem;
	border: 1px solid var(--rule);
	background: var(--bg-soft);
	color: var(--ink);
	margin-left: 0.4rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

/* --- Reveal-on-scroll (subtle fade + rise) --- */
.reveal {
	opacity: 0;
	transform: translateY(14px);
	transition: opacity 2200ms cubic-bezier(0.16, 1, 0.3, 1),
	            transform 2200ms cubic-bezier(0.16, 1, 0.3, 1);
	will-change: opacity, transform;
}
.reveal.is-in-view { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
	.reveal { opacity: 1; transform: none; transition: none; }
}

/* --- Q+A page --- */
.qa-list { margin: 1rem auto 0; max-width: var(--maxw-prose); }
.qa-item {
	padding: 1.2rem 0;
	border-bottom: 1px solid var(--rule-soft);
}
.qa-item:last-child { border-bottom: none; }
.qa-item .q {
	font-family: 'Cinzel', serif;
	font-size: 1rem;
	font-weight: 500;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	margin: 0 0 0.4rem;
	color: var(--ink);
}
.qa-item .a {
	color: var(--ink);
	margin: 0;
	font-size: 1.1rem;
	font-weight: 500;
	line-height: 1.55;
}
.qa-segment-label {
	font-family: 'Cinzel', serif;
	font-size: 0.75rem;
	font-weight: 400;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--muted);
	margin: 0.9rem 0 0.25rem;
}
.qa-segment-label:first-of-type { margin-top: 0.4rem; }
.qa-item .a + .qa-segment-label { margin-top: 1rem; }

/* --- Story page --- */
.story-text {
	max-width: var(--maxw-prose);
	margin: 1.5rem auto;
	font-size: 1.2rem;
	font-weight: 500;
	line-height: 1.65;
	color: var(--ink);
}

.story-text p { margin: 1.1rem 0; }

/* --- Registry --- */
.registry-links {
	display: grid;
	gap: 0.75rem;
	margin: 1.5rem auto;
	max-width: var(--maxw-prose);
}

.registry-link {
	display: block;
	padding: 1.1rem 1.25rem;
	background: var(--card);
	border: 1px solid var(--rule-soft);
	font-family: 'Cinzel', serif;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	font-size: 1rem;
	font-weight: 500;
	color: var(--ink);
	text-align: center;
	text-decoration: none;
}

.registry-link:hover { border-color: var(--ink); }

/* --- Admin (kept utilitarian, light styling only) --- */
.admin-bar {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 1rem;
	margin-bottom: 1rem;
}

.admin-bar-actions { display: flex; gap: 1rem; align-items: center; }

.parties, .guests {
	width: 100%;
	border-collapse: collapse;
	background: var(--card);
	border: 1px solid var(--rule);
}

.parties th, .parties td, .guests th, .guests td {
	padding: 0.55rem 0.75rem;
	border-bottom: 1px solid var(--rule-soft);
	text-align: left;
	font-size: 0.95rem;
}

.parties th, .guests th {
	background: var(--bg-soft);
	font-weight: 500;
	color: var(--muted);
	font-family: 'Cinzel', serif;
	font-size: 0.8rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.parties tr:last-child td, .guests tr:last-child td { border-bottom: none; }

code {
	font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
	background: var(--bg-soft);
	padding: 0.1rem 0.45rem;
	border-radius: 2px;
	font-size: 0.95em;
}

.code-display { font-size: 1rem; margin: 1rem 0; }

.party-form, .guest-add, .auth-form form { display: grid; gap: 0.8rem; max-width: 480px; }

.guests-section { margin-top: 2rem; }
.danger-zone { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--rule); }

/* Admin dashboard stats */
.admin-stats { margin-bottom: 2rem; }

.stat-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 0.75rem;
	margin-bottom: 1rem;
}

.stat-card {
	background: var(--card);
	border: 1px solid var(--rule);
	padding: 1rem 1.1rem;
	text-align: center;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}

.stat-number {
	font-family: 'Cinzel', serif;
	font-size: 2rem;
	font-weight: 500;
	line-height: 1.1;
	color: var(--ink);
}

.stat-number .stat-suffix {
	font-size: 1rem;
	color: var(--muted);
	font-weight: 400;
}

.stat-label {
	font-family: 'Cinzel', serif;
	font-size: 0.75rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--muted);
	margin-top: 0.25rem;
}

.stat-sub {
	margin-top: 0.45rem;
	font-size: 0.85rem;
	line-height: 1.35;
}

.event-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 0.75rem;
}

.event-stat-card {
	background: var(--card);
	border: 1px solid var(--rule);
	padding: 1rem 1.1rem;
}

.event-stat-head { margin-bottom: 0.5rem; }

.event-stat-title {
	font-family: 'Cinzel', serif;
	font-size: 0.95rem;
	font-weight: 500;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	margin: 0;
}

.event-stat-meta {
	font-size: 0.8rem;
	margin-top: 0.1rem;
}

.event-stat-summary {
	font-size: 0.85rem;
	margin: 0.6rem 0 0.5rem;
}

.event-stat-bar {
	display: flex;
	width: 100%;
	height: 12px;
	background: var(--bg-soft);
	border: 1px solid var(--rule-soft);
	overflow: hidden;
}

.event-stat-bar-seg { height: 100%; }
.event-stat-bar-seg--yes { background: #6a8763; }
.event-stat-bar-seg--no { background: var(--err); }
.event-stat-bar-seg--pending { background: var(--rule); }

.event-stat-legend {
	list-style: none;
	padding: 0;
	margin: 0.55rem 0 0;
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
	font-size: 0.85rem;
	color: var(--muted);
}

.event-stat-legend strong {
	color: var(--ink);
	font-weight: 500;
	margin-left: 0.15rem;
}

.dot {
	display: inline-block;
	width: 0.6rem;
	height: 0.6rem;
	border-radius: 50%;
	margin-right: 0.35rem;
	vertical-align: middle;
}

.dot--yes { background: #6a8763; }
.dot--no { background: var(--err); }
.dot--pending { background: var(--rule); }

.parties-toolbar {
	display: flex;
	gap: 0.4rem;
	flex-wrap: wrap;
	margin-bottom: 0.75rem;
}

.filter-chip {
	font-family: 'Cinzel', serif;
	font-size: 0.75rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--muted);
	background: var(--card);
	border: 1px solid var(--rule-soft);
	padding: 0.4rem 0.75rem;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
}

.filter-chip:hover { border-color: var(--rule); color: var(--ink); }

.filter-chip.is-active {
	background: var(--ink);
	color: var(--bg);
	border-color: var(--ink);
}

.filter-count {
	font-size: 0.7rem;
	background: var(--bg-soft);
	color: var(--muted);
	padding: 0.05rem 0.4rem;
	border-radius: 999px;
	letter-spacing: 0;
}

.filter-chip.is-active .filter-count {
	background: rgba(255, 255, 255, 0.18);
	color: var(--bg);
}

.party-name { font-weight: 500; }

.party-guests {
	list-style: none;
	margin: 0.35rem 0 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
}

.party-guest {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.85rem;
}

.party-guest-name { color: var(--muted); }

.rsvp-pill {
	font-family: 'Cinzel', serif;
	font-size: 0.65rem;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	padding: 0.1rem 0.45rem;
	border: 1px solid transparent;
	white-space: nowrap;
	line-height: 1.6;
}

.rsvp-pill--yes { background: #e3ecdc; color: #2f4f24; border-color: #c4d3b8; }
.rsvp-pill--no { background: #f3dad6; color: #5a1a13; border-color: #dab5af; }
.rsvp-pill--pending { background: var(--bg-soft); color: var(--muted); border-color: var(--rule-soft); }

.rsvp-note {
	font-size: 0.8rem;
	color: var(--muted);
	font-style: italic;
}

.parties-empty-msg { margin-top: 0.75rem; text-align: center; }

/* --- Language toggle (floating, iOS-style switch) --- */
.lang-toggle {
	position: fixed;
	right: 1.1rem;
	bottom: 1.1rem;
	z-index: 50;
	margin: 0;
	display: inline-flex;
	padding: 3px;
	background: var(--card, #faf2e9);
	border: 1px solid var(--rule, rgba(77, 66, 57, 0.25));
	border-radius: 999px;
	box-shadow:
		inset 0 1px 2px rgba(0, 0, 0, 0.08),
		0 6px 18px rgba(77, 66, 57, 0.16);
	font-family: 'Cinzel', serif;
	font-size: 0.7rem;
	letter-spacing: 0.18em;
}
.lang-toggle-knob {
	position: absolute;
	top: 3px;
	bottom: 3px;
	left: 3px;
	width: calc(50% - 3px);
	background: var(--ink, #2c241e);
	border-radius: 999px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
	transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
	pointer-events: none;
}
.lang-toggle[data-lang="es"] .lang-toggle-knob {
	transform: translateX(100%);
}
.lang-toggle-label {
	position: relative;
	z-index: 1;
	padding: 0.5rem 1rem;
	min-width: 5.5em;
	text-align: center;
	background: none;
	border: none;
	cursor: pointer;
	color: rgba(77, 66, 57, 0.55);
	font: inherit;
	letter-spacing: inherit;
	transition: color 0.25s ease;
	/* Safari (iOS especially) keeps the native blue button styling
	   unless appearance is explicitly reset. */
	appearance: none;
	-webkit-appearance: none;
	border-radius: 0;
	box-shadow: none;
	outline: none;
}
.lang-toggle-label::-moz-focus-inner { border: 0; padding: 0; }
.lang-toggle[data-lang="en"] .lang-toggle-label--en,
.lang-toggle[data-lang="es"] .lang-toggle-label--es {
	color: var(--card, #faf2e9);
	font-weight: 500;
}

.admin-edit-lang { margin-left: 0.4rem; opacity: 0.85; font-style: italic; }

@media (max-width: 480px) {
	.lang-toggle { right: 0.65rem; bottom: 0.65rem; font-size: 0.65rem; }
	.lang-toggle-label { padding: 0.4rem 0.8rem; }
}

/* --- Lightbox --- */
.lightbox {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2.5rem;
	background: rgba(44, 36, 30, 0.92);
	opacity: 0;
	visibility: hidden;
	transition: opacity 220ms ease, visibility 0s linear 220ms;
}
.lightbox.is-open {
	opacity: 1;
	visibility: visible;
	transition: opacity 220ms ease, visibility 0s linear 0s;
}
.lightbox-img {
	max-width: min(92vw, 1400px);
	max-height: 90vh;
	width: auto;
	height: auto;
	display: block;
	box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
	border-radius: 2px;
	transform: scale(0.97);
	transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1);
}
.lightbox.is-open .lightbox-img { transform: scale(1); }
.lightbox-close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	width: 2.6rem;
	height: 2.6rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 1.6rem;
	line-height: 1;
	color: rgba(243, 227, 214, 0.85);
	background: rgba(0, 0, 0, 0.25);
	border: 1px solid rgba(243, 227, 214, 0.25);
	border-radius: 999px;
	cursor: pointer;
	transition: background 180ms ease, color 180ms ease;
}
.lightbox-close:hover {
	background: rgba(0, 0, 0, 0.45);
	color: rgba(243, 227, 214, 1);
}
body.lightbox-open { overflow: hidden; }
@media (max-width: 480px) {
	.lightbox { padding: 1rem; }
	.lightbox-close { top: 0.5rem; right: 0.5rem; }
}
@media (prefers-reduced-motion: reduce) {
	.lightbox, .lightbox-img { transition: none; }
}
