/* Define the base tokens and document-level states used by the frontend */
:root {
	--ucgs-surface: #111111;
	--ucgs-surface-soft: #181818;
	--ucgs-border: rgba(255, 255, 255, 0.14);
	--ucgs-text: #f8f8f8;
	--ucgs-text-muted: rgba(255, 255, 255, 0.7);
	--ucgs-accent: #f3b340;
	--ucgs-radius: 16px;
	--ucgs-thumbnail-carousel-gutter: 6px;
	--ucgs-thumbnail-frame-hover-lift: -1px;
	--ucgs-thumbnail-frame-hover-scale: 1.01;
	--ucgs-thumbnail-hover-scale: 1.02;
}

/* Normalize the standalone share page root before the lightbox renders */
body.ucgs-share-page {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
	font-size: 17px;
	line-height: 1.6;
	box-sizing: border-box;
}

body.ucgs-share-page *,
body.ucgs-share-page *::before,
body.ucgs-share-page *::after {
	box-sizing: inherit;
}

body.ucgs-lightbox-open {
	overflow: hidden;
}

/* Style the gallery shells, preview cards, and layout variants */
.ucgs-gallery {
	position: relative;
	width: 100%;
	margin: 0 0 32px;
}

.ucgs-gallery__viewport {
	position: relative;
}

.ucgs-gallery-items {
	display: grid;
	grid-template-columns: repeat(var(--ucgs-columns-desktop, 3), minmax(0, 1fr));
	gap: var(--ucgs-gallery-gutter, 10px);
	align-items: start;
}

.ucgs-gallery-layout-masonry .ucgs-gallery-items {
	display: grid;
	grid-template-columns: repeat(var(--ucgs-columns-desktop, 3), minmax(0, 1fr));
	gap: var(--ucgs-gallery-gutter, 10px);
	align-items: start;
}

.ucgs-gallery-layout-masonry .ucgs-gallery-card {
	display: flex;
	width: 100%;
	margin: 0;
	break-inside: auto;
}

.ucgs-gallery-layout-mosaic .ucgs-gallery-items {
	grid-auto-rows: minmax(120px, auto);
}

.ucgs-gallery-layout-grid .ucgs-gallery-items {
	display: grid;
	grid-template-columns: repeat(var(--ucgs-columns-desktop, 3), minmax(0, 1fr));
}

.ucgs-gallery-layout-mosaic .ucgs-mosaic-item-1,
.ucgs-gallery-layout-mosaic .ucgs-mosaic-item-5 {
	grid-column: span 2;
	grid-row: span 2;
}

.ucgs-gallery-layout-mosaic .ucgs-mosaic-item-2,
.ucgs-gallery-layout-mosaic .ucgs-mosaic-item-4 {
	grid-row: span 2;
}

.ucgs-gallery-card {
	position: relative;
	display: inline-flex;
	flex-direction: column;
	width: 100%;
	min-width: 0;
	padding: 0;
	border: 0;
	border-radius: var(--ucgs-gallery-radius, var(--ucgs-radius));
	background: #090909;
	box-shadow: 0 18px 30px rgba(0, 0, 0, 0.18);
	cursor: pointer;
	overflow: hidden;
	text-align: left;
	transform: translateY(0) scale(1);
	transition: box-shadow 0.26s ease, transform 0.38s ease;
}

.ucgs-gallery-card:hover,
.ucgs-gallery-card:focus-visible {
	transform: translateY(var(--ucgs-thumbnail-frame-hover-lift, -1px)) scale(var(--ucgs-thumbnail-frame-hover-scale, 1.01));
}

.ucgs-gallery-card__media {
	position: relative;
	display: block;
	width: 100%;
	overflow: hidden;
	background: #000000;
}

.ucgs-gallery-card-natural .ucgs-gallery-card__media {
	aspect-ratio: inherit;
}

.ucgs-ratio-original .ucgs-gallery-card__media {
	aspect-ratio: auto;
}

.ucgs-ratio-1-1 .ucgs-gallery-card__media {
	aspect-ratio: 1 / 1;
}

.ucgs-ratio-2-3 .ucgs-gallery-card__media {
	aspect-ratio: 2 / 3;
}

.ucgs-ratio-3-2 .ucgs-gallery-card__media {
	aspect-ratio: 3 / 2;
}

.ucgs-ratio-3-4 .ucgs-gallery-card__media {
	aspect-ratio: 3 / 4;
}

.ucgs-ratio-4-3 .ucgs-gallery-card__media {
	aspect-ratio: 4 / 3;
}

.ucgs-ratio-4-5 .ucgs-gallery-card__media {
	aspect-ratio: 4 / 5;
}

.ucgs-ratio-5-4 .ucgs-gallery-card__media {
	aspect-ratio: 5 / 4;
}

.ucgs-ratio-9-16 .ucgs-gallery-card__media {
	aspect-ratio: 9 / 16;
}

.ucgs-ratio-16-9 .ucgs-gallery-card__media {
	aspect-ratio: 16 / 9;
}

.ucgs-gallery-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.38s ease;
}

.ucgs-gallery-card-natural .ucgs-gallery-card__media img {
	height: auto;
	object-fit: cover;
}

.ucgs-gallery-card:hover .ucgs-gallery-card__media img,
.ucgs-gallery-card:focus-visible .ucgs-gallery-card__media img {
	transform: scale(var(--ucgs-thumbnail-hover-scale, 1.02));
}

.ucgs-gallery-card__badge {
	position: absolute;
	top: 12px;
	right: 12px;
	padding: 6px 10px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.72);
	color: #ffffff;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.ucgs-gallery-card__caption {
	display: block;
	padding: 12px 14px 14px;
	color: #ffffff;
	font-size: 14px;
	line-height: 1.4;
}

/* Power the preview slider and thumbnail navigation shells */
.ucgs-slider-shell {
	position: relative;
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	gap: 12px;
	align-items: center;
}

.ucgs-slider-track {
	display: flex;
	gap: var(--ucgs-gallery-gutter, 10px);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.ucgs-slider-track::-webkit-scrollbar {
	display: none;
}

.ucgs-slider-slide {
	flex: 0 0 calc((100% - ((var(--ucgs-columns-desktop, 3) - 1) * var(--ucgs-gallery-gutter, 10px))) / var(--ucgs-columns-desktop, 3));
	scroll-snap-align: start;
}

.ucgs-gallery-layout-slider .ucgs-slider-slide,
.ucgs-gallery-layout-thumbslider .ucgs-slider-slide {
	flex-basis: 100%;
}

.ucgs-slider-nav {
	width: 42px;
	height: 42px;
	padding: 0;
	border: 1px solid rgba(0, 0, 0, 0.14);
	border-radius: 999px;
	background: #ffffff;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}

.ucgs-slider-thumbs {
	grid-column: 1 / -1;
	display: flex;
	gap: var(--ucgs-thumbnail-carousel-gutter, 6px);
	margin-top: 12px;
	overflow-x: auto;
}

.ucgs-slider-thumb {
	flex: 0 0 88px;
	padding: 0;
	border: 2px solid transparent;
	border-radius: 12px;
	background: transparent;
	overflow: hidden;
	cursor: pointer;
}

.ucgs-slider-thumb.ucgs-ratio-original {
	aspect-ratio: auto;
}

.ucgs-slider-thumb.ucgs-ratio-1-1 {
	aspect-ratio: 1 / 1;
}

.ucgs-slider-thumb.ucgs-ratio-2-3 {
	aspect-ratio: 2 / 3;
}

.ucgs-slider-thumb.ucgs-ratio-3-2 {
	aspect-ratio: 3 / 2;
}

.ucgs-slider-thumb.ucgs-ratio-3-4 {
	aspect-ratio: 3 / 4;
}

.ucgs-slider-thumb.ucgs-ratio-4-3 {
	aspect-ratio: 4 / 3;
}

.ucgs-slider-thumb.ucgs-ratio-4-5 {
	aspect-ratio: 4 / 5;
}

.ucgs-slider-thumb.ucgs-ratio-5-4 {
	aspect-ratio: 5 / 4;
}

.ucgs-slider-thumb.ucgs-ratio-9-16 {
	aspect-ratio: 9 / 16;
}

.ucgs-slider-thumb.ucgs-ratio-16-9 {
	aspect-ratio: 16 / 9;
}

.ucgs-slider-thumb.is-active {
	border-color: var(--ucgs-accent);
}

.ucgs-slider-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Render static single-image slides consistently with comparison slides */
.ucgs-inline-slide,
.ucgs-lightbox__item {
	display: grid;
	gap: 14px;
}

.ucgs-lightbox__item {
	width: 100%;
	align-items: center;
}

.ucgs-lightbox__media {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 0;
	max-height: calc(100vh - 260px);
}

.ucgs-inline-slide__caption,
.ucgs-lightbox__caption {
	color: var(--ucgs-text);
	font-size: 15px;
	line-height: 1.45;
}

.ucgs-static-slide {
	position: relative;
	display: block;
	width: 100%;
	border-radius: var(--ucgs-gallery-radius, var(--ucgs-radius));
	overflow: hidden;
	background: #000000;
}

.ucgs-static-slide img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
}

/* Style the comparison stage, labels, divider, and handle */
.ucgs-comparison {
	position: relative;
	width: 100%;
	border-radius: var(--ucgs-gallery-radius, var(--ucgs-radius));
	overflow: hidden;
	background: #000000;
}

.ucgs-comparison__stage {
	position: relative;
	width: 100%;
	height: 100%;
	aspect-ratio: inherit;
	min-height: 0;
	line-height: 0;
}

.ucgs-comparison__image {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
	user-select: none;
	pointer-events: none;
}

.ucgs-comparison__overlay {
	position: absolute;
	inset: 0;
	overflow: hidden;
	clip-path: inset(0 0 0 50%);
	will-change: clip-path;
}

.ucgs-comparison__image-top {
	object-fit: contain;
}

.ucgs-comparison__divider {
	position: absolute;
	top: 0;
	left: 50%;
	width: 2px;
	height: 100%;
	background: rgba(255, 255, 255, 0.92);
	transform: translateX(-50%);
}

.ucgs-comparison__handle {
	position: absolute;
	top: 50%;
	left: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	padding: 0;
	border: 3px solid #ffffff;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.8);
	color: #ffffff;
	transform: translate(-50%, -50%);
	cursor: ew-resize;
}

.ucgs-comparison__handle span {
	display: block;
	width: 18px;
	height: 18px;
	border-left: 2px solid currentColor;
	border-right: 2px solid currentColor;
}

.ucgs-comparison-vertical .ucgs-comparison__overlay {
	clip-path: inset(50% 0 0 0);
}

.ucgs-comparison-vertical .ucgs-comparison__divider {
	top: 50%;
	left: 0;
	width: 100%;
	height: 2px;
	transform: translateY(-50%);
}

.ucgs-comparison-vertical .ucgs-comparison__handle {
	cursor: ns-resize;
}

.ucgs-comparison__label {
	position: absolute;
	top: 14px;
	display: inline-block;
	padding: 7px 12px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.66);
	color: #ffffff;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	transition: none;
	will-change: clip-path;
	pointer-events: none;
}

.ucgs-comparison__label-before {
	left: 14px;
}

.ucgs-comparison__label-after {
	right: 14px;
}

/* Provide ten distinct comparison templates inspired by BEAF-like styling */
.ucgs-comparison-default .ucgs-comparison__handle {
	background: rgba(0, 0, 0, 0.8);
}

.ucgs-comparison-template-01 .ucgs-comparison__label {
	background: #f3b340;
	color: #111111;
}

.ucgs-comparison-template-02 .ucgs-comparison__handle {
	width: 32px;
	height: 128px;
	border-radius: 999px;
}

.ucgs-comparison-template-03 .ucgs-comparison__label {
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.92);
	color: #111111;
}

.ucgs-comparison-template-04 .ucgs-comparison__divider {
	background: #00e2c7;
}

.ucgs-comparison-template-04 .ucgs-comparison__handle {
	border-color: #00e2c7;
}

.ucgs-comparison-template-05 .ucgs-comparison__label-before {
	left: 0;
	border-radius: 0 999px 999px 0;
}

.ucgs-comparison-template-05 .ucgs-comparison__label-after {
	right: 0;
	border-radius: 999px 0 0 999px;
}

.ucgs-comparison-template-06 .ucgs-comparison__handle {
	background: #ffffff;
	color: #111111;
}

.ucgs-comparison-template-07 .ucgs-comparison__label {
	top: auto;
	bottom: 14px;
	background: rgba(17, 17, 17, 0.82);
}

.ucgs-comparison-template-08 .ucgs-comparison__divider {
	background: linear-gradient(180deg, #ff4e8a 0%, #ffb347 100%);
}

.ucgs-comparison-template-08 .ucgs-comparison__handle {
	border-color: #ff4e8a;
}

.ucgs-comparison-template-09 .ucgs-comparison__label {
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.6);
}

/* Style the global lightbox shell, thumbs, and fullscreen presentation */
.ucgs-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: grid;
	place-items: center;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
	font-size: 17px;
	line-height: 1.6;
	box-sizing: border-box;
}

.ucgs-lightbox *,
.ucgs-lightbox *::before,
.ucgs-lightbox *::after {
	box-sizing: inherit;
}

.ucgs-lightbox[hidden] {
	display: none !important;
}

.ucgs-lightbox__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.84);
	backdrop-filter: blur(8px);
}

.ucgs-lightbox__dialog {
	position: relative;
	z-index: 1;
	display: grid;
	gap: 18px;
	width: min(1280px, calc(100vw - 40px));
	max-height: calc(100vh - 40px);
	padding: 18px;
	border: 1px solid var(--ucgs-border);
	border-radius: var(--ucgs-gallery-radius, 24px);
	background: rgba(17, 17, 17, 0.94);
	color: var(--ucgs-text);
	outline: none;
}

.ucgs-lightbox__toolbar,
.ucgs-lightbox__actions,
.ucgs-lightbox__stage {
	display: flex;
	align-items: center;
}

.ucgs-lightbox__toolbar {
	justify-content: space-between;
	gap: 12px;
}

.ucgs-lightbox__actions {
	gap: 10px;
	flex-wrap: wrap;
	justify-content: flex-end;
}

.ucgs-lightbox .ucgs-lightbox__action,
.ucgs-lightbox .ucgs-lightbox__nav {
	-webkit-appearance: none;
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
	min-height: 0;
	padding: 0;
	margin: 0;
	border: 1px solid var(--ucgs-border);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.04);
	color: var(--ucgs-text);
	font-family: Arial, Helvetica, sans-serif;
	font-weight: 400;
	line-height: 1;
	text-align: center;
	text-decoration: none;
	transition: box-shadow 0.18s ease, border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
	vertical-align: middle;
	cursor: pointer;
}

/* Preserve the visual feedback whenever controls are hovered, active, or focused */
.ucgs-lightbox .ucgs-lightbox__action:hover,
.ucgs-lightbox .ucgs-lightbox__action:focus,
.ucgs-lightbox .ucgs-lightbox__action:active,
.ucgs-lightbox .ucgs-lightbox__nav:hover,
.ucgs-lightbox .ucgs-lightbox__nav:focus,
.ucgs-lightbox .ucgs-lightbox__nav:active,
.ucgs-lightbox .ucgs-lightbox__thumb:hover,
.ucgs-lightbox .ucgs-lightbox__thumb:focus,
.ucgs-lightbox .ucgs-lightbox__thumb:active {
	outline: none;
	box-shadow: 0 0 25px -7px var(--ur-gray-1, rgba(255, 255, 255, 0.42));
}

/* Add a stronger keyboard-visible ring on top of the shared focus effect */
.ucgs-lightbox .ucgs-lightbox__action:focus-visible,
.ucgs-lightbox .ucgs-lightbox__nav:focus-visible,
.ucgs-lightbox .ucgs-lightbox__thumb:focus-visible {
	outline: 2px solid var(--ucgs-accent);
	outline-offset: 2px;
	box-shadow: 0 0 0 3px rgba(243, 179, 64, 0.22);
}

.ucgs-lightbox .ucgs-lightbox__action {
	width: 42px;
	min-width: 42px;
	max-width: 42px;
	height: 42px;
	min-height: 42px;
	max-height: 42px;
	font-size: 18px;
}

/* Give share actions enough room for their icon and text labels */
.ucgs-lightbox .ucgs-lightbox__share-action {
	gap: 8px;
	width: auto;
	min-width: 0;
	max-width: none;
	padding: 0 14px;
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
	white-space: nowrap;
}

.ucgs-lightbox__share-icon {
	display: block;
	width: 16px;
	height: 16px;
	flex: 0 0 16px;
}

/* Position and style the controlled social share sheet */
.ucgs-share-sheet {
	position: absolute;
	top: 74px;
	right: 18px;
	z-index: 3;
	display: grid;
	gap: 14px;
	width: min(420px, calc(100vw - 64px));
	padding: 18px;
	border: 1px solid var(--ucgs-border);
	border-radius: 16px;
	background: rgba(18, 18, 18, 0.98);
	box-shadow: 0 24px 70px rgba(0, 0, 0, 0.48);
	color: var(--ucgs-text);
	outline: none;
}

.ucgs-share-sheet[hidden] {
	display: none !important;
}

.ucgs-share-sheet__header {
	display: flex;
	gap: 12px;
	align-items: center;
	justify-content: space-between;
}

.ucgs-share-sheet__title {
	min-width: 0;
	font-size: 15px;
	font-weight: 800;
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ucgs-share-sheet__close {
	-webkit-appearance: none;
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 1px solid var(--ucgs-border);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.04);
	color: var(--ucgs-text);
	cursor: pointer;
}

.ucgs-share-sheet__url {
	padding: 9px 10px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.05);
	color: var(--ucgs-text-muted);
	font-size: 12px;
	line-height: 1.35;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ucgs-share-sheet__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
}

.ucgs-share-sheet__target,
.ucgs-share-sheet__copy {
	-webkit-appearance: none;
	appearance: none;
	border: 1px solid rgba(255, 255, 255, 0.1);
	background: rgba(255, 255, 255, 0.045);
	color: var(--ucgs-text);
	cursor: pointer;
}

.ucgs-share-sheet__target {
	display: grid;
	gap: 8px;
	justify-items: center;
	min-height: 82px;
	padding: 10px 8px;
	border-radius: 10px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
}

.ucgs-share-sheet__target-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background: #2f3136;
	color: #ffffff;
	font-size: 16px;
	font-weight: 900;
}

.ucgs-share-sheet__target-discord .ucgs-share-sheet__target-icon {
	background: #5865f2;
}

.ucgs-share-sheet__target-whatsapp .ucgs-share-sheet__target-icon {
	background: #25d366;
}

.ucgs-share-sheet__target-facebook .ucgs-share-sheet__target-icon {
	background: #1877f2;
}

.ucgs-share-sheet__target-x .ucgs-share-sheet__target-icon {
	background: #050505;
}

.ucgs-share-sheet__target-reddit .ucgs-share-sheet__target-icon {
	background: #ff4500;
}

.ucgs-share-sheet__target-tiktok .ucgs-share-sheet__target-icon {
	background: #111111;
	box-shadow: inset 3px 0 0 #25f4ee, inset -3px 0 0 #fe2c55;
}

.ucgs-share-sheet__target-instagram .ucgs-share-sheet__target-icon {
	background: linear-gradient(135deg, #feda75 0%, #fa7e1e 28%, #d62976 58%, #962fbf 78%, #4f5bd5 100%);
}

.ucgs-share-sheet__target-telegram .ucgs-share-sheet__target-icon {
	background: #229ed9;
}

.ucgs-share-sheet__copy {
	display: inline-flex;
	gap: 8px;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 0 14px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 800;
}

.ucgs-share-sheet__target:hover,
.ucgs-share-sheet__target:focus-visible,
.ucgs-share-sheet__copy:hover,
.ucgs-share-sheet__copy:focus-visible,
.ucgs-share-sheet__close:hover,
.ucgs-share-sheet__close:focus-visible {
	outline: none;
	border-color: rgba(255, 255, 255, 0.28);
	background: rgba(255, 255, 255, 0.09);
	box-shadow: 0 0 25px -7px var(--ur-gray-1, rgba(255, 255, 255, 0.42));
}

.ucgs-lightbox__stage {
	gap: 18px;
	min-height: 0;
}

.ucgs-lightbox .ucgs-lightbox__nav {
	width: 48px;
	flex: 0 0 48px;
	min-width: 48px;
	max-width: 48px;
	height: 48px;
	min-height: 48px;
	max-height: 48px;
	font-size: 28px;
}

.ucgs-lightbox__content {
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	justify-content: center;
	min-width: 0;
	max-height: calc(100vh - 220px);
	overflow: auto;
}

.ucgs-lightbox__media .ucgs-static-slide,
.ucgs-lightbox__media .ucgs-comparison {
	width: min(100%, calc((100vh - 280px) * (var(--ucgs-media-width, 16) / var(--ucgs-media-height, 9))));
	max-width: 100%;
	max-height: calc(100vh - 280px);
	margin: 0 auto;
}

.ucgs-lightbox__thumbs {
	display: flex;
	gap: var(--ucgs-thumbnail-carousel-gutter, 6px);
	overflow-x: auto;
	padding-bottom: 20px;
	padding-left: 4px;
	padding-top: 4px;
}

.ucgs-lightbox__thumb {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: min(150px, calc((var(--ucgs-media-width, 16) / var(--ucgs-media-height, 9)) * 72px));
	height: auto;
	padding: 0;
	border: 2px solid transparent;
	border-radius: var(--ucgs-gallery-radius, 14px);
	background: transparent;
	cursor: pointer;
	overflow: hidden;
	transform: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ucgs-lightbox__thumb.is-active {
	border-color: var(--ucgs-accent);
}

.ucgs-lightbox .ucgs-lightbox__thumb:hover,
.ucgs-lightbox .ucgs-lightbox__thumb:focus,
.ucgs-lightbox .ucgs-lightbox__thumb:active {
	border-color: var(--ucgs-accent);
	box-shadow: 0 0 25px -7px var(--ur-gray-1, rgba(255, 255, 255, 0.42));
	transform: translateY(-1px);
}

.ucgs-lightbox__thumb img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 72px;
	object-fit: contain;
	transition: transform 0.38s ease;
}

.ucgs-lightbox__thumb:hover img,
.ucgs-lightbox__thumb:focus-visible img {
	transform: scale(var(--ucgs-thumbnail-hover-scale, 1.02));
}

.ucgs-share-page {
	background: #090909;
}

.ucgs-share-page__root {
	min-height: 100vh;
}

/* Adapt the gallery layout for narrower viewports */
@media (max-width: 960px) {
	.ucgs-gallery-items {
		grid-template-columns: repeat(var(--ucgs-columns-tablet, 2), minmax(0, 1fr));
	}

	.ucgs-gallery-layout-masonry .ucgs-gallery-items {
		grid-template-columns: repeat(var(--ucgs-columns-tablet, 2), minmax(0, 1fr));
	}

	.ucgs-slider-slide {
		flex-basis: calc((100% - ((var(--ucgs-columns-tablet, 2) - 1) * var(--ucgs-gallery-gutter, 10px))) / var(--ucgs-columns-tablet, 2));
	}

	.ucgs-lightbox__dialog {
		width: calc(100vw - 24px);
		max-height: calc(100vh - 24px);
		padding: 14px;
	}

	.ucgs-lightbox__toolbar {
		align-items: flex-start;
	}
}

@media (max-width: 640px) {
	.ucgs-gallery-items {
		grid-template-columns: repeat(var(--ucgs-columns-mobile, 1), minmax(0, 1fr));
	}

	.ucgs-gallery-layout-masonry .ucgs-gallery-items {
		grid-template-columns: repeat(var(--ucgs-columns-mobile, 1), minmax(0, 1fr));
	}

	.ucgs-slider-shell {
		grid-template-columns: 1fr;
	}

	.ucgs-slider-nav {
		display: none;
	}

	.ucgs-slider-slide {
		flex-basis: 100%;
	}

	.ucgs-lightbox__stage {
		gap: 10px;
	}

	.ucgs-lightbox__nav {
		flex-basis: 40px;
		height: 40px;
	}

	.ucgs-lightbox .ucgs-lightbox__action {
		width: 38px;
		min-width: 38px;
		max-width: 38px;
		height: 38px;
		min-height: 38px;
		max-height: 38px;
	}

	.ucgs-lightbox .ucgs-lightbox__share-action {
		width: auto;
		min-width: 0;
		max-width: none;
		padding: 0 10px;
		font-size: 12px;
	}

	.ucgs-share-sheet {
		top: 68px;
		right: 12px;
		left: 12px;
		width: auto;
		padding: 14px;
	}

	.ucgs-share-sheet__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
