/*
 * event-instance.css — Styles for single-event_instance.php
 * BEM-ish, prefixed ce-, ported from mockup components.jsx / extras.jsx
 */

/* ── Shared buttons ──────────────────────────────────────────────────────── */

.ce-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	font-family: inherit;
	text-decoration: none;
	transition: background 120ms, border-color 120ms;
	line-height: 1;
}

.ce-btn--ghost {
	background: transparent;
	border: 1px solid var(--line-2);
	color: var(--fg);
}

.ce-btn--ghost:hover {
	background: var(--bg-2);
	border-color: var(--fg-3);
}

.ce-btn--primary {
	background: var(--accent);
	border: 1px solid var(--accent);
	color: oklch(15% 0 0); /* dark ink — passes 4.5:1 against --accent oklch(72%) cobalt */
	font-weight: 600;
}

.ce-btn--primary:hover {
	opacity: 0.88;
}

/* ── Top Nav ─────────────────────────────────────────────────────────────── */

.ce-topnav {
	position: sticky;
	top: 0;
	z-index: 20;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 28px;
	background: color-mix(in oklab, var(--bg) 85%, transparent);
	backdrop-filter: blur(18px);
	border-bottom: 1px solid var(--line);
}

.ce-topnav__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
}

.ce-topnav__brand-wrap {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: inherit;
	text-decoration: none;
}

.ce-topnav__brand-wrap--logo .custom-logo-link {
	display: inline-flex;
	align-items: center;
	line-height: 0;
}

.ce-topnav__brand-wrap--logo .custom-logo {
	height: 32px;
	width: auto;
	max-width: 220px;
	display: block;
}

.ce-topnav__logo-mark {
	width: 28px;
	height: 28px;
	border-radius: 7px;
	background: var(--accent);
	display: grid;
	place-items: center;
	color: oklch(15% 0 0);
	font-family: var(--font-mono);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-decoration: none;
}

.ce-topnav__site-name {
	font-family: var(--font-display);
	font-size: 17px;
	font-weight: 600;
	letter-spacing: -0.01em;
	color: var(--fg);
	text-decoration: none;
}

.ce-topnav__links {
	margin-left: 32px;
}

.ce-topnav__menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 22px;
}

.ce-topnav__menu a {
	color: var(--fg-3);
	text-decoration: none;
	font-size: 14px;
}

.ce-topnav__menu .current-menu-item > a,
.ce-topnav__menu a:hover {
	color: var(--fg-2);
}

.ce-topnav__left {
	display: flex;
	align-items: center;
}

.ce-topnav__actions {
	display: flex;
	align-items: center;
	gap: 10px;
}

/* ── User menu (logged-in dropdown) ──────────────────────────────────────── */

.ce-user-menu {
	position: relative;
}

.ce-user-menu__toggle {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	list-style: none;
	max-width: 180px;
}

.ce-user-menu__toggle::-webkit-details-marker {
	display: none;
}

.ce-user-menu__label {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ce-user-menu__chevron {
	transition: transform 0.15s ease;
	flex: 0 0 auto;
}

.ce-user-menu[open] .ce-user-menu__chevron {
	transform: rotate(180deg);
}

.ce-user-menu__panel {
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	min-width: 180px;
	background: var(--bg);
	border: 1px solid var(--line);
	border-radius: 10px;
	box-shadow: 0 8px 24px oklch(0% 0 0 / 0.18);
	padding: 6px;
	z-index: 100;
	display: flex;
	flex-direction: column;
}

.ce-user-menu__item {
	display: flex;
	align-items: center;
	min-height: 40px;
	padding: 0 12px;
	border-radius: 6px;
	color: var(--fg);
	text-decoration: none;
	font-size: 14px;
	white-space: nowrap;
}

.ce-user-menu__item:hover,
.ce-user-menu__item:focus-visible {
	background: var(--bg-2);
	color: var(--fg);
}

.ce-user-menu__item--app {
	color: var(--accent, var(--fg));
	font-weight: 600;
	margin-block-end: 4px;
	padding-block-end: 8px;
	border-block-end: 1px solid var(--line);
	border-radius: 6px 6px 0 0;
}

/* ── Hero Cinematic ──────────────────────────────────────────────────────── */

.ce-hero {
	position: relative;
	height: 88vh;
	min-height: 620px;
	overflow: hidden;
}

.ce-hero__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: brightness(0.72);
}

.ce-hero__vignette {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		180deg,
		rgba(10, 10, 12, 0.55) 0%,
		rgba(10, 10, 12, 0) 30%,
		rgba(10, 10, 12, 0) 55%,
		rgba(10, 10, 12, 0.95) 100%
	);
}

.ce-hero__content {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 0 var(--density-pad) calc(var(--density-pad) + 16px);
}

.ce-hero__inner {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 48px;
	flex-wrap: wrap;
}

.ce-hero__text {
	max-width: 900px;
}

.ce-hero__eyebrow {
	color: var(--accent);
	margin-bottom: 18px;
	display: flex;
	align-items: center;
	gap: 12px;
	font-family: var(--font-mono);
	font-size: 12px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.ce-hero__eyebrow-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--accent);
	flex-shrink: 0;
}

.ce-hero__title {
	font-family: var(--font-display);
	font-size: clamp(48px, 7vw, 96px);
	font-weight: 600;
	margin: 0;
	color: var(--fg);
	letter-spacing: -0.02em;
	line-height: 1.0;
}

.ce-hero__meta {
	display: flex;
	gap: 24px;
	margin-top: 22px;
	flex-wrap: wrap;
	color: var(--fg-2);
	font-size: 15px;
}

.ce-hero__meta-item {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.ce-hero__meta-icon {
	color: var(--fg-3);
	display: inline-flex;
}

.ce-hero__cta {
	display: flex;
	gap: 10px;
}

/* ── Info Section ────────────────────────────────────────────────────────── */

.ce-info {
	padding: var(--density-pad);
	display: grid;
	grid-template-columns: 1.3fr 1fr;
	gap: var(--density-gap);
	border-bottom: 1px solid var(--line);
}

.ce-info__about {}

.ce-section-label {
	font-family: var(--font-mono);
	color: var(--fg-4);
	letter-spacing: 0.08em;
	font-size: 12px;
	text-transform: uppercase;
}

.ce-section-label--small {
	font-size: 11px;
}

.ce-info__description {
	font-family: var(--font-display);
	font-size: clamp(24px, 2.4vw, 34px);
	font-weight: 500;
	line-height: 1.25;
	color: var(--fg);
	margin: 12px 0 22px 0;
	max-width: 720px;
	text-wrap: pretty;
	letter-spacing: -0.02em;
}

.ce-info__details-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 28px;
	margin-top: 36px;
}

/* Rules list */

.ce-rules {
	list-style: none;
	padding: 0;
	margin: 10px 0 0 0;
}

.ce-rules__item {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 8px 0;
	color: var(--fg-2);
	font-size: 14px;
	border-bottom: 1px solid var(--line);
}

.ce-rules__item:last-child {
	border-bottom: none;
}

.ce-rules__num {
	color: var(--accent);
	font-family: var(--font-mono);
	font-size: 11px;
	margin-top: 3px;
	flex-shrink: 0;
}

/* Fact rows */

.ce-facts {
	padding: 10px 0 0 0;
}

.ce-fact-row {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 10px 0;
	border-bottom: 1px solid var(--line);
	font-size: 14px;
}

.ce-fact-row:last-child {
	border-bottom: none;
}

.ce-fact-row__label {
	color: var(--fg-3);
}

.ce-fact-row__value {
	color: var(--fg);
	text-align: right;
}

/* Location card */

.ce-location-card {
	background: var(--bg-2);
	border: 1px solid var(--line);
	border-radius: 12px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.ce-map-preview {
	height: 220px;
	position: relative;
	overflow: hidden;
	background: var(--bg-3);
}

.ce-map-preview svg {
	width: 100%;
	height: 100%;
	display: block;
}

/* MapLibre canvas inherits container size; attribution + controls restyled
   to match the dark UI. */
.ce-map-preview--live {
	cursor: grab;
}

.ce-map-preview--live:active {
	cursor: grabbing;
}

.ce-map-preview--live .maplibregl-ctrl-attrib {
	background: oklch(18% 0.01 250 / 0.7);
	color: var(--fg-3);
	font-size: 10px;
	font-family: var(--font-mono);
	margin: 0 4px 4px 0;
}

.ce-map-preview--live .maplibregl-ctrl-attrib a {
	color: var(--fg-2);
}

/* Newer MapLibre wraps attribution in a <details> element instead of using
   the .maplibregl-compact* classes. Match the same dark chrome + readable
   link color so contrast stays accessible against the map background. */
.ce-map-preview--live details.maplibregl-ctrl {
	background: oklch(18% 0.01 250 / 0.7);
	color: var(--fg-3);
	font-size: 10px;
	font-family: var(--font-mono);
	border-radius: 10px;
	margin: 0 4px 4px 0;
}

.ce-map-preview--live details.maplibregl-ctrl .maplibregl-ctrl-attrib-inner,
.ce-map-preview--live details.maplibregl-ctrl .maplibregl-ctrl-attrib-inner a {
	color: var(--fg-1);
}

/* Compact (collapsed) state: render as a 16px round info chip. */
.ce-map-preview--live .maplibregl-ctrl-attrib.maplibregl-compact {
	min-height: 16px;
	padding: 0;
	border-radius: 50%;
}

.ce-map-preview--live .maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner {
	display: none;
}

.ce-map-preview--live .maplibregl-ctrl-attrib-button {
	width: 16px;
	height: 16px;
	background-color: oklch(20% 0.01 250);
	border-radius: 50%;
	background-size: 12px 12px;
}

/* Expanded (after click) state: show the full credit with theme-matched padding. */
.ce-map-preview--live .maplibregl-ctrl-attrib.maplibregl-compact-show {
	padding: 2px 22px 2px 6px;
	border-radius: 10px;
}

.ce-map-preview--live .maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner {
	display: block;
}

.ce-map-preview--live .maplibregl-ctrl-group {
	background: oklch(18% 0.01 250 / 0.85);
	border: 1px solid var(--line);
	box-shadow: none;
	margin: 8px 8px 0 0;
}

.ce-map-preview--live .maplibregl-ctrl-group button {
	background-color: transparent;
}

.ce-map-preview--live .maplibregl-ctrl-group button + button {
	border-top: 1px solid var(--line);
}

.ce-map-preview--live .maplibregl-ctrl-group button:hover {
	background-color: oklch(24% 0.012 250);
}

.ce-map-preview--live .maplibregl-ctrl-group button .maplibregl-ctrl-icon {
	filter: invert(1) brightness(1.6);
}

/* Custom accent-colored marker with pulsing halo. */
.ce-map-marker {
	position: relative;
	width: 18px;
	height: 18px;
	pointer-events: none;
}

.ce-map-marker__dot {
	position: absolute;
	inset: 4px;
	border-radius: 50%;
	border: 2px solid var(--bg);
	box-shadow: 0 0 0 1px oklch(18% 0.01 250);
}

.ce-map-marker__pulse {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	opacity: 0.5;
	animation: ce-map-pulse 2.4s ease-out infinite;
}

@keyframes ce-map-pulse {
	0%   { transform: scale(0.6); opacity: 0.6; }
	80%  { transform: scale(2.4); opacity: 0;   }
	100% { transform: scale(2.4); opacity: 0;   }
}

.ce-location-card__body {
	padding: 20px;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.ce-location-card__label {
	font-family: var(--font-mono);
	color: var(--fg-4);
	font-size: 12px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin-bottom: 10px;
}

.ce-location-card__venue {
	font-family: var(--font-display);
	font-size: 26px;
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: -0.02em;
}

.ce-location-card__address {
	color: var(--fg-2);
	font-size: 14px;
	margin-top: 6px;
	line-height: 1.5;
}

.ce-location-card__actions {
	display: flex;
	gap: 8px;
	margin-top: 18px;
}

.ce-location-card__actions .ce-btn--primary {
	flex: 1;
	justify-content: center;
	padding: 10px 14px;
}

.ce-location-card__actions .ce-btn--ghost {
	padding: 10px 14px;
}

/* ── Gallery ─────────────────────────────────────────────────────────────── */

.ce-gallery {
	padding: var(--density-pad);
}

.ce-gallery__header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: 24px;
	flex-wrap: wrap;
	gap: 12px;
}

.ce-gallery__heading {
	font-family: var(--font-display);
	font-size: clamp(36px, 4vw, 60px);
	font-weight: 600;
	margin: 8px 0 0 0;
	letter-spacing: -0.02em;
	line-height: 0.95;
}

/* Featured row: 2-wide, 1-wide, stats tile */

.ce-gallery__featured {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr;
	gap: var(--density-gap);
	margin-bottom: var(--density-gap);
}

.ce-gallery__featured-stack {
	display: grid;
	grid-template-rows: 1fr 1fr;
	gap: var(--density-gap);
}

/* Individual tile */

.ce-gallery__item {
	position: relative;
	border-radius: 10px;
	overflow: hidden;
	cursor: zoom-in;
	background: var(--bg-2);
}

.ce-gallery__item--big {
	height: 440px;
}

.ce-gallery__item--sm {
	height: 210px;
}

/* Portrait-dominant featured row: 3 equal portrait tiles + stats column. */
.ce-gallery__featured--portrait {
	grid-template-columns: 1fr 1fr 1fr 1fr;
}

.ce-gallery__item--portrait {
	height: auto;
	aspect-ratio: 2 / 3;
}

/* Contributor view with a small featured set: center the 1-2 tiles rather than
   leaving the (now stats-less) grid columns empty. Declared after --portrait so
   the column override wins for portrait small sets too. */
.ce-gallery__featured-stack:empty {
	display: none;
}

.ce-gallery__featured--count-1 {
	grid-template-columns: minmax(0, 460px);
	justify-content: center;
}

.ce-gallery__featured--count-2 {
	grid-template-columns: repeat(2, minmax(0, 340px));
	justify-content: center;
}

/* Equalize the two tiles when the small set is not portrait (big + 1 stack tile
   would otherwise differ in height). Portrait pairs use aspect-ratio and stay even. */
.ce-gallery__featured--count-2 .ce-gallery__featured-stack {
	grid-template-rows: 1fr;
}

.ce-gallery__featured--count-2 .ce-gallery__item--big,
.ce-gallery__featured--count-2 .ce-gallery__item--sm {
	height: 340px;
}

.ce-gallery__featured--portrait .ce-gallery__stats {
	height: auto;
}

.ce-gallery__item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 600ms cubic-bezier(.2, .7, .2, 1);
}

.ce-gallery__item:hover img {
	transform: scale(1.04);
}

.ce-gallery__item__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 50%, rgba(10, 10, 12, 0.75) 100%);
	opacity: 0.7;
	transition: opacity 200ms;
}

.ce-gallery__item:hover .ce-gallery__item__overlay {
	opacity: 1;
}

.ce-gallery__item__meta {
	position: absolute;
	bottom: 14px;
	left: 14px;
	right: 14px;
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
}

.ce-gallery__item__credit {
	font-family: var(--font-mono);
	font-size: 11px;
	color: var(--fg-2);
	letter-spacing: 0.04em;
}

.ce-gallery__item__tag {
	padding: 3px 8px;
	background: rgba(10, 10, 12, 0.55);
	backdrop-filter: blur(8px);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 4px;
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: 0.06em;
	color: var(--fg-2);
	text-transform: uppercase;
}

/* Stats tile */

.ce-gallery__stats {
	background: var(--bg-2);
	border: 1px solid var(--line);
	border-radius: 10px;
	padding: 20px;
	display: flex;
	flex-direction: column;
	height: 440px;
}

.ce-gallery__stats-hint {
	margin: 6px 0 0;
	font-size: 0.78rem;
	line-height: 1.35;
	color: var(--fg-3);
}

.ce-gallery__stats-list {
	margin-top: 16px;
	flex: 1;
}

.ce-gallery__stats-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px 4px;
	margin: 0 -4px;
	border-bottom: 1px solid var(--line);
	border-radius: 6px;
	background: transparent;
	color: inherit;
	font: inherit;
	text-align: left;
	text-decoration: none;
	width: calc(100% + 8px);
	cursor: pointer;
	transition: background 120ms ease, color 120ms ease;
}

.ce-gallery__stats-row:hover,
.ce-gallery__stats-row:focus-visible {
	background: var(--bg-3, oklch(22% 0.012 250));
	outline: none;
}

.ce-gallery__stats-row:last-child {
	border-bottom: none;
}

.ce-gallery__filter {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin-top: 12px;
	padding: 8px 12px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--bg-2);
	font-size: 13px;
	color: var(--fg-2);
}

.ce-gallery__filter-label {
	font-size: 11px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--fg-3);
}

.ce-gallery__filter-name {
	font-weight: 600;
	color: var(--fg);
}

.ce-gallery__filter-clear {
	border: none;
	background: transparent;
	color: var(--accent);
	font: inherit;
	font-size: 13px;
	cursor: pointer;
	padding: 0 0 0 4px;
	border-left: 1px solid var(--line);
	margin-left: 4px;
	text-decoration: none;
}

.ce-gallery__filter-clear:hover,
.ce-gallery__filter-clear:focus-visible {
	text-decoration: underline;
	outline: none;
}


.ce-gallery__stats-contributor {
	display: flex;
	align-items: center;
	gap: 10px;
}

.ce-gallery__stats-avatar {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	font-family: var(--font-mono);
	font-size: 10px;
	color: var(--fg);
	font-weight: 600;
}

.ce-gallery__stats-name {
	font-size: 13px;
	color: var(--fg-2);
}

.ce-gallery__stats-count {
	font-family: var(--font-mono);
	font-size: 12px;
	color: var(--fg-3);
}

/* Masonry grid */

.ce-masonry {
	column-count: 4;
	column-gap: var(--density-gap);
}

@media (max-width: 1200px) {
	.ce-masonry { column-count: 3; }
}
@media (max-width: 820px) {
	.ce-masonry { column-count: 2; }
}
@media (max-width: 520px) {
	.ce-masonry { column-count: 1; }
}

.ce-masonry__item {
	break-inside: avoid;
	margin-bottom: var(--density-gap);
	border-radius: 8px;
	overflow: hidden;
	position: relative;
	cursor: zoom-in;
	background: var(--bg-2);
}

.ce-masonry--js {
	position: relative;
}

.ce-masonry--js .ce-masonry__item {
	position: absolute;
	top: 0;
	left: 0;
	margin-bottom: 0;
	will-change: transform;
}

.ce-masonry__item img {
	width: 100%;
	height: auto;
	display: block;
	transition: transform 500ms cubic-bezier(.2, .7, .2, 1);
}

.ce-masonry__item:hover img {
	transform: scale(1.03);
}

.ce-masonry__item__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 60%, rgba(10, 10, 12, 0.75) 100%);
	opacity: 0.7;
	transition: opacity 200ms;
}

.ce-masonry__item:hover .ce-masonry__item__overlay {
	opacity: 1;
}

.ce-masonry__item__caption {
	position: absolute;
	bottom: 10px;
	left: 10px;
	right: 10px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-family: var(--font-mono);
	font-size: 10px;
	color: var(--fg-2);
	letter-spacing: 0.04em;
}

/* Gallery footer */

.ce-gallery__end {
	display: flex;
	justify-content: center;
	margin-top: 36px;
	color: var(--fg-3);
	font-size: 13px;
	font-family: var(--font-mono);
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

/* ── Contribute CTA ─────────────────────────────────────────────────────── */

.ce-event-contribute {
	padding: 32px var(--density-pad) 80px;
	text-align: center;
}

.ce-event-contribute__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
}

.ce-event-contribute__label {
	margin: 0;
	color: var(--fg-3);
	font-size: 13px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.ce-event-contribute__app {
	margin: 0;
	color: var(--fg-3);
	font-size: 14px;
}

.ce-event-contribute__app a {
	color: var(--accent);
	font-weight: 600;
}

/* ── Lightbox ────────────────────────────────────────────────────────────── */

.ce-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100;
	background: rgba(8, 8, 10, 0.94);
	backdrop-filter: blur(12px);
	display: flex;
	flex-direction: column;
	animation: fadeUp 200ms ease-out;
	touch-action: none;
}

.ce-lightbox__header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px 24px;
	color: var(--fg-2);
}

.ce-lightbox__counter {
	font-family: var(--font-mono);
	font-size: 12px;
	color: var(--fg-3);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.ce-lightbox__header-actions {
	display: flex;
	gap: 8px;
}

.ce-lightbox__close {
	width: 36px;
	height: 36px;
	padding: 0;
	justify-content: center;
}

.ce-lightbox__img-wrap {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 80px;
	min-height: 0;
	position: relative;
	overflow: hidden;
}

.ce-lightbox__img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	border-radius: 4px;
	transform-origin: 0 0;
}

@media (hover: hover) {
	.ce-lightbox__img--zoomed { cursor: grab; }
	.ce-lightbox__img--panning { cursor: grabbing; }
}

.ce-lightbox__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.12);
	color: var(--fg);
	display: grid;
	place-items: center;
	cursor: pointer;
	backdrop-filter: blur(8px);
}

.ce-lightbox__nav--prev { left: 20px; }
.ce-lightbox__nav--next { right: 20px; }

.ce-lightbox__footer {
	padding: 16px 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	color: var(--fg-3);
	font-family: var(--font-mono);
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

/* Lightbox header-left: event title + counter side by side */

.ce-lightbox__header-left {
	display: flex;
	align-items: center;
	gap: 12px;
}

/* Event title shown once per open in the lightbox header */

.ce-lightbox__event-title {
	font-family: var(--font-mono);
	font-size: 12px;
	color: var(--fg-2);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

/* Footer-right: caption + credit — ellipsis for long strings */

.ce-lightbox__footer-right {
	max-width: 60%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Instagram credit link in lightbox footer — inherits footer typography */

.ce-lightbox__footer-credit-link {
	color: inherit;
	text-decoration: none;
	border-bottom: 1px solid transparent;
	transition: border-color 120ms;
}

.ce-lightbox__footer-credit-link:hover,
.ce-lightbox__footer-credit-link:focus {
	border-bottom-color: currentColor;
}

.ce-lightbox__footer-credit-link:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
	border-radius: 2px;
}

.ce-lightbox__footer-credit-link--ig {
	color: #ff0069;
	display: inline-flex;
	align-items: center;
	gap: 0.35em;
}

.ce-lightbox__footer-credit-icon {
	width: 1em;
	height: 1em;
	flex-shrink: 0;
}

/* Tap zones: transparent overlays injected by bindTapZones(). Pointer-events
   disabled on hover devices so backdrop-click-to-close still works on desktop. */

.ce-lightbox__tapzone {
	position: absolute;
	top: 0;
	bottom: 0;
	pointer-events: none;
	z-index: 1;
}

.ce-lightbox__tapzone--prev { left: 0;  width: 40%; }
.ce-lightbox__tapzone--next { right: 0; width: 60%; }

/* ── Mobile lightbox layout (touch devices) ─────────────────────────────── */

@media (hover: none) and (pointer: coarse) {

	/* Edge-to-edge image — remove horizontal padding */
	.ce-lightbox__img-wrap {
		padding: 0;
	}

	/* Hide side-arrow buttons */
	.ce-lightbox__nav--prev,
	.ce-lightbox__nav--next {
		display: none;
	}

	/* Hide keyboard hint — touch users don't have ← → or Esc */
	.ce-lightbox__hint {
		display: none;
	}

	/* Header anchored to top with safe-area padding + soft gradient */
	.ce-lightbox__header {
		position: absolute;
		top: 0;
		left: 0;
		right: 0;
		z-index: 2;
		padding-top: max(env(safe-area-inset-top), 12px);
		padding-bottom: 60px;
		background: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent);
	}

	/* Footer anchored to bottom with safe-area padding + soft gradient */
	.ce-lightbox__footer {
		position: absolute;
		bottom: 0;
		left: 0;
		right: 0;
		z-index: 2;
		padding-bottom: max(env(safe-area-inset-bottom), 12px);
		padding-top: 60px;
		background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent);
	}

	/* Full-width caption, 2-line clamp instead of 60% / single-line ellipsis */
	.ce-lightbox__footer-right {
		max-width: none;
		white-space: normal;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		overflow: hidden;
	}

	/* Smaller counter so event title dominates */
	.ce-lightbox__counter {
		font-size: 11px;
		white-space: nowrap;
	}

	/* Enable tap zones on touch — disabled on hover devices via base rule */
	.ce-lightbox__tapzone {
		pointer-events: auto;
	}
}

/* ── Lightbox swipe-gesture snap classes ─────────────────────────────────── */

/* Applied to .ce-lightbox__img during commit or rubber-band to enable
   transition. Toggled off after transitionend so drag resumes without
   a transition delay. */
.ce-lightbox__img--snapping {
	transition: transform 200ms ease-out;
}

/* Applied to .ce-lightbox during vertical commit or rubber-band so the
   inline opacity writes get a transition. Not present during live drag
   (writes take effect instantly, which is the desired follow-the-finger feel). */
.ce-lightbox--dragging-vertical {
	transition: opacity 200ms ease-out;
}

@media (prefers-reduced-motion: reduce) {
	.ce-lightbox__img--snapping {
		transition: none;
	}
	.ce-lightbox--dragging-vertical {
		transition: none;
	}
}

/* ── Share button state ──────────────────────────────────────────────────── */

.ce-share-btn.ce-share-btn--copied {
	border-color: var(--accent);
	color: var(--accent);
}

/* ── Responsive tweaks ───────────────────────────────────────────────────── */

@media (max-width: 900px) {
	.ce-info {
		grid-template-columns: 1fr;
	}

	.ce-gallery__featured {
		grid-template-columns: 1fr 1fr;
	}

	.ce-gallery__featured--portrait {
		grid-template-columns: 1fr 1fr 1fr;
	}

	.ce-gallery__stats {
		grid-column: 1 / -1;
		height: auto;
		order: -1;
	}
}

/* ── Mobile nav toggle ───────────────────────────────────────────────────── */

.ce-topnav__toggle {
	display: none; /* hidden by default; shown inside the ≤640px block below */
	background: transparent;
	border: none;
	cursor: pointer;
	color: var(--fg);
	padding: 8px;
	line-height: 0;
}

@media (max-width: 640px) {
	.ce-info__details-grid {
		grid-template-columns: 1fr;
	}

	.ce-gallery__featured {
		grid-template-columns: 1fr;
	}

	.ce-gallery__featured--portrait {
		grid-template-columns: 1fr;
	}

	.ce-gallery__featured-stack {
		grid-template-rows: auto;
	}

	/* Hide the horizontal nav; show the hamburger button instead. */
	.ce-topnav__links {
		display: none;
	}

	.ce-topnav__toggle {
		display: block;
	}

	/* Open state: show nav as a full-width drawer below the topnav. */
	body.has-menu-open .ce-topnav__links {
		display: block;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		z-index: 99;
		background: var(--bg);
		border-top: 1px solid var(--line);
	}

	body.has-menu-open .ce-topnav__links .ce-topnav__menu {
		flex-direction: column;
		gap: 0;
	}

	body.has-menu-open .ce-topnav__links .ce-topnav__menu a {
		display: flex;
		align-items: center;
		min-height: 44px;
		padding: 0 20px;
		font-size: 16px;
		border-bottom: 1px solid var(--line);
	}
}

/* ── Upcoming-event placeholder ─────────────────────────────────────────── */

.ce-placeholder {
	position: relative;
	width: 100%;
	height: 100%;
	overflow: hidden;
	background: var(--bg-2);
}

.ce-placeholder__media {
	display: block;
	position: absolute;
	inset: 0;
}

.ce-placeholder__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ce-placeholder__label {
	position: absolute;
	bottom: 8px;
	left: 50%;
	transform: translateX(-50%);
	color: var(--fg-2);
	background: oklch(0% 0 0 / 0.55);
	padding: 3px 8px;
	border-radius: 999px;
	font-size: 9px;
	letter-spacing: 0.08em;
	white-space: nowrap;
	z-index: 1;
}

.ce-placeholder--hero {
	position: absolute;
	inset: 0;
	display: block;
}

.ce-placeholder--hero .ce-placeholder__img {
	filter: brightness(0.78);
}

.ce-placeholder--hero .ce-placeholder__label {
	bottom: auto;
	top: 14%;
	font-size: 11px;
	padding: 5px 12px;
}

/* Match the dashed-empty wrapper to the populated thumb when a placeholder is inside. */
.ce-events-list__thumb--empty:has(.ce-placeholder) {
	border: none;
	box-shadow: inset 0 0 0 1px var(--line);
}

/* ── Claim-this-series link ─────────────────────────────────────────────── */

.ce-claim-link {
	margin: 8px 0 0 0;
}

.ce-claim-link__anchor {
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.04em;
	color: oklch(100% 0 0 / 0.7);
	text-decoration: none;
	transition: color 120ms;
}

.ce-claim-link__anchor:hover {
	color: var(--accent);
}

/* ── Vote hearts ─────────────────────────────────────────────────────────── */

/**
 * Base heart button. Both thumbnail (--thumb) and lightbox (--lightbox)
 * variants use these core rules. Space is reserved before JS hydrates so
 * the count appearing is not a CLS event.
 */
.ce-vote-heart {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 0;
	color: oklch(100% 0 0 / 0.7);
	line-height: 1;
	transition: color 120ms;
}

.ce-vote-heart:hover,
.ce-vote-heart:focus-visible {
	color: #fff;
}

/* Focus ring — visible keyboard navigation */
.ce-vote-heart:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
	border-radius: 4px;
}

/* Filled (liked) state */
.ce-vote-heart[aria-pressed="true"] {
	color: #e63946;
}

.ce-vote-heart[aria-pressed="true"] .ce-vote-heart__icon path {
	fill: #e63946;
	stroke: #e63946;
}

/* Icon */
.ce-vote-heart__icon {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.5;
	stroke-linecap: round;
	stroke-linejoin: round;
	/* Reserve space before hydration to avoid CLS */
	min-width: 18px;
}

/* Count label — always has space so layout doesn't shift when it hydrates */
.ce-vote-heart__count {
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.02em;
	min-width: 16px; /* reserve space for 2-digit count before hydration */
	text-align: left;
}

/* ── Thumbnail variant ───────────────────────────────────────────────────── */

.ce-vote-heart--thumb {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 3; /* above the overlay */
	padding: 6px 7px 6px 6px;
	border-radius: 6px;
	background: oklch(0% 0 0 / 0.25);
	transition: background 120ms, color 120ms;
	/* Ensure 40px minimum tap target even though visually smaller */
	min-height: 40px;
	min-width: 40px;
	justify-content: center;
}

.ce-gallery__item:hover .ce-vote-heart--thumb,
.ce-masonry__item:hover .ce-vote-heart--thumb,
.ce-vote-heart--thumb:focus-visible {
	background: oklch(0% 0 0 / 0.55);
}

/* ── Lightbox variant ────────────────────────────────────────────────────── */

.ce-vote-heart--lightbox {
	/* Sits in .ce-lightbox__header-actions alongside the close button.
	   Match the ghost-button sizing from .ce-btn. */
	padding: 8px 10px;
	border-radius: 8px;
	border: 1px solid var(--line-2);
	background: transparent;
	gap: 6px;
	transition: background 120ms, border-color 120ms, color 120ms;
}

.ce-vote-heart--lightbox:hover {
	background: var(--bg-2);
	border-color: var(--fg-3);
}

.ce-vote-heart--lightbox .ce-vote-heart__icon {
	width: 14px;
	height: 14px;
	min-width: 14px;
}

.ce-vote-heart--lightbox .ce-vote-heart__count {
	font-size: 13px;
}

/* ── Press pulse animation ───────────────────────────────────────────────── */

@keyframes ce-vote-pulse {
	0%   { transform: scale(1); }
	40%  { transform: scale(1.15); }
	100% { transform: scale(1); }
}

.ce-vote-heart[aria-pressed="true"] .ce-vote-heart__icon {
	animation: ce-vote-pulse 150ms ease-out both;
}

@media (prefers-reduced-motion: reduce) {
	.ce-vote-heart[aria-pressed="true"] .ce-vote-heart__icon {
		animation: none;
	}
}

/* ── Hide thumbnail count on small viewports for grid cleanliness ────────── */

@media (max-width: 480px) {
	.ce-vote-heart--thumb .ce-vote-heart__count {
		display: none;
	}
}

/* ── Rate-limit toast ────────────────────────────────────────────────────── */

.ce-vote-toast {
	position: absolute;
	z-index: 10;
	top: calc( 100% + 4px );
	right: 0;
	background: oklch(25% 0.01 250 / 0.95);
	border: 1px solid var(--line-2);
	color: var(--fg-2);
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: 0.04em;
	white-space: nowrap;
	padding: 4px 8px;
	border-radius: 4px;
	pointer-events: none;
}

/* ─── Videos section ────────────────────────────────────────────────── */

.ce-videos {
	padding: var(--density-pad);
}

.ce-videos__header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: 24px;
	flex-wrap: wrap;
	gap: 12px;
}

.ce-videos__heading {
	font-family: var(--font-display);
	font-size: clamp(36px, 4vw, 60px);
	font-weight: 600;
	margin: 8px 0 0 0;
	letter-spacing: -0.02em;
	line-height: 0.95;
}

.ce-videos__count {
	color: var(--fg-3);
}

.ce-videos__grid {
	column-count: 4;
	column-gap: var(--density-gap);
}

@media (max-width: 1200px) { .ce-videos__grid { column-count: 3; } }
@media (max-width: 820px)  { .ce-videos__grid { column-count: 2; } }
@media (max-width: 520px)  { .ce-videos__grid { column-count: 1; } }

.ce-video {
	break-inside: avoid;
	margin-bottom: var(--density-gap);
	display: block;
}

.ce-videos__grid.ce-masonry--js .ce-video {
	position: absolute;
	top: 0;
	left: 0;
	margin-bottom: 0;
	will-change: transform;
}

.ce-videos__grid.ce-masonry--js {
	position: relative;
}

.ce-video__media {
	position: relative;
	width: 100%;
	border-radius: 10px;
	overflow: hidden;
	background: var(--bg-3);
}

.ce-video__media::before {
	content: "";
	display: block;
	padding-top: calc(var(--ce-video-aspect, 0.5625) * 100%);
}

.ce-video__media > iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.ce-video__facade {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	background: transparent;
	cursor: pointer;
	border: 0;
	padding: 0;
	color: inherit;
	text-align: left;
	font: inherit;
}

.ce-video__thumb {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 500ms cubic-bezier(.2, .7, .2, 1);
}

.ce-video__facade:hover .ce-video__thumb {
	transform: scale(1.03);
}

.ce-video__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.55) 100%);
	transition: background 200ms;
}

.ce-video__facade:hover .ce-video__overlay {
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.65) 100%);
}

.ce-video__play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.55);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	display: grid;
	place-items: center;
	border: 1px solid rgba(255, 255, 255, 0.18);
	color: var(--fg);
	transition: transform 200ms, background 200ms, color 200ms;
}

.ce-video__facade:hover .ce-video__play {
	transform: translate(-50%, -50%) scale(1.06);
	background: var(--accent);
	color: var(--accent-ink);
	border-color: transparent;
}

.ce-video__play svg {
	margin-left: 3px;
}

.ce-video__badge {
	position: absolute;
	top: 12px;
	left: 12px;
	background: rgba(0, 0, 0, 0.6);
	color: var(--fg);
	padding: 4px 8px;
	border-radius: 4px;
	font-size: 10px;
	letter-spacing: 0.08em;
}

.ce-video__meta {
	padding: 12px 4px 0;
}

.ce-video__title {
	font-size: 15px;
	color: var(--fg);
	line-height: 1.35;
	margin: 0 0 6px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.ce-video__credit {
	color: var(--fg-3);
	font-size: 13px;
	margin: 0;
}

.ce-video__credit a {
	color: var(--fg-2);
	text-decoration: none;
	border-bottom: 1px solid var(--line-2);
}

.ce-video__credit a:hover {
	color: var(--accent);
	border-bottom-color: var(--accent);
}
