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.

25.6 KB
Raw Blame
<!doctype html>
<html lang="en">
	<head>
		<script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
		<meta charset="utf-8" />
		<title data-i18n="cosmos.meta_title">Cosmos · Living Worlds · three.ws</title>
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<meta name="theme-color" content="#000000" />
		<link rel="icon" href="/favicon.ico" sizes="any" />
		<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
		<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
		<link rel="manifest" href="/manifest.webmanifest" />
		<meta
			name="description"
			content="Bring your 3D avatar to life with NVIDIA Cosmos. Generate a living, photoreal world from a text prompt and watch your avatar stand inside a cinematic, animated scene."
		 data-i18n-attr="content:cosmos.meta_description"/>
		<meta property="og:type" content="website" />
		<meta property="og:site_name" content="three.ws" />
		<meta property="og:url" content="https://three.ws/cosmos" />
		<meta property="og:title" content="Cosmos · Living Worlds · three.ws"  data-i18n-attr="content:cosmos.meta_og_title"/>
		<meta
			property="og:description"
			content="Type a world, watch it come alive behind your avatar, powered by NVIDIA Cosmos world models."
		 data-i18n-attr="content:cosmos.meta_og_description"/>
		<meta property="og:image" content="https://three.ws/api/page-og?s=build&amp;t=Cosmos%3A+Living+Worlds&amp;d=Bring+your+avatar+to+life%3A+type+a+world+and+NVIDIA+Cosmos+renders+a+living%2C+photoreal+scene+that+plays+behind+your+3D+avatar.+Generate%2C+preview%2C+and+download+a&amp;p=%2Fcosmos" />
		<meta name="twitter:card" content="summary_large_image" />

		<link rel="stylesheet" href="/style.css" />
		<link rel="stylesheet" href="/fonts/fonts.css" />
		<link rel="stylesheet" href="/mobile.css" />

		<!-- Google <model-viewer>: the same build the Forge viewer uses. Lazy: the page
		     renders its shell instantly; the avatar appears when the module loads. -->
		<script src="/model-viewer-meshopt.js"></script>
		<script
			type="module"
			src="https://cdn.jsdelivr.net/npm/@google/[email protected]/dist/model-viewer.min.js"
		></script>

		<style>
			:root {
				--cz-bg: #06070d;
				--cz-panel: rgba(16, 18, 28, 0.72);
				--cz-panel-solid: #11131c;
				--cz-border: rgba(255, 255, 255, 0.1);
				--cz-text: #f4f6fb;
				--cz-dim: #9aa3b8;
				--cz-accent: #76e0c2;
				--cz-accent-2: #8b7cf6;
				--cz-danger: #ff6b6b;
				--cz-radius: 16px;
				--cz-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
			}
			html[data-theme='light'] {
				--cz-bg: #eef1f8;
				--cz-panel: rgba(255, 255, 255, 0.82);
				--cz-panel-solid: #ffffff;
				--cz-border: rgba(10, 12, 20, 0.12);
				--cz-text: #0c1018;
				--cz-dim: #5a6172;
				--cz-shadow: 0 24px 70px rgba(20, 30, 60, 0.18);
			}

			* {
				box-sizing: border-box;
			}
			html,
			body {
				margin: 0;
				padding: 0;
				height: 100%;
			}
			body {
				background: var(--cz-bg);
				color: var(--cz-text);
				font-family:
					'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
				-webkit-font-smoothing: antialiased;
				overflow-x: hidden;
			}

			/* ── Top bar ──────────────────────────────────────────────────── */
			.cz-bar {
				position: sticky;
				top: 0;
				z-index: 40;
				display: flex;
				align-items: center;
				gap: 14px;
				padding: 12px 20px;
				background: linear-gradient(180deg, rgba(6, 7, 13, 0.92), rgba(6, 7, 13, 0));
				backdrop-filter: blur(8px);
			}
			html[data-theme='light'] .cz-bar {
				background: linear-gradient(180deg, rgba(238, 241, 248, 0.92), rgba(238, 241, 248, 0));
			}
			.cz-back {
				display: inline-flex;
				align-items: center;
				gap: 7px;
				color: var(--cz-text);
				text-decoration: none;
				font-weight: 600;
				font-size: 14px;
				padding: 7px 12px;
				border-radius: 10px;
				border: 1px solid var(--cz-border);
				transition:
					background var(--duration-fast) var(--ease-standard),
					transform var(--duration-fast) var(--ease-standard);
			}
			.cz-back:hover {
				background: rgba(255, 255, 255, 0.06);
				transform: translateX(-2px);
			}
			.cz-brand {
				display: flex;
				flex-direction: column;
				line-height: 1.15;
			}
			.cz-brand b {
				font-size: 15px;
				letter-spacing: 0.2px;
			}
			.cz-brand span {
				font-size: 11.5px;
				color: var(--cz-dim);
			}
			.cz-badge {
				margin-left: auto;
				display: inline-flex;
				align-items: center;
				gap: 7px;
				font-size: 12px;
				color: var(--cz-dim);
				border: 1px solid var(--cz-border);
				border-radius: 999px;
				padding: 6px 12px;
			}
			.cz-badge .dot {
				width: 8px;
				height: 8px;
				border-radius: 50%;
				background: var(--cz-accent);
				box-shadow: 0 0 10px var(--cz-accent);
			}
			.cz-badge.is-off .dot {
				background: var(--cz-danger);
				box-shadow: 0 0 10px var(--cz-danger);
			}
			/* Idle: nothing has been asked of the lane yet, so the dot claims no
			   health. It turns green on the first accepted job and red when the
			   lane reports itself down. */
			.cz-badge.is-idle .dot {
				background: var(--cz-dim);
				box-shadow: none;
			}

			/* ── Layout ───────────────────────────────────────────────────── */
			.cz-wrap {
				display: grid;
				grid-template-columns: minmax(0, 1fr) 380px;
				gap: 20px;
				max-width: 1320px;
				margin: 0 auto;
				padding: 8px 20px 40px;
			}
			@media (max-width: 900px) {
				.cz-wrap {
					grid-template-columns: 1fr;
				}
			}

			/* ── Stage (avatar in front of the living world) ──────────────── */
			.cz-stage {
				position: relative;
				aspect-ratio: 16 / 10;
				min-height: 420px;
				border-radius: var(--cz-radius);
				overflow: hidden;
				border: 1px solid var(--cz-border);
				box-shadow: var(--cz-shadow);
				background: #05060a;
				isolation: isolate;
			}
			/* min-height plus aspect-ratio forces a WIDTH: 420px at 16/10 is a 672px
			   stage, which overflowed its column and clipped the avatar on every
			   phone. Below the two-column breakpoint the ratio alone sizes the stage
			   from the width that is actually available. */
			@media (max-width: 900px) {
				.cz-stage {
					min-height: 0;
				}
			}
			/* A 16/10 letterbox on a phone leaves the avatar a sliver; go portrait so
			   the character still has vertical room to stand in. */
			@media (max-width: 560px) {
				.cz-stage {
					aspect-ratio: 4 / 5;
				}
			}
			/* Designed empty/fallback backdrop: a slow living aurora so the stage is
			   never a dead void before (or instead of) a generated world. */
			.cz-aurora {
				position: absolute;
				inset: -40%;
				z-index: 0;
				background:
					radial-gradient(closest-side at 30% 35%, rgba(139, 124, 246, 0.55), transparent 70%),
					radial-gradient(closest-side at 70% 60%, rgba(118, 224, 194, 0.5), transparent 70%),
					radial-gradient(closest-side at 50% 80%, rgba(94, 137, 255, 0.4), transparent 70%);
				filter: blur(20px) saturate(1.2);
				animation: cz-drift 18s ease-in-out infinite alternate;
				will-change: transform;
			}
			@keyframes cz-drift {
				0% {
					transform: translate3d(-3%, -2%, 0) rotate(0deg) scale(1.05);
				}
				100% {
					transform: translate3d(4%, 3%, 0) rotate(8deg) scale(1.18);
				}
			}
			@media (prefers-reduced-motion: reduce) {
				.cz-aurora {
					animation: none;
				}
			}
			.cz-world {
				position: absolute;
				inset: 0;
				z-index: 1;
				width: 100%;
				height: 100%;
				object-fit: cover;
				opacity: 0;
				transition: opacity var(--duration-slow) var(--ease-standard);
			}
			.cz-world.is-live {
				opacity: 1;
			}
			.cz-stage::after {
				/* gentle vignette so the avatar reads against any world */
				content: '';
				position: absolute;
				inset: 0;
				z-index: 2;
				pointer-events: none;
				background: radial-gradient(120% 90% at 50% 35%, transparent 55%, rgba(0, 0, 0, 0.45) 100%);
			}
			model-viewer.cz-avatar {
				position: absolute;
				inset: 0;
				z-index: 3;
				width: 100%;
				height: 100%;
				--poster-color: transparent;
				background: transparent;
			}

			/* Loading scrim driven by real poll state */
			.cz-scrim {
				position: absolute;
				inset: 0;
				z-index: 5;
				display: none;
				flex-direction: column;
				align-items: center;
				justify-content: flex-end;
				padding: 22px;
				gap: 10px;
				background: linear-gradient(0deg, rgba(4, 5, 10, 0.78), rgba(4, 5, 10, 0) 60%);
			}
			.cz-stage.is-loading .cz-scrim {
				display: flex;
			}
			.cz-stage.is-loading::before {
				/* scanline shimmer: signals active rendering, CSS only (no fake %). */
				content: '';
				position: absolute;
				inset: 0;
				z-index: 4;
				background: linear-gradient(180deg, transparent 0%, rgba(118, 224, 194, 0.12) 50%, transparent 100%);
				background-size: 100% 220%;
				animation: cz-scan 1.7s linear infinite;
				pointer-events: none;
			}
			@keyframes cz-scan {
				0% {
					background-position: 0 -110%;
				}
				100% {
					background-position: 0 110%;
				}
			}
			.cz-prog {
				width: 100%;
				max-width: 460px;
				display: flex;
				flex-direction: column;
				gap: 8px;
			}
			.cz-prog-row {
				display: flex;
				align-items: center;
				justify-content: space-between;
				font-size: 13px;
				color: #e8ecf6;
			}
			.cz-prog-bar {
				height: 5px;
				border-radius: 999px;
				background: rgba(255, 255, 255, 0.14);
				overflow: hidden;
			}
			.cz-prog-bar i {
				display: block;
				height: 100%;
				width: 30%;
				border-radius: inherit;
				background: linear-gradient(90deg, var(--cz-accent), var(--cz-accent-2));
				transition: width var(--duration-slow) var(--ease-standard);
			}
			.cz-phases {
				display: flex;
				gap: 6px;
				flex-wrap: wrap;
				font-size: 11.5px;
				color: var(--cz-dim);
			}
			.cz-phases b {
				color: var(--cz-accent);
				font-weight: 600;
			}

			/* Result toolbar over the stage */
			.cz-stage-tools {
				position: absolute;
				z-index: 6;
				top: 12px;
				right: 12px;
				display: none;
				gap: 8px;
			}
			.cz-stage.is-done .cz-stage-tools {
				display: flex;
			}
			.cz-iconbtn {
				display: inline-flex;
				align-items: center;
				gap: 6px;
				font-size: 12.5px;
				font-weight: 600;
				color: #fff;
				background: rgba(8, 10, 18, 0.62);
				border: 1px solid rgba(255, 255, 255, 0.16);
				border-radius: 10px;
				padding: 8px 12px;
				cursor: pointer;
				backdrop-filter: blur(6px);
				transition:
					background var(--duration-fast) var(--ease-standard),
					transform var(--duration-fast) var(--ease-standard);
			}
			.cz-iconbtn:hover {
				background: rgba(20, 24, 40, 0.85);
				transform: translateY(-1px);
			}
			.cz-iconbtn:focus-visible {
				outline: 2px solid var(--cz-accent);
				outline-offset: 2px;
			}

			/* ── Control panel ────────────────────────────────────────────── */
			.cz-panel {
				background: var(--cz-panel);
				backdrop-filter: blur(14px);
				border: 1px solid var(--cz-border);
				border-radius: var(--cz-radius);
				padding: 18px;
				box-shadow: var(--cz-shadow);
				display: flex;
				flex-direction: column;
				gap: 16px;
				align-self: start;
			}
			.cz-h {
				font-size: 18px;
				font-weight: 700;
				margin: 0;
				letter-spacing: -0.2px;
			}
			.cz-sub {
				margin: 2px 0 0;
				font-size: 13px;
				color: var(--cz-dim);
				line-height: 1.5;
			}
			.cz-label {
				font-size: 12px;
				font-weight: 600;
				color: var(--cz-dim);
				text-transform: uppercase;
				letter-spacing: 0.5px;
				margin-bottom: 8px;
				display: block;
			}
			.cz-textarea {
				width: 100%;
				min-height: 84px;
				resize: vertical;
				background: rgba(0, 0, 0, 0.28);
				border: 1px solid var(--cz-border);
				border-radius: 12px;
				color: var(--cz-text);
				font: inherit;
				font-size: 14.5px;
				line-height: 1.5;
				padding: 12px 14px;
				transition: border-color var(--duration-fast) var(--ease-standard), box-shadow var(--duration-fast) var(--ease-standard);
			}
			html[data-theme='light'] .cz-textarea {
				background: rgba(10, 12, 20, 0.04);
			}
			.cz-textarea:focus {
				outline: none;
				border-color: var(--cz-accent);
				box-shadow: 0 0 0 3px rgba(118, 224, 194, 0.18);
			}
			.cz-chips {
				display: flex;
				flex-wrap: wrap;
				gap: 7px;
				margin-top: 10px;
			}
			.cz-chip {
				font-size: 12.5px;
				color: var(--cz-text);
				background: rgba(255, 255, 255, 0.05);
				border: 1px solid var(--cz-border);
				border-radius: 999px;
				padding: 6px 11px;
				cursor: pointer;
				transition: background var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard), transform var(--duration-fast) var(--ease-standard);
			}
			.cz-chip:hover {
				background: rgba(118, 224, 194, 0.12);
				border-color: rgba(118, 224, 194, 0.4);
				transform: translateY(-1px);
			}
			.cz-chip:focus-visible {
				outline: 2px solid var(--cz-accent);
				outline-offset: 2px;
			}

			.cz-generate {
				display: inline-flex;
				align-items: center;
				justify-content: center;
				gap: 9px;
				width: 100%;
				font-size: 15px;
				font-weight: 700;
				color: #05140f;
				background: linear-gradient(120deg, var(--cz-accent), var(--cz-accent-2));
				border: none;
				border-radius: 12px;
				padding: 14px 18px;
				cursor: pointer;
				transition: transform var(--duration-fast) var(--ease-standard), filter var(--duration-fast) var(--ease-standard), opacity var(--duration-fast) var(--ease-standard);
			}
			.cz-generate:hover:not(:disabled) {
				transform: translateY(-1px);
				filter: brightness(1.06);
			}
			.cz-generate:focus-visible {
				outline: 2px solid var(--focus-ring-color);
				outline-offset: 2px;
			}
			.cz-generate:disabled {
				cursor: not-allowed;
				opacity: 0.55;
			}
			.cz-generate .spin {
				width: 16px;
				height: 16px;
				border: 2px solid rgba(5, 20, 15, 0.4);
				border-top-color: #05140f;
				border-radius: 50%;
				animation: cz-spin 0.8s linear infinite;
				display: none;
			}
			.cz-generate.is-busy .spin {
				display: inline-block;
			}
			.cz-generate.is-busy .label-go {
				display: none;
			}
			@keyframes cz-spin {
				to {
					transform: rotate(360deg);
				}
			}
			.cz-secondary {
				display: flex;
				gap: 8px;
			}
			.cz-btn-ghost {
				flex: 1;
				font-size: 13px;
				font-weight: 600;
				color: var(--cz-text);
				background: transparent;
				border: 1px solid var(--cz-border);
				border-radius: 11px;
				padding: 11px;
				cursor: pointer;
				transition: background var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard);
			}
			.cz-btn-ghost:hover {
				background: rgba(255, 255, 255, 0.05);
				border-color: var(--cz-accent);
			}
			.cz-btn-ghost:focus-visible {
				outline: 2px solid var(--cz-accent);
				outline-offset: 2px;
			}

			/* Avatar picker */
			.cz-avatars {
				display: grid;
				grid-template-columns: repeat(5, 1fr);
				gap: 8px;
			}
			.cz-av {
				position: relative;
				aspect-ratio: 1;
				border-radius: 12px;
				overflow: hidden;
				border: 1.5px solid var(--cz-border);
				background: rgba(0, 0, 0, 0.3);
				cursor: pointer;
				padding: 0;
				transition: border-color var(--duration-fast) var(--ease-standard), transform var(--duration-fast) var(--ease-standard);
			}
			.cz-av:hover {
				transform: translateY(-2px);
			}
			.cz-av img {
				width: 100%;
				height: 100%;
				object-fit: cover;
			}
			.cz-av .ph {
				display: flex;
				align-items: center;
				justify-content: center;
				width: 100%;
				height: 100%;
				font-size: 18px;
				color: var(--cz-dim);
			}
			.cz-av.is-active {
				border-color: var(--cz-accent);
				box-shadow: 0 0 0 2px rgba(118, 224, 194, 0.3);
			}
			.cz-av:focus-visible {
				outline: 2px solid var(--cz-accent);
				outline-offset: 2px;
			}

			/* Status / error banner */
			.cz-note {
				display: none;
				font-size: 13px;
				line-height: 1.5;
				border-radius: 11px;
				padding: 11px 13px;
				border: 1px solid var(--cz-border);
			}
			.cz-note.show {
				display: block;
			}
			.cz-note.err {
				color: #ffd8d8;
				background: rgba(255, 107, 107, 0.1);
				border-color: rgba(255, 107, 107, 0.4);
			}
			.cz-note.info {
				color: var(--cz-text);
				background: rgba(139, 124, 246, 0.1);
				border-color: rgba(139, 124, 246, 0.35);
			}
			.cz-note a {
				color: var(--cz-accent);
			}
			/* Retry re-runs the generation on this page, so it is a button that reads
			   as a link and keeps native keyboard and focus behaviour. */
			.cz-note button {
				appearance: none;
				background: none;
				border: 0;
				padding: 0;
				font: inherit;
				color: var(--cz-accent);
				cursor: pointer;
				text-decoration: underline;
				text-underline-offset: 2px;
			}
			.cz-note button:focus-visible {
				outline: 2px solid var(--cz-accent);
				outline-offset: 2px;
				border-radius: 2px;
			}

			details.cz-adv {
				border-top: 1px solid var(--cz-border);
				padding-top: 12px;
			}
			details.cz-adv summary {
				cursor: pointer;
				font-size: 12.5px;
				color: var(--cz-dim);
				list-style: none;
			}
			details.cz-adv summary::-webkit-details-marker {
				display: none;
			}
			.cz-row {
				display: flex;
				align-items: center;
				gap: 10px;
				margin-top: 10px;
			}
			.cz-row input[type='number'] {
				flex: 1;
				background: rgba(0, 0, 0, 0.28);
				border: 1px solid var(--cz-border);
				border-radius: 10px;
				color: var(--cz-text);
				font: inherit;
				padding: 9px 11px;
			}
			.cz-foot {
				font-size: 11.5px;
				color: var(--cz-dim);
				line-height: 1.5;
				text-align: center;
			}

			/* Toast */
			.cz-toast {
				position: fixed;
				left: 50%;
				bottom: 26px;
				transform: translateX(-50%) translateY(20px);
				z-index: 80;
				background: var(--cz-panel-solid);
				color: var(--cz-text);
				border: 1px solid var(--cz-border);
				border-radius: 12px;
				padding: 11px 16px;
				font-size: 13.5px;
				font-weight: 600;
				box-shadow: var(--cz-shadow);
				opacity: 0;
				pointer-events: none;
				transition: opacity var(--duration-base) var(--ease-standard), transform var(--duration-base) var(--ease-standard);
			}
			.cz-toast.show {
				opacity: 1;
				transform: translateX(-50%) translateY(0);
			}
		</style>
	
	<link rel="canonical" href="https://three.ws/cosmos">
	<meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1">
	<meta property="og:locale" content="en_US">
	<meta property="og:image:alt" content="Cosmos - Living Worlds - three.ws">
	<meta name="twitter:site" content="@trythreews">
	<meta name="twitter:title" content="Cosmos · Living Worlds · three.ws" data-i18n-attr="content:cosmos.meta_twitter_title">
	<meta name="twitter:description" content="Bring your avatar to life: type a world and NVIDIA Cosmos renders a living, photoreal scene that plays behind your 3D avatar. Generate, preview, and download a short cinematic clip." data-i18n-attr="content:cosmos.meta_twitter_description">
	<meta name="twitter:image" content="https://three.ws/api/page-og?s=build&amp;t=Cosmos%3A+Living+Worlds&amp;d=Bring+your+avatar+to+life%3A+type+a+world+and+NVIDIA+Cosmos+renders+a+living%2C+photoreal+scene+that+plays+behind+your+3D+avatar.+Generate%2C+preview%2C+and+download+a&amp;p=%2Fcosmos">
	<script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@type":"WebPage","name":"Cosmos - Living Worlds","description":"Bring your avatar to life: type a world and NVIDIA Cosmos renders a living, photoreal scene that plays behind your 3D avatar. Generate, preview, and download a short cinematic clip.","url":"https://three.ws/cosmos","isPartOf":{"@type":"WebSite","name":"three.ws","url":"https://three.ws"},"primaryImageOfPage":"https://three.ws/api/page-og?s=build&t=Cosmos+-+Living+Worlds&d=Bring+your+avatar+to+life%3A+type+a+world+and+NVIDIA+Cosmos+renders+a+living%2C+photoreal+scene+that+plays+behind+your+3D+avatar.+Generate%2C+preview%2C+and+download+a+&p=%2Fcosmos"}]}</script>
</head>
	<body>
		<header class="cz-bar">
			<a class="cz-back" href="/forge" aria-label="Back to the Forge" data-i18n-attr="aria-label:cosmos.back_to_the_forge_arialabel">
				<svg width="15" height="15" viewBox="0 0 24 24" fill="none" aria-hidden="true">
					<path d="M15 18l-6-6 6-6" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" />
				</svg>
				Forge
			</a>
			<div class="cz-brand">
				<b data-i18n="cosmos.cosmos_living_worlds">Cosmos · Living Worlds</b>
				<span data-i18n="cosmos.nvidia_world_models_type_a_world_watch">NVIDIA world models: type a world, watch your avatar live in it</span>
			</div>
			<div class="cz-badge is-idle" id="cz-status-badge" title="Cosmos lane status">
				<span class="dot"></span>
				<span id="cz-status-text" data-i18n="cosmos.nvidia_cosmos">NVIDIA Cosmos</span>
			</div>
		</header>

		<main class="cz-wrap">
			<!-- Stage: avatar composited in front of the living world -->
			<section class="cz-stage" id="cz-stage" aria-label="Avatar world stage">
				<div class="cz-aurora" aria-hidden="true"></div>
				<video class="cz-world" id="cz-world" muted loop playsinline preload="auto" aria-hidden="true"></video>
				<model-viewer
					class="cz-avatar"
					id="cz-avatar"
					camera-controls
					auto-rotate
					auto-rotate-delay="600"
					rotation-per-second="14deg"
					interaction-prompt="none"
					shadow-intensity="0.9"
					exposure="1.05"
					camera-orbit="0deg 88deg 2.6m"
					field-of-view="32deg"
					disable-zoom
					alt="Your 3D avatar"
				></model-viewer>

				<div class="cz-stage-tools">
					<button class="cz-iconbtn" id="cz-download" type="button" title="Download the world clip (MP4)" data-i18n-attr="title:cosmos.download_the_world_clip_mp4_title">
						<svg width="14" height="14" viewBox="0 0 24 24" fill="none" aria-hidden="true">
							<path d="M12 3v12m0 0l-4-4m4 4l4-4M5 21h14" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
						</svg>
						MP4
					</button>
					<button class="cz-iconbtn" id="cz-copy" type="button" title="Copy a shareable link to this world" data-i18n-attr="title:cosmos.copy_a_shareable_link_to_thi_title">
						<svg width="14" height="14" viewBox="0 0 24 24" fill="none" aria-hidden="true">
							<path d="M10 13a5 5 0 007 0l2-2a5 5 0 00-7-7l-1 1m-1 8a5 5 0 01-7 0l-2-2a5 5 0 017-7l1 1" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" />
						</svg>
						Share
					</button>
				</div>

				<div class="cz-scrim" role="status" aria-live="polite">
					<div class="cz-prog">
						<div class="cz-prog-row">
							<span id="cz-prog-label" data-i18n="cosmos.summoning_the_world">Summoning the world…</span>
							<span id="cz-prog-time" data-i18n="cosmos.0s">0s</span>
						</div>
						<div class="cz-prog-bar"><i id="cz-prog-fill"></i></div>
						<div class="cz-phases" id="cz-phases">
							<b data-i18n="cosmos.submitting">Submitting</b><span data-i18n="cosmos.rendering_frames">· Rendering frames</span><span data-i18n="cosmos.finalizing">· Finalizing</span>
						</div>
					</div>
				</div>
			</section>

			<!-- Controls -->
			<aside class="cz-panel">
				<div>
					<h1 class="cz-h" data-i18n="cosmos.bring_your_avatar_to_life">Bring your avatar to life</h1>
					<p class="cz-sub" data-i18n="cosmos.nvidia_cosmos_renders_a_living_photoreal_wor">
						NVIDIA Cosmos renders a living, photoreal world from your words. Describe a place, and your
						avatar steps straight into it.
					</p>
				</div>

				<div>
					<label class="cz-label" for="cz-prompt" data-i18n="cosmos.describe_the_world">Describe the world</label>
					<textarea
						id="cz-prompt"
						class="cz-textarea"
						maxlength="300"
						placeholder="a neon Tokyo street in the rain at night, reflections shimmering on the pavement"
					></textarea>
					<div class="cz-chips" id="cz-chips" role="group" aria-label="Prompt ideas"></div>
				</div>

				<button class="cz-generate" id="cz-generate" type="button" data-i18n-html="cosmos.generate_world">
					<span class="spin" aria-hidden="true"></span>
					<span class="label-go">Generate world</span>
				</button>
				<div class="cz-secondary" id="cz-secondary" style="display: none">
					<button class="cz-btn-ghost" id="cz-cancel" type="button" data-i18n="cosmos.cancel">Cancel</button>
					<button class="cz-btn-ghost" id="cz-regen" type="button" style="display: none" data-i18n="cosmos.new_world">New world</button>
				</div>

				<div class="cz-note" id="cz-note" role="alert"></div>

				<div>
					<label class="cz-label" data-i18n="cosmos.choose_your_avatar">Choose your avatar</label>
					<div class="cz-avatars" id="cz-avatars"></div>
				</div>

				<details class="cz-adv">
					<summary data-i18n="cosmos.advanced">Advanced</summary>
					<div class="cz-row">
						<label class="cz-label" for="cz-seed" style="margin: 0" data-i18n="cosmos.seed">Seed</label>
						<input id="cz-seed" type="number" min="0" max="4294967295" placeholder="random" />
					</div>
				</details>

				<p class="cz-foot" data-i18n="cosmos.each_world_is_a_5_second_1280">
					Each world is a ~5-second 1280×704 clip from NVIDIA Cosmos. Free, on the NVIDIA NIM tier.
				</p>
			</aside>
		</main>

		<div class="cz-toast" id="cz-toast" role="status" aria-live="polite"></div>

		<script type="module" src="/src/cosmos.js"></script>
		<!-- Runtime i18n: detects locale, swaps annotated copy, mounts <lang-switcher>. -->
	<script type="module" src="/i18n.js"></script>
</body>
</html>