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.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
/* src/three/access.css
*
* Shared visual language for the $THREE hold-to-unlock surfaces:
* • tg- — the gate modal (src/three/gate-modal.js, prompt 02)
* • ta- — the /three access panel (prompt 04)
*
* Every rule is scoped under a root (.tg-gate / .ta-panel) so nothing leaks into
* global CSS — and so the gate's classes win on specificity over any bare,
* single-class `tg-*` rules another module may have injected globally. Token refs
* carry literal fallbacks (the economy palette in src/three-economy.js) so the
* surfaces render correctly on pages that don't load the design tokens.
*/
/* ── Gate modal (tg-) ─────────────────────────────────────────────────────── */
.tg-gate {
--tg-ink: var(--ink, #f6f6f8);
--tg-muted: var(--muted, #9a9aa4);
--tg-muted-2: var(--muted-2, #80808b);
--tg-line: var(--line-2, #23232c);
--tg-surface: rgba(255, 255, 255, 0.03);
--tg-green: var(--green, #6ee7a8);
--tg-ease: cubic-bezier(0.22, 1, 0.36, 1);
--tg-accent: var(--tg-green);
--tg-accent-ink: #06120c;
font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
color: var(--tg-ink);
}
.tg-gate[data-tone='gold'] {
--tg-accent: var(--gold, #f5c451);
--tg-accent-ink: #1a1304;
}
.tg-gate[data-tone='silver'] {
--tg-accent: var(--silver, #cfd6e4);
--tg-accent-ink: #0b0b0f;
}
/* Header / lead copy */
.tg-gate .tg-eyebrow {
margin: 0 0 0.4rem;
display: flex;
align-items: center;
gap: 0.35rem;
font-size: 11px;
font-weight: 700;
letter-spacing: 0.07em;
text-transform: uppercase;
color: var(--tg-accent);
}
.tg-gate .tg-eyebrow::before {
content: '◆';
font-size: 11px;
filter: drop-shadow(0 0 8px color-mix(in srgb, var(--tg-accent) 60%, transparent));
}
.tg-gate .tg-feature {
margin: 0 0 0.85rem;
font-size: 16px;
font-weight: 750;
letter-spacing: -0.01em;
line-height: 1.3;
color: var(--tg-ink);
}
.tg-gate .tg-lead {
margin: 0 0 0.7rem;
font-size: 13.5px;
line-height: 1.55;
color: var(--tg-muted);
}
.tg-gate .tg-lead strong {
color: var(--tg-ink);
font-weight: 650;
}
/* Tier chips: held → required */
.tg-gate .tg-tiers {
display: flex;
align-items: stretch;
gap: 0.5rem;
margin: 0.2rem 0 0.85rem;
}
.tg-gate .tg-chip {
flex: 1 1 0;
min-width: 0;
display: flex;
flex-direction: column;
gap: 3px;
padding: 0.6rem 0.7rem;
border: 1px solid var(--tg-line);
border-radius: 11px;
background: var(--tg-surface);
}
.tg-gate .tg-chip--req {
border-color: var(--tg-accent);
background: color-mix(in srgb, var(--tg-accent) 7%, transparent);
}
.tg-gate .tg-chip-k {
font-size: 10px;
font-weight: 700;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--tg-muted-2);
}
.tg-gate .tg-chip-v {
font-size: 13px;
font-weight: 650;
color: var(--tg-ink);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.tg-gate .tg-chip--req .tg-chip-v {
color: var(--tg-accent);
}
.tg-gate .tg-arrow {
flex: 0 0 auto;
align-self: center;
font-size: 14px;
color: var(--tg-muted-2);
}
/* Progress toward the required threshold */
.tg-gate .tg-prog {
margin: 0 0 0.55rem;
}
.tg-gate .tg-prog-track {
display: block;
height: 7px;
border-radius: 99px;
background: rgba(255, 255, 255, 0.07);
overflow: hidden;
}
.tg-gate .tg-prog-fill {
display: block;
height: 100%;
min-width: 2%;
border-radius: 99px;
background: var(--tg-accent);
box-shadow: 0 0 10px -1px var(--tg-accent);
transition: width var(--duration-slow) var(--tg-ease);
}
.tg-gate .tg-gap {
margin: 0 0 0.7rem;
font-size: 13px;
font-weight: 600;
text-align: center;
color: var(--tg-ink);
}
.tg-gate .tg-gap strong {
color: var(--tg-accent);
}
/* The honest reason it's gated */
.tg-gate .tg-why {
margin: 0.15rem 0 0.6rem;
font-size: 12.5px;
line-height: 1.5;
font-style: italic;
color: var(--tg-muted);
}
/* Pay-per-use tertiary line */
.tg-gate .tg-pay {
margin: 0.2rem 0 0.4rem;
font-size: 12.5px;
color: var(--tg-muted);
}
.tg-gate .tg-pay strong {
color: var(--tg-ink);
font-weight: 650;
}
.tg-gate .tg-pay-btn {
margin: 0.2rem 0 0.4rem;
padding: 0.15rem 0;
background: none;
border: none;
font: 600 12.5px/1.4 inherit;
color: var(--tg-muted);
cursor: pointer;
text-decoration: underline;
text-underline-offset: 3px;
transition: color var(--duration-fast);
}
.tg-gate .tg-pay-btn strong {
color: var(--tg-accent);
}
.tg-gate .tg-pay-btn:hover {
color: var(--tg-ink);
}
.tg-gate .tg-pay-btn:disabled {
opacity: 0.5;
cursor: not-allowed;
}
/* aria-live recheck status */
.tg-gate .tg-status {
margin: 0.55rem 0 0;
min-height: 1.1em;
display: flex;
align-items: center;
gap: 0.4rem;
font-size: 12px;
line-height: 1.4;
color: var(--tg-muted);
}
.tg-gate .tg-status:empty {
margin: 0;
min-height: 0;
}
.tg-gate .tg-status[data-kind='warn'] {
color: var(--gold, #f5c451);
}
.tg-gate .tg-status[data-kind='err'] {
color: #ff8a8a;
}
.tg-gate .tg-status[data-kind='ok'] {
color: var(--tg-green);
}
/* Actions */
.tg-gate-actions {
display: flex;
flex-direction: column;
gap: 0.55rem;
width: 100%;
}
.tg-gate .tg-act-row {
display: flex;
gap: 0.55rem;
}
.tg-gate .tg-act-row > * {
flex: 1 1 0;
}
.tg-gate .tg-btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.45rem;
padding: 0.72rem 1rem;
border: 1px solid var(--tg-line);
border-radius: 11px;
background: transparent;
color: var(--tg-ink);
font: 650 13.5px/1 Inter, system-ui, sans-serif;
text-decoration: none;
white-space: nowrap;
cursor: pointer;
transition:
transform var(--duration-fast) var(--tg-ease),
background var(--duration-fast),
border-color var(--duration-fast),
color var(--duration-fast),
filter var(--duration-fast),
opacity var(--duration-fast);
}
.tg-gate .tg-btn:hover {
transform: translateY(-1px);
}
.tg-gate .tg-btn:active {
transform: translateY(0);
}
.tg-gate .tg-btn--primary {
background: var(--tg-accent);
border-color: var(--tg-accent);
color: var(--tg-accent-ink);
font-weight: 750;
}
.tg-gate .tg-btn--primary:hover {
filter: brightness(1.07);
}
.tg-gate .tg-btn--secondary {
background: rgba(255, 255, 255, 0.04);
color: var(--tg-ink);
}
.tg-gate .tg-btn--secondary:hover {
background: rgba(255, 255, 255, 0.07);
border-color: #3a3a44;
}
.tg-gate .tg-btn--ghost {
background: transparent;
color: var(--tg-muted);
}
.tg-gate .tg-btn--ghost:hover {
color: var(--tg-ink);
border-color: #3a3a44;
}
.tg-gate .tg-btn:disabled,
.tg-gate .tg-btn--disabled {
opacity: 0.5;
cursor: not-allowed;
transform: none;
pointer-events: none;
}
.tg-gate :where(.tg-btn, .tg-pay-btn, a):focus-visible {
outline: 2px solid var(--tg-accent);
outline-offset: 2px;
}
/* Recheck spinner glyph (real async — driven by the await, no fake timer) */
.tg-gate .tg-spin {
width: 13px;
height: 13px;
flex: 0 0 auto;
border-radius: 50%;
border: 2px solid currentColor;
border-top-color: transparent;
animation: tg-spin 0.7s linear infinite;
}
@keyframes tg-spin {
to {
transform: rotate(360deg);
}
}
/* Responsive: stack chips + actions on the narrowest screens (320px) */
@media (max-width: 380px) {
.tg-gate .tg-tiers {
flex-direction: column;
}
.tg-gate .tg-arrow {
transform: rotate(90deg);
}
.tg-gate .tg-act-row {
flex-direction: column;
}
}
@media (prefers-reduced-motion: reduce) {
.tg-gate .tg-btn,
.tg-gate .tg-prog-fill {
transition: none;
}
.tg-gate .tg-btn:hover {
transform: none;
}
.tg-gate .tg-spin {
animation: none;
}
}
/* ── /three access panel (ta-) — populated by prompt 04 ───────────────────── */
/* The personal access panel reuses the same dark palette + tier chips. Its
rules belong here, scoped under .ta-panel, so the gate and the panel share one
stylesheet. (Intentionally left for prompt 04 to fill in.) */