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
/* War Portal (F18): the in-world Coin Wars panel and its prompt button.
*
* Scoped entirely to .wp-* so it can never reach into the rest of the /play HUD.
* Colours come from the world's existing dark UI vocabulary; the only accents are
* the two sides of a war (us / them) and the win/loss/draw verdicts, which have
* to be distinguishable at a glance without relying on colour alone (every one
* also carries a text tag). */
/* The walk-up prompt inherits the shared .ps-action chip. Its position comes from
* the stacking contract in play-systems.css (`.ps-action.wp-action`), which is
* where every contextual prompt claims its row; only the tint is set here, so the
* war prompt is distinguishable from cast/chop/spin at a glance while staying the
* same shape and size as the rest. */
.wp-action {
background: linear-gradient(180deg, #eaf6ff, #cfe9ff);
border-color: #eaf6ff;
}
/* ── overlay ─────────────────────────────────────────────────────────────── */
.wp-root {
position: fixed;
inset: 0;
z-index: 60;
display: flex;
align-items: flex-end;
justify-content: center;
pointer-events: none;
}
.wp-scrim {
position: absolute;
inset: 0;
background: rgba(4, 4, 6, 0.55);
backdrop-filter: blur(2px);
opacity: 0;
transition: opacity var(--duration-fast) var(--ease-standard);
pointer-events: auto;
}
.wp-panel {
position: relative;
width: min(560px, calc(100vw - 24px));
max-height: min(78vh, 720px);
margin: 0 0 max(16px, env(safe-area-inset-bottom));
display: flex;
flex-direction: column;
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 16px;
background: linear-gradient(180deg, #141419, #0b0b0e);
box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
color: #f5f5f6;
font: 400 14px/1.5 Inter, system-ui, sans-serif;
transform: translateY(18px);
opacity: 0;
transition: transform var(--duration-base) var(--ease-standard), opacity var(--duration-base) var(--ease-standard);
pointer-events: auto;
}
.wp-root.wp-in .wp-scrim { opacity: 1; }
.wp-root.wp-in .wp-panel { transform: translateY(0); opacity: 1; }
@media (min-width: 720px) {
.wp-root { align-items: center; }
.wp-panel { margin: 0; }
}
@media (prefers-reduced-motion: reduce) {
.wp-scrim,
.wp-panel { transition: none; }
.wp-panel { transform: none; }
}
/* ── head / foot ─────────────────────────────────────────────────────────── */
.wp-head {
display: flex;
align-items: flex-start;
gap: 12px;
padding: 16px 16px 12px;
border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.wp-head h2 {
margin: 0;
font: 800 19px/1.2 Inter, system-ui, sans-serif;
letter-spacing: 0.01em;
}
.wp-head-sub {
margin: 4px 0 0;
color: #8c8c92;
font-size: 13px;
}
.wp-head-t { flex: 1 1 auto; min-width: 0; }
.wp-x {
flex: 0 0 auto;
width: 32px;
height: 32px;
border: 1px solid rgba(255, 255, 255, 0.12);
border-radius: 9px;
background: rgba(255, 255, 255, 0.04);
color: #c9c9cf;
font-size: 14px;
cursor: pointer;
transition: background var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard), transform var(--duration-fast) var(--ease-standard);
}
.wp-x:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.wp-x:active { transform: scale(0.94); }
.wp-x:focus-visible { outline: 2px solid #8fd0ff; outline-offset: 2px; }
.wp-body {
flex: 1 1 auto;
overflow-y: auto;
padding: 12px 16px;
display: flex;
flex-direction: column;
gap: 12px;
overscroll-behavior: contain;
}
.wp-foot {
padding: 12px 16px max(14px, env(safe-area-inset-bottom));
border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.wp-cta {
width: 100%;
padding: 12px 16px;
border: 1px solid rgba(143, 208, 255, 0.5);
border-radius: 11px;
background: linear-gradient(180deg, rgba(143, 208, 255, 0.22), rgba(143, 208, 255, 0.1));
color: #eaf6ff;
font: 700 15px/1 Inter, system-ui, sans-serif;
cursor: pointer;
transition: background var(--duration-fast) var(--ease-standard), transform var(--duration-instant) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard);
}
.wp-cta:hover:not(:disabled) { background: linear-gradient(180deg, rgba(143, 208, 255, 0.32), rgba(143, 208, 255, 0.16)); }
.wp-cta:active:not(:disabled) { transform: scale(0.985); }
.wp-cta:focus-visible { outline: 2px solid #8fd0ff; outline-offset: 2px; }
.wp-cta:disabled { opacity: 0.55; cursor: default; }
.wp-foot-note {
margin: 8px 0 0;
color: #7a7a82;
font-size: 12px;
text-align: center;
}
/* ── cards ───────────────────────────────────────────────────────────────── */
.wp-card {
border: 1px solid rgba(255, 255, 255, 0.07);
border-radius: 12px;
background: rgba(255, 255, 255, 0.025);
padding: 12px 14px;
}
.wp-card-t {
display: flex;
align-items: center;
gap: 8px;
margin: 0 0 8px;
color: #a5a5ad;
font: 700 11px/1 Inter, system-ui, sans-serif;
letter-spacing: 0.09em;
text-transform: uppercase;
}
.wp-empty-b {
margin: 0;
color: #9a9aa2;
font-size: 13px;
}
.wp-empty { background: rgba(255, 255, 255, 0.015); }
.wp-retry { border-color: rgba(224, 108, 117, 0.35); }
.wp-retry-btn {
margin-top: 10px;
padding: 8px 14px;
border: 1px solid rgba(255, 255, 255, 0.16);
border-radius: 9px;
background: rgba(255, 255, 255, 0.05);
color: #eaeaf0;
font: 600 13px/1 Inter, system-ui, sans-serif;
cursor: pointer;
transition: background var(--duration-fast) var(--ease-standard), transform var(--duration-instant) var(--ease-standard);
}
.wp-retry-btn:hover { background: rgba(255, 255, 255, 0.11); }
.wp-retry-btn:active { transform: scale(0.97); }
.wp-retry-btn:focus-visible { outline: 2px solid #8fd0ff; outline-offset: 2px; }
/* ── standings ───────────────────────────────────────────────────────────── */
.wp-stats {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 10px 12px;
margin: 0;
}
.wp-stats dt {
color: #7a7a82;
font: 700 10px/1 Inter, system-ui, sans-serif;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.wp-stats dd {
margin: 3px 0 0;
font: 800 18px/1.1 Inter, system-ui, sans-serif;
}
/* ── rows ────────────────────────────────────────────────────────────────── */
.wp-list {
list-style: none;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
gap: 2px;
}
.wp-row {
display: grid;
grid-template-columns: auto auto 1fr auto;
align-items: baseline;
gap: 10px;
padding: 6px 8px;
border-radius: 8px;
font-size: 13px;
}
.wp-row:nth-child(odd) { background: rgba(255, 255, 255, 0.022); }
.wp-row-me { background: rgba(143, 208, 255, 0.1) !important; }
.wp-row-tag {
font: 800 11px/1 Inter, system-ui, sans-serif;
letter-spacing: 0.06em;
color: #9a9aa2;
}
.wp-row-win .wp-row-tag { color: #5fd08a; }
.wp-row-loss .wp-row-tag { color: #e06c75; }
.wp-row-draw .wp-row-tag { color: #c9a227; }
.wp-row-score { font: 800 13px/1 Inter, system-ui, sans-serif; }
.wp-row-vs { color: #d8d8de; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wp-row-when { color: #6f6f77; font-size: 12px; }
.wp-feed .wp-row { grid-template-columns: 1fr auto; }
/* ── live war ────────────────────────────────────────────────────────────── */
.wp-live { border-color: rgba(143, 208, 255, 0.3); }
.wp-live-dot {
width: 7px;
height: 7px;
border-radius: 50%;
background: #ff6b6b;
box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.6);
animation: wp-pulse 1.8s ease-out infinite;
}
@keyframes wp-pulse {
0% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.55); }
70% { box-shadow: 0 0 0 8px rgba(255, 107, 107, 0); }
100% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0); }
}
@media (prefers-reduced-motion: reduce) {
.wp-live-dot { animation: none; }
}
.wp-score {
display: grid;
grid-template-columns: 1fr auto 1fr;
align-items: center;
gap: 10px;
margin-bottom: 8px;
}
.wp-score-side {
display: flex;
flex-direction: column;
align-items: center;
gap: 2px;
min-width: 0;
}
.wp-score-n { font: 900 34px/1 Inter, system-ui, sans-serif; }
.wp-side-us .wp-score-n { color: #7fd8ff; }
.wp-side-them .wp-score-n { color: #ff9d7a; }
.wp-score-l {
max-width: 100%;
font: 700 13px/1.2 Inter, system-ui, sans-serif;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.wp-score-f { color: #6f6f77; font-size: 11px; }
.wp-score-vs { color: #5a5a60; font: 700 13px/1 Inter, system-ui, sans-serif; }
.wp-live-clock {
margin: 0 0 8px;
text-align: center;
font: 700 14px/1 Inter, system-ui, sans-serif;
color: #e6e6ec;
}