.wmgrl-library,
.wmgrl-library * {
	box-sizing: border-box;
}

.wmgrl-library {
	--wmgrl-violet: #5b4dff;
	--wmgrl-violet-dark: #3d32c7;
	--wmgrl-coral: #ff6e5d;
	--wmgrl-cyan: #12bfe6;
	--wmgrl-ink: #20263a;
	--wmgrl-muted: #626b80;
	--wmgrl-line: #e3e7f1;
	--wmgrl-soft: #f6f7fb;
	position: relative;
	isolation: isolate;
	width: 100%;
	padding: clamp(58px, 7vw, 94px) 0;
	color: var(--wmgrl-ink);
	background:
		radial-gradient(circle at 7% 8%, rgba(18, 191, 230, .12), transparent 27%),
		radial-gradient(circle at 93% 10%, rgba(91, 77, 255, .12), transparent 28%),
		linear-gradient(135deg, #fbfeff 0%, #f8f7ff 58%, #fff 100%);
	font-family: inherit;
	overflow: hidden;
}

.wmgrl-shell {
	width: min(calc(100% - 48px), 1240px);
	margin: 0 auto;
}

.wmgrl-header {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(300px, .75fr);
	align-items: end;
	gap: clamp(34px, 6vw, 76px);
	margin-bottom: 30px;
}

.wmgrl-heading-group,
.wmgrl-card-content {
	min-width: 0;
}

.wmgrl-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 15px;
	color: var(--wmgrl-violet);
	font-size: 12px;
	font-weight: 850;
	letter-spacing: .13em;
	line-height: 1.35;
	text-transform: uppercase;
}

.wmgrl-eyebrow span {
	width: 9px;
	height: 9px;
	flex: 0 0 9px;
	border-radius: 50%;
	background: var(--wmgrl-cyan);
	box-shadow: 0 0 0 7px rgba(18, 191, 230, .1);
}

.wmgrl-header h2 {
	max-width: 760px;
	margin: 0;
	color: var(--wmgrl-ink);
	font-size: clamp(34px, 4.4vw, 58px);
	font-weight: 850;
	letter-spacing: -.052em;
	line-height: 1.04;
}

.wmgrl-intro {
	margin: 0;
	color: var(--wmgrl-muted);
	font-size: clamp(16px, 1.5vw, 18px);
	line-height: 1.72;
}

.wmgrl-controls {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 16px;
	padding: 13px;
	border: 1px solid rgba(91, 77, 255, .13);
	border-radius: 20px;
	background: rgba(255, 255, 255, .82);
	box-shadow: 0 18px 44px rgba(32, 38, 58, .06);
	backdrop-filter: blur(12px);
}

.wmgrl-filters {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
	overflow-x: auto;
	overscroll-behavior-inline: contain;
	scrollbar-width: thin;
}

.wmgrl-filter,
.wmgrl-more {
	font: inherit;
	cursor: pointer;
}

.wmgrl-filter {
	min-height: 42px;
	padding: 10px 15px;
	border: 1px solid transparent;
	border-radius: 999px;
	color: #4d566b;
	background: transparent;
	font-size: 13px;
	font-weight: 760;
	line-height: 1.15;
	white-space: nowrap;
	transition: color .2s ease, background .2s ease, border-color .2s ease;
}

.wmgrl-filter:hover,
.wmgrl-filter:focus-visible {
	color: var(--wmgrl-violet-dark);
	border-color: rgba(91, 77, 255, .16);
	background: #f2f0ff;
}

.wmgrl-filter.is-active {
	color: #fff;
	border-color: var(--wmgrl-violet);
	background: linear-gradient(135deg, var(--wmgrl-violet), var(--wmgrl-violet-dark));
	box-shadow: 0 9px 20px rgba(91, 77, 255, .2);
}

.wmgrl-filter:disabled,
.wmgrl-more:disabled,
.wmgrl-search input:disabled {
	cursor: wait;
	opacity: .65;
}

.wmgrl-search {
	position: relative;
	flex: 0 1 310px;
	min-width: 250px;
}

.wmgrl-search svg {
	position: absolute;
	top: 50%;
	left: 15px;
	width: 18px;
	height: 18px;
	fill: none;
	stroke: var(--wmgrl-muted);
	stroke-linecap: round;
	stroke-width: 1.8;
	transform: translateY(-50%);
	pointer-events: none;
}

.wmgrl-search input {
	width: 100%;
	height: 46px;
	margin: 0;
	padding: 0 15px 0 44px;
	border: 1px solid var(--wmgrl-line);
	border-radius: 14px;
	outline: 0;
	color: var(--wmgrl-ink);
	background: #fff;
	font: inherit;
	font-size: 14px;
	transition: border-color .2s ease, box-shadow .2s ease;
}

.wmgrl-search input:focus {
	border-color: rgba(91, 77, 255, .55);
	box-shadow: 0 0 0 4px rgba(91, 77, 255, .1);
}

.wmgrl-status {
	margin: 0 0 14px;
	color: var(--wmgrl-muted);
	font-size: 12px;
	font-weight: 760;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.wmgrl-results {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
	width: 100%;
}

.wmgrl-card {
	min-width: 0;
	margin: 0;
	border: 1px solid var(--wmgrl-line);
	border-radius: 20px;
	background: rgba(255, 255, 255, .94);
	box-shadow: 0 14px 38px rgba(32, 38, 58, .05);
	overflow: hidden;
	transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.wmgrl-card:hover {
	border-color: rgba(91, 77, 255, .3);
	box-shadow: 0 19px 45px rgba(32, 38, 58, .1);
	transform: translateY(-2px);
}

.wmgrl-card-link {
	display: grid;
	grid-template-columns: 128px minmax(0, 1fr);
	align-items: stretch;
	gap: 19px;
	min-height: 162px;
	padding: 16px;
	color: inherit !important;
	text-decoration: none !important;
}

.wmgrl-card-link:focus-visible {
	outline: 3px solid rgba(18, 191, 230, .75);
	outline-offset: -4px;
}

.wmgrl-card-media {
	display: block;
	width: 128px;
	height: 100%;
	min-height: 128px;
	border-radius: 14px;
	background: linear-gradient(135deg, #edfaff, #eeebff);
	overflow: hidden;
}

.wmgrl-card-image {
	display: block;
	width: 100% !important;
	height: 100% !important;
	margin: 0 !important;
	object-fit: cover;
}

.wmgrl-card-fallback {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	background:
		radial-gradient(circle at 25% 20%, rgba(18, 191, 230, .28), transparent 33%),
		linear-gradient(135deg, rgba(91, 77, 255, .12), rgba(255, 110, 93, .13));
}

.wmgrl-card-fallback svg {
	width: 52px;
	height: 52px;
	fill: none;
	stroke: var(--wmgrl-violet);
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 3;
	opacity: .8;
}

.wmgrl-card-content {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	width: 100%;
	padding: 2px 2px 2px 0;
}

.wmgrl-card-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 7px 10px;
	margin-bottom: 8px;
	color: #737b8e;
	font-size: 11px;
	font-weight: 720;
	line-height: 1.35;
}

.wmgrl-card-category {
	padding: 5px 8px;
	border-radius: 999px;
	color: var(--wmgrl-violet-dark);
	background: #efedff;
	font-size: 10px;
	font-weight: 850;
	letter-spacing: .045em;
	text-transform: uppercase;
}

.wmgrl-card h3 {
	display: -webkit-box;
	max-width: 100%;
	margin: 0 0 7px;
	overflow: hidden;
	color: var(--wmgrl-ink);
	font-size: clamp(18px, 1.55vw, 22px);
	font-weight: 820;
	letter-spacing: -.025em;
	line-height: 1.2;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.wmgrl-card-excerpt {
	display: -webkit-box;
	max-width: 100%;
	margin-bottom: 9px;
	overflow: hidden;
	color: var(--wmgrl-muted);
	font-size: 13px;
	line-height: 1.48;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.wmgrl-card-action {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin-top: auto;
	color: var(--wmgrl-violet);
	font-size: 12px;
	font-weight: 820;
}

.wmgrl-card:hover .wmgrl-card-action span {
	transform: translateX(2px);
}

.wmgrl-card-action span {
	transition: transform .2s ease;
}

.wmgrl-more-wrap {
	display: flex;
	justify-content: center;
	margin-top: 22px;
}

.wmgrl-more {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	min-height: 50px;
	padding: 13px 20px;
	border: 1px solid rgba(91, 77, 255, .18);
	border-radius: 999px;
	color: var(--wmgrl-violet-dark);
	background: #fff;
	box-shadow: 0 11px 26px rgba(32, 38, 58, .06);
	font-size: 14px;
	font-weight: 790;
	transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.wmgrl-more:hover,
.wmgrl-more:focus-visible {
	border-color: rgba(91, 77, 255, .45);
	box-shadow: 0 14px 30px rgba(91, 77, 255, .12);
	transform: translateY(-1px);
}

.wmgrl-more[hidden] {
	display: none !important;
}

.wmgrl-no-results {
	grid-column: 1 / -1;
	display: grid;
	gap: 5px;
	padding: 30px;
	border: 1px dashed rgba(91, 77, 255, .28);
	border-radius: 20px;
	color: var(--wmgrl-muted);
	background: rgba(255, 255, 255, .78);
	text-align: center;
}

.wmgrl-no-results strong {
	color: var(--wmgrl-ink);
	font-size: 17px;
}

.wmgrl-admin-empty {
	width: min(calc(100% - 48px), 1240px);
	margin: 28px auto;
	padding: 16px 20px;
	border: 1px dashed #b9b2ff;
	border-radius: 15px;
	color: #4f5670;
	background: #f6f4ff;
	font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.wmgrl-empty-anchor {
	display: block;
	position: relative;
	top: -120px;
	width: 0;
	height: 0;
	visibility: hidden;
}

.wmgrl-library.is-loading .wmgrl-results {
	opacity: .56;
}

.wmgrl-results {
	transition: opacity .18s ease;
}

@media (max-width: 900px) {
	.wmgrl-header {
		grid-template-columns: minmax(0, 1fr);
		gap: 18px;
	}

	.wmgrl-intro {
		max-width: 760px;
	}

	.wmgrl-controls {
		align-items: stretch;
		flex-direction: column;
	}

	.wmgrl-search {
		flex-basis: auto;
		width: 100%;
		min-width: 0;
	}
}

@media (max-width: 760px) {
	.wmgrl-library {
		padding: 54px 0 62px;
	}

	.wmgrl-shell,
	.wmgrl-admin-empty {
		width: min(calc(100% - 32px), 1240px);
	}

	.wmgrl-header h2 {
		font-size: clamp(32px, 9.7vw, 43px);
	}

	.wmgrl-results {
		grid-template-columns: minmax(0, 1fr);
	}

	.wmgrl-card-link {
		grid-template-columns: 104px minmax(0, 1fr);
		min-height: 148px;
		gap: 15px;
		padding: 14px;
	}

	.wmgrl-card-media {
		width: 104px;
		min-height: 118px;
	}
}

@media (max-width: 480px) {
	.wmgrl-shell,
	.wmgrl-admin-empty {
		width: min(calc(100% - 24px), 1240px);
	}

	.wmgrl-controls {
		padding: 10px;
		border-radius: 17px;
	}

	.wmgrl-filter {
		min-height: 40px;
		padding: 9px 13px;
	}

	.wmgrl-card-link {
		grid-template-columns: 88px minmax(0, 1fr);
		gap: 12px;
		padding: 11px;
	}

	.wmgrl-card-media {
		width: 88px;
		min-height: 108px;
		border-radius: 12px;
	}

	.wmgrl-card h3 {
		font-size: 17px;
	}

	.wmgrl-card-excerpt {
		font-size: 12px;
		-webkit-line-clamp: 1;
	}

	.wmgrl-card-action {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wmgrl-library *,
	.wmgrl-library *::before,
	.wmgrl-library *::after {
		scroll-behavior: auto !important;
		transition-duration: .01ms !important;
	}
}
