.cmgw-wall {
	--cmgw-bg: #0e0d0c;
	--cmgw-gold: #c9a24b;
	--cmgw-gold-soft: #e4cd8f;
	--cmgw-cream: #f6f1e7;
	--cmgw-rows: 6;
	--cmgw-gap: 4px;
	--cmgw-wall-height: clamp(360px, 62vw, 640px);
	position: relative;
	box-sizing: border-box;
	background: transparent;
}
.cmgw-wall *,
.cmgw-lightbox * {
	box-sizing: border-box;
}

@media (max-width: 900px) {
	.cmgw-wall { --cmgw-rows: 4; --cmgw-wall-height: clamp(420px, 130vw, 620px); }
}
@media (max-width: 520px) {
	.cmgw-wall { --cmgw-rows: 3; --cmgw-gap: 3px; --cmgw-wall-height: clamp(360px, 110vw, 520px); }
}

.cmgw-empty {
	text-align: center;
	opacity: 0.7;
	padding: 40px 0;
}

/* ---------- The swipe wall ---------- */

.cmgw-scroller {
	width: 100%;
	height: var(--cmgw-wall-height);
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	scroll-snap-type: x proximity;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
	-ms-overflow-style: none;
	cursor: grab;
	/* Promote to its own compositor layer so scrolling never triggers a
	   full repaint of the page — this is what keeps it lag-free. */
	will-change: scroll-position;
	transform: translateZ(0);
}
.cmgw-scroller::-webkit-scrollbar {
	display: none;
}
.cmgw-scroller.cmgw-dragging {
	cursor: grabbing;
	scroll-snap-type: none;
}

.cmgw-grid {
	display: grid;
	grid-auto-flow: column;
	grid-template-rows: repeat(var(--cmgw-rows), 1fr);
	grid-auto-columns: calc((var(--cmgw-wall-height) - (var(--cmgw-rows) - 1) * var(--cmgw-gap)) / var(--cmgw-rows));
	gap: var(--cmgw-gap);
	height: 100%;
	padding-right: var(--cmgw-gap);
}

.cmgw-tile {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	border-radius: 0;
	overflow: hidden;
	position: relative;
	cursor: zoom-in;
	scroll-snap-align: start;
}
.cmgw-tile:focus-visible {
	outline: none;
	box-shadow: inset 0 0 0 2px var(--cmgw-gold-soft);
}
.cmgw-tile img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	pointer-events: none;
	transform: scale(1);
	transition: transform .18s cubic-bezier(.34, 1.56, .64, 1), filter .18s ease;
}
.cmgw-scroller:not(.cmgw-dragging) .cmgw-tile:hover img {
	transform: scale(1.08);
	filter: brightness(1.04);
}
.cmgw-tile:active img {
	transform: scale(0.96);
	transition-duration: .1s;
}

.cmgw-tile-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0,0,0,0) 60%, rgba(0,0,0,0.4) 100%);
	opacity: 0;
	transition: opacity .18s ease;
	pointer-events: none;
}
.cmgw-scroller:not(.cmgw-dragging) .cmgw-tile:hover .cmgw-tile-overlay {
	opacity: 1;
}

.cmgw-edge-fade {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 28px;
	pointer-events: none;
	z-index: 2;
	opacity: 0.7;
}
.cmgw-edge-left {
	left: 0;
	background: linear-gradient(90deg, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0) 100%);
}
.cmgw-edge-right {
	right: 0;
	background: linear-gradient(270deg, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0) 100%);
}

.cmgw-ig-badge {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(14,13,12,0.65);
	backdrop-filter: blur(3px);
	border-radius: 50%;
	color: #fff;
}

/* ---------- Lightbox ---------- */
.cmgw-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba(6,5,4,0.96);
	display: none;
	opacity: 0;
	transition: opacity .3s ease;
}
.cmgw-lightbox.cmgw-open {
	display: block;
}
.cmgw-lightbox.cmgw-visible {
	opacity: 1;
}

.cmgw-lightbox-inner {
	position: relative;
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.cmgw-slider-track {
	flex: 1 1 auto;
	display: flex;
	height: 100%;
	touch-action: pan-y;
	will-change: transform;
}

.cmgw-slide {
	flex: 0 0 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	overflow: hidden;
}

.cmgw-slide-media {
	max-width: 92%;
	max-height: 82%;
	width: 92%;
	height: 82%;
	touch-action: none;
	cursor: zoom-in;
	transition: transform .25s ease;
	user-select: none;
	-webkit-user-drag: none;
	border-radius: 4px;
}
.cmgw-slide-photo {
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
}
.cmgw-slide-video {
	object-fit: contain;
	background: #000;
}
.cmgw-slide-media.cmgw-zoomed { cursor: grab; }

.cmgw-close,
.cmgw-nav {
	position: absolute;
	background: rgba(255,255,255,0.06);
	border: 1px solid rgba(201,162,75,0.35);
	color: var(--cmgw-cream);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 5;
	transition: background .2s ease, border-color .2s ease;
}
.cmgw-close:hover,
.cmgw-nav:hover {
	background: rgba(201,162,75,0.18);
	border-color: var(--cmgw-gold-soft);
}

.cmgw-close {
	top: 18px;
	right: 18px;
	width: 42px;
	height: 42px;
}
.cmgw-nav {
	top: 50%;
	transform: translateY(-50%);
	width: 46px;
	height: 46px;
}
.cmgw-prev { left: 16px; }
.cmgw-next { right: 16px; }
.cmgw-next svg { transform: none; }
.cmgw-prev svg { transform: rotate(180deg); }

@media (max-width: 640px) {
	.cmgw-nav { width: 38px; height: 38px; }
	.cmgw-prev { left: 6px; }
	.cmgw-next { right: 6px; }
}

.cmgw-caption {
	flex: 0 0 auto;
	padding: 14px 20px 22px;
	background: linear-gradient(180deg, rgba(14,13,12,0) 0%, rgba(14,13,12,0.9) 40%);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}
.cmgw-caption-text {
	color: var(--cmgw-cream);
	font-family: Georgia, 'Times New Roman', serif;
	min-width: 0;
}
.cmgw-caption-title {
	display: block;
	font-size: 15px;
	letter-spacing: .02em;
	max-width: 60vw;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.cmgw-caption-link {
	display: inline-block;
	margin-top: 4px;
	font-size: 12px;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--cmgw-gold-soft);
	text-decoration: none;
	border-bottom: 1px solid rgba(228,205,143,0.4);
	padding-bottom: 2px;
}
.cmgw-caption-link:hover { color: #fff; border-color: #fff; }
.cmgw-caption-link:empty { display: none; }

.cmgw-share-bar {
	display: flex;
	gap: 8px;
}
.cmgw-share {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: 1px solid rgba(201,162,75,0.4);
	background: rgba(255,255,255,0.04);
	color: var(--cmgw-cream);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: transform .2s ease, background .2s ease, color .2s ease;
}
.cmgw-share:hover {
	background: var(--cmgw-gold);
	color: #17140f;
	transform: translateY(-2px);
}

.cmgw-toast {
	position: fixed;
	left: 50%;
	bottom: 30px;
	transform: translateX(-50%);
	background: var(--cmgw-cream);
	color: #17140f;
	padding: 10px 18px;
	border-radius: 30px;
	font-size: 13px;
	font-family: -apple-system, BlinkMacSystemFont, sans-serif;
	z-index: 100001;
	opacity: 0;
	pointer-events: none;
	transition: opacity .25s ease, transform .25s ease;
}
.cmgw-toast.cmgw-show {
	opacity: 1;
	transform: translateX(-50%) translateY(-6px);
}

body.cmgw-noscroll {
	overflow: hidden;
}
