Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

27.0 KB
Raw Blame
/* Widget gallery — black/white palette, single blue accent on primary CTA. */

[hidden] {
	display: none !important;
}

/* Local token overrides — keep purple out of this page */
.gallery-body {
	--accent: #ffffff;
	--accent-soft: rgba(255, 255, 255, 0.08);
	--blue: #ffffff;
}

html,
body.gallery-body {
	overflow: auto;
	height: auto;
	min-height: 100vh;
}

/* ── Header ─────────────────────────────────────────────────────────────────── */

/* ── Main layout ─────────────────────────────────────────────────────────────── */

.gallery-main {
	max-width: 1400px;
	margin: 0 auto;
	padding: var(--space-2xl) var(--space-lg);
	display: flex;
	flex-direction: column;
	gap: var(--space-2xl);
}

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

.gallery-hero {
	text-align: center;
	display: flex;
	flex-direction: column;
	gap: var(--space-md);
	align-items: center;
}

.gallery-hero .eyebrow {
	margin: 0;
	font-size: var(--text-sm);
	letter-spacing: 4px;
	text-transform: uppercase;
	color: var(--accent);
	font-weight: 600;
}

.gallery-hero h1 {
	margin: 0;
	font-family: var(--font-display);
	font-size: var(--text-2xl);
	font-weight: 300;
	letter-spacing: -1px;
	line-height: 1.1;
}

.gallery-hero .lede {
	max-width: 60ch;
	margin: 0;
	font-size: var(--text-lg);
	color: rgba(229, 229, 229, 0.7);
	line-height: var(--leading-normal);
}

.hero-badges {
	display: flex;
	gap: var(--space-sm);
	flex-wrap: wrap;
	justify-content: center;
	margin-top: var(--space-xs);
}

.hero-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.3rem 0.75rem;
	border-radius: 8px;
	font-size: var(--text-sm);
	font-weight: 500;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.1);
	color: rgba(229, 229, 229, 0.8);
}

.hero-badge-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--accent);
	box-shadow: 0 0 8px var(--accent);
}

.cta-row {
	display: flex;
	gap: var(--space-sm);
	flex-wrap: wrap;
	justify-content: center;
	margin-top: var(--space-sm);
}

/* ── Buttons ─────────────────────────────────────────────────────────────────── */

.btn {
	display: inline-flex;
	align-items: center;
	gap: var(--space-xs);
	padding: var(--space-sm) var(--space-lg);
	border-radius: 8px;
	font-family: var(--font-body);
	font-size: var(--text-base);
	font-weight: 500;
	text-decoration: none;
	border: 1px solid transparent;
	cursor: pointer;
	transition:
		transform var(--duration-fast),
		background var(--duration-fast),
		border-color var(--duration-fast);
}

.btn:focus-visible {
	outline: 2px solid rgba(255, 255, 255, 0.5);
	outline-offset: 2px;
}

.btn-primary {
	background: var(--blue);
	color: var(--bg-0);
}

.btn-primary:hover {
	transform: translateY(-1px);
	background: var(--ink);
}

.btn-ghost {
	background: transparent;
	color: rgba(229, 229, 229, 0.85);
	border-color: rgba(255, 255, 255, 0.18);
}

.btn-ghost:hover {
	background: rgba(255, 255, 255, 0.06);
}

/* ── Filter bar ──────────────────────────────────────────────────────────────── */

.filter-bar {
	display: flex;
	gap: var(--space-sm);
	flex-wrap: wrap;
	align-items: center;
}

.filter-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.45rem 1rem;
	border-radius: 8px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	background: rgba(255, 255, 255, 0.04);
	color: rgba(229, 229, 229, 0.7);
	font-family: var(--font-body);
	font-size: var(--text-sm);
	font-weight: 500;
	cursor: pointer;
	transition:
		background var(--duration-fast),
		border-color var(--duration-fast),
		color var(--duration-fast);
	white-space: nowrap;
}

.filter-btn::before {
	content: '';
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--type-color, transparent);
	display: none;
}

.filter-btn[data-type]::before {
	display: block;
}

.filter-btn:hover {
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	border-color: rgba(255, 255, 255, 0.2);
}

.filter-btn[data-active='true'] {
	background: rgba(255, 255, 255, 0.1);
	border-color: var(--type-color, rgba(255, 255, 255, 0.4));
	color: #fff;
}

.filter-btn:focus-visible {
	outline: 2px solid rgba(255, 255, 255, 0.5);
	outline-offset: 2px;
}

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

.gallery-grid {
	display: flex;
	flex-direction: column;
	gap: var(--space-2xl);
}

.gallery-grid .loading {
	color: rgba(229, 229, 229, 0.55);
	text-align: center;
}

/* ── Skeleton shimmer ────────────────────────────────────────────────────────── */

@keyframes shimmer {
	0% {
		background-position: -600px 0;
	}
	100% {
		background-position: 600px 0;
	}
}

.skel-block,
.skel-line {
	border-radius: var(--radius-md);
	background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.04) 75%);
	background-size: 600px 100%;
	animation: shimmer 1.6s infinite linear;
}

.skel-row {
	display: flex;
	gap: var(--space-xs);
	margin-top: var(--space-sm);
}

.showcase-skeleton .showcase-frame {
	min-height: 400px;
}

/* ── Showcase card ───────────────────────────────────────────────────────────── */

.showcase {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(280px, 400px);
	gap: var(--space-xl);
	align-items: start;
	padding: var(--space-xl);
	background: rgba(255, 255, 255, 0.025);
	border: 1px solid rgba(255, 255, 255, 0.06);
	border-radius: var(--radius-lg);
	/* scroll-in: start invisible */
	opacity: 0;
	transform: translateY(28px);
	transition:
		opacity var(--duration-slow) var(--ease-standard),
		transform var(--duration-slow) var(--ease-standard),
		border-color var(--duration-base);
}

.showcase.sc-visible {
	opacity: 1;
	transform: none;
}

/* Skeleton cards skip the animation */
.showcase-skeleton {
	opacity: 1 !important;
	transform: none !important;
	transition: none !important;
}

.showcase:hover {
	border-color: rgba(255, 255, 255, 0.1);
}

/* Alternate: even cards flip frame to right */
.showcase:not(.showcase-skeleton):nth-child(even) {
	direction: ltr; /* reset if parent has rtl */
}

.showcase:not(.showcase-skeleton):nth-child(even) .showcase-frame {
	order: 2;
}

.showcase:not(.showcase-skeleton):nth-child(even) .showcase-meta {
	order: 1;
}

@media (max-width: 900px) {
	/* minmax(0, 1fr), not 1fr: the frame's aspect-ratio + min-height give it an
	 * automatic minimum width, and a bare 1fr track refuses to shrink past it,
	 * which pushed the card's content off the right edge on phones. */
	.showcase {
		grid-template-columns: minmax(0, 1fr);
	}

	.showcase:not(.showcase-skeleton):nth-child(even) .showcase-frame,
	.showcase:not(.showcase-skeleton):nth-child(even) .showcase-meta {
		order: unset;
	}
}

/* ── Showcase frame ──────────────────────────────────────────────────────────── */

.showcase-frame {
	position: relative;
	border-radius: var(--radius-md);
	overflow: hidden;
	background: #050505;
	aspect-ratio: 1 / 1;
	min-height: 300px;
	width: 100%;
	/* min-height + aspect-ratio would otherwise set a 300px automatic minimum
	 * width and overflow narrow cards; height still honors the min-height. */
	min-width: 0;
	margin: 0 auto;
}

.showcase-frame iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

/* ── Click-to-load placeholder ───────────────────────────────────────────────── */

.frame-placeholder {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background:
		radial-gradient(ellipse at 30% 40%, rgba(255, 255, 255, 0.04) 0%, transparent 70%),
		radial-gradient(ellipse at 75% 70%, rgba(255, 255, 255, 0.02) 0%, transparent 60%),
		#050505;
	transition: opacity var(--duration-base) var(--ease-standard);
}

.frame-placeholder--loading {
	opacity: 0.4;
	pointer-events: none;
}

.frame-ph-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.75rem;
	text-align: center;
}

.play-btn {
	width: 64px;
	height: 64px;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.15);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition:
		background var(--duration-fast),
		transform var(--duration-fast),
		border-color var(--duration-fast);
}

.play-btn:hover,
.play-btn:focus-visible {
	background: rgba(255, 255, 255, 0.14);
	border-color: rgba(255, 255, 255, 0.35);
	transform: scale(1.08);
	outline: none;
}

.frame-ph-label {
	font-family: var(--font-display);
	font-size: var(--text-base);
	font-weight: 500;
	color: rgba(229, 229, 229, 0.75);
}

.frame-ph-dim {
	font-family: var(--font-mono);
	font-size: var(--text-xs);
	color: rgba(229, 229, 229, 0.35);
	letter-spacing: 0.05em;
}

/* ── Showcase meta ───────────────────────────────────────────────────────────── */

.showcase-meta {
	display: flex;
	flex-direction: column;
	gap: var(--space-md);
	min-width: 0;
}

.type-tag {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-size: var(--text-xs);
	letter-spacing: 2.5px;
	text-transform: uppercase;
	color: var(--type-color, var(--accent));
	font-weight: 600;
	width: fit-content;
}

.type-tag::before {
	content: '';
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: var(--type-color, var(--accent));
	box-shadow: 0 0 6px var(--type-color, var(--accent));
}

.showcase-meta h3 {
	margin: 0;
	font-family: var(--font-display);
	font-size: var(--text-xl);
	font-weight: 400;
	letter-spacing: -0.5px;
	line-height: 1.2;
}

.showcase-meta > p {
	margin: 0;
	color: rgba(229, 229, 229, 0.7);
	line-height: var(--leading-normal);
}

/* Feature list inside card */
.widget-features {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
}

.widget-features li {
	font-size: var(--text-sm);
	color: rgba(229, 229, 229, 0.6);
	padding-left: 1.1rem;
	position: relative;
}

.widget-features li::before {
	content: '›';
	position: absolute;
	left: 0;
	color: var(--accent);
}

/* ── Snippet ─────────────────────────────────────────────────────────────────── */

.snippet {
	position: relative;
	background: var(--bg-0);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: var(--radius-md);
	padding: var(--space-sm);
	font-family: var(--font-mono);
	font-size: 11px;
	color: rgba(229, 229, 229, 0.75);
	white-space: pre-wrap;
	word-break: break-all;
	overflow-x: auto;
	line-height: 1.55;
	max-height: 5.5rem;
	overflow-y: hidden;
}

.snippet code {
	display: block;
}

/* ── Snippet action row ───────────────────────────────────────────────────────── */

.snippet-row {
	display: flex;
	gap: var(--space-xs);
	flex-wrap: wrap;
}

.snippet-row button,
.snippet-row a {
	flex: 1 1 auto;
	min-width: 100px;
	padding: var(--space-xs) var(--space-sm);
	font-size: var(--text-sm);
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.1);
	color: #e5e5e5;
	border-radius: var(--radius-md);
	cursor: pointer;
	text-align: center;
	text-decoration: none;
	font-family: var(--font-body);
	transition:
		background var(--duration-fast),
		border-color var(--duration-fast),
		color var(--duration-fast);
}

/* The Copy split-button is no longer styled via :first-child — see .split-btn-main below. */

/* "Open in Studio" sits quieter as a text link */
.snippet-row a {
	background: transparent;
	color: rgba(229, 229, 229, 0.55);
	border-color: transparent;
}

.snippet-row a:hover {
	color: #fff;
	background: rgba(255, 255, 255, 0.06);
	border-color: rgba(255, 255, 255, 0.12);
}

.snippet-row button:hover,
.snippet-row a:hover {
	background: rgba(255, 255, 255, 0.1);
	border-color: rgba(255, 255, 255, 0.2);
}

.snippet-row button:focus-visible,
.snippet-row a:focus-visible {
	outline: 2px solid rgba(255, 255, 255, 0.5);
	outline-offset: 2px;
}

.snippet-row .copied {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.3);
	color: #fff;
}

/* ── Error state ─────────────────────────────────────────────────────────────── */

.error-state {
	display: flex;
	align-items: flex-start;
	gap: var(--space-sm);
	padding: var(--space-md) var(--space-lg);
	background: rgba(255, 80, 80, 0.06);
	border: 1px solid rgba(255, 80, 80, 0.2);
	border-radius: var(--radius-md);
	color: rgba(255, 200, 200, 0.9);
	font-size: var(--text-sm);
	line-height: var(--leading-normal);
}

.error-state code {
	font-family: var(--font-mono);
	font-size: var(--text-xs);
	color: rgba(255, 180, 180, 0.8);
}

.error-state-body {
	display: flex;
	flex-direction: column;
	gap: var(--space-sm);
	min-width: 0;
}

.error-state-actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-sm);
	align-items: center;
}

.error-retry {
	appearance: none;
	cursor: pointer;
	font: inherit;
	font-size: var(--text-xs);
	font-weight: 600;
	padding: 0.45rem 1rem;
	border-radius: var(--radius-md);
	border: 1px solid rgba(255, 120, 120, 0.35);
	background: rgba(255, 80, 80, 0.12);
	color: #ffe4e4;
	transition:
		background var(--duration-fast) var(--ease-standard),
		border-color var(--duration-fast) var(--ease-standard),
		transform var(--duration-fast) var(--ease-standard);
}

.error-retry:hover {
	background: rgba(255, 80, 80, 0.2);
	border-color: rgba(255, 140, 140, 0.55);
}

.error-retry:active {
	transform: translateY(1px);
}

.error-retry:focus-visible {
	outline: 2px solid rgba(255, 180, 180, 0.7);
	outline-offset: 2px;
}

.error-retry[disabled] {
	opacity: 0.6;
	cursor: progress;
}

.error-state-link {
	font-size: var(--text-xs);
	color: rgba(255, 210, 210, 0.85);
	text-decoration: underline;
	text-underline-offset: 3px;
	border-radius: 4px;
}

.error-state-link:hover {
	color: #fff;
}

.error-state-link:focus-visible {
	outline: 2px solid rgba(255, 180, 180, 0.7);
	outline-offset: 2px;
}

/* ── Empty state ─────────────────────────────────────────────────────────────── */

.empty-state {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--space-sm);
	text-align: center;
	padding: var(--space-2xl) var(--space-lg);
	background: rgba(255, 255, 255, 0.025);
	border: 1px dashed rgba(255, 255, 255, 0.12);
	border-radius: var(--radius-lg);
}

.empty-state svg {
	color: rgba(229, 229, 229, 0.35);
}

.empty-state h3 {
	margin: 0;
	font-family: var(--font-display);
	font-size: var(--text-lg);
	font-weight: 400;
	color: #fff;
}

.empty-state p {
	margin: 0;
	max-width: 46ch;
	font-size: var(--text-sm);
	color: rgba(229, 229, 229, 0.62);
	line-height: var(--leading-normal);
}

.empty-state .btn {
	margin-top: var(--space-xs);
}

/* ── Bottom CTA ──────────────────────────────────────────────────────────────── */

.gallery-cta {
	text-align: center;
	padding: var(--space-2xl) var(--space-lg);
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: var(--radius-lg);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--space-md);
}

.gallery-cta h3 {
	margin: 0;
	font-family: var(--font-display);
	font-size: var(--text-xl);
	font-weight: 400;
}

.gallery-cta p {
	margin: 0;
	color: rgba(229, 229, 229, 0.7);
}

/* ── Footer ──────────────────────────────────────────────────────────────────── */

.gallery-footer {
	position: static;
	padding: var(--space-lg);
	text-align: center;
	color: rgba(229, 229, 229, 0.5);
	font-size: var(--text-sm);
	border-top: 1px solid rgba(255, 255, 255, 0.06);
	pointer-events: auto;
}

.gallery-footer a {
	color: rgba(229, 229, 229, 0.7);
	text-decoration: none;
	margin: 0 var(--space-xs);
}

.gallery-footer a:hover {
	color: #fff;
}

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

@media (max-width: 600px) {
	.gallery-hero h1 {
		font-size: var(--text-xl);
	}

	.filter-bar {
		gap: var(--space-xs);
	}

	.filter-btn {
		font-size: var(--text-xs);
		padding: 0.35rem 0.75rem;
	}

	.showcase-frame {
		min-height: 300px;
	}
}

/* ── Preview / Code tabs ─────────────────────────────────────────────────────── */

.showcase-frame-wrap {
	display: flex;
	flex-direction: column;
	gap: var(--space-xs);
	width: 100%;
	min-width: 0;
	margin: 0 auto;
}

.frame-tabs {
	display: inline-flex;
	gap: 2px;
	padding: 3px;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: var(--radius-md);
	align-self: flex-start;
}

.frame-tab {
	padding: 0.35rem 0.85rem;
	font-size: var(--text-xs);
	font-family: var(--font-body);
	color: rgba(229, 229, 229, 0.55);
	background: transparent;
	border: 0;
	border-radius: calc(var(--radius-md) - 4px);
	cursor: pointer;
	letter-spacing: 0.02em;
	transition: background var(--duration-fast), color var(--duration-fast);
}

.frame-tab:hover {
	color: rgba(229, 229, 229, 0.85);
}

.frame-tab[data-active='true'] {
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

.frame-tab:focus-visible {
	outline: 2px solid rgba(255, 255, 255, 0.5);
	outline-offset: 2px;
}

/* The code panel reuses the snippet box look but takes the frame's footprint. */
.frame-code-panel {
	position: relative;
	border-radius: var(--radius-md);
	background: #050505;
	border: 1px solid rgba(255, 255, 255, 0.08);
	padding: var(--space-md);
	aspect-ratio: 1 / 1;
	overflow: auto;
	font-family: var(--font-mono);
	font-size: 12px;
	color: rgba(229, 229, 229, 0.9);
	line-height: 1.55;
}

.frame-code {
	margin: 0;
	white-space: pre-wrap;
	word-break: break-word;
}

/* ── Customize panel ─────────────────────────────────────────────────────────── */

.customize {
	margin-top: var(--space-sm);
	background: rgba(255, 255, 255, 0.02);
	border: 1px solid rgba(255, 255, 255, 0.06);
	border-radius: var(--radius-md);
	overflow: hidden;
}

.customize > summary {
	list-style: none;
	cursor: pointer;
	padding: 0.5rem 0.75rem;
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	font-size: var(--text-xs);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: rgba(229, 229, 229, 0.7);
	width: 100%;
	user-select: none;
}

.customize > summary::-webkit-details-marker { display: none; }
.customize > summary::marker { content: ''; }

.customize > summary:hover {
	color: #fff;
	background: rgba(255, 255, 255, 0.03);
}

.customize > summary svg {
	transition: transform var(--duration-base);
}

.customize[open] > summary svg {
	transform: rotate(60deg);
	color: var(--type-color, var(--accent));
}

/* minmax(0, 1fr): a text input contributes an intrinsic min-content width, and
 * a bare 1fr track sizes to it, which pushed the mint field and the Reset
 * button outside the panel's clipped box on phones. */
.customize-knobs {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0.5rem;
	padding: 0.25rem 0.75rem 0.75rem;
}

.knob-row {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: var(--text-xs);
	min-width: 0;
}

.knob-row > label:first-child {
	flex: 0 0 4.5rem;
	color: rgba(229, 229, 229, 0.55);
	letter-spacing: 0.02em;
	text-transform: uppercase;
	font-size: 10px;
}

.knob-row input[type='text'],
.knob-row select {
	flex: 1 1 0;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.08);
	color: #e5e5e5;
	border-radius: 6px;
	padding: 0.35rem 0.55rem;
	font-family: var(--font-mono);
	font-size: 11px;
	min-width: 0;
}

.knob-row input[type='text']:focus,
.knob-row select:focus {
	outline: 1px solid var(--type-color, var(--accent));
	outline-offset: 0;
	border-color: var(--type-color, var(--accent));
}

.knob-row input[type='color'] {
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.1);
	width: 2rem;
	height: 1.6rem;
	border-radius: 6px;
	padding: 0;
	cursor: pointer;
}

.accent-value {
	font-family: var(--font-mono);
	font-size: 11px;
	color: rgba(229, 229, 229, 0.55);
	letter-spacing: 0.02em;
}

.size-presets {
	display: inline-flex;
	gap: 2px;
	padding: 2px;
	background: rgba(255, 255, 255, 0.04);
	border-radius: 6px;
}

.size-presets button {
	min-width: 1.85rem;
	padding: 0.2rem 0.45rem;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.04em;
	color: rgba(229, 229, 229, 0.55);
	background: transparent;
	border: 0;
	border-radius: 4px;
	cursor: pointer;
}

.size-presets button:hover {
	color: rgba(229, 229, 229, 0.9);
}

.size-presets button[data-active='true'] {
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
}

.customize-reset {
	justify-self: end;
	background: transparent;
	border: 0;
	color: rgba(229, 229, 229, 0.4);
	font-size: 10px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	cursor: pointer;
	padding: 0.25rem 0.5rem;
}

.customize-reset:hover {
	color: rgba(229, 229, 229, 0.85);
}

/* ── Split-button copy ───────────────────────────────────────────────────────── */

.snippet-row .split-btn {
	flex: 1 1 auto;
	min-width: 140px;
	display: inline-flex;
	position: relative;
	border-radius: var(--radius-md);
	overflow: visible;
	border: 1px solid var(--type-color, var(--blue));
	background: var(--type-color, var(--blue));
	transition: filter var(--duration-fast);
}

.snippet-row .split-btn:hover {
	filter: brightness(1.08);
}

.split-btn-main,
.split-btn-toggle {
	background: transparent;
	border: 0;
	color: #fff;
	font-family: var(--font-body);
	font-size: var(--text-sm);
	cursor: pointer;
	padding: var(--space-xs) var(--space-sm);
}

.split-btn-main {
	flex: 1;
	border-right: 1px solid rgba(0, 0, 0, 0.18);
	text-align: center;
}

.split-btn-toggle {
	padding: var(--space-xs) 0.6rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.split-btn-main:focus-visible,
.split-btn-toggle:focus-visible {
	outline: 2px solid rgba(255, 255, 255, 0.6);
	outline-offset: -2px;
}

.split-btn-main.copied {
	background: rgba(0, 0, 0, 0.2);
}

.split-btn-menu {
	position: absolute;
	top: calc(100% + 4px);
	right: 0;
	min-width: 11rem;
	background: #0e0e0e;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: var(--radius-md);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
	padding: 4px;
	z-index: 50;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.split-btn-menu-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: transparent;
	border: 0;
	color: rgba(229, 229, 229, 0.85);
	font-family: var(--font-body);
	font-size: var(--text-sm);
	padding: 0.45rem 0.7rem;
	border-radius: 6px;
	cursor: pointer;
	text-align: left;
}

.split-btn-menu-item:hover {
	background: rgba(255, 255, 255, 0.06);
	color: #fff;
}

.split-btn-menu-item[aria-checked='true']::after {
	content: '✓';
	color: var(--type-color, var(--accent));
	margin-left: 0.5rem;
}

/* Studio link gets a stable secondary look (was previously the only <a>; rules
 * above still apply, but pin it to a non-flex-grow width so it doesn't fight
 * the split-btn for space). */
.snippet-row .studio-link {
	flex: 0 0 auto;
}

/* ── Reduced motion ──────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
	.btn,
	.snippet-row button,
	.snippet-row a,
	.filter-btn,
	.play-btn,
	.showcase,
	.frame-tab,
	.split-btn,
	.size-presets button,
	.customize > summary svg {
		transition: none;
		animation: none;
	}

	.btn-primary:hover {
		transform: none;
	}

	.showcase {
		opacity: 1;
		transform: none;
	}

	.skel-block,
	.skel-line {
		animation: none;
	}
}

/* ── Mobile overflow hardening ─────────────────────────────────────────────
 * body is a flex column (style.css); a flex item with the default
 * min-width:auto refuses to shrink below its content's min-size, which let
 * the gallery stretch wider than the viewport on phones. min-width:0 on the
 * flex chain restores correct shrinking so content fits any width. */
@media (max-width: 768px) {
	html,
	body.gallery-body {
		overflow-x: clip;
	}
	.gallery-main {
		min-width: 0;
		max-width: 100%;
		width: 100%;
		padding-left: var(--space-md);
		padding-right: var(--space-md);
	}
	.gallery-main > *,
	.gallery-hero,
	.gallery-grid,
	.gallery-cta {
		min-width: 0;
		max-width: 100%;
	}
}

/* ── Interactive states (QB-07) ────────────────────────────────────────────
   The split button's two halves and the colour knob set cursor: pointer with
   no hover rule, so nothing told you which half of a split button you were on,
   which is the entire point of splitting it. */
.split-btn-main,
.split-btn-toggle,
.knob-row input[type='color'] {
	transition:
		background var(--duration-fast) var(--ease-standard),
		border-color var(--duration-fast) var(--ease-standard);
}

.split-btn-main:hover,
.split-btn-toggle:hover {
	background: var(--scrim-soft);
}

.knob-row input[type='color']:hover {
	border-color: var(--stroke-strong);
}