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.

feat: world life NPCs, cosmetics loadout, skill purchase, UI neutralization, feed + multiplayer updates

nirholas41b6a14d43ee
diff --git a/_shot.mjs b/_shot.mjs
deleted file mode 100644
index 58ae5b2a2..000000000
--- a/_shot.mjs
+++ /dev/null
@@ -1,29 +0,0 @@
-import puppeteer from 'puppeteer';
-const b = await puppeteer.launch({headless:'new', args:['--no-sandbox','--use-gl=swiftshader']});
-const p = await b.newPage();
-await p.setViewport({width:1400,height:800});
-const errs=[];
-p.on('console',m=>{if(m.type()==='error')errs.push(m.text());});
-p.on('pageerror',e=>errs.push('PAGEERR '+e.message));
-await p.goto('http://localhost:3000/tutorials',{waitUntil:'networkidle2',timeout:30000}).catch(e=>console.log('goto',e.message));
-await new Promise(r=>setTimeout(r,1500));
-const info = await p.evaluate(()=>{
- const nav=document.querySelector('.nav');
- const header=document.querySelector('.tut-page header')||document.querySelector('header');
- const r=el=>el?el.getBoundingClientRect():null;
- const cs=el=>el?getComputedStyle(el):{};
- return {
- navRect:r(nav), navInnerRect:r(document.querySelector('.nav-inner')),
- headerRect:r(header),
- navPos:cs(nav).position, navTop:cs(nav).top,
- headerPos:cs(header).position, headerTop:cs(header).top, headerOverflow:cs(header).overflow,
- bodyClass:document.body.className,
- bodyOverflow:getComputedStyle(document.body).overflow,
- htmlOverflow:getComputedStyle(document.documentElement).overflow,
- scrollY:window.scrollY
- };
-});
-console.log(JSON.stringify(info,null,2));
-console.log('ERRORS:',errs.slice(0,15));
-await p.screenshot({path:'/tmp/tut.png'});
-await b.close();
diff --git a/api/_lib/feed.js b/api/_lib/feed.js
index 686ff55fc..9aff896ad 100644
--- a/api/_lib/feed.js
+++ b/api/_lib/feed.js
@@ -26,6 +26,7 @@
// level-up → { skill, level, coin }
// world-join → { coin, coinName }
// jackpot → { reward, coin }
+// mission-complete → { mission, gold, coop, coin } — /play job or heist finished
//
// All writes are best-effort. The feed is a delight layer, never on a critical
// path: a Redis outage degrades to an empty feed, never a thrown error.
@@ -45,6 +46,7 @@ export const ALLOWED_TYPES = new Set([
'world-join',
'jackpot',
'payment', // skill/service payment confirmed; { usdcAtomic, recipientLabel, txSig, explorerUrl }
+ 'mission-complete', // /play job or co-op heist finished; { mission, gold, coop, coin }
]);
// Per-user notification types: stored in user_notifications (DB), never in the
diff --git a/multiplayer/src/activities.js b/multiplayer/src/activities.js
new file mode 100644
index 000000000..1e459c1f1
--- /dev/null
+++ b/multiplayer/src/activities.js
@@ -0,0 +1,162 @@
+// Gather & craft activities for the /play coin worlds (W06) — woodcutting, mining
+// and cooking, the chop/mine/cook counterpart to WalkRoom's fishing.
+//
+// The logic lives HERE, not inline in WalkRoom, for two reasons: it keeps the room a
+// thin validator-and-replicator (the same split combat.js/vehicles.js use), and it
+// is independently unit-testable. Each handler takes the live `room` so it can reach
+// the room's authoritative helpers (`_actionOk`, `_grantXp`, `_sendInv`,
+// `_questEvent`, `_persistEcon`) and off-schema economy (`econ`) without duplicating
+// them — the WalkRoom only has to register the three message handlers.
+//
+// Authority model is byte-identical to _handleFish: client sends an intent → we
+// validate tool + range + cooldown + pack space → roll the yield against the skill
+// and the node's difficulty → grant item + XP → reply with `inv`/`notice`. The
+// client is pure UI; nothing here trusts a client-sent position or reward.
+
+import { addItem, hasRoomFor, countItem, removeItem } from './economy.js';
+import {
+ itemLabel, gatherChance, gatherDoubleChance, coalBonusChance, cookBurnChance,
+} from './items.js';
+import { treeInRange, rockInRange, firepitInRange } from './world-features.js';
+
+// Per-swing cadence on the real clock (ms). The handlers tolerate a profile whose
+// `cd` map predates these keys — `now < undefined` is false, so a missing key just
+// means "ready now", and the first action arms it.
+export const ACTIVITY_COOLDOWN_MS = { chop: 1300, mine: 1500, cook: 900 };
+
+// The two gather activities differ only in tool, node, resource and the mining-only
+// coal bonus — so one config table drives both through the shared core below.
+const GATHER = {
+ chop: {
+ tool: 'axe', skill: 'woodcutting', item: 'wood', inRange: treeInRange,
+ toolHint: 'Equip an axe to chop.', rangeHint: 'Move up to a tree to chop.',
+ holdText: 'The trunk holds firm.',
+ },
+ mine: {
+ tool: 'pickaxe', skill: 'mining', item: 'stone', inRange: rockInRange, coal: true,
+ toolHint: 'Equip a pickaxe to mine.', rangeHint: 'Move up to a rock to mine.',
+ holdText: 'The rock holds firm.',
+ },
+};
+
+// Chop a tree / mine a rock. `type` is 'chop' or 'mine'. Mirrors _handleFish.
+export function handleGather(room, client, type) {
+ const cfg = GATHER[type];
+ if (!cfg) return;
+ const player = room.state.players.get(client.sessionId);
+ const profile = room.econ.get(client.sessionId);
+ if (!player || !profile) return;
+ if (!room._actionOk(client.sessionId, type)) return;
+
+ const now = Date.now();
+ if (profile.cd && now < profile.cd[type]) return; // mid-swing
+
+ const active = profile.hotbar[profile.activeSlot];
+ if (!active || active.item !== cfg.tool) {
+ client.send('notice', { kind: 'tool', text: cfg.toolHint });
+ return;
+ }
+ const node = cfg.inRange(player.x, player.z);
+ if (!node) {
+ client.send('notice', { kind: type, text: cfg.rangeHint });
+ return;
+ }
+ if (!hasRoomFor(profile, cfg.item)) {
+ client.send('notice', { kind: 'full', text: 'Your inventory is full.' });
+ return;
+ }
+
+ if (profile.cd) profile.cd[type] = now + ACTIVITY_COOLDOWN_MS[type];
+ const lvl = profile.levels[cfg.skill] || 1;
+ const difficulty = node.difficulty || 1;
+
+ if (Math.random() >= gatherChance(lvl, difficulty)) {
+ // A swing that bites but yields nothing — a little XP keeps the grind honest.
+ room._grantXp(client, profile, cfg.skill, 2);
+ client.send('notice', { kind: type, got: 0, node: node.id, text: cfg.holdText });
+ return;
+ }
+
+ const want = 1 + (Math.random() < gatherDoubleChance(lvl, difficulty) ? 1 : 0);
+ const leftover = addItem(profile, cfg.item, want);
+ const got = want - leftover;
+ if (got <= 0) {
+ client.send('notice', { kind: 'full', text: 'Your inventory is full.' });
+ return;
+ }
+ const parts = [`${got > 1 ? got + ' ' : ''}${itemLabel(cfg.item).toLowerCase()}`];
+ let xp = Math.round((9 + Math.floor(Math.random() * 5) + lvl * 0.3) * difficulty) * got;
+ room._questEvent?.(client, profile, { type: 'collect', item: cfg.item, qty: got });
+
+ // Mining bonus: a chance to also surface coal (subject to pack space).
+ if (cfg.coal && hasRoomFor(profile, 'coal') && Math.random() < coalBonusChance(lvl, node.coal || 1)) {
+ if (addItem(profile, 'coal', 1) === 0) {
+ parts.push(itemLabel('coal').toLowerCase());
+ xp += 6;
+ room._questEvent?.(client, profile, { type: 'collect', item: 'coal', qty: 1 });
+ }
+ }
+
+ room._grantXp(client, profile, cfg.skill, xp);
+ room._sendInv(client, profile);
+ client.send('notice', { kind: type, got, node: node.id, text: `Got ${parts.join(' + ')}.` });
+ room._persistEcon(client.sessionId);
+}
+
+// Cook a raw fish at a roast pit: consume one raw fish, roll the burn chance against
+// cooking skill, and on success add an edible cooked fish (with XP). A burn loses the
+// fish — a low-level cook's tax that fades with training. No tool needed; the fire is
+// the station.
+export function handleCook(room, client) {
+ const player = room.state.players.get(client.sessionId);
+ const profile = room.econ.get(client.sessionId);
+ if (!player || !profile) return;
+ if (!room._actionOk(client.sessionId, 'cook')) return;
+
+ const now = Date.now();
+ if (profile.cd && now < profile.cd.cook) return;
+
+ if (!firepitInRange(player.x, player.z)) {
+ client.send('notice', { kind: 'cook', text: 'Stand by a roast pit to cook.' });
+ return;
+ }
+ if (countItem(profile, 'fish') <= 0) {
+ client.send('notice', { kind: 'cook', text: 'You have no raw fish to cook.' });
+ return;
+ }
+
+ if (profile.cd) profile.cd.cook = now + ACTIVITY_COOLDOWN_MS.cook;
+ const lvl = profile.levels.cooking || 1;
+ removeItem(profile, 'fish', 1);
+
+ if (Math.random() < cookBurnChance(lvl)) {
+ room._grantXp(client, profile, 'cooking', 3); // you learn from a burn, a little
+ room._sendInv(client, profile);
+ client.send('notice', { kind: 'cook', cooked: 0, text: 'You burned the fish.' });
+ room._persistEcon(client.sessionId);
+ return;
+ }
+ if (!hasRoomFor(profile, 'cookedFish')) {
+ // The raw fish is already gone; refund it so a full pack can't eat the catch.
+ addItem(profile, 'fish', 1);
+ if (profile.cd) profile.cd.cook = now; // didn't actually cook — don't burn the cadence
+ room._sendInv(client, profile);
+ client.send('notice', { kind: 'full', text: 'Your inventory is full.' });
+ return;
+ }
+ addItem(profile, 'cookedFish', 1);
+ const xp = 14 + Math.floor(Math.random() * 5) + Math.floor(lvl * 0.3);
+ room._grantXp(client, profile, 'cooking', xp);
+ room._questEvent?.(client, profile, { type: 'collect', item: 'cookedFish', qty: 1 });
+ room._sendInv(client, profile);
+ client.send('notice', { kind: 'cook', cooked: 1, text: `Cooked a ${itemLabel('cookedFish').toLowerCase()}.` });
+ room._persistEcon(client.sessionId);
+}
+
+// Wire the three intents onto a room. Called once from WalkRoom.onCreate — the room's
+// only obligation, keeping the gather/craft logic out of the room file entirely.
+export function registerActivityHandlers(room) {
+ room.onMessage('chop', (client) => handleGather(room, client, 'chop'));
+ room.onMessage('mine', (client) => handleGather(room, client, 'mine'));
+ room.onMessage('cook', (client) => handleCook(room, client));
+}
diff --git a/multiplayer/src/avatar-url.js b/multiplayer/src/avatar-url.js
index 763c773f3..83a7685aa 100644
--- a/multiplayer/src/avatar-url.js
+++ b/multiplayer/src/avatar-url.js
@@ -12,6 +12,9 @@ const AVATAR_HOST_ALLOW = [
/(^|\.)r2\.dev$/i,
/(^|\.)pump\.fun$/i,
/(^|\.)githubusercontent\.com$/i,
+ // Ready Player Me (W03 character creator): full-body avatars are exported as
+ // models.readyplayer.me/<id>.glb. Loadable cross-origin like our own models.
+ /(^|\.)readyplayer\.me$/i,
];
export function cleanAvatarUrl(v) {
diff --git a/multiplayer/src/feed.js b/multiplayer/src/feed.js
index 75b99a0a0..2d0b388f5 100644
--- a/multiplayer/src/feed.js
+++ b/multiplayer/src/feed.js
@@ -16,7 +16,7 @@ const REDIS_TOKEN = process.env.UPSTASH_REDIS_REST_TOKEN || '';
const FEED_KEY = 'feed:events';
const MAX_EVENTS = 200;
-const ALLOWED_TYPES = new Set(['coin-buy', 'agent-deploy', 'level-up', 'world-join', 'jackpot']);
+const ALLOWED_TYPES = new Set(['coin-buy', 'agent-deploy', 'level-up', 'world-join', 'jackpot', 'mission-complete']);
// Per-event-kind cooldown so a busy world can't flood the global ticker with a
// hundred near-identical lines. Keyed by `${type}:${dedupeKey}`.
diff --git a/multiplayer/src/rooms/WalkRoom.js b/multiplayer/src/rooms/WalkRoom.js
index 21f51b32a..b0aa8a0df 100644
--- a/multiplayer/src/rooms/WalkRoom.js
+++ b/multiplayer/src/rooms/WalkRoom.js
@@ -8,7 +8,7 @@
import { Room } from '@colyseus/core';
-import { Player, Block, Vehicle, WalkState } from '../schemas.js';
+import { Player, Block, Vehicle, Mob, Tombstone, WalkState } from '../schemas.js';
import {
VEHICLE_SPAWNS, vehicleSpec, isVehicleType,
VEHICLE_WORLD_RADIUS_M, VEHICLE_ENTER_RANGE_M,
@@ -24,15 +24,22 @@ import {
restoreProfile, serializeProfile, profileSnapshot,
addItem, hasRoomFor, resolveSlot, grantXp, consumeSlot,
countItem, removeItem,
+ dropCarried, reviveProfile, bankTransfer,
HOTBAR_SIZE,
} from '../economy.js';
import {
itemLabel, fishCatchChance, fishDoubleChance,
gatherChance, gatherDoubleChance, coalBonusChance, cookBurnChance,
+ weaponDef, mobStats, rollLoot,
} from '../items.js';
import {
fishingSpotInRange, treeInRange, rockInRange, firepitInRange,
+ DANGER_ZONES, SPAWN_POINT, dangerZoneAt, isSafeZone, isDangerZone, randomPointInZone,
} from '../world-features.js';
+import { registerActivityHandlers } from '../activities.js';
+import {
+ selectTarget, rollDamage, applyDamage, addHeat, decayHeat, heatStars,
+} from '../combat.js';
import { interactZoneInRange, zoneAt } from '../quest-zones.js';
import {
missionDef, isHeist, utcDayKey,
@@ -291,9 +298,7 @@ export class WalkRoom extends Room {
// Economy & activities (off-schema). The owning client drives these and
// receives the authoritative result via profile/inv/xpgain/levelup/notice.
this.onMessage('fish', (client) => this._handleFish(client));
- this.onMessage('chop', (client) => this._handleChop(client));
- this.onMessage('mine', (client) => this._handleMine(client));
- this.onMessage('cook', (client) => this._handleCook(client));
+ registerActivityHandlers(this); // W06 gather/craft: chop, mine, cook
this.onMessage('equip', (client, payload) => this._handleEquip(client, payload));
this.onMessage('consume', (client, payload) => this._handleConsume(client, payload));
this.onMessage('profileReq', (client) => this._sendProfile(client));
@@ -410,6 +415,13 @@ export class WalkRoom extends Room {
profile.quests = restoreQuestState(saved?.profile?.quests, utcDayKey());
profile._zone = null; // last quest zone the player was inside (enter-zone edge detect)
this.econ.set(client.sessionId, profile);
+ // Cosmetics (W03): apply any loadout the player chose pre-join (in the
+ // character creator) on top of their persisted one, validating each id
+ // against what they own — free cosmetics always pass, premium only when
+ // unlocked, so a join option can never put an unowned cosmetic on a player.
+ // Then publish the equipped loadout on the schema so peers render the look.
+ this._applyJoinCosmetics(profile, options?.cosmetics);
+ player.cosmetics = serializeLoadout(profile.cosmetics.equipped);
this._sendProfile(client);
this._sendQuests(client);
diff --git a/multiplayer/src/world-features.js b/multiplayer/src/world-features.js
index 26e963ff2..cee50a313 100644
--- a/multiplayer/src/world-features.js
+++ b/multiplayer/src/world-features.js
@@ -131,10 +131,14 @@ export function firepitInRange(x, z) { return nodeInRange(x, z, FIREPITS, COOK_R
// and the client (PlayCombat — paints the danger ground ring, signposts the
// crossing, gates the attack button). A circle test is exact, cheap and trivially
// unit-testable; W01 can later refine these into full districts.
+// Sited within the area players actually roam today (the ~58 m central plaza the
+// client renders) and clear of the gather/fish stations, so each is reachable and
+// reads as its own wilderness. As W01's full district streaming lands these can
+// move out into the deep map; the gating math doesn't change.
export const DANGER_ZONES = [
- { id: 'southern-wilds', name: 'Southern Wilds', x: 0, z: -46, r: 13 },
- { id: 'western-marches', name: 'Western Marches', x: -46, z: 28, r: 11 },
- { id: 'eastern-marches', name: 'Eastern Marches', x: 46, z: 8, r: 11 },
+ { id: 'southern-wilds', name: 'Southern Wilds', x: 0, z: -42, r: 10 },
+ { id: 'northern-wilds', name: 'Northern Wilds', x: 0, z: 42, r: 10 },
+ { id: 'eastern-marches', name: 'Eastern Marches', x: 40, z: 24, r: 9 },
];
export const WORLD_RADIUS = 60; // matches WalkRoom's authoritative clamp
diff --git a/pages/a-embed.html b/pages/a-embed.html
index cd637ac39..d137ae1bd 100644
--- a/pages/a-embed.html
+++ b/pages/a-embed.html
@@ -118,7 +118,7 @@
text-decoration: none;
}
body.bg-dark {
- background: #0b0d10;
+ background: #0d0d0d;
}
body.bg-light {
background: #f5f5f5;
diff --git a/pages/agenc/embodied.html b/pages/agenc/embodied.html
index 6b60df0bc..e8cc8a997 100644
--- a/pages/agenc/embodied.html
+++ b/pages/agenc/embodied.html
@@ -8,7 +8,7 @@
name="description"
content="Live demo: a three.ws 3D avatar reacts to the on-chain state of an AgenC task on Solana. Coordination protocol meets embodiment."
/>
- <meta name="theme-color" content="#07050b" />
+ <meta name="theme-color" content="#060606" />
<link rel="icon" href="/favicon.ico" />
<meta property="og:type" content="website" />
@@ -17,14 +17,14 @@
<style>
:root {
- --bg: #07050b;
- --bg-elev: #0f0d18;
+ --bg: #060606;
+ --bg-elev: #0e0e0e;
--fg: #ececec;
--muted: #8a8499;
--accent: #7af0c4;
--warn: #f0c47a;
--err: #f07a7a;
- --card: #16121f;
+ --card: #141414;
--border: rgba(255, 255, 255, 0.08);
}
* {
@@ -175,7 +175,7 @@
font-family: ui-monospace, Menlo, monospace;
font-size: 11.5px;
color: #d4d0e0;
- background: #0a0810;
+ background: #090909;
border: 1px solid var(--border);
border-radius: 8px;
padding: 12px;
diff --git a/pages/agenc/room.html b/pages/agenc/room.html
index a1421d050..3261d65b3 100644
--- a/pages/agenc/room.html
+++ b/pages/agenc/room.html
@@ -8,19 +8,19 @@
name="description"
content="A live 3D room where AgenC tasks become visible agents. Each open task on the AgenC coordination protocol gets a body, animated by its on-chain state."
/>
- <meta name="theme-color" content="#07050b" />
+ <meta name="theme-color" content="#060606" />
<link rel="icon" href="/favicon.ico" />
<style>
:root {
- --bg: #07050b;
- --bg-elev: #0f0d18;
+ --bg: #060606;
+ --bg-elev: #0e0e0e;
--fg: #ececec;
--muted: #8a8499;
--accent: #7af0c4;
--warn: #f0c47a;
--err: #f07a7a;
- --card: #16121f;
+ --card: #141414;
--border: rgba(255, 255, 255, 0.08);
}
* {
@@ -104,7 +104,7 @@
}
.task .body {
aspect-ratio: 1 / 1;
- background: linear-gradient(135deg, #1a1428, #07050b);
+ background: linear-gradient(135deg, #171717, #060606);
position: relative;
overflow: hidden;
}
diff --git a/pages/agent-economy.html b/pages/agent-economy.html
index cba1ec467..a0d8f56d3 100644
--- a/pages/agent-economy.html
+++ b/pages/agent-economy.html
@@ -8,14 +8,14 @@
<link rel="icon" href="/favicon.ico" />
<style>
:root {
- --bg: #05060a;
- --panel: #0b0c12;
- --panel2: #10111a;
- --border: #1a1c26;
- --border-hi: #252738;
+ --bg: #060606;
+ --panel: #0c0c0c;
+ --panel2: #111111;
+ --border: #1c1c1c;
+ --border-hi: #282828;
--text: #dde2f0;
--muted: #5c6180;
- --dim: #333650;
+ --dim: #373737;
--green: #22d17a;
--green-g: rgba(34,209,122,.15);
--blue: #4e8cff;
@@ -129,7 +129,7 @@
flex-direction: column;
border-left: 1px solid var(--border);
border-right: 1px solid var(--border);
- background: linear-gradient(180deg, #070810, var(--bg));
+ background: linear-gradient(180deg, #080808, var(--bg));
overflow: hidden;
}
diff --git a/pages/agent-edit.html b/pages/agent-edit.html
index 6d14ebaec..6ae8c4f8d 100644
--- a/pages/agent-edit.html
+++ b/pages/agent-edit.html
@@ -267,7 +267,7 @@
position: sticky;
top: 0;
height: 100vh;
- background: #0a0a12;
+ background: #0b0b0b;
border-right: 1px solid rgba(255, 255, 255, 0.06);
overflow: hidden;
}
@@ -484,7 +484,7 @@
aspect-ratio: 1 / 1;
object-fit: cover;
border-radius: 6px;
- background: #0a0a12;
+ background: #0b0b0b;
}
.avatar-tile-ph {
width: 100%;
@@ -492,7 +492,7 @@
display: flex;
align-items: center;
justify-content: center;
- background: #0a0a12;
+ background: #0b0b0b;
border-radius: 6px;
color: rgba(255, 255, 255, 0.3);
font-size: 0.764rem;
@@ -536,7 +536,7 @@
position: absolute;
z-index: 1000;
min-width: 220px;
- background: #0d0d18;
+ background: #0e0e0e;
border: 1px solid rgba(255, 255, 255, 0.12);
border-radius: 8px;
padding: 0.382rem;
@@ -721,7 +721,7 @@
left: 0;
right: 0;
bottom: 0;
- background-color: #374151;
+ background-color: #404040;
transition: 0.4s;
border-radius: 20px;
}
@@ -919,7 +919,7 @@
padding: 1rem;
}
.modal[hidden] { display: none !important; }
- .modal-card { background: #0f0f17; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; padding: 1.5rem; width: 100%; max-width: 400px; }
+ .modal-card { background: #101010; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; padding: 1.5rem; width: 100%; max-width: 400px; }
.modal-title { font-size: 1rem; font-weight: 500; color: #fff; margin-bottom: 1rem; }
.qr-wrap { display: flex; justify-content: center; margin: 0.5rem 0; }
.qr-wrap img { background: #fff; padding: 0.5rem; border-radius: 8px; width: 200px; height: 200px; }
diff --git a/pages/agent-embed.html b/pages/agent-embed.html
index 4b45481b3..7e4a053bd 100644
--- a/pages/agent-embed.html
+++ b/pages/agent-embed.html
@@ -55,7 +55,7 @@
text-align: center;
}
body.bg-dark {
- background: #0b0d10;
+ background: #0d0d0d;
}
body.bg-light {
background: #f5f5f5;
@@ -420,7 +420,7 @@
if (bg === 'dark') {
// Midnight-blue atmosphere with volumetric clouds.
const { Clouds, Cloud } = await import('/src/cloud.js');
- if (viewer.scene.background?.set) viewer.scene.background.set('#070b18');
+ if (viewer.scene.background?.set) viewer.scene.background.set('#0b0b0b');
const clouds = new Clouds({ limit: 350 });
clouds.add(
diff --git a/pages/agent-exchange.html b/pages/agent-exchange.html
index d19923067..ba62f8063 100644
--- a/pages/agent-exchange.html
+++ b/pages/agent-exchange.html
@@ -19,8 +19,8 @@
<style>
:root {
color-scheme: dark;
- --bg: #07080f;
- --bg2: #0d0f1a;
+ --bg: #080808;
+ --bg2: #0f0f0f;
--panel: rgba(16,19,34,0.88);
--border: rgba(255,255,255,0.08);
--border-hi:rgba(255,255,255,0.16);
diff --git a/pages/agent-trade.html b/pages/agent-trade.html
index d006b2e8d..01eb9a0bd 100644
--- a/pages/agent-trade.html
+++ b/pages/agent-trade.html
@@ -13,7 +13,7 @@
--gold: #f1c21b;
--green: #42be65;
--red: #fa4d56;
- --bg: #05050e;
+ --bg: #060606;
--surface: rgba(13,13,26,0.92);
--surface2: rgba(22,22,40,0.85);
--border: rgba(255,255,255,0.08);
diff --git a/pages/app-next.html b/pages/app-next.html
index c0fe3ae10..059670a45 100644
--- a/pages/app-next.html
+++ b/pages/app-next.html
@@ -17,7 +17,7 @@
name="keywords"
content="three.ws, AI agent, embodied AI, glTF viewer, GLB viewer, 3D model viewer, WebGL, three.js, ERC-8004, agent identity"
/>
- <meta name="theme-color" content="#06070a" />
+ <meta name="theme-color" content="#070707" />
<!-- Open Graph -->
<meta property="og:type" content="website" />
diff --git a/pages/avatar-artifact.html b/pages/avatar-artifact.html
index ad8bb561d..3f866b724 100644
--- a/pages/avatar-artifact.html
+++ b/pages/avatar-artifact.html
@@ -3,10 +3,10 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <meta name="theme-color" content="#070714" />
+ <meta name="theme-color" content="#080808" />
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
- body { background: #070714; overflow: hidden; }
+ body { background: #080808; overflow: hidden; }
canvas { display: block; }
</style>
diff --git a/pages/avatar-embed.html b/pages/avatar-embed.html
index bd0d1b151..47463ce8c 100644
--- a/pages/avatar-embed.html
+++ b/pages/avatar-embed.html
@@ -82,7 +82,7 @@
background: #5fce6a;
}
body.bg-dark {
- background: #0b0d10;
+ background: #0d0d0d;
}
body.bg-light {
background: #f5f5f5;
diff --git a/pages/avatar-page.html b/pages/avatar-page.html
index 3f6486d7d..f814bc912 100644
--- a/pages/avatar-page.html
+++ b/pages/avatar-page.html
@@ -438,8 +438,8 @@
position: absolute;
z-index: 60;
width: 280px;
- background: var(--bg-1, #0f1018);
- border: 1.5px solid var(--border-2, #1e1f2b);
+ background: var(--bg-1, #101010);
+ border: 1.5px solid var(--border-2, #202020);
border-radius: 12px;
padding: 6px;
box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
diff --git a/pages/avatar-sdk.html b/pages/avatar-sdk.html
index 2d9083c31..6665653eb 100644
--- a/pages/avatar-sdk.html
+++ b/pages/avatar-sdk.html
@@ -190,7 +190,7 @@
<three-ws-viewer
id="pg-viewer"
src="/avatars/default.glb"
- background="#09090b"
+ background="#090909"
alt="Playground avatar preview"
style="width:100%;height:100%"
></three-ws-viewer>
@@ -211,7 +211,7 @@
<div class="sdk-pg-field">
<label for="pg-bg">Background</label>
<select id="pg-bg">
- <option value="#09090b">Dark (#09090b)</option>
+ <option value="#090909">Dark (#090909)</option>
<option value="#1c1c1c">Charcoal (#1c1c1c)</option>
<option value="#171717">Graphite (#171717)</option>
<option value="transparent">Transparent</option>
@@ -370,7 +370,7 @@ creator.<span class="t-fn">open</span>()<span class="t-op">;</span></pre>
<span class="t-tag">&lt;three-ws-viewer</span>
<span class="t-attr">src</span>=<span class="t-str">"/avatars/hero.glb"</span>
- <span class="t-attr">background</span>=<span class="t-str">"#0d0d14"</span>
+ <span class="t-attr">background</span>=<span class="t-str">"#0e0e0e"</span>
<span class="t-attr">alt</span>=<span class="t-str">"Hero avatar"</span>
<span class="t-attr">style</span>=<span class="t-str">"width:400px;height:560px"</span>
<span class="t-tag">&gt;&lt;/three-ws-viewer&gt;</span></pre>
@@ -380,7 +380,7 @@ creator.<span class="t-fn">open</span>()<span class="t-op">;</span></pre>
<div style="background:var(--surface-1);border:1.5px solid var(--stroke);border-radius:var(--radius-card);overflow:hidden;aspect-ratio:3/4;max-height:420px">
<three-ws-viewer
src="/avatars/default.glb"
- background="#060608"
+ background="#060606"
alt="Lightweight viewer demo"
style="width:100%;height:100%"
></three-ws-viewer>
diff --git a/pages/avatar-wallet-chat.html b/pages/avatar-wallet-chat.html
index 0ac064b1c..4a0db6e4d 100644
--- a/pages/avatar-wallet-chat.html
+++ b/pages/avatar-wallet-chat.html
@@ -10,8 +10,8 @@
:root {
--accent: #7c5cff;
--accent-soft: rgba(124, 92, 255, 0.16);
- --bg-0: #0a0a12;
- --bg-1: #12101f;
+ --bg-0: #0b0b0b;
+ --bg-1: #121212;
--panel: rgba(255, 255, 255, 0.04);
--panel-border: rgba(255, 255, 255, 0.09);
--text: #f3f2fb;
diff --git a/pages/club.html b/pages/club.html
index 8a8a3cffc..da1c31425 100644
--- a/pages/club.html
+++ b/pages/club.html
@@ -13,7 +13,7 @@
name="description"
content="A 3D pole-dancing club where dancers only come out when you send an x402 USDC micro-tip. Pay $0.001 per routine, settled on-chain on Base or Solana."
/>
- <meta name="theme-color" content="#07050b" />
+ <meta name="theme-color" content="#060606" />
<link rel="shortcut icon" href="/favicon.ico" />
<meta property="og:type" content="website" />
@@ -27,9 +27,9 @@
<style>
:root {
- --bg: #07050b;
+ --bg: #060606;
--panel: rgba(16, 8, 22, 0.86);
- --panel-solid: #11071a;
+ --panel-solid: #0a0a0a;
--border: rgba(255, 80, 200, 0.18);
--border-strong: rgba(255, 80, 200, 0.34);
--text: #f4eef8;
@@ -232,7 +232,7 @@
#club-stage {
grid-area: stage;
position: relative;
- background: #050308;
+ background: #040404;
overflow: hidden;
}
#club-canvas {
@@ -755,7 +755,7 @@
cursor: progress;
}
.club-tip-btn:disabled {
- background: linear-gradient(135deg, #3a2a4e 0%, #4b3d5c 100%);
+ background: linear-gradient(135deg, #303030 0%, #4b3d5c 100%);
box-shadow: none;
cursor: not-allowed;
opacity: 0.7;
diff --git a/pages/coin3d.html b/pages/coin3d.html
index 89a2e06d5..64b81b584 100644
--- a/pages/coin3d.html
+++ b/pages/coin3d.html
@@ -16,8 +16,8 @@
<meta property="og:type" content="website" />
<style>
:root {
- --bg-0: #06060c;
- --bg-1: #0e1022;
+ --bg-0: #060606;
+ --bg-1: #111111;
--fg: #eef1ff;
--muted: #97a0c4;
--accent: #6ea8ff;
@@ -171,7 +171,7 @@
display: inline-block;
padding: 9px 18px;
background: var(--accent);
- color: #04060f;
+ color: #060606;
font-weight: 700;
font-size: 14px;
border-radius: 10px;
diff --git a/pages/communities.html b/pages/communities.html
index 89fb4cd21..d0ad8be46 100644
--- a/pages/communities.html
+++ b/pages/communities.html
@@ -5,7 +5,7 @@
<title>Coin Communities · three.ws</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
<meta name="description" content="Pick a coin, drop in an avatar, and walk around its world with everyone else holding it. Each coin is its own live 3D community on three.ws." />
- <meta name="theme-color" content="#0b0b12" />
+ <meta name="theme-color" content="#0c0c0c" />
<meta property="og:type" content="website" />
<meta property="og:site_name" content="three.ws" />
<meta property="og:title" content="Coin Communities · three.ws" />
@@ -15,7 +15,7 @@
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
- --bg: #0b0b12;
+ --bg: #0c0c0c;
--panel: rgba(255,255,255,0.04);
--panel-border: rgba(255,255,255,0.09);
--text: #f4f4f8;
diff --git a/pages/constellation.html b/pages/constellation.html
index 63e38e168..11a064206 100644
--- a/pages/constellation.html
+++ b/pages/constellation.html
@@ -21,7 +21,7 @@
<style>
:root {
color-scheme: dark;
- --bg: #04040a; --text: #eaeaf6; --muted: #8a93b2; --border: rgba(255,255,255,.10);
+ --bg: #040404; --text: #eaeaf6; --muted: #8a93b2; --border: rgba(255,255,255,.10);
--panel: rgba(12,14,26,.72); --good: #42d392; --warn: #f7b955;
/* IBM Carbon brand accent — theme layer over the canonical monochrome system.
Scoped visual identity for /ibm/* surfaces; everything else stays monochrome. */
@@ -62,7 +62,7 @@
.c-panel.open { transform: translateX(0); }
.c-panel-head { padding: 22px 22px 16px; border-bottom: 1px solid var(--border); }
.c-panel-top { display: flex; align-items: center; gap: 12px; }
- .c-panel-logo { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; background: #11131f; border: 1px solid var(--border); flex: none; }
+ .c-panel-logo { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; background: #131313; border: 1px solid var(--border); flex: none; }
.c-panel-title { flex: 1; min-width: 0; }
.c-panel-sym { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.c-panel-nm { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
diff --git a/pages/create-review.html b/pages/create-review.html
index 12c407507..5af9942e1 100644
--- a/pages/create-review.html
+++ b/pages/create-review.html
@@ -67,9 +67,9 @@
-webkit-tap-highlight-color: transparent;
}
.back-link:hover {
- border-color: #2a2c3a;
+ border-color: #2d2d2d;
color: var(--text);
- background: #13141d;
+ background: #141414;
}
.back-link:active { transform: scale(0.97); }
.back-link svg { flex-shrink: 0; display: block; }
@@ -301,7 +301,7 @@
}
.panel input {
width: 100%;
- background: #07080d;
+ background: #080808;
color: var(--text);
border: 1.5px solid var(--border);
border-radius: 9px;
@@ -313,7 +313,7 @@
.panel input:focus {
outline: none;
border-color: var(--accent);
- background: #090a10;
+ background: #0a0a0a;
}
/* ── Name + live handle preview ────────────────────────────────── */
@@ -349,7 +349,7 @@
align-items: center;
min-height: 28px;
padding: 5px 10px;
- background: #07080d;
+ background: #080808;
border: 1px solid var(--border);
border-radius: 7px;
font-family: ui-monospace, 'SF Mono', monospace;
@@ -364,7 +364,7 @@
.handle-preview.is-flashing { animation: handleFlash 0.5s ease-out; }
@keyframes handleFlash {
0% { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.3); }
- 100% { background: #07080d; border-color: var(--border); }
+ 100% { background: #080808; border-color: var(--border); }
}
.feature-grid {
@@ -502,7 +502,7 @@
justify-content: center;
transition: background 0.15s, border-color 0.15s;
}
- .fm-close:hover { background: rgba(255, 255, 255, 0.1); border-color: #2c2d3d; }
+ .fm-close:hover { background: rgba(255, 255, 255, 0.1); border-color: #2e2e2e; }
.fm-body { display: flex; flex-direction: column; gap: 14px; }
.fm-bullets { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.fm-bullets li {
@@ -524,7 +524,7 @@
box-shadow: 0 0 6px rgba(255, 255, 255, 0.2);
}
.fm-code {
- background: #07080d;
+ background: #080808;
border: 1px solid var(--border);
border-radius: 9px;
padding: 12px 14px;
@@ -595,7 +595,7 @@
color: var(--text);
border: 1.5px solid var(--border);
}
- .fm-cta.ghost:hover { border-color: #2c2d3d; }
+ .fm-cta.ghost:hover { border-color: #2e2e2e; }
.fm-note {
font-size: 11.5px;
color: var(--muted);
@@ -678,7 +678,7 @@
border-radius: 10px;
object-fit: cover;
border: 1px solid var(--border);
- background: #0a0b12;
+ background: #0b0b0b;
flex-shrink: 0;
}
.fm-id-avatar--fallback {
@@ -690,7 +690,7 @@
color: var(--muted);
background:
linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.03) 100%),
- #0a0b12;
+ #0b0b0b;
}
.fm-id-card-top-right {
flex: 1;
@@ -751,7 +751,7 @@
display: flex;
align-items: center;
gap: 10px;
- background: #07080d;
+ background: #080808;
border: 1px solid var(--border);
border-radius: 8px;
padding: 10px 12px;
@@ -876,7 +876,7 @@
font-size: 10px;
font-weight: 600;
color: var(--muted);
- background: #07080d;
+ background: #080808;
border: 1px solid var(--border);
border-radius: 5px;
padding: 2px 8px;
@@ -1000,21 +1000,21 @@
border: 1px solid var(--border);
border-radius: 11px;
overflow: hidden;
- background: #07080d;
+ background: #080808;
}
.fm-browser-bar {
display: flex;
align-items: center;
gap: 6px;
padding: 8px 10px;
- background: linear-gradient(180deg, #131420 0%, #0c0d15 100%);
+ background: linear-gradient(180deg, #151515 0%, #0d0d0d 100%);
border-bottom: 1px solid var(--border);
}
.fm-browser-dot {
width: 9px;
height: 9px;
border-radius: 50%;
- background: #2c2d3d;
+ background: #2e2e2e;
}
.fm-browser-dot:nth-child(1) { background: #ff5f57; }
.fm-browser-dot:nth-child(2) { background: #febc2e; }
@@ -1042,7 +1042,7 @@
width: 100%;
height: 100%;
object-fit: contain;
- background: #06070b;
+ background: #070707;
}
.fm-browser-skeleton {
color: var(--muted);
@@ -1081,7 +1081,7 @@
grid-template-columns: 1.4fr 1fr 1fr;
gap: 10px;
padding: 10px 12px;
- background: #07080d;
+ background: #080808;
border: 1px solid var(--border);
border-radius: 9px;
font-size: 12px;
@@ -1099,7 +1099,7 @@
overflow-y: auto;
}
.rep-review-item {
- background: #07080d;
+ background: #080808;
border: 1px solid var(--border);
border-radius: 9px;
padding: 9px 11px;
@@ -1217,7 +1217,7 @@
grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
gap: 10px;
padding: 12px;
- background: #07080d;
+ background: #080808;
border: 1px solid var(--border);
border-radius: 10px;
}
@@ -1283,7 +1283,7 @@
.fm-tool-catalog {
display: flex;
flex-direction: column;
- background: #07080d;
+ background: #080808;
border: 1px solid var(--border);
border-radius: 10px;
padding: 12px 14px;
@@ -1319,7 +1319,7 @@
.fm-activity-feed {
display: flex;
flex-direction: column;
- background: #07080d;
+ background: #080808;
border: 1px solid var(--border);
border-radius: 10px;
padding: 4px 0;
@@ -1474,7 +1474,7 @@
gap: 6px;
transition: border-color 0.15s, color 0.15s;
}
- .secondary:hover { border-color: #2c2d3d; color: var(--text); }
+ .secondary:hover { border-color: #2e2e2e; color: var(--text); }
.guest-note {
font-size: 12.5px;
diff --git a/pages/create/video.html b/pages/create/video.html
index 9317456d9..f8c47d1d7 100644
--- a/pages/create/video.html
+++ b/pages/create/video.html
@@ -15,10 +15,10 @@
color-scheme: dark;
--accent: #ffffff;
--accent-ink: #000000;
- --bg: #05060a;
- --panel: #0f1018;
- --panel2: #13141f;
- --border: #1e1f2b;
+ --bg: #060606;
+ --panel: #101010;
+ --panel2: #151515;
+ --border: #202020;
--text: #eee;
--muted: #8a8d98;
--radius: 16px;
@@ -40,7 +40,7 @@
background:
radial-gradient(800px 500px at 50% -100px, rgba(255,255,255,.05) 0, transparent 70%),
radial-gradient(600px 400px at 50% 110%, rgba(255,255,255,.04) 0, transparent 70%),
- #05060a;
+ #060606;
}
/* ── Page chrome ───────────────────────────────────────────── */
@@ -106,7 +106,7 @@
flex-shrink: 0;
transition: color .15s, border-color .15s;
}
- .back-btn:hover { color: var(--text); border-color: #2c2d3d; }
+ .back-btn:hover { color: var(--text); border-color: #2e2e2e; }
.back-btn svg { width: 18px; height: 18px; }
.page-title { font-size: 22px; font-weight: 600; margin: 0; letter-spacing: -.01em; }
.page-subtitle { font-size: 13px; color: var(--muted); margin: 4px 0 0; }
@@ -351,7 +351,7 @@
text-decoration: none;
transition: background .15s, border-color .15s;
}
- .video-action-btn:hover { background: rgba(255,255,255,.09); border-color: #2c2d3d; }
+ .video-action-btn:hover { background: rgba(255,255,255,.09); border-color: #2e2e2e; }
.video-action-btn svg { width: 15px; height: 15px; }
.error-area {
diff --git a/pages/creating.html b/pages/creating.html
index 6cd2bf2c1..b7e0de256 100644
--- a/pages/creating.html
+++ b/pages/creating.html
@@ -4,7 +4,7 @@
<meta charset="utf-8" />
<title>Your three.ws avatar is ready</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <meta name="theme-color" content="#05060a" />
+ <meta name="theme-color" content="#060606" />
<meta name="description" content="Preview the avatar three.ws generated from your selfies, then mint it on-chain." />
<meta name="robots" content="noindex" />
<link rel="shortcut icon" href="/favicon.ico" />
@@ -20,7 +20,7 @@
:root { color-scheme: dark; }
html, body { height: 100%; }
body {
- background: #05060a; color: #eee;
+ background: #060606; color: #eee;
font: 15px/1.5 -apple-system, system-ui, 'Segoe UI', Roboto, sans-serif;
margin: 0; min-height: 100vh; display: flex; flex-direction: column;
}
@@ -42,7 +42,7 @@
}
@media (max-width: 880px) { .grid { grid-template-columns: 1fr; } }
.viewer {
- background: #0f1018; border: 1.5px solid #1e1f2b; border-radius: 14px;
+ background: #101010; border: 1.5px solid #202020; border-radius: 14px;
aspect-ratio: 4 / 5; min-height: 480px; position: relative; overflow: hidden;
}
.viewer model-viewer {
@@ -54,7 +54,7 @@
justify-content: center; color: #6a6d7c; font-size: 13px;
}
.panel {
- background: #0f1018; border: 1.5px solid #1e1f2b; border-radius: 14px;
+ background: #101010; border: 1.5px solid #202020; border-radius: 14px;
padding: 22px; display: flex; flex-direction: column; gap: 14px;
}
.panel h2 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -0.005em; }
@@ -64,8 +64,8 @@
}
.panel input, .panel textarea, .panel select {
width: 100%; box-sizing: border-box;
- background: #07080d; color: #eee;
- border: 1.5px solid #1e1f2b; border-radius: 9px;
+ background: #080808; color: #eee;
+ border: 1.5px solid #202020; border-radius: 9px;
padding: 10px 12px; font: inherit;
}
.panel input:focus, .panel textarea:focus, .panel select:focus {
@@ -81,15 +81,15 @@
.cta:disabled { opacity: 0.35; cursor: not-allowed; }
.secondary {
background: transparent; color: #eee;
- border: 1.5px solid #1e1f2b; border-radius: 10px;
+ border: 1.5px solid #202020; border-radius: 10px;
padding: 10px 14px; font: inherit; cursor: pointer;
text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
- .secondary:hover { border-color: #2c2d3d; }
+ .secondary:hover { border-color: #2e2e2e; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 0; }
.log {
- background: #07080d; border: 1px solid #1e1f2b; border-radius: 9px;
+ background: #080808; border: 1px solid #202020; border-radius: 9px;
padding: 10px 12px; font-family: ui-monospace, monospace;
font-size: 11.5px; color: #8a8d98; max-height: 140px;
overflow: auto; line-height: 1.5;
@@ -97,12 +97,12 @@
.log .ok { color: #ffffff; }
.log .err { color: #ff6b6b; }
.empty {
- background: #0f1018; border: 1.5px solid #1e1f2b; border-radius: 14px;
+ background: #101010; border: 1.5px solid #202020; border-radius: 14px;
padding: 32px; text-align: center; color: #8a8d98;
}
.empty a { color: #ffffff; }
.meta-tag {
- display: inline-block; background: #1e1f2b; color: #8a8d98;
+ display: inline-block; background: #202020; color: #8a8d98;
padding: 2px 8px; border-radius: 6px; font-size: 11px;
margin-right: 6px;
}
diff --git a/pages/demo-economy.html b/pages/demo-economy.html
index 6ce683d06..c12025084 100644
--- a/pages/demo-economy.html
+++ b/pages/demo-economy.html
@@ -8,7 +8,7 @@
<link rel="icon" href="/favicon.ico" />
<style>
:root {
- --bg: #05070d;
+ --bg: #070707;
--panel: rgba(10,13,24,0.9);
--border: rgba(255,255,255,0.08);
--text: #e8e9f2;
diff --git a/pages/embed-demo.html b/pages/embed-demo.html
index fbcc996ca..9d789def2 100644
--- a/pages/embed-demo.html
+++ b/pages/embed-demo.html
@@ -16,9 +16,9 @@
<style>
:root {
color-scheme: dark;
- --bg: #05060a;
- --panel: #0f1018;
- --border: #1e1f2b;
+ --bg: #060606;
+ --panel: #101010;
+ --border: #202020;
--text: #eee;
--muted: #8a8d98;
--accent: #ffffff;
@@ -84,7 +84,7 @@
overflow: hidden;
background:
radial-gradient(70% 50% at 50% 100%, rgba(255, 255, 255, 0.04), transparent 70%),
- #0a0c12;
+ #0c0c0c;
position: relative;
}
.frame threews-avatar {
@@ -119,7 +119,7 @@
border-color: rgba(255, 255, 255, 0.4);
}
.snippet {
- background: #07080d;
+ background: #080808;
border: 1px solid var(--border);
border-radius: 8px;
padding: 10px 12px;
diff --git a/pages/embed-walk.html b/pages/embed-walk.html
index 19c11dc15..381a83149 100644
--- a/pages/embed-walk.html
+++ b/pages/embed-walk.html
@@ -306,8 +306,8 @@
<label><input type="radio" name="bg-type" value="none"> Black</label>
</div>
<div class="ew-color-row" id="bg-color-row" style="margin-top:10px;display:none">
- <input type="color" id="cfg-bg-color" value="#1a1a2e" />
- <span class="ew-label" id="bg-color-label">#1a1a2e</span>
+ <input type="color" id="cfg-bg-color" value="#1b1b1b" />
+ <span class="ew-label" id="bg-color-label">#1b1b1b</span>
</div>
</div>
@@ -403,7 +403,7 @@ const cfg = {
avatarId: '',
controls: 'joystick',
bgType: 'transparent',
- bgColor: '#1a1a2e',
+ bgColor: '#1b1b1b',
w: 320,
h: 480,
speed: 1,
diff --git a/pages/embed.html b/pages/embed.html
index 3ac1ca33d..ab9a98759 100644
--- a/pages/embed.html
+++ b/pages/embed.html
@@ -11,7 +11,7 @@
margin: 0;
padding: 0;
height: 100%;
- background: #0b0d10;
+ background: #0d0d0d;
color: #fff;
font-family: system-ui, sans-serif;
}
diff --git a/pages/forge.html b/pages/forge.html
index 410300d97..7966816ed 100644
--- a/pages/forge.html
+++ b/pages/forge.html
@@ -136,7 +136,7 @@
font-family: var(--font-display);
font-weight: 600;
font-size: var(--text-base);
- color: #0b0b0f;
+ color: #0b0b0b;
background: var(--accent);
border: 1px solid var(--accent);
border-radius: var(--radius-md);
@@ -305,7 +305,7 @@
.result model-viewer {
width: 100%;
height: min(60vh, 560px);
- background: radial-gradient(120% 120% at 50% 0%, #15161d 0%, #0a0b10 70%);
+ background: radial-gradient(120% 120% at 50% 0%, #161616 0%, #0b0b0b 70%);
--poster-color: transparent;
}
.result-bar {
diff --git a/pages/handle.html b/pages/handle.html
index 6d5ec430c..8e0050b38 100644
--- a/pages/handle.html
+++ b/pages/handle.html
@@ -5,7 +5,7 @@
<title>three.ws</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Live 3D avatar on three.ws — embed me anywhere." />
- <meta name="theme-color" content="#0b0d10" />
+ <meta name="theme-color" content="#0d0d0d" />
<link rel="shortcut icon" href="/favicon.ico" />
<link rel="stylesheet" href="/style.css" />
<link rel="stylesheet" href="/fonts/fonts.css" />
@@ -23,7 +23,7 @@
<style>
body {
margin: 0;
- background: #0a0c10;
+ background: #0c0c0c;
color: #e8ecf2;
font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
min-height: 100vh;
@@ -75,7 +75,7 @@
.stage {
position: relative;
- background: linear-gradient(180deg, #11141a, #0a0c10);
+ background: linear-gradient(180deg, #141414, #0c0c0c);
border-radius: 16px;
border: 1px solid rgba(255, 255, 255, 0.08);
overflow: hidden;
@@ -170,7 +170,7 @@
margin: 0 0 10px;
}
.embed-card pre {
- background: #06080b;
+ background: #080808;
border: 1px solid rgba(255, 255, 255, 0.05);
border-radius: 8px;
padding: 12px 14px;
@@ -184,7 +184,7 @@
.embed-card .copy {
margin-top: 10px;
background: #fff;
- color: #0a0c10;
+ color: #0c0c0c;
border: 0;
border-radius: 8px;
padding: 8px 14px;
@@ -209,7 +209,7 @@
align-items: center;
gap: 6px;
background: #fff;
- color: #0a0c10;
+ color: #0c0c0c;
padding: 10px 16px;
border-radius: 10px;
font-size: 13px;
diff --git a/pages/home.html b/pages/home.html
index 92efd6838..4fbb52972 100644
--- a/pages/home.html
+++ b/pages/home.html
@@ -645,7 +645,7 @@
}
.walk-preview-canvas-area {
position: relative; aspect-ratio: 16 / 9;
- background: #0d0f14; overflow: hidden; cursor: grab;
+ background: #0f0f0f; overflow: hidden; cursor: grab;
}
.walk-preview-canvas-area:active { cursor: grabbing; }
.walk-preview-canvas {
@@ -655,7 +655,7 @@
position: absolute; inset: 0; display: flex;
flex-direction: column; align-items: center;
justify-content: center; gap: 12px;
- background: #0d0f14; z-index: 4;
+ background: #0f0f0f; z-index: 4;
font-family: var(--font-mono); font-size: 11px;
color: var(--text-3); letter-spacing: 0.1em;
transition: opacity 0.5s ease;
@@ -732,7 +732,7 @@
}
.token-avatar {
width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
- background: linear-gradient(135deg, #2a2a3a 0%, #15151f 100%);
+ background: linear-gradient(135deg, #2b2b2b 0%, #161616 100%);
display: flex; align-items: center; justify-content: center;
font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: #fff;
}
@@ -2331,7 +2331,7 @@
.mocap-waveform{width:100%;height:48px;border-radius:6px;background:var(--surface-2);border:1px solid var(--hairline-strong);display:block}
.mocap-status{font-family:var(--font-mono);font-size:10px;letter-spacing:.1em;color:var(--text-4);text-align:center}
.mocap-status.live{color:var(--text-2)}
- .walk-minimap-wrap{position:relative;border-radius:8px;overflow:hidden;border:1px solid var(--hairline-strong);background:#0a0d12}
+ .walk-minimap-wrap{position:relative;border-radius:8px;overflow:hidden;border:1px solid var(--hairline-strong);background:#0d0d0d}
.walk-minimap{width:100%;height:140px;display:block;cursor:crosshair}
.walk-minimap:focus{outline:2px solid rgba(255,255,255,.3);outline-offset:-2px}
.walk-minimap-hud{position:absolute;top:6px;left:8px;display:flex;align-items:center;gap:6px;font-family:var(--font-mono);font-size:9px;color:var(--text-3);letter-spacing:.08em}
@@ -2943,7 +2943,7 @@
<div class="pg-color-swatches" id="pg-color-swatches"></div>
<div class="pg-color-hex-row">
<div class="pg-color-preview" id="pg-color-preview"></div>
- <input class="pg-color-hex-input" id="pg-color-hex" type="text" placeholder="#1a1a2e" maxlength="7" spellcheck="false" autocomplete="off" />
+ <input class="pg-color-hex-input" id="pg-color-hex" type="text" placeholder="#1b1b1b" maxlength="7" spellcheck="false" autocomplete="off" />
</div>
</div>
</div>
@@ -4524,7 +4524,7 @@
// returns '' so the default stage backdrop shows through behind the avatar.
function resolvePreviewBg(bg) {
if (bg === 'transparent') return '';
- if (bg === 'dark') return '#0b0d10';
+ if (bg === 'dark') return '#0d0d0d';
if (bg === 'light') return '#f5f5f5';
return bg;
}
@@ -4652,9 +4652,9 @@
var colorPreview = document.getElementById('pg-color-preview');
var palette = [
- '#1a1a2e','#16213e','#0f3460','#533483','#e94560','#ff6b6b',
+ '#1b1b1b','#212121','#0f3460','#533483','#e94560','#ff6b6b',
'#ffa07a','#ffd93d','#6bcb77','#4d96ff','#845ec2','#d65db1',
- '#2d3436','#636e72','#b2bec3','#dfe6e9','#fdcb6e','#e17055',
+ '#333333','#636e72','#b2bec3','#dfe6e9','#fdcb6e','#e17055',
'#00b894','#00cec9','#0984e3','#6c5ce7','#fd79a8','#e84393',
];
@@ -5507,7 +5507,7 @@
});
ctx.clearRect(0, 0, W, H);
- ctx.fillStyle = '#0a0d12';
+ ctx.fillStyle = '#0d0d0d';
ctx.fillRect(0, 0, W, H);
// Grid
ctx.strokeStyle = 'rgba(255,255,255,0.04)';
diff --git a/pages/ibm/galaxy.html b/pages/ibm/galaxy.html
index 58c9cc9db..1f2c7943b 100644
--- a/pages/ibm/galaxy.html
+++ b/pages/ibm/galaxy.html
@@ -230,7 +230,7 @@
.panel .p-avatar-row { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.panel .p-avatar {
width: 56px; height: 56px; border-radius: var(--radius); object-fit: cover;
- background: #161c28; border: 1px solid var(--border); flex: none;
+ background: #1c1c1c; border: 1px solid var(--border); flex: none;
}
.panel .p-avatar.placeholder {
display: grid; place-items: center;
@@ -264,7 +264,7 @@
.panel .nb:hover { background: rgba(255,255,255,0.05); }
.panel .nb-av {
width: 32px; height: 32px; border-radius: 9px; object-fit: cover;
- background: #161c28; flex: none; display: grid; place-items: center;
+ background: #1c1c1c; flex: none; display: grid; place-items: center;
font-weight: 700; color: var(--brand-blue-light); font-size: 13px;
}
.panel .nb-meta { min-width: 0; flex: 1; }
@@ -314,7 +314,7 @@
.results .ritem:hover, .results .ritem.active { background: rgba(15,98,254,0.12); }
.results .r-av {
width: 30px; height: 30px; border-radius: 8px; object-fit: cover;
- background: #161c28; flex: none; display: grid; place-items: center;
+ background: #1c1c1c; flex: none; display: grid; place-items: center;
font-weight: 700; color: var(--brand-blue-light); font-size: 12px;
}
.results .r-name { font-size: 13px; font-weight: 600; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@@ -414,7 +414,7 @@
</head>
<body>
<noscript>
- <div style="position:fixed;inset:0;z-index:99999;display:flex;align-items:center;justify-content:center;padding:24px;background:#06080f;color:#e7ecf5;font-family:system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;text-align:center">
+ <div style="position:fixed;inset:0;z-index:99999;display:flex;align-items:center;justify-content:center;padding:24px;background:#080808;color:#e7ecf5;font-family:system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;text-align:center">
<div style="max-width:480px">
<div style="width:12px;height:12px;border-radius:50%;background:#0f62fe;margin:0 auto 20px;box-shadow:0 0 24px #0f62fe" aria-hidden="true"></div>
<h1 style="font-size:24px;font-weight:700;letter-spacing:-0.02em;margin:0 0 10px">Agent Galaxy</h1>
@@ -552,7 +552,7 @@
<!-- Empty -->
<div class="overlay" id="emptyState">
<div class="inner">
- <div class="o-orb" style="animation:none;background:radial-gradient(circle at 35% 30%,#2a3348,#141820)"></div>
+ <div class="o-orb" style="animation:none;background:radial-gradient(circle at 35% 30%,#333333,#181818)"></div>
<h2 id="emptyTitle">No agents to map yet</h2>
<p id="emptyMsg">The galaxy lights up when public agents exist. Create one and it joins the constellation on the next rebuild.</p>
<div class="o-actions">
@@ -565,7 +565,7 @@
<!-- watsonx unavailable -->
<div class="overlay" id="unavailableState">
<div class="inner">
- <div class="o-orb" style="animation:none;background:radial-gradient(circle at 35% 30%,#1f2a3a,#0d1118)"></div>
+ <div class="o-orb" style="animation:none;background:radial-gradient(circle at 35% 30%,#292929,#111111)"></div>
<h2>IBM watsonx is not configured</h2>
<p id="unavailableMsg">Set <code>WATSONX_API_KEY</code> and <code>WATSONX_PROJECT_ID</code> on this deployment to power the galaxy with Granite embeddings.</p>
<div class="o-actions">
diff --git a/pages/ibm/identity.html b/pages/ibm/identity.html
index 17487993c..3aaa86dfa 100644
--- a/pages/ibm/identity.html
+++ b/pages/ibm/identity.html
@@ -81,7 +81,7 @@
.field label { font-size:13px; font-weight:600; color:var(--muted); }
.field input, .field textarea {
width:100%; padding:11px 13px; border:1px solid var(--border-strong); border-radius:10px;
- background:#0a0e16; color:var(--text); font:inherit; transition:border-color .15s, box-shadow .15s;
+ background:#0e0e0e; color:var(--text); font:inherit; transition:border-color .15s, box-shadow .15s;
}
.field textarea { resize:vertical; min-height:88px; }
.field input:focus, .field textarea:focus {
@@ -129,7 +129,7 @@
[data-state="block"] .status-text .label { color:var(--block); }
[data-state="unavailable"] .status-icon { background:rgba(139,147,167,0.15); color:var(--muted); }
- .gauge { height:8px; border-radius:99px; background:#0a0e16; border:1px solid var(--border); overflow:hidden; margin:4px 0 6px; }
+ .gauge { height:8px; border-radius:99px; background:#0e0e0e; border:1px solid var(--border); overflow:hidden; margin:4px 0 6px; }
.gauge > span { display:block; height:100%; border-radius:99px; background:linear-gradient(90deg,#0f62fe,#42be65); transition:width .5s ease; }
.gauge-cap { font-size:12px; color:var(--faint); display:flex; justify-content:space-between; margin-bottom:18px; }
@@ -142,7 +142,7 @@
.neighbor { display:flex; align-items:center; gap:10px; padding:8px 0; border-top:1px solid var(--border); text-decoration:none; }
.neighbor:first-of-type { border-top:none; }
.neighbor .nname { font-size:13.5px; color:var(--text); flex:0 0 38%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
- .neighbor .nbar { flex:1; height:6px; border-radius:99px; background:#0a0e16; border:1px solid var(--border); overflow:hidden; }
+ .neighbor .nbar { flex:1; height:6px; border-radius:99px; background:#0e0e0e; border:1px solid var(--border); overflow:hidden; }
.neighbor .nbar > span { display:block; height:100%; background:var(--brand-blue-light); }
.neighbor .nscore { font:12px/1 var(--mono); color:var(--muted); flex:0 0 auto; width:46px; text-align:right; }
.neighbor .ntag { font-size:10px; color:var(--faint); border:1px solid var(--border); border-radius:99px; padding:2px 7px; }
diff --git a/pages/ibm/index.html b/pages/ibm/index.html
index 256b2c2fd..512652d67 100644
--- a/pages/ibm/index.html
+++ b/pages/ibm/index.html
@@ -114,7 +114,7 @@
</head>
<body>
<noscript>
- <div style="position:fixed;inset:0;z-index:99999;display:flex;align-items:center;justify-content:center;padding:24px;background:#06080f;color:#e7ecf5;font-family:system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;text-align:center">
+ <div style="position:fixed;inset:0;z-index:99999;display:flex;align-items:center;justify-content:center;padding:24px;background:#080808;color:#e7ecf5;font-family:system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;text-align:center">
<div style="max-width:480px">
<div style="width:12px;height:12px;border-radius:50%;background:#0f62fe;margin:0 auto 20px;box-shadow:0 0 24px #0f62fe" aria-hidden="true"></div>
<h1 style="font-size:26px;font-weight:600;letter-spacing:-0.02em;margin:0 0 10px;color:#fff">three.ws × IBM watsonx</h1>
@@ -166,7 +166,7 @@
<strong>These are community demos, not partnership deliverables.</strong> Everything below is an independent showcase three.ws built for developers — playgrounds to explore IBM Granite on watsonx.ai and a starting point for building your own tools. They are not official IBM partnership work, not IBM products, and not endorsed by IBM. Our formal partnership work with IBM is being built on the IBM platform and is not yet public.
</div>
- <a href="/ibm/galaxy" class="demo-card" style="--card-bg:radial-gradient(900px 360px at 80% -20%,rgba(15,98,254,0.18),transparent 60%),linear-gradient(180deg,#0a0e18,#0c1020)">
+ <a href="/ibm/galaxy" class="demo-card" style="--card-bg:radial-gradient(900px 360px at 80% -20%,rgba(15,98,254,0.18),transparent 60%),linear-gradient(180deg,#0e0e0e,#101010)">
<div class="card-body">
<div class="card-tag">
<span class="card-dot" style="--dot-color:#0f62fe"></span>
@@ -178,7 +178,7 @@
</div>
</a>
- <a href="/ibm/oracle" class="demo-card" style="--card-bg:radial-gradient(900px 360px at 20% -20%,rgba(66,190,101,0.16),transparent 60%),radial-gradient(700px 320px at 90% 120%,rgba(15,98,254,0.18),transparent 60%),linear-gradient(180deg,#0a0e18,#0c1020)">
+ <a href="/ibm/oracle" class="demo-card" style="--card-bg:radial-gradient(900px 360px at 20% -20%,rgba(66,190,101,0.16),transparent 60%),radial-gradient(700px 320px at 90% 120%,rgba(15,98,254,0.18),transparent 60%),linear-gradient(180deg,#0e0e0e,#101010)">
<div class="card-body">
<div class="card-tag">
<span class="card-dot" style="--dot-color:#42be65"></span>
@@ -190,7 +190,7 @@
</div>
</a>
- <a href="/ibm/twin" class="demo-card" style="--card-bg:radial-gradient(900px 360px at 22% -20%,rgba(120,169,255,0.20),transparent 60%),radial-gradient(720px 320px at 88% 120%,rgba(66,190,101,0.14),transparent 60%),linear-gradient(180deg,#0a0e18,#0c1020)">
+ <a href="/ibm/twin" class="demo-card" style="--card-bg:radial-gradient(900px 360px at 22% -20%,rgba(120,169,255,0.20),transparent 60%),radial-gradient(720px 320px at 88% 120%,rgba(66,190,101,0.14),transparent 60%),linear-gradient(180deg,#0e0e0e,#101010)">
<div class="card-body">
<div class="card-tag">
<span class="card-dot" style="--dot-color:#78a9ff"></span>
@@ -202,7 +202,7 @@
</div>
</a>
- <a href="/ibm/trust-layer" class="demo-card" style="--card-bg:radial-gradient(820px 360px at 18% -20%,rgba(250,77,86,0.16),transparent 60%),radial-gradient(760px 320px at 92% 120%,rgba(15,98,254,0.20),transparent 60%),linear-gradient(180deg,#0a0e18,#0c1020)">
+ <a href="/ibm/trust-layer" class="demo-card" style="--card-bg:radial-gradient(820px 360px at 18% -20%,rgba(250,77,86,0.16),transparent 60%),radial-gradient(760px 320px at 92% 120%,rgba(15,98,254,0.20),transparent 60%),linear-gradient(180deg,#0e0e0e,#101010)">
<div class="card-body">
<div class="card-tag">
<span class="card-dot" style="--dot-color:#fa4d56"></span>
@@ -214,7 +214,7 @@
</div>
</a>
- <a href="/ibm/identity" class="demo-card" style="--card-bg:radial-gradient(840px 360px at 80% -20%,rgba(66,190,101,0.16),transparent 60%),radial-gradient(760px 320px at 10% 120%,rgba(15,98,254,0.20),transparent 60%),linear-gradient(180deg,#0a0e18,#0c1020)">
+ <a href="/ibm/identity" class="demo-card" style="--card-bg:radial-gradient(840px 360px at 80% -20%,rgba(66,190,101,0.16),transparent 60%),radial-gradient(760px 320px at 10% 120%,rgba(15,98,254,0.20),transparent 60%),linear-gradient(180deg,#0e0e0e,#101010)">
<div class="card-body">
<div class="card-tag">
<span class="card-dot" style="--dot-color:#42be65"></span>
@@ -226,7 +226,7 @@
</div>
</a>
- <a href="/ibm/proof" class="demo-card" style="--card-bg:radial-gradient(880px 360px at 82% -20%,rgba(120,169,255,0.18),transparent 60%),radial-gradient(700px 320px at 8% 120%,rgba(66,190,101,0.14),transparent 60%),linear-gradient(180deg,#0a0e18,#0b1222)">
+ <a href="/ibm/proof" class="demo-card" style="--card-bg:radial-gradient(880px 360px at 82% -20%,rgba(120,169,255,0.18),transparent 60%),radial-gradient(700px 320px at 8% 120%,rgba(66,190,101,0.14),transparent 60%),linear-gradient(180deg,#0e0e0e,#121212)">
<div class="card-body">
<div class="card-tag">
<span class="card-dot" style="--dot-color:#0f62fe"></span>
@@ -238,7 +238,7 @@
</div>
</a>
- <a href="/ibm/vision" class="demo-card" style="--card-bg:radial-gradient(900px 360px at 78% -20%,rgba(165,110,255,0.18),transparent 60%),radial-gradient(720px 320px at 10% 120%,rgba(15,98,254,0.18),transparent 60%),linear-gradient(180deg,#0a0e18,#0c1020)">
+ <a href="/ibm/vision" class="demo-card" style="--card-bg:radial-gradient(900px 360px at 78% -20%,rgba(165,110,255,0.18),transparent 60%),radial-gradient(720px 320px at 10% 120%,rgba(15,98,254,0.18),transparent 60%),linear-gradient(180deg,#0e0e0e,#101010)">
<div class="card-body">
<div class="card-tag">
<span class="card-dot" style="--dot-color:#a56eff"></span>
diff --git a/pages/ibm/oracle.html b/pages/ibm/oracle.html
index b542bc0dd..36097245c 100644
--- a/pages/ibm/oracle.html
+++ b/pages/ibm/oracle.html
@@ -10,7 +10,7 @@
name="description"
content="A live 3D oracle: IBM Granite TimeSeries forecasts a Solana token's price, an embodied agent narrates it, and IBM Granite Guardian governs every word. Real watsonx.ai, real on-chain data."
/>
- <meta name="theme-color" content="#0b0e17" />
+ <meta name="theme-color" content="#0e0e0e" />
<meta
property="og:title"
content="Granite Oracle — IBM watsonx forecasting, embodied in 3D"
@@ -38,9 +38,9 @@
font-family: var(--font);
color: var(--ink);
background:
- radial-gradient(1200px 700px at 50% -10%, #16224a 0%, rgba(11, 14, 23, 0) 60%),
- radial-gradient(900px 600px at 90% 110%, #1a1340 0%, rgba(11, 14, 23, 0) 55%),
- #0b0e17;
+ radial-gradient(1200px 700px at 50% -10%, #222222 0%, rgba(11, 14, 23, 0) 60%),
+ radial-gradient(900px 600px at 90% 110%, #181818 0%, rgba(11, 14, 23, 0) 55%),
+ #0e0e0e;
overflow: hidden;
}
a {
@@ -441,7 +441,7 @@
</head>
<body>
<noscript>
- <div style="position:fixed;inset:0;z-index:99999;display:flex;align-items:center;justify-content:center;padding:24px;background:#06080f;color:#e7ecf5;font-family:system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;text-align:center">
+ <div style="position:fixed;inset:0;z-index:99999;display:flex;align-items:center;justify-content:center;padding:24px;background:#080808;color:#e7ecf5;font-family:system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;text-align:center">
<div style="max-width:480px">
<div style="width:12px;height:12px;border-radius:50%;background:#0f62fe;margin:0 auto 20px;box-shadow:0 0 24px #0f62fe" aria-hidden="true"></div>
<h1 style="font-size:26px;font-weight:600;letter-spacing:-0.02em;margin:0 0 10px;color:#fff">Granite Oracle</h1>
diff --git a/pages/ibm/proof.html b/pages/ibm/proof.html
index 7a6efdcce..f3a7a53eb 100644
--- a/pages/ibm/proof.html
+++ b/pages/ibm/proof.html
@@ -62,7 +62,7 @@
.card .bd { padding: 18px; }
/* avatar stage */
- .stage { position: relative; aspect-ratio: 3/4; background: radial-gradient(120% 90% at 50% 10%, rgba(15,98,254,0.16), transparent 60%), #070b13; }
+ .stage { position: relative; aspect-ratio: 3/4; background: radial-gradient(120% 90% at 50% 10%, rgba(15,98,254,0.16), transparent 60%), #0b0b0b; }
.stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.stage .caption { position: absolute; left: 12px; right: 12px; bottom: 12px; background: rgba(5,7,13,0.74); backdrop-filter: blur(8px); border: 1px solid var(--border); border-radius: 12px; padding: 11px 13px; font-size: 13.5px; line-height: 1.45; color: var(--text); min-height: 0; opacity: 0; transform: translateY(6px); transition: opacity 0.3s, transform 0.3s; }
.stage .caption.on { opacity: 1; transform: none; }
@@ -150,7 +150,7 @@
</head>
<body>
<noscript>
- <div style="position:fixed;inset:0;z-index:99999;display:flex;align-items:center;justify-content:center;padding:24px;background:#06080f;color:#e7ecf5;font-family:system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;text-align:center">
+ <div style="position:fixed;inset:0;z-index:99999;display:flex;align-items:center;justify-content:center;padding:24px;background:#080808;color:#e7ecf5;font-family:system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;text-align:center">
<div style="max-width:480px">
<div style="width:12px;height:12px;border-radius:50%;background:#0f62fe;margin:0 auto 20px;box-shadow:0 0 24px #0f62fe" aria-hidden="true"></div>
<h1 style="font-size:26px;font-weight:600;letter-spacing:-0.02em;margin:0 0 10px;color:#fff">Granite Proof</h1>
diff --git a/pages/ibm/trust-layer.html b/pages/ibm/trust-layer.html
index 3af279e34..efac16bd1 100644
--- a/pages/ibm/trust-layer.html
+++ b/pages/ibm/trust-layer.html
@@ -322,7 +322,7 @@
</head>
<body>
<noscript>
- <div style="position:fixed;inset:0;z-index:99999;display:flex;align-items:center;justify-content:center;padding:24px;background:#06080f;color:#e7ecf5;font-family:system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;text-align:center">
+ <div style="position:fixed;inset:0;z-index:99999;display:flex;align-items:center;justify-content:center;padding:24px;background:#080808;color:#e7ecf5;font-family:system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;text-align:center">
<div style="max-width:480px">
<div style="width:12px;height:12px;border-radius:50%;background:#0f62fe;margin:0 auto 20px;box-shadow:0 0 24px #0f62fe" aria-hidden="true"></div>
<h1 style="font-size:26px;font-weight:600;letter-spacing:-0.02em;margin:0 0 10px;color:#fff">IBM Trust Layer</h1>
@@ -453,7 +453,7 @@
<div class="overlay" id="unavailableState" role="alertdialog" aria-modal="true" aria-label="IBM watsonx not configured">
<div class="ov-inner">
- <div class="o-orb" style="animation:none;background:radial-gradient(circle at 35% 30%,#3a4253,#1a1f2c)" aria-hidden="true"></div>
+ <div class="o-orb" style="animation:none;background:radial-gradient(circle at 35% 30%,#424242,#1f1f1f)" aria-hidden="true"></div>
<h2>IBM watsonx is not configured</h2>
<p>No watsonx.ai credentials found. Set <code>WATSONX_API_KEY</code> and <code>WATSONX_PROJECT_ID</code> to power the Trust Layer.</p>
<div class="o-actions"><a class="o-btn" href="/ibm">About the IBM integration</a></div>
diff --git a/pages/ibm/twin.html b/pages/ibm/twin.html
index c96bf3255..2d1293ffb 100644
--- a/pages/ibm/twin.html
+++ b/pages/ibm/twin.html
@@ -10,7 +10,7 @@
name="description"
content="A living digital twin of a real Solana market: it mirrors its on-chain vitals in real time, IBM Granite TimeSeries projects its future, it back-tests itself against reality, and you can run what-if simulations. Real watsonx.ai, real on-chain data."
/>
- <meta name="theme-color" content="#0b0e17" />
+ <meta name="theme-color" content="#0e0e0e" />
<meta
property="og:title"
content="Digital Twin — a living market replica, powered by IBM watsonx"
@@ -38,9 +38,9 @@
font-family: var(--font);
color: var(--ink);
background:
- radial-gradient(1200px 700px at 50% -10%, #16224a 0%, rgba(11, 14, 23, 0) 60%),
- radial-gradient(900px 600px at 90% 110%, #1a1340 0%, rgba(11, 14, 23, 0) 55%),
- #0b0e17;
+ radial-gradient(1200px 700px at 50% -10%, #222222 0%, rgba(11, 14, 23, 0) 60%),
+ radial-gradient(900px 600px at 90% 110%, #181818 0%, rgba(11, 14, 23, 0) 55%),
+ #0e0e0e;
overflow: hidden;
}
a {
@@ -605,7 +605,7 @@
</head>
<body>
<noscript>
- <div style="position:fixed;inset:0;z-index:99999;display:flex;align-items:center;justify-content:center;padding:24px;background:#06080f;color:#e7ecf5;font-family:system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;text-align:center">
+ <div style="position:fixed;inset:0;z-index:99999;display:flex;align-items:center;justify-content:center;padding:24px;background:#080808;color:#e7ecf5;font-family:system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;text-align:center">
<div style="max-width:480px">
<div style="width:12px;height:12px;border-radius:50%;background:#0f62fe;margin:0 auto 20px;box-shadow:0 0 24px #0f62fe" aria-hidden="true"></div>
<h1 style="font-size:26px;font-weight:600;letter-spacing:-0.02em;margin:0 0 10px;color:#fff">Digital Twin</h1>
diff --git a/pages/ibm/vision.html b/pages/ibm/vision.html
index ba735f0ea..bf6933177 100644
--- a/pages/ibm/vision.html
+++ b/pages/ibm/vision.html
@@ -9,7 +9,7 @@
name="description"
content="Show IBM Granite Vision on watsonx.ai a three.ws 3D avatar and watch it read the look — appearance, vibe, persona, a name, a bio, a voice — turning a face into a complete agent identity. Real multimodal inference, no mock data."
/>
- <meta name="theme-color" content="#0b0e17" />
+ <meta name="theme-color" content="#0e0e0e" />
<meta property="og:type" content="website" />
<meta property="og:title" content="Granite Vision — IBM watsonx sees your 3D avatar" />
<meta
@@ -30,9 +30,9 @@
font-family: var(--font);
color: var(--ink);
background:
- radial-gradient(1200px 700px at 30% -10%, #16224a 0%, rgba(11, 14, 23, 0) 60%),
- radial-gradient(900px 600px at 95% 110%, #1a1340 0%, rgba(11, 14, 23, 0) 55%),
- #0b0e17;
+ radial-gradient(1200px 700px at 30% -10%, #222222 0%, rgba(11, 14, 23, 0) 60%),
+ radial-gradient(900px 600px at 95% 110%, #181818 0%, rgba(11, 14, 23, 0) 55%),
+ #0e0e0e;
overflow: hidden;
}
a { color: var(--brand-blue-2); text-decoration: none; }
@@ -217,7 +217,7 @@
.subjects { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; flex: 1; min-width: 0; padding: 2px; }
.subject {
flex: none; width: 50px; height: 50px; border-radius: 11px; cursor: pointer;
- border: 2px solid transparent; background: #11151f center/cover no-repeat;
+ border: 2px solid transparent; background: #151515 center/cover no-repeat;
display: grid; place-items: center; color: var(--faint); font-size: 18px; font-weight: 700;
transition: border-color 0.15s, transform 0.12s, box-shadow 0.15s;
position: relative; overflow: hidden;
@@ -284,7 +284,7 @@
</head>
<body>
<noscript>
- <div style="position:fixed;inset:0;z-index:99999;display:flex;align-items:center;justify-content:center;padding:24px;background:#06080f;color:#e7ecf5;font-family:system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;text-align:center">
+ <div style="position:fixed;inset:0;z-index:99999;display:flex;align-items:center;justify-content:center;padding:24px;background:#080808;color:#e7ecf5;font-family:system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;text-align:center">
<div style="max-width:480px">
<div style="width:12px;height:12px;border-radius:50%;background:#0f62fe;margin:0 auto 20px;box-shadow:0 0 24px #0f62fe" aria-hidden="true"></div>
<h1 style="font-size:26px;font-weight:600;letter-spacing:-0.02em;margin:0 0 10px;color:#fff">Granite Vision</h1>
diff --git a/pages/import-rpm.html b/pages/import-rpm.html
index ad7592b41..b4a857d53 100644
--- a/pages/import-rpm.html
+++ b/pages/import-rpm.html
@@ -13,9 +13,9 @@
<style>
*, *::before, *::after { box-sizing: border-box; }
:root {
- --bg: #0b0d10;
- --panel: #12151a;
- --panel-2: #181c22;
+ --bg: #0d0d0d;
+ --panel: #151515;
+ --panel-2: #1c1c1c;
--border: rgba(255,255,255,0.07);
--border-2: rgba(255,255,255,0.13);
--text: #e9ecef;
@@ -217,7 +217,7 @@
padding: 14px 20px;
min-height: 52px;
background: var(--accent);
- color: #0b1014;
+ color: #0f0f0f;
font: inherit;
font-weight: 700;
font-size: 15px;
@@ -314,7 +314,7 @@
display: inline-block;
padding: 12px 28px;
background: var(--accent);
- color: #0b1014;
+ color: #0f0f0f;
font-weight: 700;
font-size: 14px;
border-radius: 8px;
diff --git a/pages/labs.html b/pages/labs.html
index 6e728ebe7..dbda5522e 100644
--- a/pages/labs.html
+++ b/pages/labs.html
@@ -28,7 +28,7 @@
* { box-sizing: border-box; }
body {
margin: 0;
- background: #060610;
+ background: #070707;
color: var(--ink, #e8e8e8);
font-family: var(--font-body, 'Inter', system-ui, sans-serif);
-webkit-font-smoothing: antialiased;
diff --git a/pages/launchpad.html b/pages/launchpad.html
index c56012265..c0937d260 100644
--- a/pages/launchpad.html
+++ b/pages/launchpad.html
@@ -14,7 +14,7 @@
margin: 0;
padding: 0;
height: 100%;
- background: #0b0d10;
+ background: #0d0d0d;
color: #fff;
font-family: system-ui, sans-serif;
}
diff --git a/pages/live.html b/pages/live.html
index e5d74484d..92b048562 100644
--- a/pages/live.html
+++ b/pages/live.html
@@ -8,7 +8,7 @@
<link rel="icon" href="/favicon.ico" />
<style>
:root {
- --bg: #04050b;
+ --bg: #050505;
--panel: rgba(12,14,22,0.9);
--border: rgba(255,255,255,0.08);
--border-hi: rgba(255,255,255,0.14);
diff --git a/pages/marketplace.html b/pages/marketplace.html
index 5fa43bf01..d28cc6514 100644
--- a/pages/marketplace.html
+++ b/pages/marketplace.html
@@ -202,7 +202,7 @@
background:
radial-gradient(ellipse at top right, rgba(255, 255, 255, 0.08), transparent 60%),
radial-gradient(ellipse at bottom left, rgba(255, 255, 255, 0.04), transparent 50%),
- linear-gradient(180deg, #0e0e10, #0a0a0a);
+ linear-gradient(180deg, #0e0e0e, #0a0a0a);
border: 1px solid #1f1f1f;
border-radius: 20px;
position: relative;
@@ -525,7 +525,7 @@
background:
radial-gradient(ellipse at top, rgba(255, 255, 255, 0.06), transparent 60%),
radial-gradient(ellipse at bottom, rgba(255, 255, 255, 0.03), transparent 60%),
- #050608;
+ #060606;
display: flex;
align-items: center;
justify-content: center;
@@ -621,7 +621,7 @@
/* ── Onchain card variants ────────────────────────────────────── */
.market-card-avatar.onchain {
- background: linear-gradient(180deg, #0c0d10, #0a0a0a);
+ background: linear-gradient(180deg, #0d0d0d, #0a0a0a);
}
.market-card-avatar.onchain .avatar-pill.onchain {
background: rgba(255, 255, 255, 0.08);
@@ -764,7 +764,7 @@
font-weight: 400;
}
.market-card-avatar .byline .dot {
- color: #3f3f46;
+ color: #404040;
}
.market-card-avatar .card-tags {
display: flex;
@@ -1003,7 +1003,7 @@
}
.avatar-modal-sale button.sale-buy {
background: linear-gradient(180deg, #fde047, #facc15);
- color: #18181b;
+ color: #181818;
}
.avatar-modal-sale button.sale-buy:hover,
.avatar-modal-sale button.sale-save:hover {
@@ -1879,7 +1879,7 @@
gap: 24px;
align-items: flex-start;
padding: 28px;
- background: radial-gradient(ellipse at top right, rgba(255,255,255,0.05), transparent 60%), linear-gradient(180deg, #0e0e10, #0a0a0a);
+ background: radial-gradient(ellipse at top right, rgba(255,255,255,0.05), transparent 60%), linear-gradient(180deg, #0e0e0e, #0a0a0a);
border: 1px solid #1f1f1f;
border-radius: 18px;
margin-top: 4px;
diff --git a/pages/mocap-studio.html b/pages/mocap-studio.html
index 21003c38d..cdad4e39d 100644
--- a/pages/mocap-studio.html
+++ b/pages/mocap-studio.html
@@ -134,7 +134,7 @@
/* ── Stage (3D canvas) ──────────────────────────────── */
.stage-wrap {
position: relative;
- background: linear-gradient(160deg, #0f0f12 0%, #070709 100%);
+ background: linear-gradient(160deg, #0f0f0f 0%, #070707 100%);
border-radius: 16px;
border: 1px solid var(--hairline-strong);
overflow: hidden;
diff --git a/pages/overlay-control.html b/pages/overlay-control.html
index 5eabba6a2..9bb8033ee 100644
--- a/pages/overlay-control.html
+++ b/pages/overlay-control.html
@@ -5,14 +5,14 @@
<title>Overlay Control · three.ws</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Stream Deck for your three.ws OBS overlay — emote hotkeys, expression mixer, mic threshold." />
- <meta name="theme-color" content="#0b0d10" />
+ <meta name="theme-color" content="#0d0d0d" />
<link rel="shortcut icon" href="/favicon.ico" />
<link rel="stylesheet" href="/fonts/fonts.css" />
<style>
:root {
color-scheme: dark;
- --bg: #07090c;
- --panel: #11141a;
+ --bg: #090909;
+ --panel: #141414;
--panel-edge: rgba(255, 255, 255, 0.07);
--ink: #e8ecf2;
--ink-dim: rgba(255, 255, 255, 0.6);
@@ -24,7 +24,7 @@
body {
margin: 0;
min-height: 100vh;
- background: radial-gradient(1200px 600px at 30% -10%, #1a1f29, var(--bg));
+ background: radial-gradient(1200px 600px at 30% -10%, #1f1f1f, var(--bg));
color: var(--ink);
font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
display: grid;
@@ -72,7 +72,7 @@
label.row input[type="url"] {
flex: 1;
min-width: 0;
- background: #06080b;
+ background: #080808;
color: var(--ink);
border: 1px solid var(--panel-edge);
border-radius: 8px;
@@ -88,7 +88,7 @@
button.action {
appearance: none;
background: #fff;
- color: #0a0c10;
+ color: #0c0c0c;
border: 0;
border-radius: 8px;
padding: 10px 14px;
@@ -161,7 +161,7 @@
.hotkey.fired {
transform: scale(0.97);
background: var(--accent);
- color: #06080b;
+ color: #080808;
border-color: var(--accent);
}
.hotkey .k {
@@ -198,7 +198,7 @@
}
.snippet {
margin: 0;
- background: #06080b;
+ background: #080808;
border: 1px solid var(--panel-edge);
border-radius: 8px;
padding: 10px 12px;
@@ -231,7 +231,7 @@
.event-log {
font-family: ui-monospace, SFMono-Regular, monospace;
font-size: 11px;
- background: #06080b;
+ background: #080808;
border: 1px solid var(--panel-edge);
border-radius: 8px;
padding: 10px 12px;
diff --git a/pages/playground.html b/pages/playground.html
index 9eaa4338c..39fe4c22b 100644
--- a/pages/playground.html
+++ b/pages/playground.html
@@ -565,7 +565,7 @@
<div class="pg-section-label">Background</div>
<div class="pill-row" id="bg-pills">
<button class="pill active" data-bg="#0f0f0f">Dark</button>
- <button class="pill" data-bg="#1a1a2e">Midnight</button>
+ <button class="pill" data-bg="#1b1b1b">Midnight</button>
<button class="pill" data-bg="#0d1a0d">Forest</button>
<button class="pill" data-bg="#1a0d0d">Ember</button>
</div>
diff --git a/pages/pose.html b/pages/pose.html
index e574c370c..6d2b7ddcc 100644
--- a/pages/pose.html
+++ b/pages/pose.html
@@ -13,7 +13,7 @@
name="description"
content="Free 3D pose-reference studio. Click body parts to pose them, pick from preset poses, add floor props, export PNG."
/>
- <meta name="theme-color" content="#0b0b10" />
+ <meta name="theme-color" content="#0b0b0b" />
<link rel="shortcut icon" href="/favicon.ico" />
<link rel="stylesheet" href="/style.css" />
<link rel="stylesheet" href="/footer.css" />
@@ -411,7 +411,7 @@
#pose-stage {
grid-area: stage;
position: relative;
- background: #0b0b10;
+ background: #0b0b0b;
overflow: hidden;
}
#pose-canvas {
@@ -818,7 +818,7 @@
transition: border-color 0.12s ease, transform 0.12s ease;
}
.pl-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
- .pl-card-thumb { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: #0b0b10; display: block; }
+ .pl-card-thumb { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: #0b0b0b; display: block; }
.pl-card-thumb-empty { display: flex; align-items: center; justify-content: center; font-size: 28px; color: var(--text-3); }
.pl-card-badges { display: flex; gap: 5px; flex-wrap: wrap; padding: 8px 10px 0; }
.pl-badge { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.05em; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-3); }
@@ -948,7 +948,7 @@
<h2>Camera &amp; environment</h2>
<div class="pose-form-row">
<label for="pose-bg">Background</label>
- <input id="pose-bg" type="color" value="#0b0b10" />
+ <input id="pose-bg" type="color" value="#0b0b0b" />
</div>
<div class="pose-form-row">
<label for="pose-fov">FOV</label>
diff --git a/pages/pump-dashboard.html b/pages/pump-dashboard.html
index 59cfbfba7..c3f7533e0 100644
--- a/pages/pump-dashboard.html
+++ b/pages/pump-dashboard.html
@@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Pump Dashboard — three.ws</title>
<meta name="description" content="Real-time Pump.fun dashboard — live feed, watch list, claims, token scanner, quoting, vanity addresses." />
- <meta name="theme-color" content="#06070b" />
+ <meta name="theme-color" content="#070707" />
<link rel="canonical" href="https://three.ws/pump-dashboard" />
<meta property="og:type" content="website" />
diff --git a/pages/pump-visualizer.html b/pages/pump-visualizer.html
index 5ce7f1b19..21466c213 100644
--- a/pages/pump-visualizer.html
+++ b/pages/pump-visualizer.html
@@ -11,7 +11,7 @@
<link rel="stylesheet" href="/mobile.css" />
<style>
:root {
- --vz-bg: #05060a;
+ --vz-bg: #060606;
--vz-panel: rgba(10, 10, 10, 0.88);
--vz-border: rgba(255, 255, 255, 0.10);
--vz-text: #e8e8e8;
diff --git a/pages/start.html b/pages/start.html
index 3d8c82ed2..eff5d67f8 100644
--- a/pages/start.html
+++ b/pages/start.html
@@ -205,7 +205,7 @@
right: 8px;
font-size: 10px;
font-weight: 600;
- background: #18181b;
+ background: #181818;
color: var(--text-2);
padding: 2px 7px;
border-radius: 20px;
@@ -287,7 +287,7 @@
transition: border-color 0.15s;
}
.wz-input:focus,
- .wz-textarea:focus { border-color: #3f3f46; }
+ .wz-textarea:focus { border-color: #404040; }
.wz-textarea { resize: vertical; min-height: 88px; line-height: 1.5; }
/* Personality chips */
@@ -380,8 +380,8 @@
background: var(--surface-2);
}
.wz-skill-card.active {
- border-color: #3f3f46;
- background: #0d0d10;
+ border-color: #404040;
+ background: #0d0d0d;
}
.wz-skill-check {
width: 18px;
@@ -481,7 +481,7 @@
cursor: pointer;
transition: color 0.15s, border-color 0.15s;
}
- .wz-copy-btn:hover { color: var(--text); border-color: #3f3f46; }
+ .wz-copy-btn:hover { color: var(--text); border-color: #404040; }
.wz-code-label {
font-size: 11px;
font-weight: 600;
@@ -551,7 +551,7 @@
overflow: hidden;
transition: border-color 0.15s;
}
- .wz-earn-input-wrap:focus-within { border-color: #3f3f46; }
+ .wz-earn-input-wrap:focus-within { border-color: #404040; }
.wz-earn-prefix {
padding: 10px 10px 10px 12px;
color: var(--text-3);
@@ -590,7 +590,7 @@
overflow: hidden;
transition: border-color 0.15s;
}
- .wz-wallet-input-wrap:focus-within { border-color: #3f3f46; }
+ .wz-wallet-input-wrap:focus-within { border-color: #404040; }
.wz-wallet-input {
flex: 1;
padding: 10px 14px;
@@ -642,7 +642,7 @@
color: var(--text-2);
border: 1px solid var(--border-2);
}
- .wz-btn-ghost:hover:not(:disabled) { color: var(--text); border-color: #3f3f46; }
+ .wz-btn-ghost:hover:not(:disabled) { color: var(--text); border-color: #404040; }
.wz-btn-skip {
background: none;
border: none;
@@ -809,7 +809,7 @@
transition: color 0.15s, border-color 0.15s;
margin: 4px auto 0;
}
- .tpl-blank-btn:hover { color: var(--text-2); border-color: #3f3f46; }
+ .tpl-blank-btn:hover { color: var(--text-2); border-color: #404040; }
.tpl-blank-btn:focus-visible {
outline: 2px solid var(--text-3);
outline-offset: 2px;
@@ -952,7 +952,7 @@
transition: border-color 0.15s, color 0.15s;
text-align: center;
}
- .wz-crypto-reveal-btn:hover { border-color: #3f3f46; color: var(--text-2); }
+ .wz-crypto-reveal-btn:hover { border-color: #404040; color: var(--text-2); }
.wz-crypto-reveal-btn:focus-visible { outline: 2px solid var(--text-3); outline-offset: 2px; }
/* ── Step 5 no-wallet panel ────────────────────────────────── */
diff --git a/pages/three-live.html b/pages/three-live.html
index 6d97b9813..88c512065 100644
--- a/pages/three-live.html
+++ b/pages/three-live.html
@@ -11,7 +11,7 @@
<link rel="stylesheet" href="/mobile.css" />
<style>
:root {
- --pl-bg: #04050a;
+ --pl-bg: #050505;
--pl-panel: rgba(9, 11, 18, 0.82);
--pl-border: rgba(255, 255, 255, 0.10);
--pl-text: #eaecf5;
diff --git a/pages/three-ws-launch-week.html b/pages/three-ws-launch-week.html
index e99e785f4..60b8c0ad3 100644
--- a/pages/three-ws-launch-week.html
+++ b/pages/three-ws-launch-week.html
@@ -10,11 +10,11 @@
<style>
:root {
--bg: #0a0a0b;
- --bg-elevated: #111113;
- --bg-card: #161619;
- --bg-card-hover: #1c1c20;
- --border: #2a2a2f;
- --border-accent: #3d3d44;
+ --bg-elevated: #111111;
+ --bg-card: #161616;
+ --bg-card-hover: #1c1c1c;
+ --border: #2a2a2a;
+ --border-accent: #3e3e3e;
--text: #e8e8ed;
--text-muted: #8a8a96;
--text-dim: #5c5c66;
@@ -398,7 +398,7 @@
/* ───────────── Metrics grid ───────────── */
.metrics-bg {
position: relative;
- background: linear-gradient(180deg, var(--bg) 0%, #0d0d10 50%, var(--bg) 100%);
+ background: linear-gradient(180deg, var(--bg) 0%, #0d0d0d 50%, var(--bg) 100%);
}
.metrics-bg::before {
@@ -1061,7 +1061,7 @@
</defs>
<!-- horizontal grid -->
- <g stroke="#2a2a2f" stroke-width="1">
+ <g stroke="#2a2a2a" stroke-width="1">
<line x1="50" y1="40" x2="690" y2="40" stroke-dasharray="2 4"/>
<line x1="50" y1="100" x2="690" y2="100" stroke-dasharray="2 4"/>
<line x1="50" y1="160" x2="690" y2="160" stroke-dasharray="2 4"/>
@@ -1077,7 +1077,7 @@
</g>
<!-- baseline -->
- <line x1="50" y1="220" x2="690" y2="220" stroke="#3d3d44" stroke-width="1"/>
+ <line x1="50" y1="220" x2="690" y2="220" stroke="#3e3e3e" stroke-width="1"/>
<!--
Bars from screenshot, approx values (in thousands):
@@ -1156,7 +1156,7 @@
</linearGradient>
</defs>
- <g stroke="#2a2a2f" stroke-width="1">
+ <g stroke="#2a2a2a" stroke-width="1">
<line x1="50" y1="40" x2="490" y2="40" stroke-dasharray="2 4"/>
<line x1="50" y1="100" x2="490" y2="100" stroke-dasharray="2 4"/>
<line x1="50" y1="160" x2="490" y2="160" stroke-dasharray="2 4"/>
@@ -1170,7 +1170,7 @@
<text x="42" y="224" text-anchor="end">0</text>
</g>
- <line x1="50" y1="220" x2="490" y2="220" stroke="#3d3d44" stroke-width="1"/>
+ <line x1="50" y1="220" x2="490" y2="220" stroke="#3e3e3e" stroke-width="1"/>
<!--
Follower data approx (peak ~1.2K on May 5):
diff --git a/pages/tutorial.html b/pages/tutorial.html
index 1b29d8be8..e455e17a6 100644
--- a/pages/tutorial.html
+++ b/pages/tutorial.html
@@ -49,7 +49,7 @@
.tutorial-page body {
display: block;
- background: #06070b;
+ background: #070707;
color: rgba(224, 224, 224, 0.88);
}
@@ -71,7 +71,7 @@
/* ── Hero ────────────────────────────────────────────────────── */
.tdoc-hero {
- background: linear-gradient(180deg, #0a0608 0%, #07060b 60%, #06070b 100%);
+ background: linear-gradient(180deg, #0a0608 0%, #070707 60%, #070707 100%);
border-bottom: 1px solid rgba(255, 255, 255, 0.06);
padding: clamp(2.5rem, 7vh, 4.5rem) clamp(1.25rem, 4vw, 2rem) clamp(2rem, 5vh, 3rem);
position: relative;
@@ -370,7 +370,7 @@
.tdoc-article pre {
margin: 1.25rem 0;
padding: 1.1rem 1.25rem;
- background: #0b0c12;
+ background: #0c0c0c;
border: 1px solid rgba(255, 255, 255, 0.07);
border-radius: 8px;
overflow-x: auto;
diff --git a/pages/tutorials.html b/pages/tutorials.html
index f62fa3330..70b19b7a7 100644
--- a/pages/tutorials.html
+++ b/pages/tutorials.html
@@ -52,17 +52,31 @@
flex-direction: column;
}
+ /* The injected .nav owns its own height, padding, blur and border.
+ Neutralise the legacy app-shell `header {}` rule (style.css) so its
+ line-height: var(--header-h) doesn't cascade into the nav links and
+ blow out their height. This wrapper is a pure positioning context. */
.tut-page header {
position: sticky;
top: 0;
z-index: 200;
flex-shrink: 0;
+ display: block;
+ height: auto;
+ padding: 0;
+ line-height: normal;
+ white-space: normal;
+ overflow: visible;
+ background: none;
+ backdrop-filter: none;
+ -webkit-backdrop-filter: none;
+ border-bottom: none;
}
/* ── Hero ────────────────────────────────────────────────────── */
.tut-hero {
- background: linear-gradient(180deg, #0a0608 0%, #07060b 60%, #06070b 100%);
+ background: linear-gradient(180deg, #0a0608 0%, #070707 60%, #070707 100%);
border-bottom: 1px solid rgba(255, 255, 255, 0.06);
padding: clamp(3rem, 8vh, 5.5rem) clamp(1.25rem, 4vw, 2rem) clamp(2rem, 5vh, 3.5rem);
position: relative;
@@ -163,7 +177,7 @@
.tut-content {
flex: 1;
- background: #06070b;
+ background: #070707;
padding: clamp(2.5rem, 6vh, 4rem) clamp(1.25rem, 4vw, 2rem);
}
diff --git a/pages/voice.html b/pages/voice.html
index 924658d14..55f823df8 100644
--- a/pages/voice.html
+++ b/pages/voice.html
@@ -318,7 +318,7 @@
width: 6px;
height: 6px;
border-radius: 50%;
- background: #1e2035;
+ background: #212121;
transition: background 0.2s;
}
.vl-script-dot.active {
@@ -374,7 +374,7 @@
width: 100%;
padding: 10px 12px;
background: #070707;
- border: 1px solid #1e2035;
+ border: 1px solid #212121;
border-radius: 9px;
color: #e8e8e8;
font: inherit;
@@ -570,7 +570,7 @@
width: 100%;
padding: 10px 12px;
background: #070707;
- border: 1px solid #1e2035;
+ border: 1px solid #212121;
border-radius: 9px;
color: #e8e8e8;
font: inherit;
@@ -584,7 +584,7 @@
min-height: 100px;
padding: 12px 14px;
background: #070707;
- border: 1px solid #1e2035;
+ border: 1px solid #212121;
border-radius: 10px;
color: #e8e8e8;
font: inherit;
diff --git a/pages/walk.html b/pages/walk.html
index f5602acd6..e63876b15 100644
--- a/pages/walk.html
+++ b/pages/walk.html
@@ -87,7 +87,7 @@
position: fixed;
inset: 0;
background:
- radial-gradient(80% 60% at 50% 30%, #1a2538 0%, #0a0a0a 70%) #0a0a0a;
+ radial-gradient(80% 60% at 50% 30%, #242424 0%, #0a0a0a 70%) #0a0a0a;
}
#walk-camera-feed {
@@ -438,7 +438,7 @@
gap: 10px;
padding: 10px 14px 10px 12px;
background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.92));
- color: #07111c;
+ color: #101010;
border: 1px solid rgba(255, 255, 255, 0.35);
border-radius: 999px;
font-size: 13px;
@@ -477,7 +477,7 @@
line-height: 1;
background: rgba(7, 17, 28, 0.18);
border-radius: 999px;
- color: #07111c;
+ color: #101010;
font-weight: 700;
}
diff --git a/pages/worlds.html b/pages/worlds.html
index 143a4a52d..68e5fa221 100644
--- a/pages/worlds.html
+++ b/pages/worlds.html
@@ -13,7 +13,7 @@
name="description"
content="Every coin is its own 3D world. Drop in your avatar or 3D agent — no sign-in — and hang out with the community, live and multiplayer, on three.ws."
/>
- <meta name="theme-color" content="#0b0b10" />
+ <meta name="theme-color" content="#0b0b0b" />
<link rel="shortcut icon" href="/favicon.ico" />
<link rel="stylesheet" href="/fonts/fonts.css" />
@@ -32,10 +32,10 @@
<style>
:root {
- --bg: #08080c;
- --bg-2: #0d0d14;
- --panel: #111119;
- --panel-2: #15151f;
+ --bg: #080808;
+ --bg-2: #0e0e0e;
+ --panel: #121212;
+ --panel-2: #161616;
--border: rgba(255, 255, 255, 0.08);
--border-strong: rgba(255, 255, 255, 0.18);
--text: #fafafa;
@@ -237,7 +237,7 @@
.wl-btn-primary {
border: none;
background: linear-gradient(135deg, var(--accent), var(--accent-2));
- color: #061018;
+ color: #0e0e0e;
font-weight: 700;
}
.wl-btn-primary:hover { filter: brightness(1.08); }
@@ -299,7 +299,7 @@
.wl-card-art {
position: relative;
aspect-ratio: 1 / 1;
- background: linear-gradient(135deg, #1a1a26, #0d0d14);
+ background: linear-gradient(135deg, #1b1b1b, #0e0e0e);
display: flex;
align-items: center;
justify-content: center;
diff --git a/pages/xr.html b/pages/xr.html
index 18e8ab8a5..df5256942 100644
--- a/pages/xr.html
+++ b/pages/xr.html
@@ -24,9 +24,9 @@
*, *::before, *::after { box-sizing: border-box; }
:root {
- --bg: #04050a;
+ --bg: #050505;
--surface: rgba(12, 13, 22, 0.82);
- --surface-solid: #0c0d16;
+ --surface-solid: #0d0d0d;
--border: rgba(255,255,255,0.07);
--border-accent: rgba(61,193,255,0.28);
--text: #f0f1f5;
@@ -54,8 +54,8 @@
#xr-stage {
position: fixed; inset: 0;
background:
- radial-gradient(ellipse 100% 80% at 50% 0%, #0d1a2e 0%, transparent 65%),
- radial-gradient(ellipse 60% 40% at 80% 80%, #0a0818 0%, transparent 55%),
+ radial-gradient(ellipse 100% 80% at 50% 0%, #191919 0%, transparent 65%),
+ radial-gradient(ellipse 60% 40% at 80% 80%, #0a0a0a 0%, transparent 55%),
var(--bg);
}
@@ -152,7 +152,7 @@
}
.xr-avatar-icon {
width: 34px; height: 34px;
- background: linear-gradient(135deg, #1a2540, #110e28);
+ background: linear-gradient(135deg, #252525, #111111);
border: 1px solid var(--border-accent);
border-radius: 50%;
display: flex; align-items: center; justify-content: center;
@@ -190,7 +190,7 @@
}
.xr-toggle-btn.active.half {
color: var(--accent);
- background: linear-gradient(135deg, #0e1928 0%, #090d1a 100%);
+ background: linear-gradient(135deg, #181818 0%, #0d0d0d 100%);
box-shadow: 0 0 0 1px var(--border-accent) inset, 0 1px 6px rgba(0,0,0,0.4);
}
diff --git a/public/404.html b/public/404.html
index 77afe831f..b64e41e58 100644
--- a/public/404.html
+++ b/public/404.html
@@ -10,7 +10,7 @@
<style>
:root { color-scheme: dark; }
*, *::before, *::after { box-sizing: border-box; }
- html, body { height: 100%; margin: 0; background: #08090f; color: #ccc; font: 15px/1.5 'Inter', -apple-system, system-ui, sans-serif; overflow: hidden; }
+ html, body { height: 100%; margin: 0; background: #090909; color: #ccc; font: 15px/1.5 'Inter', -apple-system, system-ui, sans-serif; overflow: hidden; }
#avatar-canvas {
position: fixed; inset: 0;
@@ -69,7 +69,7 @@
}
.btn-primary {
background: #fff;
- color: #0a0b0f;
+ color: #0b0b0b;
box-shadow: 0 7px 0 0 #555, 0 9px 24px rgba(0,0,0,0.4);
}
.btn-primary:hover { background: #e8e8e8; }
diff --git a/public/admin/index.html b/public/admin/index.html
index acc44dc3e..2b38365cc 100644
--- a/public/admin/index.html
+++ b/public/admin/index.html
@@ -8,18 +8,18 @@
<style>
:root { color-scheme: dark; --accent: #ffffff; --accent2: #ffffff; }
* { box-sizing: border-box; margin: 0; padding: 0; }
- body { font: 14px/1.5 -apple-system,system-ui,'Segoe UI',sans-serif; background: #080814; color: #ccc; min-height: 100vh; }
+ body { font: 14px/1.5 -apple-system,system-ui,'Segoe UI',sans-serif; background: #090909; color: #ccc; min-height: 100vh; }
a { color: #888888; text-decoration: none; }
a:hover { text-decoration: underline; }
/* Layout */
.layout { display: flex; min-height: 100vh; }
- .sidebar { width: 200px; background: #0d0d1a; border-right: 1px solid #1e1e2e; padding: 20px 0; flex-shrink: 0; }
+ .sidebar { width: 200px; background: #0e0e0e; border-right: 1px solid #1f1f1f; padding: 20px 0; flex-shrink: 0; }
.sidebar-brand { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); padding: 0 20px 20px; display: block; }
.sidebar-badge { display: inline-block; background: rgba(255,70,70,.15); color: #ff6060; font-size: 10px; padding: 1px 6px; border-radius: 4px; margin-left: 6px; }
.nav-item { display: block; padding: 9px 20px; color: #888; cursor: pointer; border-left: 2px solid transparent; font-size: 13px; }
- .nav-item:hover { color: #eee; background: #12121e; }
- .nav-item.active { color: #eee; border-left-color: var(--accent); background: #12121e; }
+ .nav-item:hover { color: #eee; background: #131313; }
+ .nav-item.active { color: #eee; border-left-color: var(--accent); background: #131313; }
.main { flex: 1; padding: 32px; overflow-y: auto; }
/* Header */
@@ -29,27 +29,27 @@
/* Cards */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); gap: 12px; margin-bottom: 28px; }
- .stat-card { background: #0f0f1a; border: 1px solid #1e1e2e; border-radius: 10px; padding: 16px; }
+ .stat-card { background: #101010; border: 1px solid #1f1f1f; border-radius: 10px; padding: 16px; }
.stat-label { font-size: 11px; color: #555; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.stat-value { font-size: 26px; color: #eee; font-weight: 600; }
.stat-sub { font-size: 11px; color: #555; margin-top: 2px; }
/* Section */
- .section { background: #0f0f1a; border: 1px solid #1e1e2e; border-radius: 10px; margin-bottom: 20px; }
- .section-head { padding: 14px 18px; border-bottom: 1px solid #1e1e2e; display: flex; align-items: center; gap: 12px; }
+ .section { background: #101010; border: 1px solid #1f1f1f; border-radius: 10px; margin-bottom: 20px; }
+ .section-head { padding: 14px 18px; border-bottom: 1px solid #1f1f1f; display: flex; align-items: center; gap: 12px; }
.section-title { font-size: 14px; color: #eee; font-weight: 500; }
.section-body { padding: 0; }
/* Table */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
- th { text-align: left; padding: 10px 16px; color: #555; font-weight: 500; border-bottom: 1px solid #1a1a26; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
- td { padding: 10px 16px; border-bottom: 1px solid #111118; color: #aaa; vertical-align: middle; }
+ th { text-align: left; padding: 10px 16px; color: #555; font-weight: 500; border-bottom: 1px solid #1b1b1b; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
+ td { padding: 10px 16px; border-bottom: 1px solid #121212; color: #aaa; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
- tr:hover td { background: #121218; }
+ tr:hover td { background: #121212; }
/* Badges */
.badge { display: inline-block; padding: 2px 8px; border-radius: 5px; font-size: 11px; font-weight: 500; }
- .badge-free { background: #1a1a26; color: #666; }
+ .badge-free { background: #1b1b1b; color: #666; }
.badge-pro { background: rgba(255,255,255,0.09); color: #e8e8e8; }
.badge-team { background: rgba(0,200,150,.12); color: #00c896; }
.badge-enterprise { background: rgba(255,92,168,.12); color: #ffffff; }
@@ -60,7 +60,7 @@
/* Controls */
.controls { display: flex; gap: 10px; align-items: center; }
input[type=text], select {
- padding: 7px 12px; background: #0f0f17; border: 1px solid #2a2a36; border-radius: 7px;
+ padding: 7px 12px; background: #101010; border: 1px solid #2b2b2b; border-radius: 7px;
color: #eee; font-size: 13px; outline: none;
}
input[type=text]:focus, select:focus { border-color: var(--accent); }
@@ -71,7 +71,7 @@
.btn:disabled { opacity: .5; cursor: default; }
/* User detail drawer */
- .drawer { display: none; position: fixed; top: 0; right: 0; width: 420px; height: 100vh; background: #0d0d1a; border-left: 1px solid #1e1e2e; padding: 24px; overflow-y: auto; z-index: 100; box-shadow: -8px 0 32px rgba(0,0,0,.5); }
+ .drawer { display: none; position: fixed; top: 0; right: 0; width: 420px; height: 100vh; background: #0e0e0e; border-left: 1px solid #1f1f1f; padding: 24px; overflow-y: auto; z-index: 100; box-shadow: -8px 0 32px rgba(0,0,0,.5); }
.drawer.open { display: block; }
.drawer-close { position: absolute; top: 16px; right: 16px; background: none; border: none; color: #666; font-size: 18px; cursor: pointer; }
.drawer h2 { font-size: 16px; color: #eee; margin-bottom: 16px; }
@@ -81,7 +81,7 @@
/* Pager */
.pager { display: flex; align-items: center; gap: 12px; padding: 12px 16px; font-size: 13px; color: #555; }
- .pager button { background: #1a1a26; border: 1px solid #2a2a36; color: #aaa; border-radius: 6px; padding: 4px 12px; cursor: pointer; font-size: 12px; }
+ .pager button { background: #1b1b1b; border: 1px solid #2b2b2b; color: #aaa; border-radius: 6px; padding: 4px 12px; cursor: pointer; font-size: 12px; }
.pager button:disabled { opacity: .4; cursor: default; }
/* Loading / empty */
@@ -93,7 +93,7 @@
.chart-wrap { padding: 16px 18px; }
.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 12px; }
.bar-label { width: 80px; color: #666; text-align: right; flex-shrink: 0; }
- .bar-track { flex: 1; background: #1a1a26; border-radius: 4px; height: 8px; }
+ .bar-track { flex: 1; background: #1b1b1b; border-radius: 4px; height: 8px; }
.bar-fill { height: 8px; border-radius: 4px; background: linear-gradient(90deg,var(--accent),var(--accent2)); }
.bar-count { width: 40px; color: #aaa; flex-shrink: 0; }
</style>
diff --git a/public/admin/news.html b/public/admin/news.html
index 7b1e877ce..136603d76 100644
--- a/public/admin/news.html
+++ b/public/admin/news.html
@@ -8,21 +8,21 @@
<style>
:root { color-scheme: dark; --accent: #ffffff; --accent2: #ffffff; --ok: #14f195; --warn: #ffa64d; --err: #ff5c5c; }
* { box-sizing: border-box; margin: 0; padding: 0; }
-body { font: 14px/1.5 -apple-system,system-ui,'Segoe UI',sans-serif; background: #080814; color: #ccc; min-height: 100vh; }
+body { font: 14px/1.5 -apple-system,system-ui,'Segoe UI',sans-serif; background: #090909; color: #ccc; min-height: 100vh; }
a { color: #888888; text-decoration: none; }
a:hover { text-decoration: underline; }
.layout { display: flex; min-height: 100vh; }
-.sidebar { width: 200px; background: #0d0d1a; border-right: 1px solid #1e1e2e; padding: 20px 0; flex-shrink: 0; }
+.sidebar { width: 200px; background: #0e0e0e; border-right: 1px solid #1f1f1f; padding: 20px 0; flex-shrink: 0; }
.sidebar-brand { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); padding: 0 20px 20px; display: block; }
.sidebar-badge { display: inline-block; background: rgba(255,70,70,.15); color: #ff6060; font-size: 10px; padding: 1px 6px; border-radius: 4px; margin-left: 6px; }
.nav-item { display: block; padding: 9px 20px; color: #888; cursor: pointer; border-left: 2px solid transparent; font-size: 13px; }
-.nav-item:hover { color: #eee; background: #12121e; }
-.nav-item.active { color: #eee; border-left-color: var(--accent); background: #12121e; }
+.nav-item:hover { color: #eee; background: #131313; }
+.nav-item.active { color: #eee; border-left-color: var(--accent); background: #131313; }
.main { flex: 1; padding: 28px 32px; overflow-y: auto; }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.page-title { font-size: 20px; color: #eee; font-weight: 600; }
-.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 6px; border: 1px solid #2a2a3e; background: #14141e; color: #ccc; font-size: 13px; cursor: pointer; transition: all .12s; font-family: inherit; }
-.btn:hover { background: #1c1c2a; border-color: #3a3a4e; color: #eee; }
+.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 6px; border: 1px solid #2b2b2b; background: #151515; color: #ccc; font-size: 13px; cursor: pointer; transition: all .12s; font-family: inherit; }
+.btn:hover { background: #1d1d1d; border-color: #3b3b3b; color: #eee; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: #5848e8; border-color: #5848e8; color: #fff; }
.btn-danger { color: #ff8c8c; border-color: rgba(255,92,92,.3); }
@@ -30,15 +30,15 @@ a:hover { text-decoration: underline; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.workspace { display: grid; grid-template-columns: 340px 1fr; gap: 24px; align-items: start; }
@media (max-width: 1000px) { .workspace { grid-template-columns: 1fr; } }
-.panel { background: #0f0f1a; border: 1px solid #1e1e2e; border-radius: 10px; }
-.panel-head { padding: 12px 16px; border-bottom: 1px solid #1e1e2e; display: flex; align-items: center; justify-content: space-between; }
+.panel { background: #101010; border: 1px solid #1f1f1f; border-radius: 10px; }
+.panel-head { padding: 12px 16px; border-bottom: 1px solid #1f1f1f; display: flex; align-items: center; justify-content: space-between; }
.panel-title { font-size: 13px; color: #eee; font-weight: 500; }
.panel-body { padding: 0; }
.list-empty { padding: 24px; color: #666; text-align: center; font-size: 13px; }
-.post-row { padding: 12px 16px; border-bottom: 1px solid #1a1a26; cursor: pointer; transition: background .1s; }
+.post-row { padding: 12px 16px; border-bottom: 1px solid #1b1b1b; cursor: pointer; transition: background .1s; }
.post-row:last-child { border-bottom: none; }
-.post-row:hover { background: #14141e; }
-.post-row.active { background: #1a1530; border-left: 2px solid var(--accent); padding-left: 14px; }
+.post-row:hover { background: #151515; }
+.post-row.active { background: #181818; border-left: 2px solid var(--accent); padding-left: 14px; }
.post-row-title { font-size: 13px; color: #eee; font-weight: 500; margin-bottom: 4px; line-height: 1.35; }
.post-row-meta { font-size: 11px; color: #666; display: flex; gap: 8px; align-items: center; }
.dot { width: 5px; height: 5px; border-radius: 50%; background: var(--ok); display: inline-block; }
@@ -49,7 +49,7 @@ a:hover { text-decoration: underline; }
label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #777; margin-bottom: 6px; font-weight: 500; }
label .hint { text-transform: none; letter-spacing: 0; color: #555; font-weight: 400; margin-left: 6px; }
input[type=text], input[type=number], input[type=datetime-local], textarea, select {
-\twidth: 100%; padding: 8px 10px; background: #0a0a14; border: 1px solid #1e1e2e; border-radius: 6px;
+\twidth: 100%; padding: 8px 10px; background: #0b0b0b; border: 1px solid #1f1f1f; border-radius: 6px;
\tcolor: #eee; font: inherit; font-size: 13px; font-family: inherit;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); }
@@ -58,19 +58,19 @@ textarea { resize: vertical; min-height: 220px; font-family: 'SF Mono', Menlo, m
.toggle input { width: auto; }
.body-area { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 700px) { .body-area { grid-template-columns: 1fr; } }
-.preview { padding: 14px 16px; background: #0a0a14; border: 1px solid #1e1e2e; border-radius: 6px; min-height: 220px;
+.preview { padding: 14px 16px; background: #0b0b0b; border: 1px solid #1f1f1f; border-radius: 6px; min-height: 220px;
\tcolor: #ddd; font-size: 14px; line-height: 1.65; overflow-y: auto; max-height: 600px; }
.preview p { margin: 0 0 12px; }
.preview a { color: #ffffff; border-bottom: 1px solid rgba(255,215,106,.3); }
.preview h2 { font-size: 20px; margin: 24px 0 10px; color: #fff; }
.preview h3 { font-size: 16px; margin: 18px 0 8px; color: #fff; }
.preview ul, .preview ol { padding-left: 20px; margin: 0 0 12px; }
-.preview code { background: #1a1a26; padding: 1px 6px; border-radius: 3px; font-size: .92em; }
-.preview pre { background: #1a1a26; padding: 10px; border-radius: 6px; overflow-x: auto; }
+.preview code { background: #1b1b1b; padding: 1px 6px; border-radius: 3px; font-size: .92em; }
+.preview pre { background: #1b1b1b; padding: 10px; border-radius: 6px; overflow-x: auto; }
.preview blockquote { border-left: 3px solid #ffffff; padding: 6px 14px; background: rgba(255,215,106,.04); color: #aaa; margin: 12px 0; }
.image-controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
-.image-preview { width: 80px; height: 50px; border-radius: 4px; background: #0a0a14; border: 1px solid #1e1e2e; object-fit: cover; }
-.syndication-block { background: #0a0a14; border: 1px solid #1e1e2e; border-radius: 8px; padding: 12px 14px; margin-bottom: 16px; }
+.image-preview { width: 80px; height: 50px; border-radius: 4px; background: #0b0b0b; border: 1px solid #1f1f1f; object-fit: cover; }
+.syndication-block { background: #0b0b0b; border: 1px solid #1f1f1f; border-radius: 8px; padding: 12px 14px; margin-bottom: 16px; }
.synd-rows { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.synd-row { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.synd-target { width: 70px; color: #aaa; font-weight: 500; }
@@ -78,11 +78,11 @@ textarea { resize: vertical; min-height: 220px; font-family: 'SF Mono', Menlo, m
.synd-ok { background: rgba(20,241,149,.14); color: #14f195; }
.synd-skip { background: rgba(255,166,77,.12); color: #ffa64d; }
.synd-err { background: rgba(255,92,92,.14); color: #ff5c5c; }
-.synd-none { background: #1a1a26; color: #666; }
+.synd-none { background: #1b1b1b; color: #666; }
.synd-meta { color: #666; font-size: 11px; }
.synd-meta a { color: #888888; }
.synd-actions { display: flex; gap: 8px; }
-.actions { display: flex; gap: 10px; justify-content: space-between; padding-top: 14px; border-top: 1px solid #1e1e2e; margin-top: 22px; }
+.actions { display: flex; gap: 10px; justify-content: space-between; padding-top: 14px; border-top: 1px solid #1f1f1f; margin-top: 22px; }
.actions-left, .actions-right { display: flex; gap: 8px; }
.toast { position: fixed; bottom: 20px; right: 20px; padding: 10px 14px; border-radius: 8px; font-size: 13px; z-index: 100;
\tanimation: toast-in .2s ease; box-shadow: 0 4px 16px rgba(0,0,0,.4); }
@@ -91,7 +91,7 @@ textarea { resize: vertical; min-height: 220px; font-family: 'SF Mono', Menlo, m
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.empty-state { padding: 60px 20px; text-align: center; color: #666; }
.empty-state h2 { color: #ccc; font-weight: 500; margin-bottom: 8px; }
-.kbd { background: #14141e; border: 1px solid #2a2a3e; padding: 1px 6px; border-radius: 4px; font-size: 11px; font-family: 'SF Mono', Menlo, monospace; color: #aaa; }
+.kbd { background: #151515; border: 1px solid #2b2b2b; padding: 1px 6px; border-radius: 4px; font-size: 11px; font-family: 'SF Mono', Menlo, monospace; color: #aaa; }
</style>
</head>
<body>
diff --git a/public/agent-badge.html b/public/agent-badge.html
index a19987f2e..e3aaf2bf8 100644
--- a/public/agent-badge.html
+++ b/public/agent-badge.html
@@ -15,7 +15,7 @@
background: #fff; min-width: 240px; max-width: 320px;
text-decoration: none; color: inherit;
}
- body[data-theme="dark"] .badge { background: #18181b; border-color: #2a2a2e; }
+ body[data-theme="dark"] .badge { background: #181818; border-color: #2a2a2a; }
.grade { font-size: 1.6rem; font-weight: 700; line-height: 1; min-width: 1.4rem; text-align: center; }
.grade.A { color: #1b5e20; } .grade.B { color: #2e7d32; }
.grade.C { color: #855008; } .grade.D { color: #c62828; }
diff --git a/public/agent-edit/index.html b/public/agent-edit/index.html
index dec0a2ca2..92e810e3d 100644
--- a/public/agent-edit/index.html
+++ b/public/agent-edit/index.html
@@ -10,9 +10,9 @@
color-scheme: dark;
--accent: #ffffff;
--accent2: #ffffff;
- --border: #22222e;
+ --border: #232323;
--bg: #000;
- --panel: #14141c;
+ --panel: #151515;
}
* {
box-sizing: border-box;
@@ -80,7 +80,7 @@
.preview-pane {
border-right: 1px solid var(--border);
position: relative;
- background: #080810;
+ background: #090909;
}
.preview-pane iframe {
width: 100%;
@@ -136,7 +136,7 @@
textarea,
select {
width: 100%;
- background: #0f0f17;
+ background: #101010;
border: 1px solid var(--border);
color: #eee;
padding: 9px 11px;
@@ -214,7 +214,7 @@
}
.catchphrase-row button {
padding: 0 10px;
- background: #1a1a24;
+ background: #1b1b1b;
border: 1px solid var(--border);
color: #888;
border-radius: 8px;
@@ -246,7 +246,7 @@
display: flex;
flex-wrap: wrap;
gap: 6px;
- background: #0f0f17;
+ background: #101010;
border: 1px solid var(--border);
border-radius: 8px;
padding: 7px 9px;
@@ -259,8 +259,8 @@
display: inline-flex;
align-items: center;
gap: 4px;
- background: #20202c;
- border: 1px solid #2c2c3e;
+ background: #212121;
+ border: 1px solid #2d2d2d;
border-radius: 99px;
padding: 2px 8px 2px 10px;
font-size: 12px;
@@ -297,7 +297,7 @@
}
.template-btn {
padding: 7px 13px;
- background: #14141c;
+ background: #151515;
border: 1px solid var(--border);
color: #aaa;
border-radius: 99px;
@@ -335,12 +335,12 @@
filter: none;
}
.btn.sec {
- background: #1e1e2c;
+ background: #1f1f1f;
color: #ccc;
border: 1px solid var(--border);
}
.btn.sec:hover {
- background: #252534;
+ background: #262626;
}
.save-status {
@@ -362,7 +362,7 @@
bottom: 24px;
left: 50%;
transform: translateX(-50%);
- background: #1a1a2e;
+ background: #1b1b1b;
border: 1px solid var(--accent);
color: #eee;
padding: 10px 20px;
@@ -432,7 +432,7 @@
.vp-toggle-btn {
flex: 1;
padding: 7px;
- background: #0f0f17;
+ background: #101010;
border: 1px solid var(--border);
color: #888;
border-radius: 8px;
diff --git a/public/agent/index.html b/public/agent/index.html
index 7b6510b17..b68298dce 100644
--- a/public/agent/index.html
+++ b/public/agent/index.html
@@ -308,7 +308,7 @@
}
.aem-modal {
- background: #0f0f18;
+ background: #101010;
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 12px;
width: min(480px, calc(100vw - 2rem));
diff --git a/public/agents/index.html b/public/agents/index.html
index 613d4d0b1..a6dbe0d7a 100644
--- a/public/agents/index.html
+++ b/public/agents/index.html
@@ -16,7 +16,7 @@
font-family:
-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu',
'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
- background: linear-gradient(135deg, #0f0f23 0%, #1a0f3a 100%);
+ background: linear-gradient(135deg, #101010 0%, #141414 100%);
color: #e0e0e0;
min-height: 100vh;
overflow-x: hidden;
@@ -130,7 +130,7 @@
}
.sort-select option {
- background: #0f0f23;
+ background: #101010;
color: #e0e0e0;
}
diff --git a/public/app-demo.css b/public/app-demo.css
index f9500edd8..4a6ec39a5 100644
--- a/public/app-demo.css
+++ b/public/app-demo.css
@@ -4,13 +4,13 @@
* leak into /app, /create, etc.
*
* Aesthetic sourced from /studio (public/studio/studio.css):
- * - bg #0a0a0f, panels #14141c on #2a2a36, radius 14px
+ * - bg #0a0a0a, panels #151515 on #2b2b2b, radius 14px
* - Inter 14/1.45, sticky 60px header with backdrop blur
* - accent #ffffff, active nav as filled white pill
*/
body.app-demo-body {
- background: #0a0a0f;
+ background: #0a0a0a;
color: #eee;
font-family: 'Inter', system-ui, -apple-system, sans-serif;
font-size: 14px;
@@ -172,8 +172,8 @@ body.app-demo-body .nav-user::before {
}
body.app-demo-body .nav-user-menu {
- background: #14141c;
- border: 1px solid #2a2a36;
+ background: #151515;
+ border: 1px solid #2b2b2b;
border-radius: 12px;
box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
padding: 0.35rem;
@@ -206,13 +206,13 @@ body.app-demo-body .wrap {
body.app-demo-body .viewer-container {
border-radius: 14px;
overflow: hidden;
- border: 1px solid #2a2a36;
+ border: 1px solid #2b2b2b;
background:
- linear-gradient(45deg, #14141c 25%, transparent 25%) -8px 0,
- linear-gradient(-45deg, #14141c 25%, transparent 25%) -8px 0,
- linear-gradient(45deg, transparent 75%, #14141c 75%),
- linear-gradient(-45deg, transparent 75%, #14141c 75%),
- #0f0f15;
+ linear-gradient(45deg, #151515 25%, transparent 25%) -8px 0,
+ linear-gradient(-45deg, #151515 25%, transparent 25%) -8px 0,
+ linear-gradient(45deg, transparent 75%, #151515 75%),
+ linear-gradient(-45deg, transparent 75%, #151515 75%),
+ #0f0f0f;
background-size: 16px 16px;
}
@@ -229,8 +229,8 @@ body.app-demo-body .dropzone {
align-items: center;
gap: 0.85rem;
padding: 0.65rem 0.85rem;
- background: #14141c;
- border: 1px solid #2a2a36;
+ background: #151515;
+ border: 1px solid #2b2b2b;
border-radius: 14px;
box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
backdrop-filter: blur(8px);
@@ -309,8 +309,8 @@ body.app-demo-body .create-avatar-btn svg {
/* ---------- Auth gate aside — re-skin as a studio panel ---------- */
body.app-demo-body .auth-gate {
- background: #14141c;
- border: 1px solid #2a2a36;
+ background: #151515;
+ border: 1px solid #2b2b2b;
border-radius: 14px;
box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
padding: 1.25rem 1.4rem 1.4rem;
@@ -385,8 +385,8 @@ body.app-demo-body .auth-gate__perks li::before {
/* ---------- Agent presence sidebar — soften into studio aesthetic ---------- */
body.app-demo-body .agent-presence-sidebar {
- background: #14141c;
- border: 1px solid #2a2a36;
+ background: #151515;
+ border: 1px solid #2b2b2b;
border-radius: 14px;
box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
overflow: hidden;
@@ -395,8 +395,8 @@ body.app-demo-body .agent-presence-sidebar {
/* ---------- Onboarding banner ---------- */
body.app-demo-body .agent-onboarding {
- background: #14141c;
- border: 1px solid #2a2a36;
+ background: #151515;
+ border: 1px solid #2b2b2b;
border-radius: 14px;
box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
}
diff --git a/public/app-next.css b/public/app-next.css
index d345ff395..4f5f786ad 100644
--- a/public/app-next.css
+++ b/public/app-next.css
@@ -555,7 +555,7 @@ body.app-next-body {
inset: 0;
z-index: 1;
pointer-events: none;
- background: radial-gradient(circle at 50% 28%, #2b2b33 0%, #111116 72%);
+ background: radial-gradient(circle at 50% 28%, #2c2c2c 0%, #111111 72%);
transition: background 0.45s ease;
}
diff --git a/public/arbitrage.html b/public/arbitrage.html
index 30ad061bd..39791cf1a 100644
--- a/public/arbitrage.html
+++ b/public/arbitrage.html
@@ -5,19 +5,19 @@
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>x402 Arbitrage — same capability, different price</title>
<meta name="description" content="Cross-provider price disparities surfaced live from the merged x402 facilitator catalog. Find the cheapest endpoint for any capability." />
-<meta name="theme-color" content="#0a0b10" />
+<meta name="theme-color" content="#0b0b0b" />
<meta property="og:title" content="x402 Arbitrage — same capability, different price" />
<meta property="og:description" content="Live cross-provider price disparities from the merged x402 catalog." />
<meta property="og:type" content="website" />
<link rel="stylesheet" href="/nav.css" />
<style>
:root {
- --bg: #0a0b10;
- --bg-2: #0f1119;
- --panel: #14161f;
- --panel-2: #1a1d29;
- --border: #232636;
- --border-strong: #2e3447;
+ --bg: #0b0b0b;
+ --bg-2: #111111;
+ --panel: #161616;
+ --panel-2: #1d1d1d;
+ --border: #272727;
+ --border-strong: #343434;
--text: #f0f2f8;
--muted: #8a90a8;
--muted-2: #6b7088;
diff --git a/public/artifact-viewer.bundle.js b/public/artifact-viewer.bundle.js
index 787135a90..0c2ea3844 100644
--- a/public/artifact-viewer.bundle.js
+++ b/public/artifact-viewer.bundle.js
@@ -3819,4 +3819,4 @@ void main() {
}
-}`,yc=class{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t,n){if(this.texture===null){let i=new _t,r=e.properties.get(i);r.__webglTexture=t.texture,(t.depthNear!==n.depthNear||t.depthFar!==n.depthFar)&&(this.depthNear=t.depthNear,this.depthFar=t.depthFar),this.texture=i}}getMesh(e){if(this.texture!==null&&this.mesh===null){let t=e.cameras[0].viewport,n=new cn({vertexShader:$g,fragmentShader:jg,uniforms:{depthColor:{value:this.texture},depthWidth:{value:t.z},depthHeight:{value:t.w}}});this.mesh=new Mt(new Vs(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}},vc=class extends pn{constructor(e,t){super();let n=this,i=null,r=1,o=null,a="local-floor",c=1,l=null,h=null,u=null,d=null,p=null,g=null,_=new yc,m=t.getContextAttributes(),f=null,E=null,T=[],M=[],L=new ze,R=null,w=new dt;w.viewport=new qe;let N=new dt;N.viewport=new qe;let S=[w,N],v=new jr,C=null,q=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(X){let ee=T[X];return ee===void 0&&(ee=new Yi,T[X]=ee),ee.getTargetRaySpace()},this.getControllerGrip=function(X){let ee=T[X];return ee===void 0&&(ee=new Yi,T[X]=ee),ee.getGripSpace()},this.getHand=function(X){let ee=T[X];return ee===void 0&&(ee=new Yi,T[X]=ee),ee.getHandSpace()};function z(X){let ee=M.indexOf(X.inputSource);if(ee===-1)return;let pe=T[ee];pe!==void 0&&(pe.update(X.inputSource,X.frame,l||o),pe.dispatchEvent({type:X.type,data:X.inputSource}))}function W(){i.removeEventListener("select",z),i.removeEventListener("selectstart",z),i.removeEventListener("selectend",z),i.removeEventListener("squeeze",z),i.removeEventListener("squeezestart",z),i.removeEventListener("squeezeend",z),i.removeEventListener("end",W),i.removeEventListener("inputsourceschange",J);for(let X=0;X<T.length;X++){let ee=M[X];ee!==null&&(M[X]=null,T[X].disconnect(ee))}C=null,q=null,_.reset(),e.setRenderTarget(f),p=null,d=null,u=null,i=null,E=null,et.stop(),n.isPresenting=!1,e.setPixelRatio(R),e.setSize(L.width,L.height,!1),n.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(X){r=X,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(X){a=X,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return l||o},this.setReferenceSpace=function(X){l=X},this.getBaseLayer=function(){return d!==null?d:p},this.getBinding=function(){return u},this.getFrame=function(){return g},this.getSession=function(){return i},this.setSession=async function(X){if(i=X,i!==null){if(f=e.getRenderTarget(),i.addEventListener("select",z),i.addEventListener("selectstart",z),i.addEventListener("selectend",z),i.addEventListener("squeeze",z),i.addEventListener("squeezestart",z),i.addEventListener("squeezeend",z),i.addEventListener("end",W),i.addEventListener("inputsourceschange",J),m.xrCompatible!==!0&&await t.makeXRCompatible(),R=e.getPixelRatio(),e.getSize(L),typeof XRWebGLBinding<"u"&&"createProjectionLayer"in XRWebGLBinding.prototype){let pe=null,se=null,Me=null;m.depth&&(Me=m.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,pe=m.stencil?rs:Gi,se=m.stencil?ss:Jn);let Ye={colorFormat:t.RGBA8,depthFormat:Me,scaleFactor:r};u=new XRWebGLBinding(i,t),d=u.createProjectionLayer(Ye),i.updateRenderState({layers:[d]}),e.setPixelRatio(1),e.setSize(d.textureWidth,d.textureHeight,!1),E=new mn(d.textureWidth,d.textureHeight,{format:Ht,type:hn,depthTexture:new ks(d.textureWidth,d.textureHeight,se,void 0,void 0,void 0,void 0,void 0,void 0,pe),stencilBuffer:m.stencil,colorSpace:e.outputColorSpace,samples:m.antialias?4:0,resolveDepthBuffer:d.ignoreDepthValues===!1,resolveStencilBuffer:d.ignoreDepthValues===!1})}else{let pe={antialias:m.antialias,alpha:!0,depth:m.depth,stencil:m.stencil,framebufferScaleFactor:r};p=new XRWebGLLayer(i,t,pe),i.updateRenderState({baseLayer:p}),e.setPixelRatio(1),e.setSize(p.framebufferWidth,p.framebufferHeight,!1),E=new mn(p.framebufferWidth,p.framebufferHeight,{format:Ht,type:hn,colorSpace:e.outputColorSpace,stencilBuffer:m.stencil,resolveDepthBuffer:p.ignoreDepthValues===!1,resolveStencilBuffer:p.ignoreDepthValues===!1})}E.isXRRenderTarget=!0,this.setFoveation(c),l=null,o=await i.requestReferenceSpace(a),et.setContext(i),et.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(i!==null)return i.environmentBlendMode},this.getDepthTexture=function(){return _.getDepthTexture()};function J(X){for(let ee=0;ee<X.removed.length;ee++){let pe=X.removed[ee],se=M.indexOf(pe);se>=0&&(M[se]=null,T[se].disconnect(pe))}for(let ee=0;ee<X.added.length;ee++){let pe=X.added[ee],se=M.indexOf(pe);if(se===-1){for(let Ye=0;Ye<T.length;Ye++)if(Ye>=M.length){M.push(pe),se=Ye;break}else if(M[Ye]===null){M[Ye]=pe,se=Ye;break}if(se===-1)break}let Me=T[se];Me&&Me.connect(pe)}}let G=new P,Q=new P;function V(X,ee,pe){G.setFromMatrixPosition(ee.matrixWorld),Q.setFromMatrixPosition(pe.matrixWorld);let se=G.distanceTo(Q),Me=ee.projectionMatrix.elements,Ye=pe.projectionMatrix.elements,Ae=Me[14]/(Me[10]-1),ct=Me[14]/(Me[10]+1),st=(Me[9]+1)/Me[5],ke=(Me[9]-1)/Me[5],A=(Me[8]-1)/Me[0],Gt=(Ye[8]+1)/Ye[0],Ge=Ae*A,Ve=Ae*Gt,xe=se/(-A+Gt),nt=xe*-A;if(ee.matrixWorld.decompose(X.position,X.quaternion,X.scale),X.translateX(nt),X.translateZ(xe),X.matrixWorld.compose(X.position,X.quaternion,X.scale),X.matrixWorldInverse.copy(X.matrixWorld).invert(),Me[10]===-1)X.projectionMatrix.copy(ee.projectionMatrix),X.projectionMatrixInverse.copy(ee.projectionMatrixInverse);else{let ge=Ae+xe,b=ct+xe,x=Ge-nt,F=Ve+(se-nt),Y=st*ct/b*ge,K=ke*ct/b*ge;X.projectionMatrix.makePerspective(x,F,Y,K,ge,b),X.projectionMatrixInverse.copy(X.projectionMatrix).invert()}}function ie(X,ee){ee===null?X.matrixWorld.copy(X.matrix):X.matrixWorld.multiplyMatrices(ee.matrixWorld,X.matrix),X.matrixWorldInverse.copy(X.matrixWorld).invert()}this.updateCamera=function(X){if(i===null)return;let ee=X.near,pe=X.far;_.texture!==null&&(_.depthNear>0&&(ee=_.depthNear),_.depthFar>0&&(pe=_.depthFar)),v.near=N.near=w.near=ee,v.far=N.far=w.far=pe,(C!==v.near||q!==v.far)&&(i.updateRenderState({depthNear:v.near,depthFar:v.far}),C=v.near,q=v.far),w.layers.mask=X.layers.mask|2,N.layers.mask=X.layers.mask|4,v.layers.mask=w.layers.mask|N.layers.mask;let se=X.parent,Me=v.cameras;ie(v,se);for(let Ye=0;Ye<Me.length;Ye++)ie(Me[Ye],se);Me.length===2?V(v,w,N):v.projectionMatrix.copy(w.projectionMatrix),he(X,v,se)};function he(X,ee,pe){pe===null?X.matrix.copy(ee.matrixWorld):(X.matrix.copy(pe.matrixWorld),X.matrix.invert(),X.matrix.multiply(ee.matrixWorld)),X.matrix.decompose(X.position,X.quaternion,X.scale),X.updateMatrixWorld(!0),X.projectionMatrix.copy(ee.projectionMatrix),X.projectionMatrixInverse.copy(ee.projectionMatrixInverse),X.isPerspectiveCamera&&(X.fov=ui*2*Math.atan(1/X.projectionMatrix.elements[5]),X.zoom=1)}this.getCamera=function(){return v},this.getFoveation=function(){if(!(d===null&&p===null))return c},this.setFoveation=function(X){c=X,d!==null&&(d.fixedFoveation=X),p!==null&&p.fixedFoveation!==void 0&&(p.fixedFoveation=X)},this.hasDepthSensing=function(){return _.texture!==null},this.getDepthSensingMesh=function(){return _.getMesh(v)};let _e=null;function Ne(X,ee){if(h=ee.getViewerPose(l||o),g=ee,h!==null){let pe=h.views;p!==null&&(e.setRenderTargetFramebuffer(E,p.framebuffer),e.setRenderTarget(E));let se=!1;pe.length!==v.cameras.length&&(v.cameras.length=0,se=!0);for(let Ae=0;Ae<pe.length;Ae++){let ct=pe[Ae],st=null;if(p!==null)st=p.getViewport(ct);else{let A=u.getViewSubImage(d,ct);st=A.viewport,Ae===0&&(e.setRenderTargetTextures(E,A.colorTexture,A.depthStencilTexture),e.setRenderTarget(E))}let ke=S[Ae];ke===void 0&&(ke=new dt,ke.layers.enable(Ae),ke.viewport=new qe,S[Ae]=ke),ke.matrix.fromArray(ct.transform.matrix),ke.matrix.decompose(ke.position,ke.quaternion,ke.scale),ke.projectionMatrix.fromArray(ct.projectionMatrix),ke.projectionMatrixInverse.copy(ke.projectionMatrix).invert(),ke.viewport.set(st.x,st.y,st.width,st.height),Ae===0&&(v.matrix.copy(ke.matrix),v.matrix.decompose(v.position,v.quaternion,v.scale)),se===!0&&v.cameras.push(ke)}let Me=i.enabledFeatures;if(Me&&Me.includes("depth-sensing")&&i.depthUsage=="gpu-optimized"&&u){let Ae=u.getDepthInformation(pe[0]);Ae&&Ae.isValid&&Ae.texture&&_.init(e,Ae,i.renderState)}}for(let pe=0;pe<T.length;pe++){let se=M[pe],Me=T[pe];se!==null&&Me!==void 0&&Me.update(se,ee,l||o)}_e&&_e(X,ee),ee.detectedPlanes&&n.dispatchEvent({type:"planesdetected",data:ee}),g=null}let et=new hu;et.setAnimationLoop(Ne),this.setAnimationLoop=function(X){_e=X},this.dispose=function(){}}},bi=new on,Qg=new Ie;function e_(s,e){function t(m,f){m.matrixAutoUpdate===!0&&m.updateMatrix(),f.value.copy(m.matrix)}function n(m,f){f.color.getRGB(m.fogColor.value,ic(s)),f.isFog?(m.fogNear.value=f.near,m.fogFar.value=f.far):f.isFogExp2&&(m.fogDensity.value=f.density)}function i(m,f,E,T,M){f.isMeshBasicMaterial||f.isMeshLambertMaterial?r(m,f):f.isMeshToonMaterial?(r(m,f),u(m,f)):f.isMeshPhongMaterial?(r(m,f),h(m,f)):f.isMeshStandardMaterial?(r(m,f),d(m,f),f.isMeshPhysicalMaterial&&p(m,f,M)):f.isMeshMatcapMaterial?(r(m,f),g(m,f)):f.isMeshDepthMaterial?r(m,f):f.isMeshDistanceMaterial?(r(m,f),_(m,f)):f.isMeshNormalMaterial?r(m,f):f.isLineBasicMaterial?(o(m,f),f.isLineDashedMaterial&&a(m,f)):f.isPointsMaterial?c(m,f,E,T):f.isSpriteMaterial?l(m,f):f.isShadowMaterial?(m.color.value.copy(f.color),m.opacity.value=f.opacity):f.isShaderMaterial&&(f.uniformsNeedUpdate=!1)}function r(m,f){m.opacity.value=f.opacity,f.color&&m.diffuse.value.copy(f.color),f.emissive&&m.emissive.value.copy(f.emissive).multiplyScalar(f.emissiveIntensity),f.map&&(m.map.value=f.map,t(f.map,m.mapTransform)),f.alphaMap&&(m.alphaMap.value=f.alphaMap,t(f.alphaMap,m.alphaMapTransform)),f.bumpMap&&(m.bumpMap.value=f.bumpMap,t(f.bumpMap,m.bumpMapTransform),m.bumpScale.value=f.bumpScale,f.side===Pt&&(m.bumpScale.value*=-1)),f.normalMap&&(m.normalMap.value=f.normalMap,t(f.normalMap,m.normalMapTransform),m.normalScale.value.copy(f.normalScale),f.side===Pt&&m.normalScale.value.negate()),f.displacementMap&&(m.displacementMap.value=f.displacementMap,t(f.displacementMap,m.displacementMapTransform),m.displacementScale.value=f.displacementScale,m.displacementBias.value=f.displacementBias),f.emissiveMap&&(m.emissiveMap.value=f.emissiveMap,t(f.emissiveMap,m.emissiveMapTransform)),f.specularMap&&(m.specularMap.value=f.specularMap,t(f.specularMap,m.specularMapTransform)),f.alphaTest>0&&(m.alphaTest.value=f.alphaTest);let E=e.get(f),T=E.envMap,M=E.envMapRotation;T&&(m.envMap.value=T,bi.copy(M),bi.x*=-1,bi.y*=-1,bi.z*=-1,T.isCubeTexture&&T.isRenderTargetTexture===!1&&(bi.y*=-1,bi.z*=-1),m.envMapRotation.value.setFromMatrix4(Qg.makeRotationFromEuler(bi)),m.flipEnvMap.value=T.isCubeTexture&&T.isRenderTargetTexture===!1?-1:1,m.reflectivity.value=f.reflectivity,m.ior.value=f.ior,m.refractionRatio.value=f.refractionRatio),f.lightMap&&(m.lightMap.value=f.lightMap,m.lightMapIntensity.value=f.lightMapIntensity,t(f.lightMap,m.lightMapTransform)),f.aoMap&&(m.aoMap.value=f.aoMap,m.aoMapIntensity.value=f.aoMapIntensity,t(f.aoMap,m.aoMapTransform))}function o(m,f){m.diffuse.value.copy(f.color),m.opacity.value=f.opacity,f.map&&(m.map.value=f.map,t(f.map,m.mapTransform))}function a(m,f){m.dashSize.value=f.dashSize,m.totalSize.value=f.dashSize+f.gapSize,m.scale.value=f.scale}function c(m,f,E,T){m.diffuse.value.copy(f.color),m.opacity.value=f.opacity,m.size.value=f.size*E,m.scale.value=T*.5,f.map&&(m.map.value=f.map,t(f.map,m.uvTransform)),f.alphaMap&&(m.alphaMap.value=f.alphaMap,t(f.alphaMap,m.alphaMapTransform)),f.alphaTest>0&&(m.alphaTest.value=f.alphaTest)}function l(m,f){m.diffuse.value.copy(f.color),m.opacity.value=f.opacity,m.rotation.value=f.rotation,f.map&&(m.map.value=f.map,t(f.map,m.mapTransform)),f.alphaMap&&(m.alphaMap.value=f.alphaMap,t(f.alphaMap,m.alphaMapTransform)),f.alphaTest>0&&(m.alphaTest.value=f.alphaTest)}function h(m,f){m.specular.value.copy(f.specular),m.shininess.value=Math.max(f.shininess,1e-4)}function u(m,f){f.gradientMap&&(m.gradientMap.value=f.gradientMap)}function d(m,f){m.metalness.value=f.metalness,f.metalnessMap&&(m.metalnessMap.value=f.metalnessMap,t(f.metalnessMap,m.metalnessMapTransform)),m.roughness.value=f.roughness,f.roughnessMap&&(m.roughnessMap.value=f.roughnessMap,t(f.roughnessMap,m.roughnessMapTransform)),f.envMap&&(m.envMapIntensity.value=f.envMapIntensity)}function p(m,f,E){m.ior.value=f.ior,f.sheen>0&&(m.sheenColor.value.copy(f.sheenColor).multiplyScalar(f.sheen),m.sheenRoughness.value=f.sheenRoughness,f.sheenColorMap&&(m.sheenColorMap.value=f.sheenColorMap,t(f.sheenColorMap,m.sheenColorMapTransform)),f.sheenRoughnessMap&&(m.sheenRoughnessMap.value=f.sheenRoughnessMap,t(f.sheenRoughnessMap,m.sheenRoughnessMapTransform))),f.clearcoat>0&&(m.clearcoat.value=f.clearcoat,m.clearcoatRoughness.value=f.clearcoatRoughness,f.clearcoatMap&&(m.clearcoatMap.value=f.clearcoatMap,t(f.clearcoatMap,m.clearcoatMapTransform)),f.clearcoatRoughnessMap&&(m.clearcoatRoughnessMap.value=f.clearcoatRoughnessMap,t(f.clearcoatRoughnessMap,m.clearcoatRoughnessMapTransform)),f.clearcoatNormalMap&&(m.clearcoatNormalMap.value=f.clearcoatNormalMap,t(f.clearcoatNormalMap,m.clearcoatNormalMapTransform),m.clearcoatNormalScale.value.copy(f.clearcoatNormalScale),f.side===Pt&&m.clearcoatNormalScale.value.negate())),f.dispersion>0&&(m.dispersion.value=f.dispersion),f.iridescence>0&&(m.iridescence.value=f.iridescence,m.iridescenceIOR.value=f.iridescenceIOR,m.iridescenceThicknessMinimum.value=f.iridescenceThicknessRange[0],m.iridescenceThicknessMaximum.value=f.iridescenceThicknessRange[1],f.iridescenceMap&&(m.iridescenceMap.value=f.iridescenceMap,t(f.iridescenceMap,m.iridescenceMapTransform)),f.iridescenceThicknessMap&&(m.iridescenceThicknessMap.value=f.iridescenceThicknessMap,t(f.iridescenceThicknessMap,m.iridescenceThicknessMapTransform))),f.transmission>0&&(m.transmission.value=f.transmission,m.transmissionSamplerMap.value=E.texture,m.transmissionSamplerSize.value.set(E.width,E.height),f.transmissionMap&&(m.transmissionMap.value=f.transmissionMap,t(f.transmissionMap,m.transmissionMapTransform)),m.thickness.value=f.thickness,f.thicknessMap&&(m.thicknessMap.value=f.thicknessMap,t(f.thicknessMap,m.thicknessMapTransform)),m.attenuationDistance.value=f.attenuationDistance,m.attenuationColor.value.copy(f.attenuationColor)),f.anisotropy>0&&(m.anisotropyVector.value.set(f.anisotropy*Math.cos(f.anisotropyRotation),f.anisotropy*Math.sin(f.anisotropyRotation)),f.anisotropyMap&&(m.anisotropyMap.value=f.anisotropyMap,t(f.anisotropyMap,m.anisotropyMapTransform))),m.specularIntensity.value=f.specularIntensity,m.specularColor.value.copy(f.specularColor),f.specularColorMap&&(m.specularColorMap.value=f.specularColorMap,t(f.specularColorMap,m.specularColorMapTransform)),f.specularIntensityMap&&(m.specularIntensityMap.value=f.specularIntensityMap,t(f.specularIntensityMap,m.specularIntensityMapTransform))}function g(m,f){f.matcap&&(m.matcap.value=f.matcap)}function _(m,f){let E=e.get(f).light;m.referencePosition.value.setFromMatrixPosition(E.matrixWorld),m.nearDistance.value=E.shadow.camera.near,m.farDistance.value=E.shadow.camera.far}return{refreshFogUniforms:n,refreshMaterialUniforms:i}}function t_(s,e,t,n){let i={},r={},o=[],a=s.getParameter(s.MAX_UNIFORM_BUFFER_BINDINGS);function c(E,T){let M=T.program;n.uniformBlockBinding(E,M)}function l(E,T){let M=i[E.id];M===void 0&&(g(E),M=h(E),i[E.id]=M,E.addEventListener("dispose",m));let L=T.program;n.updateUBOMapping(E,L);let R=e.render.frame;r[E.id]!==R&&(d(E),r[E.id]=R)}function h(E){let T=u();E.__bindingPointIndex=T;let M=s.createBuffer(),L=E.__size,R=E.usage;return s.bindBuffer(s.UNIFORM_BUFFER,M),s.bufferData(s.UNIFORM_BUFFER,L,R),s.bindBuffer(s.UNIFORM_BUFFER,null),s.bindBufferBase(s.UNIFORM_BUFFER,T,M),M}function u(){for(let E=0;E<a;E++)if(o.indexOf(E)===-1)return o.push(E),E;return console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}function d(E){let T=i[E.id],M=E.uniforms,L=E.__cache;s.bindBuffer(s.UNIFORM_BUFFER,T);for(let R=0,w=M.length;R<w;R++){let N=Array.isArray(M[R])?M[R]:[M[R]];for(let S=0,v=N.length;S<v;S++){let C=N[S];if(p(C,R,S,L)===!0){let q=C.__offset,z=Array.isArray(C.value)?C.value:[C.value],W=0;for(let J=0;J<z.length;J++){let G=z[J],Q=_(G);typeof G=="number"||typeof G=="boolean"?(C.__data[0]=G,s.bufferSubData(s.UNIFORM_BUFFER,q+W,C.__data)):G.isMatrix3?(C.__data[0]=G.elements[0],C.__data[1]=G.elements[1],C.__data[2]=G.elements[2],C.__data[3]=0,C.__data[4]=G.elements[3],C.__data[5]=G.elements[4],C.__data[6]=G.elements[5],C.__data[7]=0,C.__data[8]=G.elements[6],C.__data[9]=G.elements[7],C.__data[10]=G.elements[8],C.__data[11]=0):(G.toArray(C.__data,W),W+=Q.storage/Float32Array.BYTES_PER_ELEMENT)}s.bufferSubData(s.UNIFORM_BUFFER,q,C.__data)}}}s.bindBuffer(s.UNIFORM_BUFFER,null)}function p(E,T,M,L){let R=E.value,w=T+"_"+M;if(L[w]===void 0)return typeof R=="number"||typeof R=="boolean"?L[w]=R:L[w]=R.clone(),!0;{let N=L[w];if(typeof R=="number"||typeof R=="boolean"){if(N!==R)return L[w]=R,!0}else if(N.equals(R)===!1)return N.copy(R),!0}return!1}function g(E){let T=E.uniforms,M=0,L=16;for(let w=0,N=T.length;w<N;w++){let S=Array.isArray(T[w])?T[w]:[T[w]];for(let v=0,C=S.length;v<C;v++){let q=S[v],z=Array.isArray(q.value)?q.value:[q.value];for(let W=0,J=z.length;W<J;W++){let G=z[W],Q=_(G),V=M%L,ie=V%Q.boundary,he=V+ie;M+=ie,he!==0&&L-he<Q.storage&&(M+=L-he),q.__data=new Float32Array(Q.storage/Float32Array.BYTES_PER_ELEMENT),q.__offset=M,M+=Q.storage}}}let R=M%L;return R>0&&(M+=L-R),E.__size=M,E.__cache={},this}function _(E){let T={boundary:0,storage:0};return typeof E=="number"||typeof E=="boolean"?(T.boundary=4,T.storage=4):E.isVector2?(T.boundary=8,T.storage=8):E.isVector3||E.isColor?(T.boundary=16,T.storage=12):E.isVector4?(T.boundary=16,T.storage=16):E.isMatrix3?(T.boundary=48,T.storage=48):E.isMatrix4?(T.boundary=64,T.storage=64):E.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",E),T}function m(E){let T=E.target;T.removeEventListener("dispose",m);let M=o.indexOf(T.__bindingPointIndex);o.splice(M,1),s.deleteBuffer(i[T.id]),delete i[T.id],delete r[T.id]}function f(){for(let E in i)s.deleteBuffer(i[E]);o=[],i={},r={}}return{bind:c,update:l,dispose:f}}var $o=class{constructor(e={}){let{canvas:t=Dh(),context:n=null,depth:i=!0,stencil:r=!1,alpha:o=!1,antialias:a=!1,premultipliedAlpha:c=!0,preserveDrawingBuffer:l=!1,powerPreference:h="default",failIfMajorPerformanceCaveat:u=!1,reverseDepthBuffer:d=!1}=e;this.isWebGLRenderer=!0;let p;if(n!==null){if(typeof WebGLRenderingContext<"u"&&n instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");p=n.getContextAttributes().alpha}else p=o;let g=new Uint32Array(4),_=new Int32Array(4),m=null,f=null,E=[],T=[];this.domElement=t,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.toneMapping=Fn,this.toneMappingExposure=1,this.transmissionResolutionScale=1;let M=this,L=!1;this._outputColorSpace=lt;let R=0,w=0,N=null,S=-1,v=null,C=new qe,q=new qe,z=null,W=new be(0),J=0,G=t.width,Q=t.height,V=1,ie=null,he=null,_e=new qe(0,0,G,Q),Ne=new qe(0,0,G,Q),et=!1,X=new $i,ee=!1,pe=!1,se=new Ie,Me=new Ie,Ye=new P,Ae=new qe,ct={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0},st=!1;function ke(){return N===null?V:1}let A=n;function Gt(y,D){return t.getContext(y,D)}try{let y={alpha:!0,depth:i,stencil:r,antialias:a,premultipliedAlpha:c,preserveDrawingBuffer:l,powerPreference:h,failIfMajorPerformanceCaveat:u};if("setAttribute"in t&&t.setAttribute("data-engine",`three.js r${"176"}`),t.addEventListener("webglcontextlost",Z,!1),t.addEventListener("webglcontextrestored",ce,!1),t.addEventListener("webglcontextcreationerror",ae,!1),A===null){let D="webgl2";if(A=Gt(D,y),A===null)throw Gt(D)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(y){throw console.error("THREE.WebGLRenderer: "+y.message),y}let Ge,Ve,xe,nt,ge,b,x,F,Y,K,H,me,re,Se,Te,$,ue,Ee,Re,de,He,De,tt,I;function oe(){Ge=new ym(A),Ge.init(),De=new Jg(A,Ge),Ve=new dm(A,Ge,e,De),xe=new Zg(A,Ge),Ve.reverseDepthBuffer&&d&&xe.buffers.depth.setReversed(!0),nt=new Sm(A),ge=new Ng,b=new Kg(A,Ge,xe,ge,Ve,De,nt),x=new pm(M),F=new xm(M),Y=new wd(A),tt=new hm(A,Y),K=new vm(A,Y,nt,tt),H=new Tm(A,K,Y,nt),Re=new bm(A,Ve,b),$=new fm(ge),me=new Ug(M,x,F,Ge,Ve,tt,$),re=new e_(M,ge),Se=new Og,Te=new Gg(Ge),Ee=new lm(M,x,F,xe,H,p,c),ue=new qg(M,H,Ve),I=new t_(A,nt,Ve,xe),de=new um(A,Ge,nt),He=new Mm(A,Ge,nt),nt.programs=me.programs,M.capabilities=Ve,M.extensions=Ge,M.properties=ge,M.renderLists=Se,M.shadowMap=ue,M.state=xe,M.info=nt}oe();let k=new vc(M,A);this.xr=k,this.getContext=function(){return A},this.getContextAttributes=function(){return A.getContextAttributes()},this.forceContextLoss=function(){let y=Ge.get("WEBGL_lose_context");y&&y.loseContext()},this.forceContextRestore=function(){let y=Ge.get("WEBGL_lose_context");y&&y.restoreContext()},this.getPixelRatio=function(){return V},this.setPixelRatio=function(y){y!==void 0&&(V=y,this.setSize(G,Q,!1))},this.getSize=function(y){return y.set(G,Q)},this.setSize=function(y,D,O=!0){if(k.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}G=y,Q=D,t.width=Math.floor(y*V),t.height=Math.floor(D*V),O===!0&&(t.style.width=y+"px",t.style.height=D+"px"),this.setViewport(0,0,y,D)},this.getDrawingBufferSize=function(y){return y.set(G*V,Q*V).floor()},this.setDrawingBufferSize=function(y,D,O){G=y,Q=D,V=O,t.width=Math.floor(y*O),t.height=Math.floor(D*O),this.setViewport(0,0,y,D)},this.getCurrentViewport=function(y){return y.copy(C)},this.getViewport=function(y){return y.copy(_e)},this.setViewport=function(y,D,O,B){y.isVector4?_e.set(y.x,y.y,y.z,y.w):_e.set(y,D,O,B),xe.viewport(C.copy(_e).multiplyScalar(V).round())},this.getScissor=function(y){return y.copy(Ne)},this.setScissor=function(y,D,O,B){y.isVector4?Ne.set(y.x,y.y,y.z,y.w):Ne.set(y,D,O,B),xe.scissor(q.copy(Ne).multiplyScalar(V).round())},this.getScissorTest=function(){return et},this.setScissorTest=function(y){xe.setScissorTest(et=y)},this.setOpaqueSort=function(y){ie=y},this.setTransparentSort=function(y){he=y},this.getClearColor=function(y){return y.copy(Ee.getClearColor())},this.setClearColor=function(){Ee.setClearColor(...arguments)},this.getClearAlpha=function(){return Ee.getClearAlpha()},this.setClearAlpha=function(){Ee.setClearAlpha(...arguments)},this.clear=function(y=!0,D=!0,O=!0){let B=0;if(y){let U=!1;if(N!==null){let j=N.texture.format;U=j===yo||j===xo||j===_o}if(U){let j=N.texture.type,ne=j===hn||j===Jn||j===ns||j===ss||j===po||j===mo,le=Ee.getClearColor(),fe=Ee.getClearAlpha(),Ce=le.r,we=le.g,ye=le.b;ne?(g[0]=Ce,g[1]=we,g[2]=ye,g[3]=fe,A.clearBufferuiv(A.COLOR,0,g)):(_[0]=Ce,_[1]=we,_[2]=ye,_[3]=fe,A.clearBufferiv(A.COLOR,0,_))}else B|=A.COLOR_BUFFER_BIT}D&&(B|=A.DEPTH_BUFFER_BIT),O&&(B|=A.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),A.clear(B)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){t.removeEventListener("webglcontextlost",Z,!1),t.removeEventListener("webglcontextrestored",ce,!1),t.removeEventListener("webglcontextcreationerror",ae,!1),Ee.dispose(),Se.dispose(),Te.dispose(),ge.dispose(),x.dispose(),F.dispose(),H.dispose(),tt.dispose(),I.dispose(),me.dispose(),k.dispose(),k.removeEventListener("sessionstart",Qc),k.removeEventListener("sessionend",el),jn.stop()};function Z(y){y.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),L=!0}function ce(){console.log("THREE.WebGLRenderer: Context Restored."),L=!1;let y=nt.autoReset,D=ue.enabled,O=ue.autoUpdate,B=ue.needsUpdate,U=ue.type;oe(),nt.autoReset=y,ue.enabled=D,ue.autoUpdate=O,ue.needsUpdate=B,ue.type=U}function ae(y){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",y.statusMessage)}function Le(y){let D=y.target;D.removeEventListener("dispose",Le),ot(D)}function ot(y){St(y),ge.remove(y)}function St(y){let D=ge.get(y).programs;D!==void 0&&(D.forEach(function(O){me.releaseProgram(O)}),y.isShaderMaterial&&me.releaseShaderCache(y))}this.renderBufferDirect=function(y,D,O,B,U,j){D===null&&(D=ct);let ne=U.isMesh&&U.matrixWorld.determinant()<0,le=Mu(y,D,O,B,U);xe.setMaterial(B,ne);let fe=O.index,Ce=1;if(B.wireframe===!0){if(fe=K.getWireframeAttribute(O),fe===void 0)return;Ce=2}let we=O.drawRange,ye=O.attributes.position,We=we.start*Ce,Ze=(we.start+we.count)*Ce;j!==null&&(We=Math.max(We,j.start*Ce),Ze=Math.min(Ze,(j.start+j.count)*Ce)),fe!==null?(We=Math.max(We,0),Ze=Math.min(Ze,fe.count)):ye!=null&&(We=Math.max(We,0),Ze=Math.min(Ze,ye.count));let ht=Ze-We;if(ht<0||ht===1/0)return;tt.setup(U,B,le,O,fe);let at,Xe=de;if(fe!==null&&(at=Y.get(fe),Xe=He,Xe.setIndex(at)),U.isMesh)B.wireframe===!0?(xe.setLineWidth(B.wireframeLinewidth*ke()),Xe.setMode(A.LINES)):Xe.setMode(A.TRIANGLES);else if(U.isLine){let ve=B.linewidth;ve===void 0&&(ve=1),xe.setLineWidth(ve*ke()),U.isLineSegments?Xe.setMode(A.LINES):U.isLineLoop?Xe.setMode(A.LINE_LOOP):Xe.setMode(A.LINE_STRIP)}else U.isPoints?Xe.setMode(A.POINTS):U.isSprite&&Xe.setMode(A.TRIANGLES);if(U.isBatchedMesh)if(U._multiDrawInstances!==null)rr("THREE.WebGLRenderer: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection."),Xe.renderMultiDrawInstances(U._multiDrawStarts,U._multiDrawCounts,U._multiDrawCount,U._multiDrawInstances);else if(Ge.get("WEBGL_multi_draw"))Xe.renderMultiDraw(U._multiDrawStarts,U._multiDrawCounts,U._multiDrawCount);else{let ve=U._multiDrawStarts,xt=U._multiDrawCounts,Ke=U._multiDrawCount,$t=fe?Y.get(fe).bytesPerElement:1,wi=ge.get(B).currentProgram.getUniforms();for(let Ot=0;Ot<Ke;Ot++)wi.setValue(A,"_gl_DrawID",Ot),Xe.render(ve[Ot]/$t,xt[Ot])}else if(U.isInstancedMesh)Xe.renderInstances(We,ht,U.count);else if(O.isInstancedBufferGeometry){let ve=O._maxInstanceCount!==void 0?O._maxInstanceCount:1/0,xt=Math.min(O.instanceCount,ve);Xe.renderInstances(We,ht,xt)}else Xe.render(We,ht)};function Je(y,D,O){y.transparent===!0&&y.side===Yt&&y.forceSinglePass===!1?(y.side=Pt,y.needsUpdate=!0,lr(y,D,O),y.side=rn,y.needsUpdate=!0,lr(y,D,O),y.side=Yt):lr(y,D,O)}this.compile=function(y,D,O=null){O===null&&(O=y),f=Te.get(O),f.init(D),T.push(f),O.traverseVisible(function(U){U.isLight&&U.layers.test(D.layers)&&(f.pushLight(U),U.castShadow&&f.pushShadow(U))}),y!==O&&y.traverseVisible(function(U){U.isLight&&U.layers.test(D.layers)&&(f.pushLight(U),U.castShadow&&f.pushShadow(U))}),f.setupLights();let B=new Set;return y.traverse(function(U){if(!(U.isMesh||U.isPoints||U.isLine||U.isSprite))return;let j=U.material;if(j)if(Array.isArray(j))for(let ne=0;ne<j.length;ne++){let le=j[ne];Je(le,O,U),B.add(le)}else Je(j,O,U),B.add(j)}),f=T.pop(),B},this.compileAsync=function(y,D,O=null){let B=this.compile(y,D,O);return new Promise(U=>{function j(){if(B.forEach(function(ne){ge.get(ne).currentProgram.isReady()&&B.delete(ne)}),B.size===0){U(y);return}setTimeout(j,10)}Ge.get("KHR_parallel_shader_compile")!==null?j():setTimeout(j,10)})};let Jt=null;function Sn(y){Jt&&Jt(y)}function Qc(){jn.stop()}function el(){jn.start()}let jn=new hu;jn.setAnimationLoop(Sn),typeof self<"u"&&jn.setContext(self),this.setAnimationLoop=function(y){Jt=y,k.setAnimationLoop(y),y===null?jn.stop():jn.start()},k.addEventListener("sessionstart",Qc),k.addEventListener("sessionend",el),this.render=function(y,D){if(D!==void 0&&D.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(L===!0)return;if(y.matrixWorldAutoUpdate===!0&&y.updateMatrixWorld(),D.parent===null&&D.matrixWorldAutoUpdate===!0&&D.updateMatrixWorld(),k.enabled===!0&&k.isPresenting===!0&&(k.cameraAutoUpdate===!0&&k.updateCamera(D),D=k.getCamera()),y.isScene===!0&&y.onBeforeRender(M,y,D,N),f=Te.get(y,T.length),f.init(D),T.push(f),Me.multiplyMatrices(D.projectionMatrix,D.matrixWorldInverse),X.setFromProjectionMatrix(Me),pe=this.localClippingEnabled,ee=$.init(this.clippingPlanes,pe),m=Se.get(y,E.length),m.init(),E.push(m),k.enabled===!0&&k.isPresenting===!0){let j=M.xr.getDepthSensingMesh();j!==null&&ta(j,D,-1/0,M.sortObjects)}ta(y,D,0,M.sortObjects),m.finish(),M.sortObjects===!0&&m.sort(ie,he),st=k.enabled===!1||k.isPresenting===!1||k.hasDepthSensing()===!1,st&&Ee.addToRenderList(m,y),this.info.render.frame++,ee===!0&&$.beginShadows();let O=f.state.shadowsArray;ue.render(O,y,D),ee===!0&&$.endShadows(),this.info.autoReset===!0&&this.info.reset();let B=m.opaque,U=m.transmissive;if(f.setupLights(),D.isArrayCamera){let j=D.cameras;if(U.length>0)for(let ne=0,le=j.length;ne<le;ne++){let fe=j[ne];nl(B,U,y,fe)}st&&Ee.render(y);for(let ne=0,le=j.length;ne<le;ne++){let fe=j[ne];tl(m,y,fe,fe.viewport)}}else U.length>0&&nl(B,U,y,D),st&&Ee.render(y),tl(m,y,D);N!==null&&w===0&&(b.updateMultisampleRenderTarget(N),b.updateRenderTargetMipmap(N)),y.isScene===!0&&y.onAfterRender(M,y,D),tt.resetDefaultState(),S=-1,v=null,T.pop(),T.length>0?(f=T[T.length-1],ee===!0&&$.setGlobalState(M.clippingPlanes,f.state.camera)):f=null,E.pop(),E.length>0?m=E[E.length-1]:m=null};function ta(y,D,O,B){if(y.visible===!1)return;if(y.layers.test(D.layers)){if(y.isGroup)O=y.renderOrder;else if(y.isLOD)y.autoUpdate===!0&&y.update(D);else if(y.isLight)f.pushLight(y),y.castShadow&&f.pushShadow(y);else if(y.isSprite){if(!y.frustumCulled||X.intersectsSprite(y)){B&&Ae.setFromMatrixPosition(y.matrixWorld).applyMatrix4(Me);let ne=H.update(y),le=y.material;le.visible&&m.push(y,ne,le,O,Ae.z,null)}}else if((y.isMesh||y.isLine||y.isPoints)&&(!y.frustumCulled||X.intersectsObject(y))){let ne=H.update(y),le=y.material;if(B&&(y.boundingSphere!==void 0?(y.boundingSphere===null&&y.computeBoundingSphere(),Ae.copy(y.boundingSphere.center)):(ne.boundingSphere===null&&ne.computeBoundingSphere(),Ae.copy(ne.boundingSphere.center)),Ae.applyMatrix4(y.matrixWorld).applyMatrix4(Me)),Array.isArray(le)){let fe=ne.groups;for(let Ce=0,we=fe.length;Ce<we;Ce++){let ye=fe[Ce],We=le[ye.materialIndex];We&&We.visible&&m.push(y,ne,We,O,Ae.z,ye)}}else le.visible&&m.push(y,ne,le,O,Ae.z,null)}}let j=y.children;for(let ne=0,le=j.length;ne<le;ne++)ta(j[ne],D,O,B)}function tl(y,D,O,B){let U=y.opaque,j=y.transmissive,ne=y.transparent;f.setupLightsView(O),ee===!0&&$.setGlobalState(M.clippingPlanes,O),B&&xe.viewport(C.copy(B)),U.length>0&&cr(U,D,O),j.length>0&&cr(j,D,O),ne.length>0&&cr(ne,D,O),xe.buffers.depth.setTest(!0),xe.buffers.depth.setMask(!0),xe.buffers.color.setMask(!0),xe.setPolygonOffset(!1)}function nl(y,D,O,B){if((O.isScene===!0?O.overrideMaterial:null)!==null)return;f.state.transmissionRenderTarget[B.id]===void 0&&(f.state.transmissionRenderTarget[B.id]=new mn(1,1,{generateMipmaps:!0,type:Ge.has("EXT_color_buffer_half_float")||Ge.has("EXT_color_buffer_float")?is:hn,minFilter:ln,samples:4,stencilBuffer:r,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:Be.workingColorSpace}));let j=f.state.transmissionRenderTarget[B.id],ne=B.viewport||C;j.setSize(ne.z*M.transmissionResolutionScale,ne.w*M.transmissionResolutionScale);let le=M.getRenderTarget();M.setRenderTarget(j),M.getClearColor(W),J=M.getClearAlpha(),J<1&&M.setClearColor(16777215,.5),M.clear(),st&&Ee.render(O);let fe=M.toneMapping;M.toneMapping=Fn;let Ce=B.viewport;if(B.viewport!==void 0&&(B.viewport=void 0),f.setupLightsView(B),ee===!0&&$.setGlobalState(M.clippingPlanes,B),cr(y,O,B),b.updateMultisampleRenderTarget(j),b.updateRenderTargetMipmap(j),Ge.has("WEBGL_multisampled_render_to_texture")===!1){let we=!1;for(let ye=0,We=D.length;ye<We;ye++){let Ze=D[ye],ht=Ze.object,at=Ze.geometry,Xe=Ze.material,ve=Ze.group;if(Xe.side===Yt&&ht.layers.test(B.layers)){let xt=Xe.side;Xe.side=Pt,Xe.needsUpdate=!0,il(ht,O,B,at,Xe,ve),Xe.side=xt,Xe.needsUpdate=!0,we=!0}}we===!0&&(b.updateMultisampleRenderTarget(j),b.updateRenderTargetMipmap(j))}M.setRenderTarget(le),M.setClearColor(W,J),Ce!==void 0&&(B.viewport=Ce),M.toneMapping=fe}function cr(y,D,O){let B=D.isScene===!0?D.overrideMaterial:null;for(let U=0,j=y.length;U<j;U++){let ne=y[U],le=ne.object,fe=ne.geometry,Ce=ne.group,we=ne.material;we.allowOverride===!0&&B!==null&&(we=B),le.layers.test(O.layers)&&il(le,D,O,fe,we,Ce)}}function il(y,D,O,B,U,j){y.onBeforeRender(M,D,O,B,U,j),y.modelViewMatrix.multiplyMatrices(O.matrixWorldInverse,y.matrixWorld),y.normalMatrix.getNormalMatrix(y.modelViewMatrix),U.onBeforeRender(M,D,O,B,y,j),U.transparent===!0&&U.side===Yt&&U.forceSinglePass===!1?(U.side=Pt,U.needsUpdate=!0,M.renderBufferDirect(O,D,B,U,y,j),U.side=rn,U.needsUpdate=!0,M.renderBufferDirect(O,D,B,U,y,j),U.side=Yt):M.renderBufferDirect(O,D,B,U,y,j),y.onAfterRender(M,D,O,B,U,j)}function lr(y,D,O){D.isScene!==!0&&(D=ct);let B=ge.get(y),U=f.state.lights,j=f.state.shadowsArray,ne=U.state.version,le=me.getParameters(y,U.state,j,D,O),fe=me.getProgramCacheKey(le),Ce=B.programs;B.environment=y.isMeshStandardMaterial?D.environment:null,B.fog=D.fog,B.envMap=(y.isMeshStandardMaterial?F:x).get(y.envMap||B.environment),B.envMapRotation=B.environment!==null&&y.envMap===null?D.environmentRotation:y.envMapRotation,Ce===void 0&&(y.addEventListener("dispose",Le),Ce=new Map,B.programs=Ce);let we=Ce.get(fe);if(we!==void 0){if(B.currentProgram===we&&B.lightsStateVersion===ne)return rl(y,le),we}else le.uniforms=me.getUniforms(y),y.onBeforeCompile(le,M),we=me.acquireProgram(le,fe),Ce.set(fe,we),B.uniforms=le.uniforms;let ye=B.uniforms;return(!y.isShaderMaterial&&!y.isRawShaderMaterial||y.clipping===!0)&&(ye.clippingPlanes=$.uniform),rl(y,le),B.needsLights=bu(y),B.lightsStateVersion=ne,B.needsLights&&(ye.ambientLightColor.value=U.state.ambient,ye.lightProbe.value=U.state.probe,ye.directionalLights.value=U.state.directional,ye.directionalLightShadows.value=U.state.directionalShadow,ye.spotLights.value=U.state.spot,ye.spotLightShadows.value=U.state.spotShadow,ye.rectAreaLights.value=U.state.rectArea,ye.ltc_1.value=U.state.rectAreaLTC1,ye.ltc_2.value=U.state.rectAreaLTC2,ye.pointLights.value=U.state.point,ye.pointLightShadows.value=U.state.pointShadow,ye.hemisphereLights.value=U.state.hemi,ye.directionalShadowMap.value=U.state.directionalShadowMap,ye.directionalShadowMatrix.value=U.state.directionalShadowMatrix,ye.spotShadowMap.value=U.state.spotShadowMap,ye.spotLightMatrix.value=U.state.spotLightMatrix,ye.spotLightMap.value=U.state.spotLightMap,ye.pointShadowMap.value=U.state.pointShadowMap,ye.pointShadowMatrix.value=U.state.pointShadowMatrix),B.currentProgram=we,B.uniformsList=null,we}function sl(y){if(y.uniformsList===null){let D=y.currentProgram.getUniforms();y.uniformsList=ls.seqWithValue(D.seq,y.uniforms)}return y.uniformsList}function rl(y,D){let O=ge.get(y);O.outputColorSpace=D.outputColorSpace,O.batching=D.batching,O.batchingColor=D.batchingColor,O.instancing=D.instancing,O.instancingColor=D.instancingColor,O.instancingMorph=D.instancingMorph,O.skinning=D.skinning,O.morphTargets=D.morphTargets,O.morphNormals=D.morphNormals,O.morphColors=D.morphColors,O.morphTargetsCount=D.morphTargetsCount,O.numClippingPlanes=D.numClippingPlanes,O.numIntersection=D.numClipIntersection,O.vertexAlphas=D.vertexAlphas,O.vertexTangents=D.vertexTangents,O.toneMapping=D.toneMapping}function Mu(y,D,O,B,U){D.isScene!==!0&&(D=ct),b.resetTextureUnits();let j=D.fog,ne=B.isMeshStandardMaterial?D.environment:null,le=N===null?M.outputColorSpace:N.isXRRenderTarget===!0?N.texture.colorSpace:vt,fe=(B.isMeshStandardMaterial?F:x).get(B.envMap||ne),Ce=B.vertexColors===!0&&!!O.attributes.color&&O.attributes.color.itemSize===4,we=!!O.attributes.tangent&&(!!B.normalMap||B.anisotropy>0),ye=!!O.morphAttributes.position,We=!!O.morphAttributes.normal,Ze=!!O.morphAttributes.color,ht=Fn;B.toneMapped&&(N===null||N.isXRRenderTarget===!0)&&(ht=M.toneMapping);let at=O.morphAttributes.position||O.morphAttributes.normal||O.morphAttributes.color,Xe=at!==void 0?at.length:0,ve=ge.get(B),xt=f.state.lights;if(ee===!0&&(pe===!0||y!==v)){let At=y===v&&B.id===S;$.setState(B,y,At)}let Ke=!1;B.version===ve.__version?(ve.needsLights&&ve.lightsStateVersion!==xt.state.version||ve.outputColorSpace!==le||U.isBatchedMesh&&ve.batching===!1||!U.isBatchedMesh&&ve.batching===!0||U.isBatchedMesh&&ve.batchingColor===!0&&U.colorTexture===null||U.isBatchedMesh&&ve.batchingColor===!1&&U.colorTexture!==null||U.isInstancedMesh&&ve.instancing===!1||!U.isInstancedMesh&&ve.instancing===!0||U.isSkinnedMesh&&ve.skinning===!1||!U.isSkinnedMesh&&ve.skinning===!0||U.isInstancedMesh&&ve.instancingColor===!0&&U.instanceColor===null||U.isInstancedMesh&&ve.instancingColor===!1&&U.instanceColor!==null||U.isInstancedMesh&&ve.instancingMorph===!0&&U.morphTexture===null||U.isInstancedMesh&&ve.instancingMorph===!1&&U.morphTexture!==null||ve.envMap!==fe||B.fog===!0&&ve.fog!==j||ve.numClippingPlanes!==void 0&&(ve.numClippingPlanes!==$.numPlanes||ve.numIntersection!==$.numIntersection)||ve.vertexAlphas!==Ce||ve.vertexTangents!==we||ve.morphTargets!==ye||ve.morphNormals!==We||ve.morphColors!==Ze||ve.toneMapping!==ht||ve.morphTargetsCount!==Xe)&&(Ke=!0):(Ke=!0,ve.__version=B.version);let $t=ve.currentProgram;Ke===!0&&($t=lr(B,D,U));let wi=!1,Ot=!1,ds=!1,it=$t.getUniforms(),Wt=ve.uniforms;if(xe.useProgram($t.program)&&(wi=!0,Ot=!0,ds=!0),B.id!==S&&(S=B.id,Ot=!0),wi||v!==y){xe.buffers.depth.getReversed()?(se.copy(y.projectionMatrix),Nh(se),Fh(se),it.setValue(A,"projectionMatrix",se)):it.setValue(A,"projectionMatrix",y.projectionMatrix),it.setValue(A,"viewMatrix",y.matrixWorldInverse);let Lt=it.map.cameraPosition;Lt!==void 0&&Lt.setValue(A,Ye.setFromMatrixPosition(y.matrixWorld)),Ve.logarithmicDepthBuffer&&it.setValue(A,"logDepthBufFC",2/(Math.log(y.far+1)/Math.LN2)),(B.isMeshPhongMaterial||B.isMeshToonMaterial||B.isMeshLambertMaterial||B.isMeshBasicMaterial||B.isMeshStandardMaterial||B.isShaderMaterial)&&it.setValue(A,"isOrthographic",y.isOrthographicCamera===!0),v!==y&&(v=y,Ot=!0,ds=!0)}if(U.isSkinnedMesh){it.setOptional(A,U,"bindMatrix"),it.setOptional(A,U,"bindMatrixInverse");let At=U.skeleton;At&&(At.boneTexture===null&&At.computeBoneTexture(),it.setValue(A,"boneTexture",At.boneTexture,b))}U.isBatchedMesh&&(it.setOptional(A,U,"batchingTexture"),it.setValue(A,"batchingTexture",U._matricesTexture,b),it.setOptional(A,U,"batchingIdTexture"),it.setValue(A,"batchingIdTexture",U._indirectTexture,b),it.setOptional(A,U,"batchingColorTexture"),U._colorsTexture!==null&&it.setValue(A,"batchingColorTexture",U._colorsTexture,b));let Xt=O.morphAttributes;if((Xt.position!==void 0||Xt.normal!==void 0||Xt.color!==void 0)&&Re.update(U,O,$t),(Ot||ve.receiveShadow!==U.receiveShadow)&&(ve.receiveShadow=U.receiveShadow,it.setValue(A,"receiveShadow",U.receiveShadow)),B.isMeshGouraudMaterial&&B.envMap!==null&&(Wt.envMap.value=fe,Wt.flipEnvMap.value=fe.isCubeTexture&&fe.isRenderTargetTexture===!1?-1:1),B.isMeshStandardMaterial&&B.envMap===null&&D.environment!==null&&(Wt.envMapIntensity.value=D.environmentIntensity),Ot&&(it.setValue(A,"toneMappingExposure",M.toneMappingExposure),ve.needsLights&&Su(Wt,ds),j&&B.fog===!0&&re.refreshFogUniforms(Wt,j),re.refreshMaterialUniforms(Wt,B,V,Q,f.state.transmissionRenderTarget[y.id]),ls.upload(A,sl(ve),Wt,b)),B.isShaderMaterial&&B.uniformsNeedUpdate===!0&&(ls.upload(A,sl(ve),Wt,b),B.uniformsNeedUpdate=!1),B.isSpriteMaterial&&it.setValue(A,"center",U.center),it.setValue(A,"modelViewMatrix",U.modelViewMatrix),it.setValue(A,"normalMatrix",U.normalMatrix),it.setValue(A,"modelMatrix",U.matrixWorld),B.isShaderMaterial||B.isRawShaderMaterial){let At=B.uniformsGroups;for(let Lt=0,na=At.length;Lt<na;Lt++){let Qn=At[Lt];I.update(Qn,$t),I.bind(Qn,$t)}}return $t}function Su(y,D){y.ambientLightColor.needsUpdate=D,y.lightProbe.needsUpdate=D,y.directionalLights.needsUpdate=D,y.directionalLightShadows.needsUpdate=D,y.pointLights.needsUpdate=D,y.pointLightShadows.needsUpdate=D,y.spotLights.needsUpdate=D,y.spotLightShadows.needsUpdate=D,y.rectAreaLights.needsUpdate=D,y.hemisphereLights.needsUpdate=D}function bu(y){return y.isMeshLambertMaterial||y.isMeshToonMaterial||y.isMeshPhongMaterial||y.isMeshStandardMaterial||y.isShadowMaterial||y.isShaderMaterial&&y.lights===!0}this.getActiveCubeFace=function(){return R},this.getActiveMipmapLevel=function(){return w},this.getRenderTarget=function(){return N},this.setRenderTargetTextures=function(y,D,O){let B=ge.get(y);B.__autoAllocateDepthBuffer=y.resolveDepthBuffer===!1,B.__autoAllocateDepthBuffer===!1&&(B.__useRenderToTexture=!1),ge.get(y.texture).__webglTexture=D,ge.get(y.depthTexture).__webglTexture=B.__autoAllocateDepthBuffer?void 0:O,B.__hasExternalTextures=!0},this.setRenderTargetFramebuffer=function(y,D){let O=ge.get(y);O.__webglFramebuffer=D,O.__useDefaultFramebuffer=D===void 0};let Tu=A.createFramebuffer();this.setRenderTarget=function(y,D=0,O=0){N=y,R=D,w=O;let B=!0,U=null,j=!1,ne=!1;if(y){let fe=ge.get(y);if(fe.__useDefaultFramebuffer!==void 0)xe.bindFramebuffer(A.FRAMEBUFFER,null),B=!1;else if(fe.__webglFramebuffer===void 0)b.setupRenderTarget(y);else if(fe.__hasExternalTextures)b.rebindTextures(y,ge.get(y.texture).__webglTexture,ge.get(y.depthTexture).__webglTexture);else if(y.depthBuffer){let ye=y.depthTexture;if(fe.__boundDepthTexture!==ye){if(ye!==null&&ge.has(ye)&&(y.width!==ye.image.width||y.height!==ye.image.height))throw new Error("WebGLRenderTarget: Attached DepthTexture is initialized to the incorrect size.");b.setupDepthRenderbuffer(y)}}let Ce=y.texture;(Ce.isData3DTexture||Ce.isDataArrayTexture||Ce.isCompressedArrayTexture)&&(ne=!0);let we=ge.get(y).__webglFramebuffer;y.isWebGLCubeRenderTarget?(Array.isArray(we[D])?U=we[D][O]:U=we[D],j=!0):y.samples>0&&b.useMultisampledRTT(y)===!1?U=ge.get(y).__webglMultisampledFramebuffer:Array.isArray(we)?U=we[O]:U=we,C.copy(y.viewport),q.copy(y.scissor),z=y.scissorTest}else C.copy(_e).multiplyScalar(V).floor(),q.copy(Ne).multiplyScalar(V).floor(),z=et;if(O!==0&&(U=Tu),xe.bindFramebuffer(A.FRAMEBUFFER,U)&&B&&xe.drawBuffers(y,U),xe.viewport(C),xe.scissor(q),xe.setScissorTest(z),j){let fe=ge.get(y.texture);A.framebufferTexture2D(A.FRAMEBUFFER,A.COLOR_ATTACHMENT0,A.TEXTURE_CUBE_MAP_POSITIVE_X+D,fe.__webglTexture,O)}else if(ne){let fe=ge.get(y.texture),Ce=D;A.framebufferTextureLayer(A.FRAMEBUFFER,A.COLOR_ATTACHMENT0,fe.__webglTexture,O,Ce)}else if(y!==null&&O!==0){let fe=ge.get(y.texture);A.framebufferTexture2D(A.FRAMEBUFFER,A.COLOR_ATTACHMENT0,A.TEXTURE_2D,fe.__webglTexture,O)}S=-1},this.readRenderTargetPixels=function(y,D,O,B,U,j,ne){if(!(y&&y.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let le=ge.get(y).__webglFramebuffer;if(y.isWebGLCubeRenderTarget&&ne!==void 0&&(le=le[ne]),le){xe.bindFramebuffer(A.FRAMEBUFFER,le);try{let fe=y.texture,Ce=fe.format,we=fe.type;if(!Ve.textureFormatReadable(Ce)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!Ve.textureTypeReadable(we)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}D>=0&&D<=y.width-B&&O>=0&&O<=y.height-U&&A.readPixels(D,O,B,U,De.convert(Ce),De.convert(we),j)}finally{let fe=N!==null?ge.get(N).__webglFramebuffer:null;xe.bindFramebuffer(A.FRAMEBUFFER,fe)}}},this.readRenderTargetPixelsAsync=async function(y,D,O,B,U,j,ne){if(!(y&&y.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let le=ge.get(y).__webglFramebuffer;if(y.isWebGLCubeRenderTarget&&ne!==void 0&&(le=le[ne]),le)if(D>=0&&D<=y.width-B&&O>=0&&O<=y.height-U){xe.bindFramebuffer(A.FRAMEBUFFER,le);let fe=y.texture,Ce=fe.format,we=fe.type;if(!Ve.textureFormatReadable(Ce))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!Ve.textureTypeReadable(we))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");let ye=A.createBuffer();A.bindBuffer(A.PIXEL_PACK_BUFFER,ye),A.bufferData(A.PIXEL_PACK_BUFFER,j.byteLength,A.STREAM_READ),A.readPixels(D,O,B,U,De.convert(Ce),De.convert(we),0);let We=N!==null?ge.get(N).__webglFramebuffer:null;xe.bindFramebuffer(A.FRAMEBUFFER,We);let Ze=A.fenceSync(A.SYNC_GPU_COMMANDS_COMPLETE,0);return A.flush(),await Uh(A,Ze,4),A.bindBuffer(A.PIXEL_PACK_BUFFER,ye),A.getBufferSubData(A.PIXEL_PACK_BUFFER,0,j),A.deleteBuffer(ye),A.deleteSync(Ze),j}else throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")},this.copyFramebufferToTexture=function(y,D=null,O=0){let B=Math.pow(2,-O),U=Math.floor(y.image.width*B),j=Math.floor(y.image.height*B),ne=D!==null?D.x:0,le=D!==null?D.y:0;b.setTexture2D(y,0),A.copyTexSubImage2D(A.TEXTURE_2D,O,0,0,ne,le,U,j),xe.unbindTexture()};let Eu=A.createFramebuffer(),Au=A.createFramebuffer();this.copyTextureToTexture=function(y,D,O=null,B=null,U=0,j=null){j===null&&(U!==0?(rr("WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels."),j=U,U=0):j=0);let ne,le,fe,Ce,we,ye,We,Ze,ht,at=y.isCompressedTexture?y.mipmaps[j]:y.image;if(O!==null)ne=O.max.x-O.min.x,le=O.max.y-O.min.y,fe=O.isBox3?O.max.z-O.min.z:1,Ce=O.min.x,we=O.min.y,ye=O.isBox3?O.min.z:0;else{let Xt=Math.pow(2,-U);ne=Math.floor(at.width*Xt),le=Math.floor(at.height*Xt),y.isDataArrayTexture?fe=at.depth:y.isData3DTexture?fe=Math.floor(at.depth*Xt):fe=1,Ce=0,we=0,ye=0}B!==null?(We=B.x,Ze=B.y,ht=B.z):(We=0,Ze=0,ht=0);let Xe=De.convert(D.format),ve=De.convert(D.type),xt;D.isData3DTexture?(b.setTexture3D(D,0),xt=A.TEXTURE_3D):D.isDataArrayTexture||D.isCompressedArrayTexture?(b.setTexture2DArray(D,0),xt=A.TEXTURE_2D_ARRAY):(b.setTexture2D(D,0),xt=A.TEXTURE_2D),A.pixelStorei(A.UNPACK_FLIP_Y_WEBGL,D.flipY),A.pixelStorei(A.UNPACK_PREMULTIPLY_ALPHA_WEBGL,D.premultiplyAlpha),A.pixelStorei(A.UNPACK_ALIGNMENT,D.unpackAlignment);let Ke=A.getParameter(A.UNPACK_ROW_LENGTH),$t=A.getParameter(A.UNPACK_IMAGE_HEIGHT),wi=A.getParameter(A.UNPACK_SKIP_PIXELS),Ot=A.getParameter(A.UNPACK_SKIP_ROWS),ds=A.getParameter(A.UNPACK_SKIP_IMAGES);A.pixelStorei(A.UNPACK_ROW_LENGTH,at.width),A.pixelStorei(A.UNPACK_IMAGE_HEIGHT,at.height),A.pixelStorei(A.UNPACK_SKIP_PIXELS,Ce),A.pixelStorei(A.UNPACK_SKIP_ROWS,we),A.pixelStorei(A.UNPACK_SKIP_IMAGES,ye);let it=y.isDataArrayTexture||y.isData3DTexture,Wt=D.isDataArrayTexture||D.isData3DTexture;if(y.isDepthTexture){let Xt=ge.get(y),At=ge.get(D),Lt=ge.get(Xt.__renderTarget),na=ge.get(At.__renderTarget);xe.bindFramebuffer(A.READ_FRAMEBUFFER,Lt.__webglFramebuffer),xe.bindFramebuffer(A.DRAW_FRAMEBUFFER,na.__webglFramebuffer);for(let Qn=0;Qn<fe;Qn++)it&&(A.framebufferTextureLayer(A.READ_FRAMEBUFFER,A.COLOR_ATTACHMENT0,ge.get(y).__webglTexture,U,ye+Qn),A.framebufferTextureLayer(A.DRAW_FRAMEBUFFER,A.COLOR_ATTACHMENT0,ge.get(D).__webglTexture,j,ht+Qn)),A.blitFramebuffer(Ce,we,ne,le,We,Ze,ne,le,A.DEPTH_BUFFER_BIT,A.NEAREST);xe.bindFramebuffer(A.READ_FRAMEBUFFER,null),xe.bindFramebuffer(A.DRAW_FRAMEBUFFER,null)}else if(U!==0||y.isRenderTargetTexture||ge.has(y)){let Xt=ge.get(y),At=ge.get(D);xe.bindFramebuffer(A.READ_FRAMEBUFFER,Eu),xe.bindFramebuffer(A.DRAW_FRAMEBUFFER,Au);for(let Lt=0;Lt<fe;Lt++)it?A.framebufferTextureLayer(A.READ_FRAMEBUFFER,A.COLOR_ATTACHMENT0,Xt.__webglTexture,U,ye+Lt):A.framebufferTexture2D(A.READ_FRAMEBUFFER,A.COLOR_ATTACHMENT0,A.TEXTURE_2D,Xt.__webglTexture,U),Wt?A.framebufferTextureLayer(A.DRAW_FRAMEBUFFER,A.COLOR_ATTACHMENT0,At.__webglTexture,j,ht+Lt):A.framebufferTexture2D(A.DRAW_FRAMEBUFFER,A.COLOR_ATTACHMENT0,A.TEXTURE_2D,At.__webglTexture,j),U!==0?A.blitFramebuffer(Ce,we,ne,le,We,Ze,ne,le,A.COLOR_BUFFER_BIT,A.NEAREST):Wt?A.copyTexSubImage3D(xt,j,We,Ze,ht+Lt,Ce,we,ne,le):A.copyTexSubImage2D(xt,j,We,Ze,Ce,we,ne,le);xe.bindFramebuffer(A.READ_FRAMEBUFFER,null),xe.bindFramebuffer(A.DRAW_FRAMEBUFFER,null)}else Wt?y.isDataTexture||y.isData3DTexture?A.texSubImage3D(xt,j,We,Ze,ht,ne,le,fe,Xe,ve,at.data):D.isCompressedArrayTexture?A.compressedTexSubImage3D(xt,j,We,Ze,ht,ne,le,fe,Xe,at.data):A.texSubImage3D(xt,j,We,Ze,ht,ne,le,fe,Xe,ve,at):y.isDataTexture?A.texSubImage2D(A.TEXTURE_2D,j,We,Ze,ne,le,Xe,ve,at.data):y.isCompressedTexture?A.compressedTexSubImage2D(A.TEXTURE_2D,j,We,Ze,at.width,at.height,Xe,at.data):A.texSubImage2D(A.TEXTURE_2D,j,We,Ze,ne,le,Xe,ve,at);A.pixelStorei(A.UNPACK_ROW_LENGTH,Ke),A.pixelStorei(A.UNPACK_IMAGE_HEIGHT,$t),A.pixelStorei(A.UNPACK_SKIP_PIXELS,wi),A.pixelStorei(A.UNPACK_SKIP_ROWS,Ot),A.pixelStorei(A.UNPACK_SKIP_IMAGES,ds),j===0&&D.generateMipmaps&&A.generateMipmap(xt),xe.unbindTexture()},this.copyTextureToTexture3D=function(y,D,O=null,B=null,U=0){return rr('WebGLRenderer: copyTextureToTexture3D function has been deprecated. Use "copyTextureToTexture" instead.'),this.copyTextureToTexture(y,D,O,B,U)},this.initRenderTarget=function(y){ge.get(y).__webglFramebuffer===void 0&&b.setupRenderTarget(y)},this.initTexture=function(y){y.isCubeTexture?b.setTextureCube(y,0):y.isData3DTexture?b.setTexture3D(y,0):y.isDataArrayTexture||y.isCompressedArrayTexture?b.setTexture2DArray(y,0):b.setTexture2D(y,0),xe.unbindTexture()},this.resetState=function(){R=0,w=0,N=null,xe.reset(),tt.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return fn}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;let t=this.getContext();t.drawingBufferColorSpace=Be._getDrawingBufferColorSpace(e),t.unpackColorSpace=Be._getUnpackColorSpace()}};function Sc(s,e){if(e===Ja)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),s;if(e===os||e===sr){let t=s.getIndex();if(t===null){let o=[],a=s.getAttribute("position");if(a!==void 0){for(let c=0;c<a.count;c++)o.push(c);s.setIndex(o),t=s.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),s}let n=t.count-2,i=[];if(e===os)for(let o=1;o<=n;o++)i.push(t.getX(0)),i.push(t.getX(o)),i.push(t.getX(o+1));else for(let o=0;o<n;o++)o%2===0?(i.push(t.getX(o)),i.push(t.getX(o+1)),i.push(t.getX(o+2))):(i.push(t.getX(o+2)),i.push(t.getX(o+1)),i.push(t.getX(o)));i.length/3!==n&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");let r=s.clone();return r.setIndex(i),r.clearGroups(),r}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",e),s}var Qo=class extends yn{constructor(e){super(e),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(t){return new Cc(t)}),this.register(function(t){return new Ic(t)}),this.register(function(t){return new zc(t)}),this.register(function(t){return new kc(t)}),this.register(function(t){return new Vc(t)}),this.register(function(t){return new Lc(t)}),this.register(function(t){return new Dc(t)}),this.register(function(t){return new Uc(t)}),this.register(function(t){return new Nc(t)}),this.register(function(t){return new Rc(t)}),this.register(function(t){return new Fc(t)}),this.register(function(t){return new Pc(t)}),this.register(function(t){return new Bc(t)}),this.register(function(t){return new Oc(t)}),this.register(function(t){return new Ac(t)}),this.register(function(t){return new Hc(t)}),this.register(function(t){return new Gc(t)})}load(e,t,n,i){let r=this,o;if(this.resourcePath!=="")o=this.resourcePath;else if(this.path!==""){let l=Un.extractUrlBase(e);o=Un.resolveURL(l,this.path)}else o=Un.extractUrlBase(e);this.manager.itemStart(e);let a=function(l){i?i(l):console.error(l),r.manager.itemError(e),r.manager.itemEnd(e)},c=new es(this.manager);c.setPath(this.path),c.setResponseType("arraybuffer"),c.setRequestHeader(this.requestHeader),c.setWithCredentials(this.withCredentials),c.load(e,function(l){try{r.parse(l,o,function(h){t(h),r.manager.itemEnd(e)},a)}catch(h){a(h)}},n,a)}setDRACOLoader(e){return this.dracoLoader=e,this}setKTX2Loader(e){return this.ktx2Loader=e,this}setMeshoptDecoder(e){return this.meshoptDecoder=e,this}register(e){return this.pluginCallbacks.indexOf(e)===-1&&this.pluginCallbacks.push(e),this}unregister(e){return this.pluginCallbacks.indexOf(e)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,t,n,i){let r,o={},a={},c=new TextDecoder;if(typeof e=="string")r=JSON.parse(e);else if(e instanceof ArrayBuffer)if(c.decode(new Uint8Array(e,0,4))===yu){try{o[Oe.KHR_BINARY_GLTF]=new Wc(e)}catch(u){i&&i(u);return}r=JSON.parse(o[Oe.KHR_BINARY_GLTF].content)}else r=JSON.parse(c.decode(e));else r=e;if(r.asset===void 0||r.asset.version[0]<2){i&&i(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}let l=new $c(r,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});l.fileLoader.setRequestHeader(this.requestHeader);for(let h=0;h<this.pluginCallbacks.length;h++){let u=this.pluginCallbacks[h](l);u.name||console.error("THREE.GLTFLoader: Invalid plugin found: missing name"),a[u.name]=u,o[u.name]=!0}if(r.extensionsUsed)for(let h=0;h<r.extensionsUsed.length;++h){let u=r.extensionsUsed[h],d=r.extensionsRequired||[];switch(u){case Oe.KHR_MATERIALS_UNLIT:o[u]=new wc;break;case Oe.KHR_DRACO_MESH_COMPRESSION:o[u]=new Xc(r,this.dracoLoader);break;case Oe.KHR_TEXTURE_TRANSFORM:o[u]=new qc;break;case Oe.KHR_MESH_QUANTIZATION:o[u]=new Yc;break;default:d.indexOf(u)>=0&&a[u]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+u+'".')}}l.setExtensions(o),l.setPlugins(a),l.parse(n,i)}parseAsync(e,t){let n=this;return new Promise(function(i,r){n.parse(e,t,i,r)})}};function i_(){let s={};return{get:function(e){return s[e]},add:function(e,t){s[e]=t},remove:function(e){delete s[e]},removeAll:function(){s={}}}}var Oe={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_DISPERSION:"KHR_materials_dispersion",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"},Ac=class{constructor(e){this.parser=e,this.name=Oe.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){let e=this.parser,t=this.parser.json.nodes||[];for(let n=0,i=t.length;n<i;n++){let r=t[n];r.extensions&&r.extensions[this.name]&&r.extensions[this.name].light!==void 0&&e._addNodeRef(this.cache,r.extensions[this.name].light)}}_loadLight(e){let t=this.parser,n="light:"+e,i=t.cache.get(n);if(i)return i;let r=t.json,c=((r.extensions&&r.extensions[this.name]||{}).lights||[])[e],l,h=new be(16777215);c.color!==void 0&&h.setRGB(c.color[0],c.color[1],c.color[2],vt);let u=c.range!==void 0?c.range:0;switch(c.type){case"directional":l=new Kn(h),l.target.position.set(0,0,-1),l.add(l.target);break;case"point":l=new Ys(h),l.distance=u;break;case"spot":l=new qs(h),l.distance=u,c.spot=c.spot||{},c.spot.innerConeAngle=c.spot.innerConeAngle!==void 0?c.spot.innerConeAngle:0,c.spot.outerConeAngle=c.spot.outerConeAngle!==void 0?c.spot.outerConeAngle:Math.PI/4,l.angle=c.spot.outerConeAngle,l.penumbra=1-c.spot.innerConeAngle/c.spot.outerConeAngle,l.target.position.set(0,0,-1),l.add(l.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+c.type)}return l.position.set(0,0,0),Bn(l,c),c.intensity!==void 0&&(l.intensity=c.intensity),l.name=t.createUniqueName(c.name||"light_"+e),i=Promise.resolve(l),t.cache.add(n,i),i}getDependency(e,t){if(e==="light")return this._loadLight(t)}createNodeAttachment(e){let t=this,n=this.parser,r=n.json.nodes[e],a=(r.extensions&&r.extensions[this.name]||{}).light;return a===void 0?null:this._loadLight(a).then(function(c){return n._getNodeRef(t.cache,a,c)})}},wc=class{constructor(){this.name=Oe.KHR_MATERIALS_UNLIT}getMaterialType(){return an}extendParams(e,t,n){let i=[];e.color=new be(1,1,1),e.opacity=1;let r=t.pbrMetallicRoughness;if(r){if(Array.isArray(r.baseColorFactor)){let o=r.baseColorFactor;e.color.setRGB(o[0],o[1],o[2],vt),e.opacity=o[3]}r.baseColorTexture!==void 0&&i.push(n.assignTexture(e,"map",r.baseColorTexture,lt))}return Promise.all(i)}},Rc=class{constructor(e){this.parser=e,this.name=Oe.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(e,t){let i=this.parser.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();let r=i.extensions[this.name].emissiveStrength;return r!==void 0&&(t.emissiveIntensity=r),Promise.resolve()}},Cc=class{constructor(e){this.parser=e,this.name=Oe.KHR_MATERIALS_CLEARCOAT}getMaterialType(e){let n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:Nt}extendMaterialParams(e,t){let n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();let r=[],o=i.extensions[this.name];if(o.clearcoatFactor!==void 0&&(t.clearcoat=o.clearcoatFactor),o.clearcoatTexture!==void 0&&r.push(n.assignTexture(t,"clearcoatMap",o.clearcoatTexture)),o.clearcoatRoughnessFactor!==void 0&&(t.clearcoatRoughness=o.clearcoatRoughnessFactor),o.clearcoatRoughnessTexture!==void 0&&r.push(n.assignTexture(t,"clearcoatRoughnessMap",o.clearcoatRoughnessTexture)),o.clearcoatNormalTexture!==void 0&&(r.push(n.assignTexture(t,"clearcoatNormalMap",o.clearcoatNormalTexture)),o.clearcoatNormalTexture.scale!==void 0)){let a=o.clearcoatNormalTexture.scale;t.clearcoatNormalScale=new ze(a,a)}return Promise.all(r)}},Ic=class{constructor(e){this.parser=e,this.name=Oe.KHR_MATERIALS_DISPERSION}getMaterialType(e){let n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:Nt}extendMaterialParams(e,t){let i=this.parser.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();let r=i.extensions[this.name];return t.dispersion=r.dispersion!==void 0?r.dispersion:0,Promise.resolve()}},Pc=class{constructor(e){this.parser=e,this.name=Oe.KHR_MATERIALS_IRIDESCENCE}getMaterialType(e){let n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:Nt}extendMaterialParams(e,t){let n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();let r=[],o=i.extensions[this.name];return o.iridescenceFactor!==void 0&&(t.iridescence=o.iridescenceFactor),o.iridescenceTexture!==void 0&&r.push(n.assignTexture(t,"iridescenceMap",o.iridescenceTexture)),o.iridescenceIor!==void 0&&(t.iridescenceIOR=o.iridescenceIor),t.iridescenceThicknessRange===void 0&&(t.iridescenceThicknessRange=[100,400]),o.iridescenceThicknessMinimum!==void 0&&(t.iridescenceThicknessRange[0]=o.iridescenceThicknessMinimum),o.iridescenceThicknessMaximum!==void 0&&(t.iridescenceThicknessRange[1]=o.iridescenceThicknessMaximum),o.iridescenceThicknessTexture!==void 0&&r.push(n.assignTexture(t,"iridescenceThicknessMap",o.iridescenceThicknessTexture)),Promise.all(r)}},Lc=class{constructor(e){this.parser=e,this.name=Oe.KHR_MATERIALS_SHEEN}getMaterialType(e){let n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:Nt}extendMaterialParams(e,t){let n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();let r=[];t.sheenColor=new be(0,0,0),t.sheenRoughness=0,t.sheen=1;let o=i.extensions[this.name];if(o.sheenColorFactor!==void 0){let a=o.sheenColorFactor;t.sheenColor.setRGB(a[0],a[1],a[2],vt)}return o.sheenRoughnessFactor!==void 0&&(t.sheenRoughness=o.sheenRoughnessFactor),o.sheenColorTexture!==void 0&&r.push(n.assignTexture(t,"sheenColorMap",o.sheenColorTexture,lt)),o.sheenRoughnessTexture!==void 0&&r.push(n.assignTexture(t,"sheenRoughnessMap",o.sheenRoughnessTexture)),Promise.all(r)}},Dc=class{constructor(e){this.parser=e,this.name=Oe.KHR_MATERIALS_TRANSMISSION}getMaterialType(e){let n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:Nt}extendMaterialParams(e,t){let n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();let r=[],o=i.extensions[this.name];return o.transmissionFactor!==void 0&&(t.transmission=o.transmissionFactor),o.transmissionTexture!==void 0&&r.push(n.assignTexture(t,"transmissionMap",o.transmissionTexture)),Promise.all(r)}},Uc=class{constructor(e){this.parser=e,this.name=Oe.KHR_MATERIALS_VOLUME}getMaterialType(e){let n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:Nt}extendMaterialParams(e,t){let n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();let r=[],o=i.extensions[this.name];t.thickness=o.thicknessFactor!==void 0?o.thicknessFactor:0,o.thicknessTexture!==void 0&&r.push(n.assignTexture(t,"thicknessMap",o.thicknessTexture)),t.attenuationDistance=o.attenuationDistance||1/0;let a=o.attenuationColor||[1,1,1];return t.attenuationColor=new be().setRGB(a[0],a[1],a[2],vt),Promise.all(r)}},Nc=class{constructor(e){this.parser=e,this.name=Oe.KHR_MATERIALS_IOR}getMaterialType(e){let n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:Nt}extendMaterialParams(e,t){let i=this.parser.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();let r=i.extensions[this.name];return t.ior=r.ior!==void 0?r.ior:1.5,Promise.resolve()}},Fc=class{constructor(e){this.parser=e,this.name=Oe.KHR_MATERIALS_SPECULAR}getMaterialType(e){let n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:Nt}extendMaterialParams(e,t){let n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();let r=[],o=i.extensions[this.name];t.specularIntensity=o.specularFactor!==void 0?o.specularFactor:1,o.specularTexture!==void 0&&r.push(n.assignTexture(t,"specularIntensityMap",o.specularTexture));let a=o.specularColorFactor||[1,1,1];return t.specularColor=new be().setRGB(a[0],a[1],a[2],vt),o.specularColorTexture!==void 0&&r.push(n.assignTexture(t,"specularColorMap",o.specularColorTexture,lt)),Promise.all(r)}},Oc=class{constructor(e){this.parser=e,this.name=Oe.EXT_MATERIALS_BUMP}getMaterialType(e){let n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:Nt}extendMaterialParams(e,t){let n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();let r=[],o=i.extensions[this.name];return t.bumpScale=o.bumpFactor!==void 0?o.bumpFactor:1,o.bumpTexture!==void 0&&r.push(n.assignTexture(t,"bumpMap",o.bumpTexture)),Promise.all(r)}},Bc=class{constructor(e){this.parser=e,this.name=Oe.KHR_MATERIALS_ANISOTROPY}getMaterialType(e){let n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:Nt}extendMaterialParams(e,t){let n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();let r=[],o=i.extensions[this.name];return o.anisotropyStrength!==void 0&&(t.anisotropy=o.anisotropyStrength),o.anisotropyRotation!==void 0&&(t.anisotropyRotation=o.anisotropyRotation),o.anisotropyTexture!==void 0&&r.push(n.assignTexture(t,"anisotropyMap",o.anisotropyTexture)),Promise.all(r)}},zc=class{constructor(e){this.parser=e,this.name=Oe.KHR_TEXTURE_BASISU}loadTexture(e){let t=this.parser,n=t.json,i=n.textures[e];if(!i.extensions||!i.extensions[this.name])return null;let r=i.extensions[this.name],o=t.options.ktx2Loader;if(!o){if(n.extensionsRequired&&n.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,r.source,o)}},kc=class{constructor(e){this.parser=e,this.name=Oe.EXT_TEXTURE_WEBP}loadTexture(e){let t=this.name,n=this.parser,i=n.json,r=i.textures[e];if(!r.extensions||!r.extensions[t])return null;let o=r.extensions[t],a=i.images[o.source],c=n.textureLoader;if(a.uri){let l=n.options.manager.getHandler(a.uri);l!==null&&(c=l)}return n.loadTextureImage(e,o.source,c)}},Vc=class{constructor(e){this.parser=e,this.name=Oe.EXT_TEXTURE_AVIF}loadTexture(e){let t=this.name,n=this.parser,i=n.json,r=i.textures[e];if(!r.extensions||!r.extensions[t])return null;let o=r.extensions[t],a=i.images[o.source],c=n.textureLoader;if(a.uri){let l=n.options.manager.getHandler(a.uri);l!==null&&(c=l)}return n.loadTextureImage(e,o.source,c)}},Hc=class{constructor(e){this.name=Oe.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){let t=this.parser.json,n=t.bufferViews[e];if(n.extensions&&n.extensions[this.name]){let i=n.extensions[this.name],r=this.parser.getDependency("buffer",i.buffer),o=this.parser.options.meshoptDecoder;if(!o||!o.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return r.then(function(a){let c=i.byteOffset||0,l=i.byteLength||0,h=i.count,u=i.byteStride,d=new Uint8Array(a,c,l);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(h,u,d,i.mode,i.filter).then(function(p){return p.buffer}):o.ready.then(function(){let p=new ArrayBuffer(h*u);return o.decodeGltfBuffer(new Uint8Array(p),h,u,d,i.mode,i.filter),p})})}else return null}},Gc=class{constructor(e){this.name=Oe.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){let t=this.parser.json,n=t.nodes[e];if(!n.extensions||!n.extensions[this.name]||n.mesh===void 0)return null;let i=t.meshes[n.mesh];for(let l of i.primitives)if(l.mode!==Kt.TRIANGLES&&l.mode!==Kt.TRIANGLE_STRIP&&l.mode!==Kt.TRIANGLE_FAN&&l.mode!==void 0)return null;let o=n.extensions[this.name].attributes,a=[],c={};for(let l in o)a.push(this.parser.getDependency("accessor",o[l]).then(h=>(c[l]=h,c[l])));return a.length<1?null:(a.push(this.parser.createNodeMesh(e)),Promise.all(a).then(l=>{let h=l.pop(),u=h.isGroup?h.children:[h],d=l[0].count,p=[];for(let g of u){let _=new Ie,m=new P,f=new Rt,E=new P(1,1,1),T=new Fs(g.geometry,g.material,d);for(let M=0;M<d;M++)c.TRANSLATION&&m.fromBufferAttribute(c.TRANSLATION,M),c.ROTATION&&f.fromBufferAttribute(c.ROTATION,M),c.SCALE&&E.fromBufferAttribute(c.SCALE,M),T.setMatrixAt(M,_.compose(m,f,E));for(let M in c)if(M==="_COLOR_0"){let L=c[M];T.instanceColor=new Zn(L.array,L.itemSize,L.normalized)}else M!=="TRANSLATION"&&M!=="ROTATION"&&M!=="SCALE"&&g.geometry.setAttribute(M,c[M]);rt.prototype.copy.call(T,g),this.parser.assignFinalMaterial(T),p.push(T)}return h.isGroup?(h.clear(),h.add(...p),h):p[0]}))}},yu="glTF",ar=12,mu={JSON:1313821514,BIN:5130562},Wc=class{constructor(e){this.name=Oe.KHR_BINARY_GLTF,this.content=null,this.body=null;let t=new DataView(e,0,ar),n=new TextDecoder;if(this.header={magic:n.decode(new Uint8Array(e.slice(0,4))),version:t.getUint32(4,!0),length:t.getUint32(8,!0)},this.header.magic!==yu)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");let i=this.header.length-ar,r=new DataView(e,ar),o=0;for(;o<i;){let a=r.getUint32(o,!0);o+=4;let c=r.getUint32(o,!0);if(o+=4,c===mu.JSON){let l=new Uint8Array(e,ar+o,a);this.content=n.decode(l)}else if(c===mu.BIN){let l=ar+o;this.body=e.slice(l,l+a)}o+=a}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}},Xc=class{constructor(e,t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=Oe.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=t,this.dracoLoader.preload()}decodePrimitive(e,t){let n=this.json,i=this.dracoLoader,r=e.extensions[this.name].bufferView,o=e.extensions[this.name].attributes,a={},c={},l={};for(let h in o){let u=Kc[h]||h.toLowerCase();a[u]=o[h]}for(let h in e.attributes){let u=Kc[h]||h.toLowerCase();if(o[h]!==void 0){let d=n.accessors[e.attributes[h]],p=us[d.componentType];l[u]=p.name,c[u]=d.normalized===!0}}return t.getDependency("bufferView",r).then(function(h){return new Promise(function(u,d){i.decodeDracoFile(h,function(p){for(let g in p.attributes){let _=p.attributes[g],m=c[g];m!==void 0&&(_.normalized=m)}u(p)},a,l,vt,d)})})}},qc=class{constructor(){this.name=Oe.KHR_TEXTURE_TRANSFORM}extendTexture(e,t){return(t.texCoord===void 0||t.texCoord===e.channel)&&t.offset===void 0&&t.rotation===void 0&&t.scale===void 0||(e=e.clone(),t.texCoord!==void 0&&(e.channel=t.texCoord),t.offset!==void 0&&e.offset.fromArray(t.offset),t.rotation!==void 0&&(e.rotation=t.rotation),t.scale!==void 0&&e.repeat.fromArray(t.scale),e.needsUpdate=!0),e}},Yc=class{constructor(){this.name=Oe.KHR_MESH_QUANTIZATION}},ea=class extends Pn{constructor(e,t,n,i){super(e,t,n,i)}copySampleValue_(e){let t=this.resultBuffer,n=this.sampleValues,i=this.valueSize,r=e*i*3+i;for(let o=0;o!==i;o++)t[o]=n[r+o];return t}interpolate_(e,t,n,i){let r=this.resultBuffer,o=this.sampleValues,a=this.valueSize,c=a*2,l=a*3,h=i-t,u=(n-t)/h,d=u*u,p=d*u,g=e*l,_=g-l,m=-2*p+3*d,f=p-d,E=1-m,T=f-d+u;for(let M=0;M!==a;M++){let L=o[_+M+a],R=o[_+M+c]*h,w=o[g+M+a],N=o[g+M]*h;r[M]=E*L+T*R+m*w+f*N}return r}},s_=new Rt,Zc=class extends ea{interpolate_(e,t,n,i){let r=super.interpolate_(e,t,n,i);return s_.fromArray(r).normalize().toArray(r),r}},Kt={FLOAT:5126,FLOAT_MAT3:35675,FLOAT_MAT4:35676,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,LINEAR:9729,REPEAT:10497,SAMPLER_2D:35678,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123},us={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},gu={9728:yt,9729:Ct,9984:uo,9985:ts,9986:vi,9987:ln},_u={33071:dn,33648:Hi,10497:Yn},bc={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Kc={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},$n={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},r_={CUBICSPLINE:void 0,LINEAR:hi,STEP:li},Tc={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function o_(s){return s.DefaultMaterial===void 0&&(s.DefaultMaterial=new pi({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:rn})),s.DefaultMaterial}function Ai(s,e,t){for(let n in t.extensions)s[n]===void 0&&(e.userData.gltfExtensions=e.userData.gltfExtensions||{},e.userData.gltfExtensions[n]=t.extensions[n])}function Bn(s,e){e.extras!==void 0&&(typeof e.extras=="object"?Object.assign(s.userData,e.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+e.extras))}function a_(s,e,t){let n=!1,i=!1,r=!1;for(let l=0,h=e.length;l<h;l++){let u=e[l];if(u.POSITION!==void 0&&(n=!0),u.NORMAL!==void 0&&(i=!0),u.COLOR_0!==void 0&&(r=!0),n&&i&&r)break}if(!n&&!i&&!r)return Promise.resolve(s);let o=[],a=[],c=[];for(let l=0,h=e.length;l<h;l++){let u=e[l];if(n){let d=u.POSITION!==void 0?t.getDependency("accessor",u.POSITION):s.attributes.position;o.push(d)}if(i){let d=u.NORMAL!==void 0?t.getDependency("accessor",u.NORMAL):s.attributes.normal;a.push(d)}if(r){let d=u.COLOR_0!==void 0?t.getDependency("accessor",u.COLOR_0):s.attributes.color;c.push(d)}}return Promise.all([Promise.all(o),Promise.all(a),Promise.all(c)]).then(function(l){let h=l[0],u=l[1],d=l[2];return n&&(s.morphAttributes.position=h),i&&(s.morphAttributes.normal=u),r&&(s.morphAttributes.color=d),s.morphTargetsRelative=!0,s})}function c_(s,e){if(s.updateMorphTargets(),e.weights!==void 0)for(let t=0,n=e.weights.length;t<n;t++)s.morphTargetInfluences[t]=e.weights[t];if(e.extras&&Array.isArray(e.extras.targetNames)){let t=e.extras.targetNames;if(s.morphTargetInfluences.length===t.length){s.morphTargetDictionary={};for(let n=0,i=t.length;n<i;n++)s.morphTargetDictionary[t[n]]=n}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function l_(s){let e,t=s.extensions&&s.extensions[Oe.KHR_DRACO_MESH_COMPRESSION];if(t?e="draco:"+t.bufferView+":"+t.indices+":"+Ec(t.attributes):e=s.indices+":"+Ec(s.attributes)+":"+s.mode,s.targets!==void 0)for(let n=0,i=s.targets.length;n<i;n++)e+=":"+Ec(s.targets[n]);return e}function Ec(s){let e="",t=Object.keys(s).sort();for(let n=0,i=t.length;n<i;n++)e+=t[n]+":"+s[t[n]]+";";return e}function Jc(s){switch(s){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}function h_(s){return s.search(/\.jpe?g($|\?)/i)>0||s.search(/^data\:image\/jpeg/)===0?"image/jpeg":s.search(/\.webp($|\?)/i)>0||s.search(/^data\:image\/webp/)===0?"image/webp":s.search(/\.ktx2($|\?)/i)>0||s.search(/^data\:image\/ktx2/)===0?"image/ktx2":"image/png"}var u_=new Ie,$c=class{constructor(e={},t={}){this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new i_,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let n=!1,i=-1,r=!1,o=-1;if(typeof navigator<"u"){let a=navigator.userAgent;n=/^((?!chrome|android).)*safari/i.test(a)===!0;let c=a.match(/Version\/(\d+)/);i=n&&c?parseInt(c[1],10):-1,r=a.indexOf("Firefox")>-1,o=r?a.match(/Firefox\/([0-9]+)\./)[1]:-1}typeof createImageBitmap>"u"||n&&i<17||r&&o<98?this.textureLoader=new Ws(this.options.manager):this.textureLoader=new Ks(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new es(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){let n=this,i=this.json,r=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(o){return o._markDefs&&o._markDefs()}),Promise.all(this._invokeAll(function(o){return o.beforeRoot&&o.beforeRoot()})).then(function(){return Promise.all([n.getDependencies("scene"),n.getDependencies("animation"),n.getDependencies("camera")])}).then(function(o){let a={scene:o[0][i.scene||0],scenes:o[0],animations:o[1],cameras:o[2],asset:i.asset,parser:n,userData:{}};return Ai(r,a,i),Bn(a,i),Promise.all(n._invokeAll(function(c){return c.afterRoot&&c.afterRoot(a)})).then(function(){for(let c of a.scenes)c.updateMatrixWorld();e(a)})}).catch(t)}_markDefs(){let e=this.json.nodes||[],t=this.json.skins||[],n=this.json.meshes||[];for(let i=0,r=t.length;i<r;i++){let o=t[i].joints;for(let a=0,c=o.length;a<c;a++)e[o[a]].isBone=!0}for(let i=0,r=e.length;i<r;i++){let o=e[i];o.mesh!==void 0&&(this._addNodeRef(this.meshCache,o.mesh),o.skin!==void 0&&(n[o.mesh].isSkinnedMesh=!0)),o.camera!==void 0&&this._addNodeRef(this.cameraCache,o.camera)}}_addNodeRef(e,t){t!==void 0&&(e.refs[t]===void 0&&(e.refs[t]=e.uses[t]=0),e.refs[t]++)}_getNodeRef(e,t,n){if(e.refs[t]<=1)return n;let i=n.clone(),r=(o,a)=>{let c=this.associations.get(o);c!=null&&this.associations.set(a,c);for(let[l,h]of o.children.entries())r(h,a.children[l])};return r(n,i),i.name+="_instance_"+e.uses[t]++,i}_invokeOne(e){let t=Object.values(this.plugins);t.push(this);for(let n=0;n<t.length;n++){let i=e(t[n]);if(i)return i}return null}_invokeAll(e){let t=Object.values(this.plugins);t.unshift(this);let n=[];for(let i=0;i<t.length;i++){let r=e(t[i]);r&&n.push(r)}return n}getDependency(e,t){let n=e+":"+t,i=this.cache.get(n);if(!i){switch(e){case"scene":i=this.loadScene(t);break;case"node":i=this._invokeOne(function(r){return r.loadNode&&r.loadNode(t)});break;case"mesh":i=this._invokeOne(function(r){return r.loadMesh&&r.loadMesh(t)});break;case"accessor":i=this.loadAccessor(t);break;case"bufferView":i=this._invokeOne(function(r){return r.loadBufferView&&r.loadBufferView(t)});break;case"buffer":i=this.loadBuffer(t);break;case"material":i=this._invokeOne(function(r){return r.loadMaterial&&r.loadMaterial(t)});break;case"texture":i=this._invokeOne(function(r){return r.loadTexture&&r.loadTexture(t)});break;case"skin":i=this.loadSkin(t);break;case"animation":i=this._invokeOne(function(r){return r.loadAnimation&&r.loadAnimation(t)});break;case"camera":i=this.loadCamera(t);break;default:if(i=this._invokeOne(function(r){return r!=this&&r.getDependency&&r.getDependency(e,t)}),!i)throw new Error("Unknown type: "+e);break}this.cache.add(n,i)}return i}getDependencies(e){let t=this.cache.get(e);if(!t){let n=this,i=this.json[e+(e==="mesh"?"es":"s")]||[];t=Promise.all(i.map(function(r,o){return n.getDependency(e,o)})),this.cache.add(e,t)}return t}loadBuffer(e){let t=this.json.buffers[e],n=this.fileLoader;if(t.type&&t.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+t.type+" buffer type is not supported.");if(t.uri===void 0&&e===0)return Promise.resolve(this.extensions[Oe.KHR_BINARY_GLTF].body);let i=this.options;return new Promise(function(r,o){n.load(Un.resolveURL(t.uri,i.path),r,void 0,function(){o(new Error('THREE.GLTFLoader: Failed to load buffer "'+t.uri+'".'))})})}loadBufferView(e){let t=this.json.bufferViews[e];return this.getDependency("buffer",t.buffer).then(function(n){let i=t.byteLength||0,r=t.byteOffset||0;return n.slice(r,r+i)})}loadAccessor(e){let t=this,n=this.json,i=this.json.accessors[e];if(i.bufferView===void 0&&i.sparse===void 0){let o=bc[i.type],a=us[i.componentType],c=i.normalized===!0,l=new a(i.count*o);return Promise.resolve(new ft(l,o,c))}let r=[];return i.bufferView!==void 0?r.push(this.getDependency("bufferView",i.bufferView)):r.push(null),i.sparse!==void 0&&(r.push(this.getDependency("bufferView",i.sparse.indices.bufferView)),r.push(this.getDependency("bufferView",i.sparse.values.bufferView))),Promise.all(r).then(function(o){let a=o[0],c=bc[i.type],l=us[i.componentType],h=l.BYTES_PER_ELEMENT,u=h*c,d=i.byteOffset||0,p=i.bufferView!==void 0?n.bufferViews[i.bufferView].byteStride:void 0,g=i.normalized===!0,_,m;if(p&&p!==u){let f=Math.floor(d/p),E="InterleavedBuffer:"+i.bufferView+":"+i.componentType+":"+f+":"+i.count,T=t.cache.get(E);T||(_=new l(a,f*p,i.count*p/h),T=new Zi(_,p/h),t.cache.add(E,T)),m=new Ki(T,c,d%p/h,g)}else a===null?_=new l(i.count*c):_=new l(a,d,i.count*c),m=new ft(_,c,g);if(i.sparse!==void 0){let f=bc.SCALAR,E=us[i.sparse.indices.componentType],T=i.sparse.indices.byteOffset||0,M=i.sparse.values.byteOffset||0,L=new E(o[1],T,i.sparse.count*f),R=new l(o[2],M,i.sparse.count*c);a!==null&&(m=new ft(m.array.slice(),m.itemSize,m.normalized)),m.normalized=!1;for(let w=0,N=L.length;w<N;w++){let S=L[w];if(m.setX(S,R[w*c]),c>=2&&m.setY(S,R[w*c+1]),c>=3&&m.setZ(S,R[w*c+2]),c>=4&&m.setW(S,R[w*c+3]),c>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}m.normalized=g}return m})}loadTexture(e){let t=this.json,n=this.options,r=t.textures[e].source,o=t.images[r],a=this.textureLoader;if(o.uri){let c=n.manager.getHandler(o.uri);c!==null&&(a=c)}return this.loadTextureImage(e,r,a)}loadTextureImage(e,t,n){let i=this,r=this.json,o=r.textures[e],a=r.images[t],c=(a.uri||a.bufferView)+":"+o.sampler;if(this.textureCache[c])return this.textureCache[c];let l=this.loadImageSource(t,n).then(function(h){h.flipY=!1,h.name=o.name||a.name||"",h.name===""&&typeof a.uri=="string"&&a.uri.startsWith("data:image/")===!1&&(h.name=a.uri);let d=(r.samplers||{})[o.sampler]||{};return h.magFilter=gu[d.magFilter]||Ct,h.minFilter=gu[d.minFilter]||ln,h.wrapS=_u[d.wrapS]||Yn,h.wrapT=_u[d.wrapT]||Yn,h.generateMipmaps=!h.isCompressedTexture&&h.minFilter!==yt&&h.minFilter!==Ct,i.associations.set(h,{textures:e}),h}).catch(function(){return null});return this.textureCache[c]=l,l}loadImageSource(e,t){let n=this,i=this.json,r=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(u=>u.clone());let o=i.images[e],a=self.URL||self.webkitURL,c=o.uri||"",l=!1;if(o.bufferView!==void 0)c=n.getDependency("bufferView",o.bufferView).then(function(u){l=!0;let d=new Blob([u],{type:o.mimeType});return c=a.createObjectURL(d),c});else if(o.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");let h=Promise.resolve(c).then(function(u){return new Promise(function(d,p){let g=d;t.isImageBitmapLoader===!0&&(g=function(_){let m=new _t(_);m.needsUpdate=!0,d(m)}),t.load(Un.resolveURL(u,r.path),g,void 0,p)})}).then(function(u){return l===!0&&a.revokeObjectURL(c),Bn(u,o),u.userData.mimeType=o.mimeType||h_(o.uri),u}).catch(function(u){throw console.error("THREE.GLTFLoader: Couldn't load texture",c),u});return this.sourceCache[e]=h,h}assignTexture(e,t,n,i){let r=this;return this.getDependency("texture",n.index).then(function(o){if(!o)return null;if(n.texCoord!==void 0&&n.texCoord>0&&(o=o.clone(),o.channel=n.texCoord),r.extensions[Oe.KHR_TEXTURE_TRANSFORM]){let a=n.extensions!==void 0?n.extensions[Oe.KHR_TEXTURE_TRANSFORM]:void 0;if(a){let c=r.associations.get(o);o=r.extensions[Oe.KHR_TEXTURE_TRANSFORM].extendTexture(o,a),r.associations.set(o,c)}}return i!==void 0&&(o.colorSpace=i),e[t]=o,o})}assignFinalMaterial(e){let t=e.geometry,n=e.material,i=t.attributes.tangent===void 0,r=t.attributes.color!==void 0,o=t.attributes.normal===void 0;if(e.isPoints){let a="PointsMaterial:"+n.uuid,c=this.cache.get(a);c||(c=new Qi,Ut.prototype.copy.call(c,n),c.color.copy(n.color),c.map=n.map,c.sizeAttenuation=!1,this.cache.add(a,c)),n=c}else if(e.isLine){let a="LineBasicMaterial:"+n.uuid,c=this.cache.get(a);c||(c=new ji,Ut.prototype.copy.call(c,n),c.color.copy(n.color),c.map=n.map,this.cache.add(a,c)),n=c}if(i||r||o){let a="ClonedMaterial:"+n.uuid+":";i&&(a+="derivative-tangents:"),r&&(a+="vertex-colors:"),o&&(a+="flat-shading:");let c=this.cache.get(a);c||(c=n.clone(),r&&(c.vertexColors=!0),o&&(c.flatShading=!0),i&&(c.normalScale&&(c.normalScale.y*=-1),c.clearcoatNormalScale&&(c.clearcoatNormalScale.y*=-1)),this.cache.add(a,c),this.associations.set(c,this.associations.get(n))),n=c}e.material=n}getMaterialType(){return pi}loadMaterial(e){let t=this,n=this.json,i=this.extensions,r=n.materials[e],o,a={},c=r.extensions||{},l=[];if(c[Oe.KHR_MATERIALS_UNLIT]){let u=i[Oe.KHR_MATERIALS_UNLIT];o=u.getMaterialType(),l.push(u.extendParams(a,r,t))}else{let u=r.pbrMetallicRoughness||{};if(a.color=new be(1,1,1),a.opacity=1,Array.isArray(u.baseColorFactor)){let d=u.baseColorFactor;a.color.setRGB(d[0],d[1],d[2],vt),a.opacity=d[3]}u.baseColorTexture!==void 0&&l.push(t.assignTexture(a,"map",u.baseColorTexture,lt)),a.metalness=u.metallicFactor!==void 0?u.metallicFactor:1,a.roughness=u.roughnessFactor!==void 0?u.roughnessFactor:1,u.metallicRoughnessTexture!==void 0&&(l.push(t.assignTexture(a,"metalnessMap",u.metallicRoughnessTexture)),l.push(t.assignTexture(a,"roughnessMap",u.metallicRoughnessTexture))),o=this._invokeOne(function(d){return d.getMaterialType&&d.getMaterialType(e)}),l.push(Promise.all(this._invokeAll(function(d){return d.extendMaterialParams&&d.extendMaterialParams(e,a)})))}r.doubleSided===!0&&(a.side=Yt);let h=r.alphaMode||Tc.OPAQUE;if(h===Tc.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,h===Tc.MASK&&(a.alphaTest=r.alphaCutoff!==void 0?r.alphaCutoff:.5)),r.normalTexture!==void 0&&o!==an&&(l.push(t.assignTexture(a,"normalMap",r.normalTexture)),a.normalScale=new ze(1,1),r.normalTexture.scale!==void 0)){let u=r.normalTexture.scale;a.normalScale.set(u,u)}if(r.occlusionTexture!==void 0&&o!==an&&(l.push(t.assignTexture(a,"aoMap",r.occlusionTexture)),r.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=r.occlusionTexture.strength)),r.emissiveFactor!==void 0&&o!==an){let u=r.emissiveFactor;a.emissive=new be().setRGB(u[0],u[1],u[2],vt)}return r.emissiveTexture!==void 0&&o!==an&&l.push(t.assignTexture(a,"emissiveMap",r.emissiveTexture,lt)),Promise.all(l).then(function(){let u=new o(a);return r.name&&(u.name=r.name),Bn(u,r),t.associations.set(u,{materials:e}),r.extensions&&Ai(i,u,r),u})}createUniqueName(e){let t=Qe.sanitizeNodeName(e||"");return t in this.nodeNamesUsed?t+"_"+ ++this.nodeNamesUsed[t]:(this.nodeNamesUsed[t]=0,t)}loadGeometries(e){let t=this,n=this.extensions,i=this.primitiveCache;function r(a){return n[Oe.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,t).then(function(c){return xu(c,a,t)})}let o=[];for(let a=0,c=e.length;a<c;a++){let l=e[a],h=l_(l),u=i[h];if(u)o.push(u.promise);else{let d;l.extensions&&l.extensions[Oe.KHR_DRACO_MESH_COMPRESSION]?d=r(l):d=xu(new Vt,l,t),i[h]={primitive:l,promise:d},o.push(d)}}return Promise.all(o)}loadMesh(e){let t=this,n=this.json,i=this.extensions,r=n.meshes[e],o=r.primitives,a=[];for(let c=0,l=o.length;c<l;c++){let h=o[c].material===void 0?o_(this.cache):this.getDependency("material",o[c].material);a.push(h)}return a.push(t.loadGeometries(o)),Promise.all(a).then(function(c){let l=c.slice(0,c.length-1),h=c[c.length-1],u=[];for(let p=0,g=h.length;p<g;p++){let _=h[p],m=o[p],f,E=l[p];if(m.mode===Kt.TRIANGLES||m.mode===Kt.TRIANGLE_STRIP||m.mode===Kt.TRIANGLE_FAN||m.mode===void 0)f=r.isSkinnedMesh===!0?new Ds(_,E):new Mt(_,E),f.isSkinnedMesh===!0&&f.normalizeSkinWeights(),m.mode===Kt.TRIANGLE_STRIP?f.geometry=Sc(f.geometry,sr):m.mode===Kt.TRIANGLE_FAN&&(f.geometry=Sc(f.geometry,os));else if(m.mode===Kt.LINES)f=new Os(_,E);else if(m.mode===Kt.LINE_STRIP)f=new fi(_,E);else if(m.mode===Kt.LINE_LOOP)f=new Bs(_,E);else if(m.mode===Kt.POINTS)f=new zs(_,E);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+m.mode);Object.keys(f.geometry.morphAttributes).length>0&&c_(f,r),f.name=t.createUniqueName(r.name||"mesh_"+e),Bn(f,r),m.extensions&&Ai(i,f,m),t.assignFinalMaterial(f),u.push(f)}for(let p=0,g=u.length;p<g;p++)t.associations.set(u[p],{meshes:e,primitives:p});if(u.length===1)return r.extensions&&Ai(i,u[0],r),u[0];let d=new nn;r.extensions&&Ai(i,d,r),t.associations.set(d,{meshes:e});for(let p=0,g=u.length;p<g;p++)d.add(u[p]);return d})}loadCamera(e){let t,n=this.json.cameras[e],i=n[n.type];if(!i){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return n.type==="perspective"?t=new dt(tc.radToDeg(i.yfov),i.aspectRatio||1,i.znear||1,i.zfar||2e6):n.type==="orthographic"&&(t=new _i(-i.xmag,i.xmag,i.ymag,-i.ymag,i.znear,i.zfar)),n.name&&(t.name=this.createUniqueName(n.name)),Bn(t,n),Promise.resolve(t)}loadSkin(e){let t=this.json.skins[e],n=[];for(let i=0,r=t.joints.length;i<r;i++)n.push(this._loadNodeShallow(t.joints[i]));return t.inverseBindMatrices!==void 0?n.push(this.getDependency("accessor",t.inverseBindMatrices)):n.push(null),Promise.all(n).then(function(i){let r=i.pop(),o=i,a=[],c=[];for(let l=0,h=o.length;l<h;l++){let u=o[l];if(u){a.push(u);let d=new Ie;r!==null&&d.fromArray(r.array,l*16),c.push(d)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',t.joints[l])}return new Ns(a,c)})}loadAnimation(e){let t=this.json,n=this,i=t.animations[e],r=i.name?i.name:"animation_"+e,o=[],a=[],c=[],l=[],h=[];for(let u=0,d=i.channels.length;u<d;u++){let p=i.channels[u],g=i.samplers[p.sampler],_=p.target,m=_.node,f=i.parameters!==void 0?i.parameters[g.input]:g.input,E=i.parameters!==void 0?i.parameters[g.output]:g.output;_.node!==void 0&&(o.push(this.getDependency("node",m)),a.push(this.getDependency("accessor",f)),c.push(this.getDependency("accessor",E)),l.push(g),h.push(_))}return Promise.all([Promise.all(o),Promise.all(a),Promise.all(c),Promise.all(l),Promise.all(h)]).then(function(u){let d=u[0],p=u[1],g=u[2],_=u[3],m=u[4],f=[];for(let E=0,T=d.length;E<T;E++){let M=d[E],L=p[E],R=g[E],w=_[E],N=m[E];if(M===void 0)continue;M.updateMatrix&&M.updateMatrix();let S=n._createAnimationTracks(M,L,R,w,N);if(S)for(let v=0;v<S.length;v++)f.push(S[v])}return new mi(r,void 0,f)})}createNodeMesh(e){let t=this.json,n=this,i=t.nodes[e];return i.mesh===void 0?null:n.getDependency("mesh",i.mesh).then(function(r){let o=n._getNodeRef(n.meshCache,i.mesh,r);return i.weights!==void 0&&o.traverse(function(a){if(a.isMesh)for(let c=0,l=i.weights.length;c<l;c++)a.morphTargetInfluences[c]=i.weights[c]}),o})}loadNode(e){let t=this.json,n=this,i=t.nodes[e],r=n._loadNodeShallow(e),o=[],a=i.children||[];for(let l=0,h=a.length;l<h;l++)o.push(n.getDependency("node",a[l]));let c=i.skin===void 0?Promise.resolve(null):n.getDependency("skin",i.skin);return Promise.all([r,Promise.all(o),c]).then(function(l){let h=l[0],u=l[1],d=l[2];d!==null&&h.traverse(function(p){p.isSkinnedMesh&&p.bind(d,u_)});for(let p=0,g=u.length;p<g;p++)h.add(u[p]);return h})}_loadNodeShallow(e){let t=this.json,n=this.extensions,i=this;if(this.nodeCache[e]!==void 0)return this.nodeCache[e];let r=t.nodes[e],o=r.name?i.createUniqueName(r.name):"",a=[],c=i._invokeOne(function(l){return l.createNodeMesh&&l.createNodeMesh(e)});return c&&a.push(c),r.camera!==void 0&&a.push(i.getDependency("camera",r.camera).then(function(l){return i._getNodeRef(i.cameraCache,r.camera,l)})),i._invokeAll(function(l){return l.createNodeAttachment&&l.createNodeAttachment(e)}).forEach(function(l){a.push(l)}),this.nodeCache[e]=Promise.all(a).then(function(l){let h;if(r.isBone===!0?h=new Ji:l.length>1?h=new nn:l.length===1?h=l[0]:h=new rt,h!==l[0])for(let u=0,d=l.length;u<d;u++)h.add(l[u]);if(r.name&&(h.userData.name=r.name,h.name=o),Bn(h,r),r.extensions&&Ai(n,h,r),r.matrix!==void 0){let u=new Ie;u.fromArray(r.matrix),h.applyMatrix4(u)}else r.translation!==void 0&&h.position.fromArray(r.translation),r.rotation!==void 0&&h.quaternion.fromArray(r.rotation),r.scale!==void 0&&h.scale.fromArray(r.scale);return i.associations.has(h)||i.associations.set(h,{}),i.associations.get(h).nodes=e,h}),this.nodeCache[e]}loadScene(e){let t=this.extensions,n=this.json.scenes[e],i=this,r=new nn;n.name&&(r.name=i.createUniqueName(n.name)),Bn(r,n),n.extensions&&Ai(t,r,n);let o=n.nodes||[],a=[];for(let c=0,l=o.length;c<l;c++)a.push(i.getDependency("node",o[c]));return Promise.all(a).then(function(c){for(let h=0,u=c.length;h<u;h++)r.add(c[h]);let l=h=>{let u=new Map;for(let[d,p]of i.associations)(d instanceof Ut||d instanceof _t)&&u.set(d,p);return h.traverse(d=>{let p=i.associations.get(d);p!=null&&u.set(d,p)}),u};return i.associations=l(r),r})}_createAnimationTracks(e,t,n,i,r){let o=[],a=e.name?e.name:e.uuid,c=[];$n[r.path]===$n.weights?e.traverse(function(d){d.morphTargetInfluences&&c.push(d.name?d.name:d.uuid)}):c.push(a);let l;switch($n[r.path]){case $n.weights:l=gn;break;case $n.rotation:l=_n;break;case $n.translation:case $n.scale:l=xn;break;default:n.itemSize===1?l=gn:l=xn;break}let h=i.interpolation!==void 0?r_[i.interpolation]:hi,u=this._getArrayFromAccessor(n);for(let d=0,p=c.length;d<p;d++){let g=new l(c[d]+"."+$n[r.path],t.array,u,h);i.interpolation==="CUBICSPLINE"&&this._createCubicSplineTrackInterpolant(g),o.push(g)}return o}_getArrayFromAccessor(e){let t=e.array;if(e.normalized){let n=Jc(t.constructor),i=new Float32Array(t.length);for(let r=0,o=t.length;r<o;r++)i[r]=t[r]*n;t=i}return t}_createCubicSplineTrackInterpolant(e){e.createInterpolant=function(n){let i=this instanceof _n?Zc:ea;return new i(this.times,this.values,this.getValueSize()/3,n)},e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}};function d_(s,e,t){let n=e.attributes,i=new It;if(n.POSITION!==void 0){let a=t.json.accessors[n.POSITION],c=a.min,l=a.max;if(c!==void 0&&l!==void 0){if(i.set(new P(c[0],c[1],c[2]),new P(l[0],l[1],l[2])),a.normalized){let h=Jc(us[a.componentType]);i.min.multiplyScalar(h),i.max.multiplyScalar(h)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;let r=e.targets;if(r!==void 0){let a=new P,c=new P;for(let l=0,h=r.length;l<h;l++){let u=r[l];if(u.POSITION!==void 0){let d=t.json.accessors[u.POSITION],p=d.min,g=d.max;if(p!==void 0&&g!==void 0){if(c.setX(Math.max(Math.abs(p[0]),Math.abs(g[0]))),c.setY(Math.max(Math.abs(p[1]),Math.abs(g[1]))),c.setZ(Math.max(Math.abs(p[2]),Math.abs(g[2]))),d.normalized){let _=Jc(us[d.componentType]);c.multiplyScalar(_)}a.max(c)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}i.expandByVector(a)}s.boundingBox=i;let o=new Dt;i.getCenter(o.center),o.radius=i.min.distanceTo(i.max)/2,s.boundingSphere=o}function xu(s,e,t){let n=e.attributes,i=[];function r(o,a){return t.getDependency("accessor",o).then(function(c){s.setAttribute(a,c)})}for(let o in n){let a=Kc[o]||o.toLowerCase();a in s.attributes||i.push(r(n[o],a))}if(e.indices!==void 0&&!s.index){let o=t.getDependency("accessor",e.indices).then(function(a){s.setIndex(a)});i.push(o)}return Be.workingColorSpace!==vt&&"COLOR_0"in n&&console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${Be.workingColorSpace}" not supported.`),Bn(s,e),d_(s,e,t),Promise.all(i).then(function(){return e.targets!==void 0?a_(s,e.targets,t):s})}var f_={dark:{bg:"#0a0e27",amb:16777215,key:16777215,fill:10075135},light:{bg:"#f5f5f7",amb:16777215,key:16777215,fill:16771272}},p_=window.matchMedia("(prefers-reduced-motion: reduce)").matches;function m_(){let s=document.getElementById("artifact-config");if(!s)throw new Error("artifact-config script tag not found");let e=JSON.parse(s.textContent);if(!e.glb)throw new Error("artifact-config.glb missing");return e}function g_(s){let e=atob(s),t=e.length,n=new Uint8Array(t);for(let i=0;i<t;i++)n[i]=e.charCodeAt(i);return n.buffer}function __(s){let e=f_[s.theme==="light"?"light":"dark"],t=s.bg&&/^#?[0-9a-f]{6}$/i.test(s.bg)?`#${s.bg.replace(/^#/,"")}`:e.bg;return{...e,bg:t}}function x_(s,e){let t=s.clientWidth||600,n=s.clientHeight||600,i=new $o({antialias:!0,alpha:!0});i.setPixelRatio(Math.min(window.devicePixelRatio||1,2)),i.setSize(t,n,!1),i.outputColorSpace=lt,i.toneMapping=co,i.toneMappingExposure=1.05,i.domElement.style.display="block",i.domElement.style.width="100%",i.domElement.style.height="100%",s.appendChild(i.domElement);let r=new Ls;r.background=new be(e.bg);let o=new dt(38,t/n,.05,50);o.position.set(0,1.4,2.7),o.lookAt(0,1.05,0),r.add(new Zs(e.amb,.85));let a=new Kn(e.key,1.25);a.position.set(2.5,5,3),r.add(a);let c=new Kn(e.fill,.45);return c.position.set(-3,1.5,-2),r.add(c),new ResizeObserver(()=>{let h=s.clientWidth,u=s.clientHeight;!h||!u||(o.aspect=h/u,o.updateProjectionMatrix(),i.setSize(h,u,!1))}).observe(s),{renderer:i,scene:r,camera:o}}function y_(s){let e=new It().setFromObject(s),t=e.getSize(new P),n=e.getCenter(new P),r=1.8/Math.max(t.y,.001);s.scale.setScalar(r),s.position.copy(n.multiplyScalar(-r)),s.position.y+=t.y*r/2}function v_(s,e){if(!s?.length)return null;if(e){let t=s.find(n=>n.name===e);if(t)return t}return s.find(t=>/idle|breathing|stand/i.test(t.name))||s[0]}function jc(s,e){s.querySelector(".artifact-error")?.remove();let t=document.createElement("div");t.className="artifact-error",t.textContent=e,Object.assign(t.style,{position:"absolute",inset:"0",display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(0,0,0,0.65)",color:"#f87171",font:"14px/1.4 system-ui, sans-serif",padding:"24px",textAlign:"center"}),s.appendChild(t)}function M_(s,e,t){if(!e.name)return;let n=document.createElement("div");n.className="artifact-name-plate",n.textContent=e.name;let i=t.bg&&/^#[ef]/i.test(t.bg);Object.assign(n.style,{position:"absolute",left:"16px",bottom:"16px",padding:"6px 12px",borderRadius:"999px",font:"500 13px/1 system-ui, -apple-system, sans-serif",letterSpacing:"0.01em",color:i?"#111":"#fff",background:i?"rgba(255,255,255,0.85)":"rgba(0,0,0,0.55)",backdropFilter:"blur(8px)",pointerEvents:"none",userSelect:"none"}),s.appendChild(n)}async function vu(){let s=document.getElementById("artifact-stage");if(!s)throw new Error("artifact-stage element not found");s.style.position="relative";let e=m_(),t=__(e);s.style.background=t.bg;let{renderer:n,scene:i,camera:r}=x_(s,t),o;try{o=g_(e.glb)}catch(c){jc(s,"Failed to decode embedded model: "+c.message);return}new Qo().parse(o,"",c=>{let l=c.scene||c.scenes?.[0];if(!l){jc(s,"Embedded GLB has no scene");return}y_(l),i.add(l);let h=null,u=v_(c.animations,e.idle);u&&(h=new $s(l),h.clipAction(u).play()),M_(s,e,t);let d=new Js,p=0,g=l.scale.clone();function _(){requestAnimationFrame(_);let m=d.getDelta();p+=m,h&&h.update(m),p_||(l.rotation.y+=m*.32,l.scale.y=g.y*(1+Math.sin(p*1.1)*.006)),n.render(i,r)}_()},c=>{jc(s,"Model parse failed: "+(c?.message||c))})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{vu().catch(s=>console.error("[artifact-viewer]",s))}):vu().catch(s=>console.error("[artifact-viewer]",s));})();
+}`,yc=class{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t,n){if(this.texture===null){let i=new _t,r=e.properties.get(i);r.__webglTexture=t.texture,(t.depthNear!==n.depthNear||t.depthFar!==n.depthFar)&&(this.depthNear=t.depthNear,this.depthFar=t.depthFar),this.texture=i}}getMesh(e){if(this.texture!==null&&this.mesh===null){let t=e.cameras[0].viewport,n=new cn({vertexShader:$g,fragmentShader:jg,uniforms:{depthColor:{value:this.texture},depthWidth:{value:t.z},depthHeight:{value:t.w}}});this.mesh=new Mt(new Vs(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}},vc=class extends pn{constructor(e,t){super();let n=this,i=null,r=1,o=null,a="local-floor",c=1,l=null,h=null,u=null,d=null,p=null,g=null,_=new yc,m=t.getContextAttributes(),f=null,E=null,T=[],M=[],L=new ze,R=null,w=new dt;w.viewport=new qe;let N=new dt;N.viewport=new qe;let S=[w,N],v=new jr,C=null,q=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(X){let ee=T[X];return ee===void 0&&(ee=new Yi,T[X]=ee),ee.getTargetRaySpace()},this.getControllerGrip=function(X){let ee=T[X];return ee===void 0&&(ee=new Yi,T[X]=ee),ee.getGripSpace()},this.getHand=function(X){let ee=T[X];return ee===void 0&&(ee=new Yi,T[X]=ee),ee.getHandSpace()};function z(X){let ee=M.indexOf(X.inputSource);if(ee===-1)return;let pe=T[ee];pe!==void 0&&(pe.update(X.inputSource,X.frame,l||o),pe.dispatchEvent({type:X.type,data:X.inputSource}))}function W(){i.removeEventListener("select",z),i.removeEventListener("selectstart",z),i.removeEventListener("selectend",z),i.removeEventListener("squeeze",z),i.removeEventListener("squeezestart",z),i.removeEventListener("squeezeend",z),i.removeEventListener("end",W),i.removeEventListener("inputsourceschange",J);for(let X=0;X<T.length;X++){let ee=M[X];ee!==null&&(M[X]=null,T[X].disconnect(ee))}C=null,q=null,_.reset(),e.setRenderTarget(f),p=null,d=null,u=null,i=null,E=null,et.stop(),n.isPresenting=!1,e.setPixelRatio(R),e.setSize(L.width,L.height,!1),n.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(X){r=X,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(X){a=X,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return l||o},this.setReferenceSpace=function(X){l=X},this.getBaseLayer=function(){return d!==null?d:p},this.getBinding=function(){return u},this.getFrame=function(){return g},this.getSession=function(){return i},this.setSession=async function(X){if(i=X,i!==null){if(f=e.getRenderTarget(),i.addEventListener("select",z),i.addEventListener("selectstart",z),i.addEventListener("selectend",z),i.addEventListener("squeeze",z),i.addEventListener("squeezestart",z),i.addEventListener("squeezeend",z),i.addEventListener("end",W),i.addEventListener("inputsourceschange",J),m.xrCompatible!==!0&&await t.makeXRCompatible(),R=e.getPixelRatio(),e.getSize(L),typeof XRWebGLBinding<"u"&&"createProjectionLayer"in XRWebGLBinding.prototype){let pe=null,se=null,Me=null;m.depth&&(Me=m.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,pe=m.stencil?rs:Gi,se=m.stencil?ss:Jn);let Ye={colorFormat:t.RGBA8,depthFormat:Me,scaleFactor:r};u=new XRWebGLBinding(i,t),d=u.createProjectionLayer(Ye),i.updateRenderState({layers:[d]}),e.setPixelRatio(1),e.setSize(d.textureWidth,d.textureHeight,!1),E=new mn(d.textureWidth,d.textureHeight,{format:Ht,type:hn,depthTexture:new ks(d.textureWidth,d.textureHeight,se,void 0,void 0,void 0,void 0,void 0,void 0,pe),stencilBuffer:m.stencil,colorSpace:e.outputColorSpace,samples:m.antialias?4:0,resolveDepthBuffer:d.ignoreDepthValues===!1,resolveStencilBuffer:d.ignoreDepthValues===!1})}else{let pe={antialias:m.antialias,alpha:!0,depth:m.depth,stencil:m.stencil,framebufferScaleFactor:r};p=new XRWebGLLayer(i,t,pe),i.updateRenderState({baseLayer:p}),e.setPixelRatio(1),e.setSize(p.framebufferWidth,p.framebufferHeight,!1),E=new mn(p.framebufferWidth,p.framebufferHeight,{format:Ht,type:hn,colorSpace:e.outputColorSpace,stencilBuffer:m.stencil,resolveDepthBuffer:p.ignoreDepthValues===!1,resolveStencilBuffer:p.ignoreDepthValues===!1})}E.isXRRenderTarget=!0,this.setFoveation(c),l=null,o=await i.requestReferenceSpace(a),et.setContext(i),et.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(i!==null)return i.environmentBlendMode},this.getDepthTexture=function(){return _.getDepthTexture()};function J(X){for(let ee=0;ee<X.removed.length;ee++){let pe=X.removed[ee],se=M.indexOf(pe);se>=0&&(M[se]=null,T[se].disconnect(pe))}for(let ee=0;ee<X.added.length;ee++){let pe=X.added[ee],se=M.indexOf(pe);if(se===-1){for(let Ye=0;Ye<T.length;Ye++)if(Ye>=M.length){M.push(pe),se=Ye;break}else if(M[Ye]===null){M[Ye]=pe,se=Ye;break}if(se===-1)break}let Me=T[se];Me&&Me.connect(pe)}}let G=new P,Q=new P;function V(X,ee,pe){G.setFromMatrixPosition(ee.matrixWorld),Q.setFromMatrixPosition(pe.matrixWorld);let se=G.distanceTo(Q),Me=ee.projectionMatrix.elements,Ye=pe.projectionMatrix.elements,Ae=Me[14]/(Me[10]-1),ct=Me[14]/(Me[10]+1),st=(Me[9]+1)/Me[5],ke=(Me[9]-1)/Me[5],A=(Me[8]-1)/Me[0],Gt=(Ye[8]+1)/Ye[0],Ge=Ae*A,Ve=Ae*Gt,xe=se/(-A+Gt),nt=xe*-A;if(ee.matrixWorld.decompose(X.position,X.quaternion,X.scale),X.translateX(nt),X.translateZ(xe),X.matrixWorld.compose(X.position,X.quaternion,X.scale),X.matrixWorldInverse.copy(X.matrixWorld).invert(),Me[10]===-1)X.projectionMatrix.copy(ee.projectionMatrix),X.projectionMatrixInverse.copy(ee.projectionMatrixInverse);else{let ge=Ae+xe,b=ct+xe,x=Ge-nt,F=Ve+(se-nt),Y=st*ct/b*ge,K=ke*ct/b*ge;X.projectionMatrix.makePerspective(x,F,Y,K,ge,b),X.projectionMatrixInverse.copy(X.projectionMatrix).invert()}}function ie(X,ee){ee===null?X.matrixWorld.copy(X.matrix):X.matrixWorld.multiplyMatrices(ee.matrixWorld,X.matrix),X.matrixWorldInverse.copy(X.matrixWorld).invert()}this.updateCamera=function(X){if(i===null)return;let ee=X.near,pe=X.far;_.texture!==null&&(_.depthNear>0&&(ee=_.depthNear),_.depthFar>0&&(pe=_.depthFar)),v.near=N.near=w.near=ee,v.far=N.far=w.far=pe,(C!==v.near||q!==v.far)&&(i.updateRenderState({depthNear:v.near,depthFar:v.far}),C=v.near,q=v.far),w.layers.mask=X.layers.mask|2,N.layers.mask=X.layers.mask|4,v.layers.mask=w.layers.mask|N.layers.mask;let se=X.parent,Me=v.cameras;ie(v,se);for(let Ye=0;Ye<Me.length;Ye++)ie(Me[Ye],se);Me.length===2?V(v,w,N):v.projectionMatrix.copy(w.projectionMatrix),he(X,v,se)};function he(X,ee,pe){pe===null?X.matrix.copy(ee.matrixWorld):(X.matrix.copy(pe.matrixWorld),X.matrix.invert(),X.matrix.multiply(ee.matrixWorld)),X.matrix.decompose(X.position,X.quaternion,X.scale),X.updateMatrixWorld(!0),X.projectionMatrix.copy(ee.projectionMatrix),X.projectionMatrixInverse.copy(ee.projectionMatrixInverse),X.isPerspectiveCamera&&(X.fov=ui*2*Math.atan(1/X.projectionMatrix.elements[5]),X.zoom=1)}this.getCamera=function(){return v},this.getFoveation=function(){if(!(d===null&&p===null))return c},this.setFoveation=function(X){c=X,d!==null&&(d.fixedFoveation=X),p!==null&&p.fixedFoveation!==void 0&&(p.fixedFoveation=X)},this.hasDepthSensing=function(){return _.texture!==null},this.getDepthSensingMesh=function(){return _.getMesh(v)};let _e=null;function Ne(X,ee){if(h=ee.getViewerPose(l||o),g=ee,h!==null){let pe=h.views;p!==null&&(e.setRenderTargetFramebuffer(E,p.framebuffer),e.setRenderTarget(E));let se=!1;pe.length!==v.cameras.length&&(v.cameras.length=0,se=!0);for(let Ae=0;Ae<pe.length;Ae++){let ct=pe[Ae],st=null;if(p!==null)st=p.getViewport(ct);else{let A=u.getViewSubImage(d,ct);st=A.viewport,Ae===0&&(e.setRenderTargetTextures(E,A.colorTexture,A.depthStencilTexture),e.setRenderTarget(E))}let ke=S[Ae];ke===void 0&&(ke=new dt,ke.layers.enable(Ae),ke.viewport=new qe,S[Ae]=ke),ke.matrix.fromArray(ct.transform.matrix),ke.matrix.decompose(ke.position,ke.quaternion,ke.scale),ke.projectionMatrix.fromArray(ct.projectionMatrix),ke.projectionMatrixInverse.copy(ke.projectionMatrix).invert(),ke.viewport.set(st.x,st.y,st.width,st.height),Ae===0&&(v.matrix.copy(ke.matrix),v.matrix.decompose(v.position,v.quaternion,v.scale)),se===!0&&v.cameras.push(ke)}let Me=i.enabledFeatures;if(Me&&Me.includes("depth-sensing")&&i.depthUsage=="gpu-optimized"&&u){let Ae=u.getDepthInformation(pe[0]);Ae&&Ae.isValid&&Ae.texture&&_.init(e,Ae,i.renderState)}}for(let pe=0;pe<T.length;pe++){let se=M[pe],Me=T[pe];se!==null&&Me!==void 0&&Me.update(se,ee,l||o)}_e&&_e(X,ee),ee.detectedPlanes&&n.dispatchEvent({type:"planesdetected",data:ee}),g=null}let et=new hu;et.setAnimationLoop(Ne),this.setAnimationLoop=function(X){_e=X},this.dispose=function(){}}},bi=new on,Qg=new Ie;function e_(s,e){function t(m,f){m.matrixAutoUpdate===!0&&m.updateMatrix(),f.value.copy(m.matrix)}function n(m,f){f.color.getRGB(m.fogColor.value,ic(s)),f.isFog?(m.fogNear.value=f.near,m.fogFar.value=f.far):f.isFogExp2&&(m.fogDensity.value=f.density)}function i(m,f,E,T,M){f.isMeshBasicMaterial||f.isMeshLambertMaterial?r(m,f):f.isMeshToonMaterial?(r(m,f),u(m,f)):f.isMeshPhongMaterial?(r(m,f),h(m,f)):f.isMeshStandardMaterial?(r(m,f),d(m,f),f.isMeshPhysicalMaterial&&p(m,f,M)):f.isMeshMatcapMaterial?(r(m,f),g(m,f)):f.isMeshDepthMaterial?r(m,f):f.isMeshDistanceMaterial?(r(m,f),_(m,f)):f.isMeshNormalMaterial?r(m,f):f.isLineBasicMaterial?(o(m,f),f.isLineDashedMaterial&&a(m,f)):f.isPointsMaterial?c(m,f,E,T):f.isSpriteMaterial?l(m,f):f.isShadowMaterial?(m.color.value.copy(f.color),m.opacity.value=f.opacity):f.isShaderMaterial&&(f.uniformsNeedUpdate=!1)}function r(m,f){m.opacity.value=f.opacity,f.color&&m.diffuse.value.copy(f.color),f.emissive&&m.emissive.value.copy(f.emissive).multiplyScalar(f.emissiveIntensity),f.map&&(m.map.value=f.map,t(f.map,m.mapTransform)),f.alphaMap&&(m.alphaMap.value=f.alphaMap,t(f.alphaMap,m.alphaMapTransform)),f.bumpMap&&(m.bumpMap.value=f.bumpMap,t(f.bumpMap,m.bumpMapTransform),m.bumpScale.value=f.bumpScale,f.side===Pt&&(m.bumpScale.value*=-1)),f.normalMap&&(m.normalMap.value=f.normalMap,t(f.normalMap,m.normalMapTransform),m.normalScale.value.copy(f.normalScale),f.side===Pt&&m.normalScale.value.negate()),f.displacementMap&&(m.displacementMap.value=f.displacementMap,t(f.displacementMap,m.displacementMapTransform),m.displacementScale.value=f.displacementScale,m.displacementBias.value=f.displacementBias),f.emissiveMap&&(m.emissiveMap.value=f.emissiveMap,t(f.emissiveMap,m.emissiveMapTransform)),f.specularMap&&(m.specularMap.value=f.specularMap,t(f.specularMap,m.specularMapTransform)),f.alphaTest>0&&(m.alphaTest.value=f.alphaTest);let E=e.get(f),T=E.envMap,M=E.envMapRotation;T&&(m.envMap.value=T,bi.copy(M),bi.x*=-1,bi.y*=-1,bi.z*=-1,T.isCubeTexture&&T.isRenderTargetTexture===!1&&(bi.y*=-1,bi.z*=-1),m.envMapRotation.value.setFromMatrix4(Qg.makeRotationFromEuler(bi)),m.flipEnvMap.value=T.isCubeTexture&&T.isRenderTargetTexture===!1?-1:1,m.reflectivity.value=f.reflectivity,m.ior.value=f.ior,m.refractionRatio.value=f.refractionRatio),f.lightMap&&(m.lightMap.value=f.lightMap,m.lightMapIntensity.value=f.lightMapIntensity,t(f.lightMap,m.lightMapTransform)),f.aoMap&&(m.aoMap.value=f.aoMap,m.aoMapIntensity.value=f.aoMapIntensity,t(f.aoMap,m.aoMapTransform))}function o(m,f){m.diffuse.value.copy(f.color),m.opacity.value=f.opacity,f.map&&(m.map.value=f.map,t(f.map,m.mapTransform))}function a(m,f){m.dashSize.value=f.dashSize,m.totalSize.value=f.dashSize+f.gapSize,m.scale.value=f.scale}function c(m,f,E,T){m.diffuse.value.copy(f.color),m.opacity.value=f.opacity,m.size.value=f.size*E,m.scale.value=T*.5,f.map&&(m.map.value=f.map,t(f.map,m.uvTransform)),f.alphaMap&&(m.alphaMap.value=f.alphaMap,t(f.alphaMap,m.alphaMapTransform)),f.alphaTest>0&&(m.alphaTest.value=f.alphaTest)}function l(m,f){m.diffuse.value.copy(f.color),m.opacity.value=f.opacity,m.rotation.value=f.rotation,f.map&&(m.map.value=f.map,t(f.map,m.mapTransform)),f.alphaMap&&(m.alphaMap.value=f.alphaMap,t(f.alphaMap,m.alphaMapTransform)),f.alphaTest>0&&(m.alphaTest.value=f.alphaTest)}function h(m,f){m.specular.value.copy(f.specular),m.shininess.value=Math.max(f.shininess,1e-4)}function u(m,f){f.gradientMap&&(m.gradientMap.value=f.gradientMap)}function d(m,f){m.metalness.value=f.metalness,f.metalnessMap&&(m.metalnessMap.value=f.metalnessMap,t(f.metalnessMap,m.metalnessMapTransform)),m.roughness.value=f.roughness,f.roughnessMap&&(m.roughnessMap.value=f.roughnessMap,t(f.roughnessMap,m.roughnessMapTransform)),f.envMap&&(m.envMapIntensity.value=f.envMapIntensity)}function p(m,f,E){m.ior.value=f.ior,f.sheen>0&&(m.sheenColor.value.copy(f.sheenColor).multiplyScalar(f.sheen),m.sheenRoughness.value=f.sheenRoughness,f.sheenColorMap&&(m.sheenColorMap.value=f.sheenColorMap,t(f.sheenColorMap,m.sheenColorMapTransform)),f.sheenRoughnessMap&&(m.sheenRoughnessMap.value=f.sheenRoughnessMap,t(f.sheenRoughnessMap,m.sheenRoughnessMapTransform))),f.clearcoat>0&&(m.clearcoat.value=f.clearcoat,m.clearcoatRoughness.value=f.clearcoatRoughness,f.clearcoatMap&&(m.clearcoatMap.value=f.clearcoatMap,t(f.clearcoatMap,m.clearcoatMapTransform)),f.clearcoatRoughnessMap&&(m.clearcoatRoughnessMap.value=f.clearcoatRoughnessMap,t(f.clearcoatRoughnessMap,m.clearcoatRoughnessMapTransform)),f.clearcoatNormalMap&&(m.clearcoatNormalMap.value=f.clearcoatNormalMap,t(f.clearcoatNormalMap,m.clearcoatNormalMapTransform),m.clearcoatNormalScale.value.copy(f.clearcoatNormalScale),f.side===Pt&&m.clearcoatNormalScale.value.negate())),f.dispersion>0&&(m.dispersion.value=f.dispersion),f.iridescence>0&&(m.iridescence.value=f.iridescence,m.iridescenceIOR.value=f.iridescenceIOR,m.iridescenceThicknessMinimum.value=f.iridescenceThicknessRange[0],m.iridescenceThicknessMaximum.value=f.iridescenceThicknessRange[1],f.iridescenceMap&&(m.iridescenceMap.value=f.iridescenceMap,t(f.iridescenceMap,m.iridescenceMapTransform)),f.iridescenceThicknessMap&&(m.iridescenceThicknessMap.value=f.iridescenceThicknessMap,t(f.iridescenceThicknessMap,m.iridescenceThicknessMapTransform))),f.transmission>0&&(m.transmission.value=f.transmission,m.transmissionSamplerMap.value=E.texture,m.transmissionSamplerSize.value.set(E.width,E.height),f.transmissionMap&&(m.transmissionMap.value=f.transmissionMap,t(f.transmissionMap,m.transmissionMapTransform)),m.thickness.value=f.thickness,f.thicknessMap&&(m.thicknessMap.value=f.thicknessMap,t(f.thicknessMap,m.thicknessMapTransform)),m.attenuationDistance.value=f.attenuationDistance,m.attenuationColor.value.copy(f.attenuationColor)),f.anisotropy>0&&(m.anisotropyVector.value.set(f.anisotropy*Math.cos(f.anisotropyRotation),f.anisotropy*Math.sin(f.anisotropyRotation)),f.anisotropyMap&&(m.anisotropyMap.value=f.anisotropyMap,t(f.anisotropyMap,m.anisotropyMapTransform))),m.specularIntensity.value=f.specularIntensity,m.specularColor.value.copy(f.specularColor),f.specularColorMap&&(m.specularColorMap.value=f.specularColorMap,t(f.specularColorMap,m.specularColorMapTransform)),f.specularIntensityMap&&(m.specularIntensityMap.value=f.specularIntensityMap,t(f.specularIntensityMap,m.specularIntensityMapTransform))}function g(m,f){f.matcap&&(m.matcap.value=f.matcap)}function _(m,f){let E=e.get(f).light;m.referencePosition.value.setFromMatrixPosition(E.matrixWorld),m.nearDistance.value=E.shadow.camera.near,m.farDistance.value=E.shadow.camera.far}return{refreshFogUniforms:n,refreshMaterialUniforms:i}}function t_(s,e,t,n){let i={},r={},o=[],a=s.getParameter(s.MAX_UNIFORM_BUFFER_BINDINGS);function c(E,T){let M=T.program;n.uniformBlockBinding(E,M)}function l(E,T){let M=i[E.id];M===void 0&&(g(E),M=h(E),i[E.id]=M,E.addEventListener("dispose",m));let L=T.program;n.updateUBOMapping(E,L);let R=e.render.frame;r[E.id]!==R&&(d(E),r[E.id]=R)}function h(E){let T=u();E.__bindingPointIndex=T;let M=s.createBuffer(),L=E.__size,R=E.usage;return s.bindBuffer(s.UNIFORM_BUFFER,M),s.bufferData(s.UNIFORM_BUFFER,L,R),s.bindBuffer(s.UNIFORM_BUFFER,null),s.bindBufferBase(s.UNIFORM_BUFFER,T,M),M}function u(){for(let E=0;E<a;E++)if(o.indexOf(E)===-1)return o.push(E),E;return console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}function d(E){let T=i[E.id],M=E.uniforms,L=E.__cache;s.bindBuffer(s.UNIFORM_BUFFER,T);for(let R=0,w=M.length;R<w;R++){let N=Array.isArray(M[R])?M[R]:[M[R]];for(let S=0,v=N.length;S<v;S++){let C=N[S];if(p(C,R,S,L)===!0){let q=C.__offset,z=Array.isArray(C.value)?C.value:[C.value],W=0;for(let J=0;J<z.length;J++){let G=z[J],Q=_(G);typeof G=="number"||typeof G=="boolean"?(C.__data[0]=G,s.bufferSubData(s.UNIFORM_BUFFER,q+W,C.__data)):G.isMatrix3?(C.__data[0]=G.elements[0],C.__data[1]=G.elements[1],C.__data[2]=G.elements[2],C.__data[3]=0,C.__data[4]=G.elements[3],C.__data[5]=G.elements[4],C.__data[6]=G.elements[5],C.__data[7]=0,C.__data[8]=G.elements[6],C.__data[9]=G.elements[7],C.__data[10]=G.elements[8],C.__data[11]=0):(G.toArray(C.__data,W),W+=Q.storage/Float32Array.BYTES_PER_ELEMENT)}s.bufferSubData(s.UNIFORM_BUFFER,q,C.__data)}}}s.bindBuffer(s.UNIFORM_BUFFER,null)}function p(E,T,M,L){let R=E.value,w=T+"_"+M;if(L[w]===void 0)return typeof R=="number"||typeof R=="boolean"?L[w]=R:L[w]=R.clone(),!0;{let N=L[w];if(typeof R=="number"||typeof R=="boolean"){if(N!==R)return L[w]=R,!0}else if(N.equals(R)===!1)return N.copy(R),!0}return!1}function g(E){let T=E.uniforms,M=0,L=16;for(let w=0,N=T.length;w<N;w++){let S=Array.isArray(T[w])?T[w]:[T[w]];for(let v=0,C=S.length;v<C;v++){let q=S[v],z=Array.isArray(q.value)?q.value:[q.value];for(let W=0,J=z.length;W<J;W++){let G=z[W],Q=_(G),V=M%L,ie=V%Q.boundary,he=V+ie;M+=ie,he!==0&&L-he<Q.storage&&(M+=L-he),q.__data=new Float32Array(Q.storage/Float32Array.BYTES_PER_ELEMENT),q.__offset=M,M+=Q.storage}}}let R=M%L;return R>0&&(M+=L-R),E.__size=M,E.__cache={},this}function _(E){let T={boundary:0,storage:0};return typeof E=="number"||typeof E=="boolean"?(T.boundary=4,T.storage=4):E.isVector2?(T.boundary=8,T.storage=8):E.isVector3||E.isColor?(T.boundary=16,T.storage=12):E.isVector4?(T.boundary=16,T.storage=16):E.isMatrix3?(T.boundary=48,T.storage=48):E.isMatrix4?(T.boundary=64,T.storage=64):E.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",E),T}function m(E){let T=E.target;T.removeEventListener("dispose",m);let M=o.indexOf(T.__bindingPointIndex);o.splice(M,1),s.deleteBuffer(i[T.id]),delete i[T.id],delete r[T.id]}function f(){for(let E in i)s.deleteBuffer(i[E]);o=[],i={},r={}}return{bind:c,update:l,dispose:f}}var $o=class{constructor(e={}){let{canvas:t=Dh(),context:n=null,depth:i=!0,stencil:r=!1,alpha:o=!1,antialias:a=!1,premultipliedAlpha:c=!0,preserveDrawingBuffer:l=!1,powerPreference:h="default",failIfMajorPerformanceCaveat:u=!1,reverseDepthBuffer:d=!1}=e;this.isWebGLRenderer=!0;let p;if(n!==null){if(typeof WebGLRenderingContext<"u"&&n instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");p=n.getContextAttributes().alpha}else p=o;let g=new Uint32Array(4),_=new Int32Array(4),m=null,f=null,E=[],T=[];this.domElement=t,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.toneMapping=Fn,this.toneMappingExposure=1,this.transmissionResolutionScale=1;let M=this,L=!1;this._outputColorSpace=lt;let R=0,w=0,N=null,S=-1,v=null,C=new qe,q=new qe,z=null,W=new be(0),J=0,G=t.width,Q=t.height,V=1,ie=null,he=null,_e=new qe(0,0,G,Q),Ne=new qe(0,0,G,Q),et=!1,X=new $i,ee=!1,pe=!1,se=new Ie,Me=new Ie,Ye=new P,Ae=new qe,ct={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0},st=!1;function ke(){return N===null?V:1}let A=n;function Gt(y,D){return t.getContext(y,D)}try{let y={alpha:!0,depth:i,stencil:r,antialias:a,premultipliedAlpha:c,preserveDrawingBuffer:l,powerPreference:h,failIfMajorPerformanceCaveat:u};if("setAttribute"in t&&t.setAttribute("data-engine",`three.js r${"176"}`),t.addEventListener("webglcontextlost",Z,!1),t.addEventListener("webglcontextrestored",ce,!1),t.addEventListener("webglcontextcreationerror",ae,!1),A===null){let D="webgl2";if(A=Gt(D,y),A===null)throw Gt(D)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(y){throw console.error("THREE.WebGLRenderer: "+y.message),y}let Ge,Ve,xe,nt,ge,b,x,F,Y,K,H,me,re,Se,Te,$,ue,Ee,Re,de,He,De,tt,I;function oe(){Ge=new ym(A),Ge.init(),De=new Jg(A,Ge),Ve=new dm(A,Ge,e,De),xe=new Zg(A,Ge),Ve.reverseDepthBuffer&&d&&xe.buffers.depth.setReversed(!0),nt=new Sm(A),ge=new Ng,b=new Kg(A,Ge,xe,ge,Ve,De,nt),x=new pm(M),F=new xm(M),Y=new wd(A),tt=new hm(A,Y),K=new vm(A,Y,nt,tt),H=new Tm(A,K,Y,nt),Re=new bm(A,Ve,b),$=new fm(ge),me=new Ug(M,x,F,Ge,Ve,tt,$),re=new e_(M,ge),Se=new Og,Te=new Gg(Ge),Ee=new lm(M,x,F,xe,H,p,c),ue=new qg(M,H,Ve),I=new t_(A,nt,Ve,xe),de=new um(A,Ge,nt),He=new Mm(A,Ge,nt),nt.programs=me.programs,M.capabilities=Ve,M.extensions=Ge,M.properties=ge,M.renderLists=Se,M.shadowMap=ue,M.state=xe,M.info=nt}oe();let k=new vc(M,A);this.xr=k,this.getContext=function(){return A},this.getContextAttributes=function(){return A.getContextAttributes()},this.forceContextLoss=function(){let y=Ge.get("WEBGL_lose_context");y&&y.loseContext()},this.forceContextRestore=function(){let y=Ge.get("WEBGL_lose_context");y&&y.restoreContext()},this.getPixelRatio=function(){return V},this.setPixelRatio=function(y){y!==void 0&&(V=y,this.setSize(G,Q,!1))},this.getSize=function(y){return y.set(G,Q)},this.setSize=function(y,D,O=!0){if(k.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}G=y,Q=D,t.width=Math.floor(y*V),t.height=Math.floor(D*V),O===!0&&(t.style.width=y+"px",t.style.height=D+"px"),this.setViewport(0,0,y,D)},this.getDrawingBufferSize=function(y){return y.set(G*V,Q*V).floor()},this.setDrawingBufferSize=function(y,D,O){G=y,Q=D,V=O,t.width=Math.floor(y*O),t.height=Math.floor(D*O),this.setViewport(0,0,y,D)},this.getCurrentViewport=function(y){return y.copy(C)},this.getViewport=function(y){return y.copy(_e)},this.setViewport=function(y,D,O,B){y.isVector4?_e.set(y.x,y.y,y.z,y.w):_e.set(y,D,O,B),xe.viewport(C.copy(_e).multiplyScalar(V).round())},this.getScissor=function(y){return y.copy(Ne)},this.setScissor=function(y,D,O,B){y.isVector4?Ne.set(y.x,y.y,y.z,y.w):Ne.set(y,D,O,B),xe.scissor(q.copy(Ne).multiplyScalar(V).round())},this.getScissorTest=function(){return et},this.setScissorTest=function(y){xe.setScissorTest(et=y)},this.setOpaqueSort=function(y){ie=y},this.setTransparentSort=function(y){he=y},this.getClearColor=function(y){return y.copy(Ee.getClearColor())},this.setClearColor=function(){Ee.setClearColor(...arguments)},this.getClearAlpha=function(){return Ee.getClearAlpha()},this.setClearAlpha=function(){Ee.setClearAlpha(...arguments)},this.clear=function(y=!0,D=!0,O=!0){let B=0;if(y){let U=!1;if(N!==null){let j=N.texture.format;U=j===yo||j===xo||j===_o}if(U){let j=N.texture.type,ne=j===hn||j===Jn||j===ns||j===ss||j===po||j===mo,le=Ee.getClearColor(),fe=Ee.getClearAlpha(),Ce=le.r,we=le.g,ye=le.b;ne?(g[0]=Ce,g[1]=we,g[2]=ye,g[3]=fe,A.clearBufferuiv(A.COLOR,0,g)):(_[0]=Ce,_[1]=we,_[2]=ye,_[3]=fe,A.clearBufferiv(A.COLOR,0,_))}else B|=A.COLOR_BUFFER_BIT}D&&(B|=A.DEPTH_BUFFER_BIT),O&&(B|=A.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),A.clear(B)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){t.removeEventListener("webglcontextlost",Z,!1),t.removeEventListener("webglcontextrestored",ce,!1),t.removeEventListener("webglcontextcreationerror",ae,!1),Ee.dispose(),Se.dispose(),Te.dispose(),ge.dispose(),x.dispose(),F.dispose(),H.dispose(),tt.dispose(),I.dispose(),me.dispose(),k.dispose(),k.removeEventListener("sessionstart",Qc),k.removeEventListener("sessionend",el),jn.stop()};function Z(y){y.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),L=!0}function ce(){console.log("THREE.WebGLRenderer: Context Restored."),L=!1;let y=nt.autoReset,D=ue.enabled,O=ue.autoUpdate,B=ue.needsUpdate,U=ue.type;oe(),nt.autoReset=y,ue.enabled=D,ue.autoUpdate=O,ue.needsUpdate=B,ue.type=U}function ae(y){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",y.statusMessage)}function Le(y){let D=y.target;D.removeEventListener("dispose",Le),ot(D)}function ot(y){St(y),ge.remove(y)}function St(y){let D=ge.get(y).programs;D!==void 0&&(D.forEach(function(O){me.releaseProgram(O)}),y.isShaderMaterial&&me.releaseShaderCache(y))}this.renderBufferDirect=function(y,D,O,B,U,j){D===null&&(D=ct);let ne=U.isMesh&&U.matrixWorld.determinant()<0,le=Mu(y,D,O,B,U);xe.setMaterial(B,ne);let fe=O.index,Ce=1;if(B.wireframe===!0){if(fe=K.getWireframeAttribute(O),fe===void 0)return;Ce=2}let we=O.drawRange,ye=O.attributes.position,We=we.start*Ce,Ze=(we.start+we.count)*Ce;j!==null&&(We=Math.max(We,j.start*Ce),Ze=Math.min(Ze,(j.start+j.count)*Ce)),fe!==null?(We=Math.max(We,0),Ze=Math.min(Ze,fe.count)):ye!=null&&(We=Math.max(We,0),Ze=Math.min(Ze,ye.count));let ht=Ze-We;if(ht<0||ht===1/0)return;tt.setup(U,B,le,O,fe);let at,Xe=de;if(fe!==null&&(at=Y.get(fe),Xe=He,Xe.setIndex(at)),U.isMesh)B.wireframe===!0?(xe.setLineWidth(B.wireframeLinewidth*ke()),Xe.setMode(A.LINES)):Xe.setMode(A.TRIANGLES);else if(U.isLine){let ve=B.linewidth;ve===void 0&&(ve=1),xe.setLineWidth(ve*ke()),U.isLineSegments?Xe.setMode(A.LINES):U.isLineLoop?Xe.setMode(A.LINE_LOOP):Xe.setMode(A.LINE_STRIP)}else U.isPoints?Xe.setMode(A.POINTS):U.isSprite&&Xe.setMode(A.TRIANGLES);if(U.isBatchedMesh)if(U._multiDrawInstances!==null)rr("THREE.WebGLRenderer: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection."),Xe.renderMultiDrawInstances(U._multiDrawStarts,U._multiDrawCounts,U._multiDrawCount,U._multiDrawInstances);else if(Ge.get("WEBGL_multi_draw"))Xe.renderMultiDraw(U._multiDrawStarts,U._multiDrawCounts,U._multiDrawCount);else{let ve=U._multiDrawStarts,xt=U._multiDrawCounts,Ke=U._multiDrawCount,$t=fe?Y.get(fe).bytesPerElement:1,wi=ge.get(B).currentProgram.getUniforms();for(let Ot=0;Ot<Ke;Ot++)wi.setValue(A,"_gl_DrawID",Ot),Xe.render(ve[Ot]/$t,xt[Ot])}else if(U.isInstancedMesh)Xe.renderInstances(We,ht,U.count);else if(O.isInstancedBufferGeometry){let ve=O._maxInstanceCount!==void 0?O._maxInstanceCount:1/0,xt=Math.min(O.instanceCount,ve);Xe.renderInstances(We,ht,xt)}else Xe.render(We,ht)};function Je(y,D,O){y.transparent===!0&&y.side===Yt&&y.forceSinglePass===!1?(y.side=Pt,y.needsUpdate=!0,lr(y,D,O),y.side=rn,y.needsUpdate=!0,lr(y,D,O),y.side=Yt):lr(y,D,O)}this.compile=function(y,D,O=null){O===null&&(O=y),f=Te.get(O),f.init(D),T.push(f),O.traverseVisible(function(U){U.isLight&&U.layers.test(D.layers)&&(f.pushLight(U),U.castShadow&&f.pushShadow(U))}),y!==O&&y.traverseVisible(function(U){U.isLight&&U.layers.test(D.layers)&&(f.pushLight(U),U.castShadow&&f.pushShadow(U))}),f.setupLights();let B=new Set;return y.traverse(function(U){if(!(U.isMesh||U.isPoints||U.isLine||U.isSprite))return;let j=U.material;if(j)if(Array.isArray(j))for(let ne=0;ne<j.length;ne++){let le=j[ne];Je(le,O,U),B.add(le)}else Je(j,O,U),B.add(j)}),f=T.pop(),B},this.compileAsync=function(y,D,O=null){let B=this.compile(y,D,O);return new Promise(U=>{function j(){if(B.forEach(function(ne){ge.get(ne).currentProgram.isReady()&&B.delete(ne)}),B.size===0){U(y);return}setTimeout(j,10)}Ge.get("KHR_parallel_shader_compile")!==null?j():setTimeout(j,10)})};let Jt=null;function Sn(y){Jt&&Jt(y)}function Qc(){jn.stop()}function el(){jn.start()}let jn=new hu;jn.setAnimationLoop(Sn),typeof self<"u"&&jn.setContext(self),this.setAnimationLoop=function(y){Jt=y,k.setAnimationLoop(y),y===null?jn.stop():jn.start()},k.addEventListener("sessionstart",Qc),k.addEventListener("sessionend",el),this.render=function(y,D){if(D!==void 0&&D.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(L===!0)return;if(y.matrixWorldAutoUpdate===!0&&y.updateMatrixWorld(),D.parent===null&&D.matrixWorldAutoUpdate===!0&&D.updateMatrixWorld(),k.enabled===!0&&k.isPresenting===!0&&(k.cameraAutoUpdate===!0&&k.updateCamera(D),D=k.getCamera()),y.isScene===!0&&y.onBeforeRender(M,y,D,N),f=Te.get(y,T.length),f.init(D),T.push(f),Me.multiplyMatrices(D.projectionMatrix,D.matrixWorldInverse),X.setFromProjectionMatrix(Me),pe=this.localClippingEnabled,ee=$.init(this.clippingPlanes,pe),m=Se.get(y,E.length),m.init(),E.push(m),k.enabled===!0&&k.isPresenting===!0){let j=M.xr.getDepthSensingMesh();j!==null&&ta(j,D,-1/0,M.sortObjects)}ta(y,D,0,M.sortObjects),m.finish(),M.sortObjects===!0&&m.sort(ie,he),st=k.enabled===!1||k.isPresenting===!1||k.hasDepthSensing()===!1,st&&Ee.addToRenderList(m,y),this.info.render.frame++,ee===!0&&$.beginShadows();let O=f.state.shadowsArray;ue.render(O,y,D),ee===!0&&$.endShadows(),this.info.autoReset===!0&&this.info.reset();let B=m.opaque,U=m.transmissive;if(f.setupLights(),D.isArrayCamera){let j=D.cameras;if(U.length>0)for(let ne=0,le=j.length;ne<le;ne++){let fe=j[ne];nl(B,U,y,fe)}st&&Ee.render(y);for(let ne=0,le=j.length;ne<le;ne++){let fe=j[ne];tl(m,y,fe,fe.viewport)}}else U.length>0&&nl(B,U,y,D),st&&Ee.render(y),tl(m,y,D);N!==null&&w===0&&(b.updateMultisampleRenderTarget(N),b.updateRenderTargetMipmap(N)),y.isScene===!0&&y.onAfterRender(M,y,D),tt.resetDefaultState(),S=-1,v=null,T.pop(),T.length>0?(f=T[T.length-1],ee===!0&&$.setGlobalState(M.clippingPlanes,f.state.camera)):f=null,E.pop(),E.length>0?m=E[E.length-1]:m=null};function ta(y,D,O,B){if(y.visible===!1)return;if(y.layers.test(D.layers)){if(y.isGroup)O=y.renderOrder;else if(y.isLOD)y.autoUpdate===!0&&y.update(D);else if(y.isLight)f.pushLight(y),y.castShadow&&f.pushShadow(y);else if(y.isSprite){if(!y.frustumCulled||X.intersectsSprite(y)){B&&Ae.setFromMatrixPosition(y.matrixWorld).applyMatrix4(Me);let ne=H.update(y),le=y.material;le.visible&&m.push(y,ne,le,O,Ae.z,null)}}else if((y.isMesh||y.isLine||y.isPoints)&&(!y.frustumCulled||X.intersectsObject(y))){let ne=H.update(y),le=y.material;if(B&&(y.boundingSphere!==void 0?(y.boundingSphere===null&&y.computeBoundingSphere(),Ae.copy(y.boundingSphere.center)):(ne.boundingSphere===null&&ne.computeBoundingSphere(),Ae.copy(ne.boundingSphere.center)),Ae.applyMatrix4(y.matrixWorld).applyMatrix4(Me)),Array.isArray(le)){let fe=ne.groups;for(let Ce=0,we=fe.length;Ce<we;Ce++){let ye=fe[Ce],We=le[ye.materialIndex];We&&We.visible&&m.push(y,ne,We,O,Ae.z,ye)}}else le.visible&&m.push(y,ne,le,O,Ae.z,null)}}let j=y.children;for(let ne=0,le=j.length;ne<le;ne++)ta(j[ne],D,O,B)}function tl(y,D,O,B){let U=y.opaque,j=y.transmissive,ne=y.transparent;f.setupLightsView(O),ee===!0&&$.setGlobalState(M.clippingPlanes,O),B&&xe.viewport(C.copy(B)),U.length>0&&cr(U,D,O),j.length>0&&cr(j,D,O),ne.length>0&&cr(ne,D,O),xe.buffers.depth.setTest(!0),xe.buffers.depth.setMask(!0),xe.buffers.color.setMask(!0),xe.setPolygonOffset(!1)}function nl(y,D,O,B){if((O.isScene===!0?O.overrideMaterial:null)!==null)return;f.state.transmissionRenderTarget[B.id]===void 0&&(f.state.transmissionRenderTarget[B.id]=new mn(1,1,{generateMipmaps:!0,type:Ge.has("EXT_color_buffer_half_float")||Ge.has("EXT_color_buffer_float")?is:hn,minFilter:ln,samples:4,stencilBuffer:r,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:Be.workingColorSpace}));let j=f.state.transmissionRenderTarget[B.id],ne=B.viewport||C;j.setSize(ne.z*M.transmissionResolutionScale,ne.w*M.transmissionResolutionScale);let le=M.getRenderTarget();M.setRenderTarget(j),M.getClearColor(W),J=M.getClearAlpha(),J<1&&M.setClearColor(16777215,.5),M.clear(),st&&Ee.render(O);let fe=M.toneMapping;M.toneMapping=Fn;let Ce=B.viewport;if(B.viewport!==void 0&&(B.viewport=void 0),f.setupLightsView(B),ee===!0&&$.setGlobalState(M.clippingPlanes,B),cr(y,O,B),b.updateMultisampleRenderTarget(j),b.updateRenderTargetMipmap(j),Ge.has("WEBGL_multisampled_render_to_texture")===!1){let we=!1;for(let ye=0,We=D.length;ye<We;ye++){let Ze=D[ye],ht=Ze.object,at=Ze.geometry,Xe=Ze.material,ve=Ze.group;if(Xe.side===Yt&&ht.layers.test(B.layers)){let xt=Xe.side;Xe.side=Pt,Xe.needsUpdate=!0,il(ht,O,B,at,Xe,ve),Xe.side=xt,Xe.needsUpdate=!0,we=!0}}we===!0&&(b.updateMultisampleRenderTarget(j),b.updateRenderTargetMipmap(j))}M.setRenderTarget(le),M.setClearColor(W,J),Ce!==void 0&&(B.viewport=Ce),M.toneMapping=fe}function cr(y,D,O){let B=D.isScene===!0?D.overrideMaterial:null;for(let U=0,j=y.length;U<j;U++){let ne=y[U],le=ne.object,fe=ne.geometry,Ce=ne.group,we=ne.material;we.allowOverride===!0&&B!==null&&(we=B),le.layers.test(O.layers)&&il(le,D,O,fe,we,Ce)}}function il(y,D,O,B,U,j){y.onBeforeRender(M,D,O,B,U,j),y.modelViewMatrix.multiplyMatrices(O.matrixWorldInverse,y.matrixWorld),y.normalMatrix.getNormalMatrix(y.modelViewMatrix),U.onBeforeRender(M,D,O,B,y,j),U.transparent===!0&&U.side===Yt&&U.forceSinglePass===!1?(U.side=Pt,U.needsUpdate=!0,M.renderBufferDirect(O,D,B,U,y,j),U.side=rn,U.needsUpdate=!0,M.renderBufferDirect(O,D,B,U,y,j),U.side=Yt):M.renderBufferDirect(O,D,B,U,y,j),y.onAfterRender(M,D,O,B,U,j)}function lr(y,D,O){D.isScene!==!0&&(D=ct);let B=ge.get(y),U=f.state.lights,j=f.state.shadowsArray,ne=U.state.version,le=me.getParameters(y,U.state,j,D,O),fe=me.getProgramCacheKey(le),Ce=B.programs;B.environment=y.isMeshStandardMaterial?D.environment:null,B.fog=D.fog,B.envMap=(y.isMeshStandardMaterial?F:x).get(y.envMap||B.environment),B.envMapRotation=B.environment!==null&&y.envMap===null?D.environmentRotation:y.envMapRotation,Ce===void 0&&(y.addEventListener("dispose",Le),Ce=new Map,B.programs=Ce);let we=Ce.get(fe);if(we!==void 0){if(B.currentProgram===we&&B.lightsStateVersion===ne)return rl(y,le),we}else le.uniforms=me.getUniforms(y),y.onBeforeCompile(le,M),we=me.acquireProgram(le,fe),Ce.set(fe,we),B.uniforms=le.uniforms;let ye=B.uniforms;return(!y.isShaderMaterial&&!y.isRawShaderMaterial||y.clipping===!0)&&(ye.clippingPlanes=$.uniform),rl(y,le),B.needsLights=bu(y),B.lightsStateVersion=ne,B.needsLights&&(ye.ambientLightColor.value=U.state.ambient,ye.lightProbe.value=U.state.probe,ye.directionalLights.value=U.state.directional,ye.directionalLightShadows.value=U.state.directionalShadow,ye.spotLights.value=U.state.spot,ye.spotLightShadows.value=U.state.spotShadow,ye.rectAreaLights.value=U.state.rectArea,ye.ltc_1.value=U.state.rectAreaLTC1,ye.ltc_2.value=U.state.rectAreaLTC2,ye.pointLights.value=U.state.point,ye.pointLightShadows.value=U.state.pointShadow,ye.hemisphereLights.value=U.state.hemi,ye.directionalShadowMap.value=U.state.directionalShadowMap,ye.directionalShadowMatrix.value=U.state.directionalShadowMatrix,ye.spotShadowMap.value=U.state.spotShadowMap,ye.spotLightMatrix.value=U.state.spotLightMatrix,ye.spotLightMap.value=U.state.spotLightMap,ye.pointShadowMap.value=U.state.pointShadowMap,ye.pointShadowMatrix.value=U.state.pointShadowMatrix),B.currentProgram=we,B.uniformsList=null,we}function sl(y){if(y.uniformsList===null){let D=y.currentProgram.getUniforms();y.uniformsList=ls.seqWithValue(D.seq,y.uniforms)}return y.uniformsList}function rl(y,D){let O=ge.get(y);O.outputColorSpace=D.outputColorSpace,O.batching=D.batching,O.batchingColor=D.batchingColor,O.instancing=D.instancing,O.instancingColor=D.instancingColor,O.instancingMorph=D.instancingMorph,O.skinning=D.skinning,O.morphTargets=D.morphTargets,O.morphNormals=D.morphNormals,O.morphColors=D.morphColors,O.morphTargetsCount=D.morphTargetsCount,O.numClippingPlanes=D.numClippingPlanes,O.numIntersection=D.numClipIntersection,O.vertexAlphas=D.vertexAlphas,O.vertexTangents=D.vertexTangents,O.toneMapping=D.toneMapping}function Mu(y,D,O,B,U){D.isScene!==!0&&(D=ct),b.resetTextureUnits();let j=D.fog,ne=B.isMeshStandardMaterial?D.environment:null,le=N===null?M.outputColorSpace:N.isXRRenderTarget===!0?N.texture.colorSpace:vt,fe=(B.isMeshStandardMaterial?F:x).get(B.envMap||ne),Ce=B.vertexColors===!0&&!!O.attributes.color&&O.attributes.color.itemSize===4,we=!!O.attributes.tangent&&(!!B.normalMap||B.anisotropy>0),ye=!!O.morphAttributes.position,We=!!O.morphAttributes.normal,Ze=!!O.morphAttributes.color,ht=Fn;B.toneMapped&&(N===null||N.isXRRenderTarget===!0)&&(ht=M.toneMapping);let at=O.morphAttributes.position||O.morphAttributes.normal||O.morphAttributes.color,Xe=at!==void 0?at.length:0,ve=ge.get(B),xt=f.state.lights;if(ee===!0&&(pe===!0||y!==v)){let At=y===v&&B.id===S;$.setState(B,y,At)}let Ke=!1;B.version===ve.__version?(ve.needsLights&&ve.lightsStateVersion!==xt.state.version||ve.outputColorSpace!==le||U.isBatchedMesh&&ve.batching===!1||!U.isBatchedMesh&&ve.batching===!0||U.isBatchedMesh&&ve.batchingColor===!0&&U.colorTexture===null||U.isBatchedMesh&&ve.batchingColor===!1&&U.colorTexture!==null||U.isInstancedMesh&&ve.instancing===!1||!U.isInstancedMesh&&ve.instancing===!0||U.isSkinnedMesh&&ve.skinning===!1||!U.isSkinnedMesh&&ve.skinning===!0||U.isInstancedMesh&&ve.instancingColor===!0&&U.instanceColor===null||U.isInstancedMesh&&ve.instancingColor===!1&&U.instanceColor!==null||U.isInstancedMesh&&ve.instancingMorph===!0&&U.morphTexture===null||U.isInstancedMesh&&ve.instancingMorph===!1&&U.morphTexture!==null||ve.envMap!==fe||B.fog===!0&&ve.fog!==j||ve.numClippingPlanes!==void 0&&(ve.numClippingPlanes!==$.numPlanes||ve.numIntersection!==$.numIntersection)||ve.vertexAlphas!==Ce||ve.vertexTangents!==we||ve.morphTargets!==ye||ve.morphNormals!==We||ve.morphColors!==Ze||ve.toneMapping!==ht||ve.morphTargetsCount!==Xe)&&(Ke=!0):(Ke=!0,ve.__version=B.version);let $t=ve.currentProgram;Ke===!0&&($t=lr(B,D,U));let wi=!1,Ot=!1,ds=!1,it=$t.getUniforms(),Wt=ve.uniforms;if(xe.useProgram($t.program)&&(wi=!0,Ot=!0,ds=!0),B.id!==S&&(S=B.id,Ot=!0),wi||v!==y){xe.buffers.depth.getReversed()?(se.copy(y.projectionMatrix),Nh(se),Fh(se),it.setValue(A,"projectionMatrix",se)):it.setValue(A,"projectionMatrix",y.projectionMatrix),it.setValue(A,"viewMatrix",y.matrixWorldInverse);let Lt=it.map.cameraPosition;Lt!==void 0&&Lt.setValue(A,Ye.setFromMatrixPosition(y.matrixWorld)),Ve.logarithmicDepthBuffer&&it.setValue(A,"logDepthBufFC",2/(Math.log(y.far+1)/Math.LN2)),(B.isMeshPhongMaterial||B.isMeshToonMaterial||B.isMeshLambertMaterial||B.isMeshBasicMaterial||B.isMeshStandardMaterial||B.isShaderMaterial)&&it.setValue(A,"isOrthographic",y.isOrthographicCamera===!0),v!==y&&(v=y,Ot=!0,ds=!0)}if(U.isSkinnedMesh){it.setOptional(A,U,"bindMatrix"),it.setOptional(A,U,"bindMatrixInverse");let At=U.skeleton;At&&(At.boneTexture===null&&At.computeBoneTexture(),it.setValue(A,"boneTexture",At.boneTexture,b))}U.isBatchedMesh&&(it.setOptional(A,U,"batchingTexture"),it.setValue(A,"batchingTexture",U._matricesTexture,b),it.setOptional(A,U,"batchingIdTexture"),it.setValue(A,"batchingIdTexture",U._indirectTexture,b),it.setOptional(A,U,"batchingColorTexture"),U._colorsTexture!==null&&it.setValue(A,"batchingColorTexture",U._colorsTexture,b));let Xt=O.morphAttributes;if((Xt.position!==void 0||Xt.normal!==void 0||Xt.color!==void 0)&&Re.update(U,O,$t),(Ot||ve.receiveShadow!==U.receiveShadow)&&(ve.receiveShadow=U.receiveShadow,it.setValue(A,"receiveShadow",U.receiveShadow)),B.isMeshGouraudMaterial&&B.envMap!==null&&(Wt.envMap.value=fe,Wt.flipEnvMap.value=fe.isCubeTexture&&fe.isRenderTargetTexture===!1?-1:1),B.isMeshStandardMaterial&&B.envMap===null&&D.environment!==null&&(Wt.envMapIntensity.value=D.environmentIntensity),Ot&&(it.setValue(A,"toneMappingExposure",M.toneMappingExposure),ve.needsLights&&Su(Wt,ds),j&&B.fog===!0&&re.refreshFogUniforms(Wt,j),re.refreshMaterialUniforms(Wt,B,V,Q,f.state.transmissionRenderTarget[y.id]),ls.upload(A,sl(ve),Wt,b)),B.isShaderMaterial&&B.uniformsNeedUpdate===!0&&(ls.upload(A,sl(ve),Wt,b),B.uniformsNeedUpdate=!1),B.isSpriteMaterial&&it.setValue(A,"center",U.center),it.setValue(A,"modelViewMatrix",U.modelViewMatrix),it.setValue(A,"normalMatrix",U.normalMatrix),it.setValue(A,"modelMatrix",U.matrixWorld),B.isShaderMaterial||B.isRawShaderMaterial){let At=B.uniformsGroups;for(let Lt=0,na=At.length;Lt<na;Lt++){let Qn=At[Lt];I.update(Qn,$t),I.bind(Qn,$t)}}return $t}function Su(y,D){y.ambientLightColor.needsUpdate=D,y.lightProbe.needsUpdate=D,y.directionalLights.needsUpdate=D,y.directionalLightShadows.needsUpdate=D,y.pointLights.needsUpdate=D,y.pointLightShadows.needsUpdate=D,y.spotLights.needsUpdate=D,y.spotLightShadows.needsUpdate=D,y.rectAreaLights.needsUpdate=D,y.hemisphereLights.needsUpdate=D}function bu(y){return y.isMeshLambertMaterial||y.isMeshToonMaterial||y.isMeshPhongMaterial||y.isMeshStandardMaterial||y.isShadowMaterial||y.isShaderMaterial&&y.lights===!0}this.getActiveCubeFace=function(){return R},this.getActiveMipmapLevel=function(){return w},this.getRenderTarget=function(){return N},this.setRenderTargetTextures=function(y,D,O){let B=ge.get(y);B.__autoAllocateDepthBuffer=y.resolveDepthBuffer===!1,B.__autoAllocateDepthBuffer===!1&&(B.__useRenderToTexture=!1),ge.get(y.texture).__webglTexture=D,ge.get(y.depthTexture).__webglTexture=B.__autoAllocateDepthBuffer?void 0:O,B.__hasExternalTextures=!0},this.setRenderTargetFramebuffer=function(y,D){let O=ge.get(y);O.__webglFramebuffer=D,O.__useDefaultFramebuffer=D===void 0};let Tu=A.createFramebuffer();this.setRenderTarget=function(y,D=0,O=0){N=y,R=D,w=O;let B=!0,U=null,j=!1,ne=!1;if(y){let fe=ge.get(y);if(fe.__useDefaultFramebuffer!==void 0)xe.bindFramebuffer(A.FRAMEBUFFER,null),B=!1;else if(fe.__webglFramebuffer===void 0)b.setupRenderTarget(y);else if(fe.__hasExternalTextures)b.rebindTextures(y,ge.get(y.texture).__webglTexture,ge.get(y.depthTexture).__webglTexture);else if(y.depthBuffer){let ye=y.depthTexture;if(fe.__boundDepthTexture!==ye){if(ye!==null&&ge.has(ye)&&(y.width!==ye.image.width||y.height!==ye.image.height))throw new Error("WebGLRenderTarget: Attached DepthTexture is initialized to the incorrect size.");b.setupDepthRenderbuffer(y)}}let Ce=y.texture;(Ce.isData3DTexture||Ce.isDataArrayTexture||Ce.isCompressedArrayTexture)&&(ne=!0);let we=ge.get(y).__webglFramebuffer;y.isWebGLCubeRenderTarget?(Array.isArray(we[D])?U=we[D][O]:U=we[D],j=!0):y.samples>0&&b.useMultisampledRTT(y)===!1?U=ge.get(y).__webglMultisampledFramebuffer:Array.isArray(we)?U=we[O]:U=we,C.copy(y.viewport),q.copy(y.scissor),z=y.scissorTest}else C.copy(_e).multiplyScalar(V).floor(),q.copy(Ne).multiplyScalar(V).floor(),z=et;if(O!==0&&(U=Tu),xe.bindFramebuffer(A.FRAMEBUFFER,U)&&B&&xe.drawBuffers(y,U),xe.viewport(C),xe.scissor(q),xe.setScissorTest(z),j){let fe=ge.get(y.texture);A.framebufferTexture2D(A.FRAMEBUFFER,A.COLOR_ATTACHMENT0,A.TEXTURE_CUBE_MAP_POSITIVE_X+D,fe.__webglTexture,O)}else if(ne){let fe=ge.get(y.texture),Ce=D;A.framebufferTextureLayer(A.FRAMEBUFFER,A.COLOR_ATTACHMENT0,fe.__webglTexture,O,Ce)}else if(y!==null&&O!==0){let fe=ge.get(y.texture);A.framebufferTexture2D(A.FRAMEBUFFER,A.COLOR_ATTACHMENT0,A.TEXTURE_2D,fe.__webglTexture,O)}S=-1},this.readRenderTargetPixels=function(y,D,O,B,U,j,ne){if(!(y&&y.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let le=ge.get(y).__webglFramebuffer;if(y.isWebGLCubeRenderTarget&&ne!==void 0&&(le=le[ne]),le){xe.bindFramebuffer(A.FRAMEBUFFER,le);try{let fe=y.texture,Ce=fe.format,we=fe.type;if(!Ve.textureFormatReadable(Ce)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!Ve.textureTypeReadable(we)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}D>=0&&D<=y.width-B&&O>=0&&O<=y.height-U&&A.readPixels(D,O,B,U,De.convert(Ce),De.convert(we),j)}finally{let fe=N!==null?ge.get(N).__webglFramebuffer:null;xe.bindFramebuffer(A.FRAMEBUFFER,fe)}}},this.readRenderTargetPixelsAsync=async function(y,D,O,B,U,j,ne){if(!(y&&y.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let le=ge.get(y).__webglFramebuffer;if(y.isWebGLCubeRenderTarget&&ne!==void 0&&(le=le[ne]),le)if(D>=0&&D<=y.width-B&&O>=0&&O<=y.height-U){xe.bindFramebuffer(A.FRAMEBUFFER,le);let fe=y.texture,Ce=fe.format,we=fe.type;if(!Ve.textureFormatReadable(Ce))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!Ve.textureTypeReadable(we))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");let ye=A.createBuffer();A.bindBuffer(A.PIXEL_PACK_BUFFER,ye),A.bufferData(A.PIXEL_PACK_BUFFER,j.byteLength,A.STREAM_READ),A.readPixels(D,O,B,U,De.convert(Ce),De.convert(we),0);let We=N!==null?ge.get(N).__webglFramebuffer:null;xe.bindFramebuffer(A.FRAMEBUFFER,We);let Ze=A.fenceSync(A.SYNC_GPU_COMMANDS_COMPLETE,0);return A.flush(),await Uh(A,Ze,4),A.bindBuffer(A.PIXEL_PACK_BUFFER,ye),A.getBufferSubData(A.PIXEL_PACK_BUFFER,0,j),A.deleteBuffer(ye),A.deleteSync(Ze),j}else throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")},this.copyFramebufferToTexture=function(y,D=null,O=0){let B=Math.pow(2,-O),U=Math.floor(y.image.width*B),j=Math.floor(y.image.height*B),ne=D!==null?D.x:0,le=D!==null?D.y:0;b.setTexture2D(y,0),A.copyTexSubImage2D(A.TEXTURE_2D,O,0,0,ne,le,U,j),xe.unbindTexture()};let Eu=A.createFramebuffer(),Au=A.createFramebuffer();this.copyTextureToTexture=function(y,D,O=null,B=null,U=0,j=null){j===null&&(U!==0?(rr("WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels."),j=U,U=0):j=0);let ne,le,fe,Ce,we,ye,We,Ze,ht,at=y.isCompressedTexture?y.mipmaps[j]:y.image;if(O!==null)ne=O.max.x-O.min.x,le=O.max.y-O.min.y,fe=O.isBox3?O.max.z-O.min.z:1,Ce=O.min.x,we=O.min.y,ye=O.isBox3?O.min.z:0;else{let Xt=Math.pow(2,-U);ne=Math.floor(at.width*Xt),le=Math.floor(at.height*Xt),y.isDataArrayTexture?fe=at.depth:y.isData3DTexture?fe=Math.floor(at.depth*Xt):fe=1,Ce=0,we=0,ye=0}B!==null?(We=B.x,Ze=B.y,ht=B.z):(We=0,Ze=0,ht=0);let Xe=De.convert(D.format),ve=De.convert(D.type),xt;D.isData3DTexture?(b.setTexture3D(D,0),xt=A.TEXTURE_3D):D.isDataArrayTexture||D.isCompressedArrayTexture?(b.setTexture2DArray(D,0),xt=A.TEXTURE_2D_ARRAY):(b.setTexture2D(D,0),xt=A.TEXTURE_2D),A.pixelStorei(A.UNPACK_FLIP_Y_WEBGL,D.flipY),A.pixelStorei(A.UNPACK_PREMULTIPLY_ALPHA_WEBGL,D.premultiplyAlpha),A.pixelStorei(A.UNPACK_ALIGNMENT,D.unpackAlignment);let Ke=A.getParameter(A.UNPACK_ROW_LENGTH),$t=A.getParameter(A.UNPACK_IMAGE_HEIGHT),wi=A.getParameter(A.UNPACK_SKIP_PIXELS),Ot=A.getParameter(A.UNPACK_SKIP_ROWS),ds=A.getParameter(A.UNPACK_SKIP_IMAGES);A.pixelStorei(A.UNPACK_ROW_LENGTH,at.width),A.pixelStorei(A.UNPACK_IMAGE_HEIGHT,at.height),A.pixelStorei(A.UNPACK_SKIP_PIXELS,Ce),A.pixelStorei(A.UNPACK_SKIP_ROWS,we),A.pixelStorei(A.UNPACK_SKIP_IMAGES,ye);let it=y.isDataArrayTexture||y.isData3DTexture,Wt=D.isDataArrayTexture||D.isData3DTexture;if(y.isDepthTexture){let Xt=ge.get(y),At=ge.get(D),Lt=ge.get(Xt.__renderTarget),na=ge.get(At.__renderTarget);xe.bindFramebuffer(A.READ_FRAMEBUFFER,Lt.__webglFramebuffer),xe.bindFramebuffer(A.DRAW_FRAMEBUFFER,na.__webglFramebuffer);for(let Qn=0;Qn<fe;Qn++)it&&(A.framebufferTextureLayer(A.READ_FRAMEBUFFER,A.COLOR_ATTACHMENT0,ge.get(y).__webglTexture,U,ye+Qn),A.framebufferTextureLayer(A.DRAW_FRAMEBUFFER,A.COLOR_ATTACHMENT0,ge.get(D).__webglTexture,j,ht+Qn)),A.blitFramebuffer(Ce,we,ne,le,We,Ze,ne,le,A.DEPTH_BUFFER_BIT,A.NEAREST);xe.bindFramebuffer(A.READ_FRAMEBUFFER,null),xe.bindFramebuffer(A.DRAW_FRAMEBUFFER,null)}else if(U!==0||y.isRenderTargetTexture||ge.has(y)){let Xt=ge.get(y),At=ge.get(D);xe.bindFramebuffer(A.READ_FRAMEBUFFER,Eu),xe.bindFramebuffer(A.DRAW_FRAMEBUFFER,Au);for(let Lt=0;Lt<fe;Lt++)it?A.framebufferTextureLayer(A.READ_FRAMEBUFFER,A.COLOR_ATTACHMENT0,Xt.__webglTexture,U,ye+Lt):A.framebufferTexture2D(A.READ_FRAMEBUFFER,A.COLOR_ATTACHMENT0,A.TEXTURE_2D,Xt.__webglTexture,U),Wt?A.framebufferTextureLayer(A.DRAW_FRAMEBUFFER,A.COLOR_ATTACHMENT0,At.__webglTexture,j,ht+Lt):A.framebufferTexture2D(A.DRAW_FRAMEBUFFER,A.COLOR_ATTACHMENT0,A.TEXTURE_2D,At.__webglTexture,j),U!==0?A.blitFramebuffer(Ce,we,ne,le,We,Ze,ne,le,A.COLOR_BUFFER_BIT,A.NEAREST):Wt?A.copyTexSubImage3D(xt,j,We,Ze,ht+Lt,Ce,we,ne,le):A.copyTexSubImage2D(xt,j,We,Ze,Ce,we,ne,le);xe.bindFramebuffer(A.READ_FRAMEBUFFER,null),xe.bindFramebuffer(A.DRAW_FRAMEBUFFER,null)}else Wt?y.isDataTexture||y.isData3DTexture?A.texSubImage3D(xt,j,We,Ze,ht,ne,le,fe,Xe,ve,at.data):D.isCompressedArrayTexture?A.compressedTexSubImage3D(xt,j,We,Ze,ht,ne,le,fe,Xe,at.data):A.texSubImage3D(xt,j,We,Ze,ht,ne,le,fe,Xe,ve,at):y.isDataTexture?A.texSubImage2D(A.TEXTURE_2D,j,We,Ze,ne,le,Xe,ve,at.data):y.isCompressedTexture?A.compressedTexSubImage2D(A.TEXTURE_2D,j,We,Ze,at.width,at.height,Xe,at.data):A.texSubImage2D(A.TEXTURE_2D,j,We,Ze,ne,le,Xe,ve,at);A.pixelStorei(A.UNPACK_ROW_LENGTH,Ke),A.pixelStorei(A.UNPACK_IMAGE_HEIGHT,$t),A.pixelStorei(A.UNPACK_SKIP_PIXELS,wi),A.pixelStorei(A.UNPACK_SKIP_ROWS,Ot),A.pixelStorei(A.UNPACK_SKIP_IMAGES,ds),j===0&&D.generateMipmaps&&A.generateMipmap(xt),xe.unbindTexture()},this.copyTextureToTexture3D=function(y,D,O=null,B=null,U=0){return rr('WebGLRenderer: copyTextureToTexture3D function has been deprecated. Use "copyTextureToTexture" instead.'),this.copyTextureToTexture(y,D,O,B,U)},this.initRenderTarget=function(y){ge.get(y).__webglFramebuffer===void 0&&b.setupRenderTarget(y)},this.initTexture=function(y){y.isCubeTexture?b.setTextureCube(y,0):y.isData3DTexture?b.setTexture3D(y,0):y.isDataArrayTexture||y.isCompressedArrayTexture?b.setTexture2DArray(y,0):b.setTexture2D(y,0),xe.unbindTexture()},this.resetState=function(){R=0,w=0,N=null,xe.reset(),tt.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return fn}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;let t=this.getContext();t.drawingBufferColorSpace=Be._getDrawingBufferColorSpace(e),t.unpackColorSpace=Be._getUnpackColorSpace()}};function Sc(s,e){if(e===Ja)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),s;if(e===os||e===sr){let t=s.getIndex();if(t===null){let o=[],a=s.getAttribute("position");if(a!==void 0){for(let c=0;c<a.count;c++)o.push(c);s.setIndex(o),t=s.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),s}let n=t.count-2,i=[];if(e===os)for(let o=1;o<=n;o++)i.push(t.getX(0)),i.push(t.getX(o)),i.push(t.getX(o+1));else for(let o=0;o<n;o++)o%2===0?(i.push(t.getX(o)),i.push(t.getX(o+1)),i.push(t.getX(o+2))):(i.push(t.getX(o+2)),i.push(t.getX(o+1)),i.push(t.getX(o)));i.length/3!==n&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");let r=s.clone();return r.setIndex(i),r.clearGroups(),r}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",e),s}var Qo=class extends yn{constructor(e){super(e),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(t){return new Cc(t)}),this.register(function(t){return new Ic(t)}),this.register(function(t){return new zc(t)}),this.register(function(t){return new kc(t)}),this.register(function(t){return new Vc(t)}),this.register(function(t){return new Lc(t)}),this.register(function(t){return new Dc(t)}),this.register(function(t){return new Uc(t)}),this.register(function(t){return new Nc(t)}),this.register(function(t){return new Rc(t)}),this.register(function(t){return new Fc(t)}),this.register(function(t){return new Pc(t)}),this.register(function(t){return new Bc(t)}),this.register(function(t){return new Oc(t)}),this.register(function(t){return new Ac(t)}),this.register(function(t){return new Hc(t)}),this.register(function(t){return new Gc(t)})}load(e,t,n,i){let r=this,o;if(this.resourcePath!=="")o=this.resourcePath;else if(this.path!==""){let l=Un.extractUrlBase(e);o=Un.resolveURL(l,this.path)}else o=Un.extractUrlBase(e);this.manager.itemStart(e);let a=function(l){i?i(l):console.error(l),r.manager.itemError(e),r.manager.itemEnd(e)},c=new es(this.manager);c.setPath(this.path),c.setResponseType("arraybuffer"),c.setRequestHeader(this.requestHeader),c.setWithCredentials(this.withCredentials),c.load(e,function(l){try{r.parse(l,o,function(h){t(h),r.manager.itemEnd(e)},a)}catch(h){a(h)}},n,a)}setDRACOLoader(e){return this.dracoLoader=e,this}setKTX2Loader(e){return this.ktx2Loader=e,this}setMeshoptDecoder(e){return this.meshoptDecoder=e,this}register(e){return this.pluginCallbacks.indexOf(e)===-1&&this.pluginCallbacks.push(e),this}unregister(e){return this.pluginCallbacks.indexOf(e)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,t,n,i){let r,o={},a={},c=new TextDecoder;if(typeof e=="string")r=JSON.parse(e);else if(e instanceof ArrayBuffer)if(c.decode(new Uint8Array(e,0,4))===yu){try{o[Oe.KHR_BINARY_GLTF]=new Wc(e)}catch(u){i&&i(u);return}r=JSON.parse(o[Oe.KHR_BINARY_GLTF].content)}else r=JSON.parse(c.decode(e));else r=e;if(r.asset===void 0||r.asset.version[0]<2){i&&i(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}let l=new $c(r,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});l.fileLoader.setRequestHeader(this.requestHeader);for(let h=0;h<this.pluginCallbacks.length;h++){let u=this.pluginCallbacks[h](l);u.name||console.error("THREE.GLTFLoader: Invalid plugin found: missing name"),a[u.name]=u,o[u.name]=!0}if(r.extensionsUsed)for(let h=0;h<r.extensionsUsed.length;++h){let u=r.extensionsUsed[h],d=r.extensionsRequired||[];switch(u){case Oe.KHR_MATERIALS_UNLIT:o[u]=new wc;break;case Oe.KHR_DRACO_MESH_COMPRESSION:o[u]=new Xc(r,this.dracoLoader);break;case Oe.KHR_TEXTURE_TRANSFORM:o[u]=new qc;break;case Oe.KHR_MESH_QUANTIZATION:o[u]=new Yc;break;default:d.indexOf(u)>=0&&a[u]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+u+'".')}}l.setExtensions(o),l.setPlugins(a),l.parse(n,i)}parseAsync(e,t){let n=this;return new Promise(function(i,r){n.parse(e,t,i,r)})}};function i_(){let s={};return{get:function(e){return s[e]},add:function(e,t){s[e]=t},remove:function(e){delete s[e]},removeAll:function(){s={}}}}var Oe={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_DISPERSION:"KHR_materials_dispersion",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"},Ac=class{constructor(e){this.parser=e,this.name=Oe.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){let e=this.parser,t=this.parser.json.nodes||[];for(let n=0,i=t.length;n<i;n++){let r=t[n];r.extensions&&r.extensions[this.name]&&r.extensions[this.name].light!==void 0&&e._addNodeRef(this.cache,r.extensions[this.name].light)}}_loadLight(e){let t=this.parser,n="light:"+e,i=t.cache.get(n);if(i)return i;let r=t.json,c=((r.extensions&&r.extensions[this.name]||{}).lights||[])[e],l,h=new be(16777215);c.color!==void 0&&h.setRGB(c.color[0],c.color[1],c.color[2],vt);let u=c.range!==void 0?c.range:0;switch(c.type){case"directional":l=new Kn(h),l.target.position.set(0,0,-1),l.add(l.target);break;case"point":l=new Ys(h),l.distance=u;break;case"spot":l=new qs(h),l.distance=u,c.spot=c.spot||{},c.spot.innerConeAngle=c.spot.innerConeAngle!==void 0?c.spot.innerConeAngle:0,c.spot.outerConeAngle=c.spot.outerConeAngle!==void 0?c.spot.outerConeAngle:Math.PI/4,l.angle=c.spot.outerConeAngle,l.penumbra=1-c.spot.innerConeAngle/c.spot.outerConeAngle,l.target.position.set(0,0,-1),l.add(l.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+c.type)}return l.position.set(0,0,0),Bn(l,c),c.intensity!==void 0&&(l.intensity=c.intensity),l.name=t.createUniqueName(c.name||"light_"+e),i=Promise.resolve(l),t.cache.add(n,i),i}getDependency(e,t){if(e==="light")return this._loadLight(t)}createNodeAttachment(e){let t=this,n=this.parser,r=n.json.nodes[e],a=(r.extensions&&r.extensions[this.name]||{}).light;return a===void 0?null:this._loadLight(a).then(function(c){return n._getNodeRef(t.cache,a,c)})}},wc=class{constructor(){this.name=Oe.KHR_MATERIALS_UNLIT}getMaterialType(){return an}extendParams(e,t,n){let i=[];e.color=new be(1,1,1),e.opacity=1;let r=t.pbrMetallicRoughness;if(r){if(Array.isArray(r.baseColorFactor)){let o=r.baseColorFactor;e.color.setRGB(o[0],o[1],o[2],vt),e.opacity=o[3]}r.baseColorTexture!==void 0&&i.push(n.assignTexture(e,"map",r.baseColorTexture,lt))}return Promise.all(i)}},Rc=class{constructor(e){this.parser=e,this.name=Oe.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(e,t){let i=this.parser.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();let r=i.extensions[this.name].emissiveStrength;return r!==void 0&&(t.emissiveIntensity=r),Promise.resolve()}},Cc=class{constructor(e){this.parser=e,this.name=Oe.KHR_MATERIALS_CLEARCOAT}getMaterialType(e){let n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:Nt}extendMaterialParams(e,t){let n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();let r=[],o=i.extensions[this.name];if(o.clearcoatFactor!==void 0&&(t.clearcoat=o.clearcoatFactor),o.clearcoatTexture!==void 0&&r.push(n.assignTexture(t,"clearcoatMap",o.clearcoatTexture)),o.clearcoatRoughnessFactor!==void 0&&(t.clearcoatRoughness=o.clearcoatRoughnessFactor),o.clearcoatRoughnessTexture!==void 0&&r.push(n.assignTexture(t,"clearcoatRoughnessMap",o.clearcoatRoughnessTexture)),o.clearcoatNormalTexture!==void 0&&(r.push(n.assignTexture(t,"clearcoatNormalMap",o.clearcoatNormalTexture)),o.clearcoatNormalTexture.scale!==void 0)){let a=o.clearcoatNormalTexture.scale;t.clearcoatNormalScale=new ze(a,a)}return Promise.all(r)}},Ic=class{constructor(e){this.parser=e,this.name=Oe.KHR_MATERIALS_DISPERSION}getMaterialType(e){let n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:Nt}extendMaterialParams(e,t){let i=this.parser.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();let r=i.extensions[this.name];return t.dispersion=r.dispersion!==void 0?r.dispersion:0,Promise.resolve()}},Pc=class{constructor(e){this.parser=e,this.name=Oe.KHR_MATERIALS_IRIDESCENCE}getMaterialType(e){let n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:Nt}extendMaterialParams(e,t){let n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();let r=[],o=i.extensions[this.name];return o.iridescenceFactor!==void 0&&(t.iridescence=o.iridescenceFactor),o.iridescenceTexture!==void 0&&r.push(n.assignTexture(t,"iridescenceMap",o.iridescenceTexture)),o.iridescenceIor!==void 0&&(t.iridescenceIOR=o.iridescenceIor),t.iridescenceThicknessRange===void 0&&(t.iridescenceThicknessRange=[100,400]),o.iridescenceThicknessMinimum!==void 0&&(t.iridescenceThicknessRange[0]=o.iridescenceThicknessMinimum),o.iridescenceThicknessMaximum!==void 0&&(t.iridescenceThicknessRange[1]=o.iridescenceThicknessMaximum),o.iridescenceThicknessTexture!==void 0&&r.push(n.assignTexture(t,"iridescenceThicknessMap",o.iridescenceThicknessTexture)),Promise.all(r)}},Lc=class{constructor(e){this.parser=e,this.name=Oe.KHR_MATERIALS_SHEEN}getMaterialType(e){let n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:Nt}extendMaterialParams(e,t){let n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();let r=[];t.sheenColor=new be(0,0,0),t.sheenRoughness=0,t.sheen=1;let o=i.extensions[this.name];if(o.sheenColorFactor!==void 0){let a=o.sheenColorFactor;t.sheenColor.setRGB(a[0],a[1],a[2],vt)}return o.sheenRoughnessFactor!==void 0&&(t.sheenRoughness=o.sheenRoughnessFactor),o.sheenColorTexture!==void 0&&r.push(n.assignTexture(t,"sheenColorMap",o.sheenColorTexture,lt)),o.sheenRoughnessTexture!==void 0&&r.push(n.assignTexture(t,"sheenRoughnessMap",o.sheenRoughnessTexture)),Promise.all(r)}},Dc=class{constructor(e){this.parser=e,this.name=Oe.KHR_MATERIALS_TRANSMISSION}getMaterialType(e){let n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:Nt}extendMaterialParams(e,t){let n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();let r=[],o=i.extensions[this.name];return o.transmissionFactor!==void 0&&(t.transmission=o.transmissionFactor),o.transmissionTexture!==void 0&&r.push(n.assignTexture(t,"transmissionMap",o.transmissionTexture)),Promise.all(r)}},Uc=class{constructor(e){this.parser=e,this.name=Oe.KHR_MATERIALS_VOLUME}getMaterialType(e){let n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:Nt}extendMaterialParams(e,t){let n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();let r=[],o=i.extensions[this.name];t.thickness=o.thicknessFactor!==void 0?o.thicknessFactor:0,o.thicknessTexture!==void 0&&r.push(n.assignTexture(t,"thicknessMap",o.thicknessTexture)),t.attenuationDistance=o.attenuationDistance||1/0;let a=o.attenuationColor||[1,1,1];return t.attenuationColor=new be().setRGB(a[0],a[1],a[2],vt),Promise.all(r)}},Nc=class{constructor(e){this.parser=e,this.name=Oe.KHR_MATERIALS_IOR}getMaterialType(e){let n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:Nt}extendMaterialParams(e,t){let i=this.parser.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();let r=i.extensions[this.name];return t.ior=r.ior!==void 0?r.ior:1.5,Promise.resolve()}},Fc=class{constructor(e){this.parser=e,this.name=Oe.KHR_MATERIALS_SPECULAR}getMaterialType(e){let n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:Nt}extendMaterialParams(e,t){let n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();let r=[],o=i.extensions[this.name];t.specularIntensity=o.specularFactor!==void 0?o.specularFactor:1,o.specularTexture!==void 0&&r.push(n.assignTexture(t,"specularIntensityMap",o.specularTexture));let a=o.specularColorFactor||[1,1,1];return t.specularColor=new be().setRGB(a[0],a[1],a[2],vt),o.specularColorTexture!==void 0&&r.push(n.assignTexture(t,"specularColorMap",o.specularColorTexture,lt)),Promise.all(r)}},Oc=class{constructor(e){this.parser=e,this.name=Oe.EXT_MATERIALS_BUMP}getMaterialType(e){let n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:Nt}extendMaterialParams(e,t){let n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();let r=[],o=i.extensions[this.name];return t.bumpScale=o.bumpFactor!==void 0?o.bumpFactor:1,o.bumpTexture!==void 0&&r.push(n.assignTexture(t,"bumpMap",o.bumpTexture)),Promise.all(r)}},Bc=class{constructor(e){this.parser=e,this.name=Oe.KHR_MATERIALS_ANISOTROPY}getMaterialType(e){let n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:Nt}extendMaterialParams(e,t){let n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();let r=[],o=i.extensions[this.name];return o.anisotropyStrength!==void 0&&(t.anisotropy=o.anisotropyStrength),o.anisotropyRotation!==void 0&&(t.anisotropyRotation=o.anisotropyRotation),o.anisotropyTexture!==void 0&&r.push(n.assignTexture(t,"anisotropyMap",o.anisotropyTexture)),Promise.all(r)}},zc=class{constructor(e){this.parser=e,this.name=Oe.KHR_TEXTURE_BASISU}loadTexture(e){let t=this.parser,n=t.json,i=n.textures[e];if(!i.extensions||!i.extensions[this.name])return null;let r=i.extensions[this.name],o=t.options.ktx2Loader;if(!o){if(n.extensionsRequired&&n.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,r.source,o)}},kc=class{constructor(e){this.parser=e,this.name=Oe.EXT_TEXTURE_WEBP}loadTexture(e){let t=this.name,n=this.parser,i=n.json,r=i.textures[e];if(!r.extensions||!r.extensions[t])return null;let o=r.extensions[t],a=i.images[o.source],c=n.textureLoader;if(a.uri){let l=n.options.manager.getHandler(a.uri);l!==null&&(c=l)}return n.loadTextureImage(e,o.source,c)}},Vc=class{constructor(e){this.parser=e,this.name=Oe.EXT_TEXTURE_AVIF}loadTexture(e){let t=this.name,n=this.parser,i=n.json,r=i.textures[e];if(!r.extensions||!r.extensions[t])return null;let o=r.extensions[t],a=i.images[o.source],c=n.textureLoader;if(a.uri){let l=n.options.manager.getHandler(a.uri);l!==null&&(c=l)}return n.loadTextureImage(e,o.source,c)}},Hc=class{constructor(e){this.name=Oe.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){let t=this.parser.json,n=t.bufferViews[e];if(n.extensions&&n.extensions[this.name]){let i=n.extensions[this.name],r=this.parser.getDependency("buffer",i.buffer),o=this.parser.options.meshoptDecoder;if(!o||!o.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return r.then(function(a){let c=i.byteOffset||0,l=i.byteLength||0,h=i.count,u=i.byteStride,d=new Uint8Array(a,c,l);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(h,u,d,i.mode,i.filter).then(function(p){return p.buffer}):o.ready.then(function(){let p=new ArrayBuffer(h*u);return o.decodeGltfBuffer(new Uint8Array(p),h,u,d,i.mode,i.filter),p})})}else return null}},Gc=class{constructor(e){this.name=Oe.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){let t=this.parser.json,n=t.nodes[e];if(!n.extensions||!n.extensions[this.name]||n.mesh===void 0)return null;let i=t.meshes[n.mesh];for(let l of i.primitives)if(l.mode!==Kt.TRIANGLES&&l.mode!==Kt.TRIANGLE_STRIP&&l.mode!==Kt.TRIANGLE_FAN&&l.mode!==void 0)return null;let o=n.extensions[this.name].attributes,a=[],c={};for(let l in o)a.push(this.parser.getDependency("accessor",o[l]).then(h=>(c[l]=h,c[l])));return a.length<1?null:(a.push(this.parser.createNodeMesh(e)),Promise.all(a).then(l=>{let h=l.pop(),u=h.isGroup?h.children:[h],d=l[0].count,p=[];for(let g of u){let _=new Ie,m=new P,f=new Rt,E=new P(1,1,1),T=new Fs(g.geometry,g.material,d);for(let M=0;M<d;M++)c.TRANSLATION&&m.fromBufferAttribute(c.TRANSLATION,M),c.ROTATION&&f.fromBufferAttribute(c.ROTATION,M),c.SCALE&&E.fromBufferAttribute(c.SCALE,M),T.setMatrixAt(M,_.compose(m,f,E));for(let M in c)if(M==="_COLOR_0"){let L=c[M];T.instanceColor=new Zn(L.array,L.itemSize,L.normalized)}else M!=="TRANSLATION"&&M!=="ROTATION"&&M!=="SCALE"&&g.geometry.setAttribute(M,c[M]);rt.prototype.copy.call(T,g),this.parser.assignFinalMaterial(T),p.push(T)}return h.isGroup?(h.clear(),h.add(...p),h):p[0]}))}},yu="glTF",ar=12,mu={JSON:1313821514,BIN:5130562},Wc=class{constructor(e){this.name=Oe.KHR_BINARY_GLTF,this.content=null,this.body=null;let t=new DataView(e,0,ar),n=new TextDecoder;if(this.header={magic:n.decode(new Uint8Array(e.slice(0,4))),version:t.getUint32(4,!0),length:t.getUint32(8,!0)},this.header.magic!==yu)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");let i=this.header.length-ar,r=new DataView(e,ar),o=0;for(;o<i;){let a=r.getUint32(o,!0);o+=4;let c=r.getUint32(o,!0);if(o+=4,c===mu.JSON){let l=new Uint8Array(e,ar+o,a);this.content=n.decode(l)}else if(c===mu.BIN){let l=ar+o;this.body=e.slice(l,l+a)}o+=a}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}},Xc=class{constructor(e,t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=Oe.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=t,this.dracoLoader.preload()}decodePrimitive(e,t){let n=this.json,i=this.dracoLoader,r=e.extensions[this.name].bufferView,o=e.extensions[this.name].attributes,a={},c={},l={};for(let h in o){let u=Kc[h]||h.toLowerCase();a[u]=o[h]}for(let h in e.attributes){let u=Kc[h]||h.toLowerCase();if(o[h]!==void 0){let d=n.accessors[e.attributes[h]],p=us[d.componentType];l[u]=p.name,c[u]=d.normalized===!0}}return t.getDependency("bufferView",r).then(function(h){return new Promise(function(u,d){i.decodeDracoFile(h,function(p){for(let g in p.attributes){let _=p.attributes[g],m=c[g];m!==void 0&&(_.normalized=m)}u(p)},a,l,vt,d)})})}},qc=class{constructor(){this.name=Oe.KHR_TEXTURE_TRANSFORM}extendTexture(e,t){return(t.texCoord===void 0||t.texCoord===e.channel)&&t.offset===void 0&&t.rotation===void 0&&t.scale===void 0||(e=e.clone(),t.texCoord!==void 0&&(e.channel=t.texCoord),t.offset!==void 0&&e.offset.fromArray(t.offset),t.rotation!==void 0&&(e.rotation=t.rotation),t.scale!==void 0&&e.repeat.fromArray(t.scale),e.needsUpdate=!0),e}},Yc=class{constructor(){this.name=Oe.KHR_MESH_QUANTIZATION}},ea=class extends Pn{constructor(e,t,n,i){super(e,t,n,i)}copySampleValue_(e){let t=this.resultBuffer,n=this.sampleValues,i=this.valueSize,r=e*i*3+i;for(let o=0;o!==i;o++)t[o]=n[r+o];return t}interpolate_(e,t,n,i){let r=this.resultBuffer,o=this.sampleValues,a=this.valueSize,c=a*2,l=a*3,h=i-t,u=(n-t)/h,d=u*u,p=d*u,g=e*l,_=g-l,m=-2*p+3*d,f=p-d,E=1-m,T=f-d+u;for(let M=0;M!==a;M++){let L=o[_+M+a],R=o[_+M+c]*h,w=o[g+M+a],N=o[g+M]*h;r[M]=E*L+T*R+m*w+f*N}return r}},s_=new Rt,Zc=class extends ea{interpolate_(e,t,n,i){let r=super.interpolate_(e,t,n,i);return s_.fromArray(r).normalize().toArray(r),r}},Kt={FLOAT:5126,FLOAT_MAT3:35675,FLOAT_MAT4:35676,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,LINEAR:9729,REPEAT:10497,SAMPLER_2D:35678,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123},us={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},gu={9728:yt,9729:Ct,9984:uo,9985:ts,9986:vi,9987:ln},_u={33071:dn,33648:Hi,10497:Yn},bc={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Kc={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},$n={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},r_={CUBICSPLINE:void 0,LINEAR:hi,STEP:li},Tc={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function o_(s){return s.DefaultMaterial===void 0&&(s.DefaultMaterial=new pi({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:rn})),s.DefaultMaterial}function Ai(s,e,t){for(let n in t.extensions)s[n]===void 0&&(e.userData.gltfExtensions=e.userData.gltfExtensions||{},e.userData.gltfExtensions[n]=t.extensions[n])}function Bn(s,e){e.extras!==void 0&&(typeof e.extras=="object"?Object.assign(s.userData,e.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+e.extras))}function a_(s,e,t){let n=!1,i=!1,r=!1;for(let l=0,h=e.length;l<h;l++){let u=e[l];if(u.POSITION!==void 0&&(n=!0),u.NORMAL!==void 0&&(i=!0),u.COLOR_0!==void 0&&(r=!0),n&&i&&r)break}if(!n&&!i&&!r)return Promise.resolve(s);let o=[],a=[],c=[];for(let l=0,h=e.length;l<h;l++){let u=e[l];if(n){let d=u.POSITION!==void 0?t.getDependency("accessor",u.POSITION):s.attributes.position;o.push(d)}if(i){let d=u.NORMAL!==void 0?t.getDependency("accessor",u.NORMAL):s.attributes.normal;a.push(d)}if(r){let d=u.COLOR_0!==void 0?t.getDependency("accessor",u.COLOR_0):s.attributes.color;c.push(d)}}return Promise.all([Promise.all(o),Promise.all(a),Promise.all(c)]).then(function(l){let h=l[0],u=l[1],d=l[2];return n&&(s.morphAttributes.position=h),i&&(s.morphAttributes.normal=u),r&&(s.morphAttributes.color=d),s.morphTargetsRelative=!0,s})}function c_(s,e){if(s.updateMorphTargets(),e.weights!==void 0)for(let t=0,n=e.weights.length;t<n;t++)s.morphTargetInfluences[t]=e.weights[t];if(e.extras&&Array.isArray(e.extras.targetNames)){let t=e.extras.targetNames;if(s.morphTargetInfluences.length===t.length){s.morphTargetDictionary={};for(let n=0,i=t.length;n<i;n++)s.morphTargetDictionary[t[n]]=n}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function l_(s){let e,t=s.extensions&&s.extensions[Oe.KHR_DRACO_MESH_COMPRESSION];if(t?e="draco:"+t.bufferView+":"+t.indices+":"+Ec(t.attributes):e=s.indices+":"+Ec(s.attributes)+":"+s.mode,s.targets!==void 0)for(let n=0,i=s.targets.length;n<i;n++)e+=":"+Ec(s.targets[n]);return e}function Ec(s){let e="",t=Object.keys(s).sort();for(let n=0,i=t.length;n<i;n++)e+=t[n]+":"+s[t[n]]+";";return e}function Jc(s){switch(s){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}function h_(s){return s.search(/\.jpe?g($|\?)/i)>0||s.search(/^data\:image\/jpeg/)===0?"image/jpeg":s.search(/\.webp($|\?)/i)>0||s.search(/^data\:image\/webp/)===0?"image/webp":s.search(/\.ktx2($|\?)/i)>0||s.search(/^data\:image\/ktx2/)===0?"image/ktx2":"image/png"}var u_=new Ie,$c=class{constructor(e={},t={}){this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new i_,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let n=!1,i=-1,r=!1,o=-1;if(typeof navigator<"u"){let a=navigator.userAgent;n=/^((?!chrome|android).)*safari/i.test(a)===!0;let c=a.match(/Version\/(\d+)/);i=n&&c?parseInt(c[1],10):-1,r=a.indexOf("Firefox")>-1,o=r?a.match(/Firefox\/([0-9]+)\./)[1]:-1}typeof createImageBitmap>"u"||n&&i<17||r&&o<98?this.textureLoader=new Ws(this.options.manager):this.textureLoader=new Ks(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new es(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){let n=this,i=this.json,r=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(o){return o._markDefs&&o._markDefs()}),Promise.all(this._invokeAll(function(o){return o.beforeRoot&&o.beforeRoot()})).then(function(){return Promise.all([n.getDependencies("scene"),n.getDependencies("animation"),n.getDependencies("camera")])}).then(function(o){let a={scene:o[0][i.scene||0],scenes:o[0],animations:o[1],cameras:o[2],asset:i.asset,parser:n,userData:{}};return Ai(r,a,i),Bn(a,i),Promise.all(n._invokeAll(function(c){return c.afterRoot&&c.afterRoot(a)})).then(function(){for(let c of a.scenes)c.updateMatrixWorld();e(a)})}).catch(t)}_markDefs(){let e=this.json.nodes||[],t=this.json.skins||[],n=this.json.meshes||[];for(let i=0,r=t.length;i<r;i++){let o=t[i].joints;for(let a=0,c=o.length;a<c;a++)e[o[a]].isBone=!0}for(let i=0,r=e.length;i<r;i++){let o=e[i];o.mesh!==void 0&&(this._addNodeRef(this.meshCache,o.mesh),o.skin!==void 0&&(n[o.mesh].isSkinnedMesh=!0)),o.camera!==void 0&&this._addNodeRef(this.cameraCache,o.camera)}}_addNodeRef(e,t){t!==void 0&&(e.refs[t]===void 0&&(e.refs[t]=e.uses[t]=0),e.refs[t]++)}_getNodeRef(e,t,n){if(e.refs[t]<=1)return n;let i=n.clone(),r=(o,a)=>{let c=this.associations.get(o);c!=null&&this.associations.set(a,c);for(let[l,h]of o.children.entries())r(h,a.children[l])};return r(n,i),i.name+="_instance_"+e.uses[t]++,i}_invokeOne(e){let t=Object.values(this.plugins);t.push(this);for(let n=0;n<t.length;n++){let i=e(t[n]);if(i)return i}return null}_invokeAll(e){let t=Object.values(this.plugins);t.unshift(this);let n=[];for(let i=0;i<t.length;i++){let r=e(t[i]);r&&n.push(r)}return n}getDependency(e,t){let n=e+":"+t,i=this.cache.get(n);if(!i){switch(e){case"scene":i=this.loadScene(t);break;case"node":i=this._invokeOne(function(r){return r.loadNode&&r.loadNode(t)});break;case"mesh":i=this._invokeOne(function(r){return r.loadMesh&&r.loadMesh(t)});break;case"accessor":i=this.loadAccessor(t);break;case"bufferView":i=this._invokeOne(function(r){return r.loadBufferView&&r.loadBufferView(t)});break;case"buffer":i=this.loadBuffer(t);break;case"material":i=this._invokeOne(function(r){return r.loadMaterial&&r.loadMaterial(t)});break;case"texture":i=this._invokeOne(function(r){return r.loadTexture&&r.loadTexture(t)});break;case"skin":i=this.loadSkin(t);break;case"animation":i=this._invokeOne(function(r){return r.loadAnimation&&r.loadAnimation(t)});break;case"camera":i=this.loadCamera(t);break;default:if(i=this._invokeOne(function(r){return r!=this&&r.getDependency&&r.getDependency(e,t)}),!i)throw new Error("Unknown type: "+e);break}this.cache.add(n,i)}return i}getDependencies(e){let t=this.cache.get(e);if(!t){let n=this,i=this.json[e+(e==="mesh"?"es":"s")]||[];t=Promise.all(i.map(function(r,o){return n.getDependency(e,o)})),this.cache.add(e,t)}return t}loadBuffer(e){let t=this.json.buffers[e],n=this.fileLoader;if(t.type&&t.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+t.type+" buffer type is not supported.");if(t.uri===void 0&&e===0)return Promise.resolve(this.extensions[Oe.KHR_BINARY_GLTF].body);let i=this.options;return new Promise(function(r,o){n.load(Un.resolveURL(t.uri,i.path),r,void 0,function(){o(new Error('THREE.GLTFLoader: Failed to load buffer "'+t.uri+'".'))})})}loadBufferView(e){let t=this.json.bufferViews[e];return this.getDependency("buffer",t.buffer).then(function(n){let i=t.byteLength||0,r=t.byteOffset||0;return n.slice(r,r+i)})}loadAccessor(e){let t=this,n=this.json,i=this.json.accessors[e];if(i.bufferView===void 0&&i.sparse===void 0){let o=bc[i.type],a=us[i.componentType],c=i.normalized===!0,l=new a(i.count*o);return Promise.resolve(new ft(l,o,c))}let r=[];return i.bufferView!==void 0?r.push(this.getDependency("bufferView",i.bufferView)):r.push(null),i.sparse!==void 0&&(r.push(this.getDependency("bufferView",i.sparse.indices.bufferView)),r.push(this.getDependency("bufferView",i.sparse.values.bufferView))),Promise.all(r).then(function(o){let a=o[0],c=bc[i.type],l=us[i.componentType],h=l.BYTES_PER_ELEMENT,u=h*c,d=i.byteOffset||0,p=i.bufferView!==void 0?n.bufferViews[i.bufferView].byteStride:void 0,g=i.normalized===!0,_,m;if(p&&p!==u){let f=Math.floor(d/p),E="InterleavedBuffer:"+i.bufferView+":"+i.componentType+":"+f+":"+i.count,T=t.cache.get(E);T||(_=new l(a,f*p,i.count*p/h),T=new Zi(_,p/h),t.cache.add(E,T)),m=new Ki(T,c,d%p/h,g)}else a===null?_=new l(i.count*c):_=new l(a,d,i.count*c),m=new ft(_,c,g);if(i.sparse!==void 0){let f=bc.SCALAR,E=us[i.sparse.indices.componentType],T=i.sparse.indices.byteOffset||0,M=i.sparse.values.byteOffset||0,L=new E(o[1],T,i.sparse.count*f),R=new l(o[2],M,i.sparse.count*c);a!==null&&(m=new ft(m.array.slice(),m.itemSize,m.normalized)),m.normalized=!1;for(let w=0,N=L.length;w<N;w++){let S=L[w];if(m.setX(S,R[w*c]),c>=2&&m.setY(S,R[w*c+1]),c>=3&&m.setZ(S,R[w*c+2]),c>=4&&m.setW(S,R[w*c+3]),c>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}m.normalized=g}return m})}loadTexture(e){let t=this.json,n=this.options,r=t.textures[e].source,o=t.images[r],a=this.textureLoader;if(o.uri){let c=n.manager.getHandler(o.uri);c!==null&&(a=c)}return this.loadTextureImage(e,r,a)}loadTextureImage(e,t,n){let i=this,r=this.json,o=r.textures[e],a=r.images[t],c=(a.uri||a.bufferView)+":"+o.sampler;if(this.textureCache[c])return this.textureCache[c];let l=this.loadImageSource(t,n).then(function(h){h.flipY=!1,h.name=o.name||a.name||"",h.name===""&&typeof a.uri=="string"&&a.uri.startsWith("data:image/")===!1&&(h.name=a.uri);let d=(r.samplers||{})[o.sampler]||{};return h.magFilter=gu[d.magFilter]||Ct,h.minFilter=gu[d.minFilter]||ln,h.wrapS=_u[d.wrapS]||Yn,h.wrapT=_u[d.wrapT]||Yn,h.generateMipmaps=!h.isCompressedTexture&&h.minFilter!==yt&&h.minFilter!==Ct,i.associations.set(h,{textures:e}),h}).catch(function(){return null});return this.textureCache[c]=l,l}loadImageSource(e,t){let n=this,i=this.json,r=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(u=>u.clone());let o=i.images[e],a=self.URL||self.webkitURL,c=o.uri||"",l=!1;if(o.bufferView!==void 0)c=n.getDependency("bufferView",o.bufferView).then(function(u){l=!0;let d=new Blob([u],{type:o.mimeType});return c=a.createObjectURL(d),c});else if(o.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");let h=Promise.resolve(c).then(function(u){return new Promise(function(d,p){let g=d;t.isImageBitmapLoader===!0&&(g=function(_){let m=new _t(_);m.needsUpdate=!0,d(m)}),t.load(Un.resolveURL(u,r.path),g,void 0,p)})}).then(function(u){return l===!0&&a.revokeObjectURL(c),Bn(u,o),u.userData.mimeType=o.mimeType||h_(o.uri),u}).catch(function(u){throw console.error("THREE.GLTFLoader: Couldn't load texture",c),u});return this.sourceCache[e]=h,h}assignTexture(e,t,n,i){let r=this;return this.getDependency("texture",n.index).then(function(o){if(!o)return null;if(n.texCoord!==void 0&&n.texCoord>0&&(o=o.clone(),o.channel=n.texCoord),r.extensions[Oe.KHR_TEXTURE_TRANSFORM]){let a=n.extensions!==void 0?n.extensions[Oe.KHR_TEXTURE_TRANSFORM]:void 0;if(a){let c=r.associations.get(o);o=r.extensions[Oe.KHR_TEXTURE_TRANSFORM].extendTexture(o,a),r.associations.set(o,c)}}return i!==void 0&&(o.colorSpace=i),e[t]=o,o})}assignFinalMaterial(e){let t=e.geometry,n=e.material,i=t.attributes.tangent===void 0,r=t.attributes.color!==void 0,o=t.attributes.normal===void 0;if(e.isPoints){let a="PointsMaterial:"+n.uuid,c=this.cache.get(a);c||(c=new Qi,Ut.prototype.copy.call(c,n),c.color.copy(n.color),c.map=n.map,c.sizeAttenuation=!1,this.cache.add(a,c)),n=c}else if(e.isLine){let a="LineBasicMaterial:"+n.uuid,c=this.cache.get(a);c||(c=new ji,Ut.prototype.copy.call(c,n),c.color.copy(n.color),c.map=n.map,this.cache.add(a,c)),n=c}if(i||r||o){let a="ClonedMaterial:"+n.uuid+":";i&&(a+="derivative-tangents:"),r&&(a+="vertex-colors:"),o&&(a+="flat-shading:");let c=this.cache.get(a);c||(c=n.clone(),r&&(c.vertexColors=!0),o&&(c.flatShading=!0),i&&(c.normalScale&&(c.normalScale.y*=-1),c.clearcoatNormalScale&&(c.clearcoatNormalScale.y*=-1)),this.cache.add(a,c),this.associations.set(c,this.associations.get(n))),n=c}e.material=n}getMaterialType(){return pi}loadMaterial(e){let t=this,n=this.json,i=this.extensions,r=n.materials[e],o,a={},c=r.extensions||{},l=[];if(c[Oe.KHR_MATERIALS_UNLIT]){let u=i[Oe.KHR_MATERIALS_UNLIT];o=u.getMaterialType(),l.push(u.extendParams(a,r,t))}else{let u=r.pbrMetallicRoughness||{};if(a.color=new be(1,1,1),a.opacity=1,Array.isArray(u.baseColorFactor)){let d=u.baseColorFactor;a.color.setRGB(d[0],d[1],d[2],vt),a.opacity=d[3]}u.baseColorTexture!==void 0&&l.push(t.assignTexture(a,"map",u.baseColorTexture,lt)),a.metalness=u.metallicFactor!==void 0?u.metallicFactor:1,a.roughness=u.roughnessFactor!==void 0?u.roughnessFactor:1,u.metallicRoughnessTexture!==void 0&&(l.push(t.assignTexture(a,"metalnessMap",u.metallicRoughnessTexture)),l.push(t.assignTexture(a,"roughnessMap",u.metallicRoughnessTexture))),o=this._invokeOne(function(d){return d.getMaterialType&&d.getMaterialType(e)}),l.push(Promise.all(this._invokeAll(function(d){return d.extendMaterialParams&&d.extendMaterialParams(e,a)})))}r.doubleSided===!0&&(a.side=Yt);let h=r.alphaMode||Tc.OPAQUE;if(h===Tc.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,h===Tc.MASK&&(a.alphaTest=r.alphaCutoff!==void 0?r.alphaCutoff:.5)),r.normalTexture!==void 0&&o!==an&&(l.push(t.assignTexture(a,"normalMap",r.normalTexture)),a.normalScale=new ze(1,1),r.normalTexture.scale!==void 0)){let u=r.normalTexture.scale;a.normalScale.set(u,u)}if(r.occlusionTexture!==void 0&&o!==an&&(l.push(t.assignTexture(a,"aoMap",r.occlusionTexture)),r.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=r.occlusionTexture.strength)),r.emissiveFactor!==void 0&&o!==an){let u=r.emissiveFactor;a.emissive=new be().setRGB(u[0],u[1],u[2],vt)}return r.emissiveTexture!==void 0&&o!==an&&l.push(t.assignTexture(a,"emissiveMap",r.emissiveTexture,lt)),Promise.all(l).then(function(){let u=new o(a);return r.name&&(u.name=r.name),Bn(u,r),t.associations.set(u,{materials:e}),r.extensions&&Ai(i,u,r),u})}createUniqueName(e){let t=Qe.sanitizeNodeName(e||"");return t in this.nodeNamesUsed?t+"_"+ ++this.nodeNamesUsed[t]:(this.nodeNamesUsed[t]=0,t)}loadGeometries(e){let t=this,n=this.extensions,i=this.primitiveCache;function r(a){return n[Oe.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,t).then(function(c){return xu(c,a,t)})}let o=[];for(let a=0,c=e.length;a<c;a++){let l=e[a],h=l_(l),u=i[h];if(u)o.push(u.promise);else{let d;l.extensions&&l.extensions[Oe.KHR_DRACO_MESH_COMPRESSION]?d=r(l):d=xu(new Vt,l,t),i[h]={primitive:l,promise:d},o.push(d)}}return Promise.all(o)}loadMesh(e){let t=this,n=this.json,i=this.extensions,r=n.meshes[e],o=r.primitives,a=[];for(let c=0,l=o.length;c<l;c++){let h=o[c].material===void 0?o_(this.cache):this.getDependency("material",o[c].material);a.push(h)}return a.push(t.loadGeometries(o)),Promise.all(a).then(function(c){let l=c.slice(0,c.length-1),h=c[c.length-1],u=[];for(let p=0,g=h.length;p<g;p++){let _=h[p],m=o[p],f,E=l[p];if(m.mode===Kt.TRIANGLES||m.mode===Kt.TRIANGLE_STRIP||m.mode===Kt.TRIANGLE_FAN||m.mode===void 0)f=r.isSkinnedMesh===!0?new Ds(_,E):new Mt(_,E),f.isSkinnedMesh===!0&&f.normalizeSkinWeights(),m.mode===Kt.TRIANGLE_STRIP?f.geometry=Sc(f.geometry,sr):m.mode===Kt.TRIANGLE_FAN&&(f.geometry=Sc(f.geometry,os));else if(m.mode===Kt.LINES)f=new Os(_,E);else if(m.mode===Kt.LINE_STRIP)f=new fi(_,E);else if(m.mode===Kt.LINE_LOOP)f=new Bs(_,E);else if(m.mode===Kt.POINTS)f=new zs(_,E);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+m.mode);Object.keys(f.geometry.morphAttributes).length>0&&c_(f,r),f.name=t.createUniqueName(r.name||"mesh_"+e),Bn(f,r),m.extensions&&Ai(i,f,m),t.assignFinalMaterial(f),u.push(f)}for(let p=0,g=u.length;p<g;p++)t.associations.set(u[p],{meshes:e,primitives:p});if(u.length===1)return r.extensions&&Ai(i,u[0],r),u[0];let d=new nn;r.extensions&&Ai(i,d,r),t.associations.set(d,{meshes:e});for(let p=0,g=u.length;p<g;p++)d.add(u[p]);return d})}loadCamera(e){let t,n=this.json.cameras[e],i=n[n.type];if(!i){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return n.type==="perspective"?t=new dt(tc.radToDeg(i.yfov),i.aspectRatio||1,i.znear||1,i.zfar||2e6):n.type==="orthographic"&&(t=new _i(-i.xmag,i.xmag,i.ymag,-i.ymag,i.znear,i.zfar)),n.name&&(t.name=this.createUniqueName(n.name)),Bn(t,n),Promise.resolve(t)}loadSkin(e){let t=this.json.skins[e],n=[];for(let i=0,r=t.joints.length;i<r;i++)n.push(this._loadNodeShallow(t.joints[i]));return t.inverseBindMatrices!==void 0?n.push(this.getDependency("accessor",t.inverseBindMatrices)):n.push(null),Promise.all(n).then(function(i){let r=i.pop(),o=i,a=[],c=[];for(let l=0,h=o.length;l<h;l++){let u=o[l];if(u){a.push(u);let d=new Ie;r!==null&&d.fromArray(r.array,l*16),c.push(d)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',t.joints[l])}return new Ns(a,c)})}loadAnimation(e){let t=this.json,n=this,i=t.animations[e],r=i.name?i.name:"animation_"+e,o=[],a=[],c=[],l=[],h=[];for(let u=0,d=i.channels.length;u<d;u++){let p=i.channels[u],g=i.samplers[p.sampler],_=p.target,m=_.node,f=i.parameters!==void 0?i.parameters[g.input]:g.input,E=i.parameters!==void 0?i.parameters[g.output]:g.output;_.node!==void 0&&(o.push(this.getDependency("node",m)),a.push(this.getDependency("accessor",f)),c.push(this.getDependency("accessor",E)),l.push(g),h.push(_))}return Promise.all([Promise.all(o),Promise.all(a),Promise.all(c),Promise.all(l),Promise.all(h)]).then(function(u){let d=u[0],p=u[1],g=u[2],_=u[3],m=u[4],f=[];for(let E=0,T=d.length;E<T;E++){let M=d[E],L=p[E],R=g[E],w=_[E],N=m[E];if(M===void 0)continue;M.updateMatrix&&M.updateMatrix();let S=n._createAnimationTracks(M,L,R,w,N);if(S)for(let v=0;v<S.length;v++)f.push(S[v])}return new mi(r,void 0,f)})}createNodeMesh(e){let t=this.json,n=this,i=t.nodes[e];return i.mesh===void 0?null:n.getDependency("mesh",i.mesh).then(function(r){let o=n._getNodeRef(n.meshCache,i.mesh,r);return i.weights!==void 0&&o.traverse(function(a){if(a.isMesh)for(let c=0,l=i.weights.length;c<l;c++)a.morphTargetInfluences[c]=i.weights[c]}),o})}loadNode(e){let t=this.json,n=this,i=t.nodes[e],r=n._loadNodeShallow(e),o=[],a=i.children||[];for(let l=0,h=a.length;l<h;l++)o.push(n.getDependency("node",a[l]));let c=i.skin===void 0?Promise.resolve(null):n.getDependency("skin",i.skin);return Promise.all([r,Promise.all(o),c]).then(function(l){let h=l[0],u=l[1],d=l[2];d!==null&&h.traverse(function(p){p.isSkinnedMesh&&p.bind(d,u_)});for(let p=0,g=u.length;p<g;p++)h.add(u[p]);return h})}_loadNodeShallow(e){let t=this.json,n=this.extensions,i=this;if(this.nodeCache[e]!==void 0)return this.nodeCache[e];let r=t.nodes[e],o=r.name?i.createUniqueName(r.name):"",a=[],c=i._invokeOne(function(l){return l.createNodeMesh&&l.createNodeMesh(e)});return c&&a.push(c),r.camera!==void 0&&a.push(i.getDependency("camera",r.camera).then(function(l){return i._getNodeRef(i.cameraCache,r.camera,l)})),i._invokeAll(function(l){return l.createNodeAttachment&&l.createNodeAttachment(e)}).forEach(function(l){a.push(l)}),this.nodeCache[e]=Promise.all(a).then(function(l){let h;if(r.isBone===!0?h=new Ji:l.length>1?h=new nn:l.length===1?h=l[0]:h=new rt,h!==l[0])for(let u=0,d=l.length;u<d;u++)h.add(l[u]);if(r.name&&(h.userData.name=r.name,h.name=o),Bn(h,r),r.extensions&&Ai(n,h,r),r.matrix!==void 0){let u=new Ie;u.fromArray(r.matrix),h.applyMatrix4(u)}else r.translation!==void 0&&h.position.fromArray(r.translation),r.rotation!==void 0&&h.quaternion.fromArray(r.rotation),r.scale!==void 0&&h.scale.fromArray(r.scale);return i.associations.has(h)||i.associations.set(h,{}),i.associations.get(h).nodes=e,h}),this.nodeCache[e]}loadScene(e){let t=this.extensions,n=this.json.scenes[e],i=this,r=new nn;n.name&&(r.name=i.createUniqueName(n.name)),Bn(r,n),n.extensions&&Ai(t,r,n);let o=n.nodes||[],a=[];for(let c=0,l=o.length;c<l;c++)a.push(i.getDependency("node",o[c]));return Promise.all(a).then(function(c){for(let h=0,u=c.length;h<u;h++)r.add(c[h]);let l=h=>{let u=new Map;for(let[d,p]of i.associations)(d instanceof Ut||d instanceof _t)&&u.set(d,p);return h.traverse(d=>{let p=i.associations.get(d);p!=null&&u.set(d,p)}),u};return i.associations=l(r),r})}_createAnimationTracks(e,t,n,i,r){let o=[],a=e.name?e.name:e.uuid,c=[];$n[r.path]===$n.weights?e.traverse(function(d){d.morphTargetInfluences&&c.push(d.name?d.name:d.uuid)}):c.push(a);let l;switch($n[r.path]){case $n.weights:l=gn;break;case $n.rotation:l=_n;break;case $n.translation:case $n.scale:l=xn;break;default:n.itemSize===1?l=gn:l=xn;break}let h=i.interpolation!==void 0?r_[i.interpolation]:hi,u=this._getArrayFromAccessor(n);for(let d=0,p=c.length;d<p;d++){let g=new l(c[d]+"."+$n[r.path],t.array,u,h);i.interpolation==="CUBICSPLINE"&&this._createCubicSplineTrackInterpolant(g),o.push(g)}return o}_getArrayFromAccessor(e){let t=e.array;if(e.normalized){let n=Jc(t.constructor),i=new Float32Array(t.length);for(let r=0,o=t.length;r<o;r++)i[r]=t[r]*n;t=i}return t}_createCubicSplineTrackInterpolant(e){e.createInterpolant=function(n){let i=this instanceof _n?Zc:ea;return new i(this.times,this.values,this.getValueSize()/3,n)},e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}};function d_(s,e,t){let n=e.attributes,i=new It;if(n.POSITION!==void 0){let a=t.json.accessors[n.POSITION],c=a.min,l=a.max;if(c!==void 0&&l!==void 0){if(i.set(new P(c[0],c[1],c[2]),new P(l[0],l[1],l[2])),a.normalized){let h=Jc(us[a.componentType]);i.min.multiplyScalar(h),i.max.multiplyScalar(h)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;let r=e.targets;if(r!==void 0){let a=new P,c=new P;for(let l=0,h=r.length;l<h;l++){let u=r[l];if(u.POSITION!==void 0){let d=t.json.accessors[u.POSITION],p=d.min,g=d.max;if(p!==void 0&&g!==void 0){if(c.setX(Math.max(Math.abs(p[0]),Math.abs(g[0]))),c.setY(Math.max(Math.abs(p[1]),Math.abs(g[1]))),c.setZ(Math.max(Math.abs(p[2]),Math.abs(g[2]))),d.normalized){let _=Jc(us[d.componentType]);c.multiplyScalar(_)}a.max(c)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}i.expandByVector(a)}s.boundingBox=i;let o=new Dt;i.getCenter(o.center),o.radius=i.min.distanceTo(i.max)/2,s.boundingSphere=o}function xu(s,e,t){let n=e.attributes,i=[];function r(o,a){return t.getDependency("accessor",o).then(function(c){s.setAttribute(a,c)})}for(let o in n){let a=Kc[o]||o.toLowerCase();a in s.attributes||i.push(r(n[o],a))}if(e.indices!==void 0&&!s.index){let o=t.getDependency("accessor",e.indices).then(function(a){s.setIndex(a)});i.push(o)}return Be.workingColorSpace!==vt&&"COLOR_0"in n&&console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${Be.workingColorSpace}" not supported.`),Bn(s,e),d_(s,e,t),Promise.all(i).then(function(){return e.targets!==void 0?a_(s,e.targets,t):s})}var f_={dark:{bg:"#0f0f0f",amb:16777215,key:16777215,fill:10075135},light:{bg:"#f5f5f7",amb:16777215,key:16777215,fill:16771272}},p_=window.matchMedia("(prefers-reduced-motion: reduce)").matches;function m_(){let s=document.getElementById("artifact-config");if(!s)throw new Error("artifact-config script tag not found");let e=JSON.parse(s.textContent);if(!e.glb)throw new Error("artifact-config.glb missing");return e}function g_(s){let e=atob(s),t=e.length,n=new Uint8Array(t);for(let i=0;i<t;i++)n[i]=e.charCodeAt(i);return n.buffer}function __(s){let e=f_[s.theme==="light"?"light":"dark"],t=s.bg&&/^#?[0-9a-f]{6}$/i.test(s.bg)?`#${s.bg.replace(/^#/,"")}`:e.bg;return{...e,bg:t}}function x_(s,e){let t=s.clientWidth||600,n=s.clientHeight||600,i=new $o({antialias:!0,alpha:!0});i.setPixelRatio(Math.min(window.devicePixelRatio||1,2)),i.setSize(t,n,!1),i.outputColorSpace=lt,i.toneMapping=co,i.toneMappingExposure=1.05,i.domElement.style.display="block",i.domElement.style.width="100%",i.domElement.style.height="100%",s.appendChild(i.domElement);let r=new Ls;r.background=new be(e.bg);let o=new dt(38,t/n,.05,50);o.position.set(0,1.4,2.7),o.lookAt(0,1.05,0),r.add(new Zs(e.amb,.85));let a=new Kn(e.key,1.25);a.position.set(2.5,5,3),r.add(a);let c=new Kn(e.fill,.45);return c.position.set(-3,1.5,-2),r.add(c),new ResizeObserver(()=>{let h=s.clientWidth,u=s.clientHeight;!h||!u||(o.aspect=h/u,o.updateProjectionMatrix(),i.setSize(h,u,!1))}).observe(s),{renderer:i,scene:r,camera:o}}function y_(s){let e=new It().setFromObject(s),t=e.getSize(new P),n=e.getCenter(new P),r=1.8/Math.max(t.y,.001);s.scale.setScalar(r),s.position.copy(n.multiplyScalar(-r)),s.position.y+=t.y*r/2}function v_(s,e){if(!s?.length)return null;if(e){let t=s.find(n=>n.name===e);if(t)return t}return s.find(t=>/idle|breathing|stand/i.test(t.name))||s[0]}function jc(s,e){s.querySelector(".artifact-error")?.remove();let t=document.createElement("div");t.className="artifact-error",t.textContent=e,Object.assign(t.style,{position:"absolute",inset:"0",display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(0,0,0,0.65)",color:"#f87171",font:"14px/1.4 system-ui, sans-serif",padding:"24px",textAlign:"center"}),s.appendChild(t)}function M_(s,e,t){if(!e.name)return;let n=document.createElement("div");n.className="artifact-name-plate",n.textContent=e.name;let i=t.bg&&/^#[ef]/i.test(t.bg);Object.assign(n.style,{position:"absolute",left:"16px",bottom:"16px",padding:"6px 12px",borderRadius:"999px",font:"500 13px/1 system-ui, -apple-system, sans-serif",letterSpacing:"0.01em",color:i?"#111":"#fff",background:i?"rgba(255,255,255,0.85)":"rgba(0,0,0,0.55)",backdropFilter:"blur(8px)",pointerEvents:"none",userSelect:"none"}),s.appendChild(n)}async function vu(){let s=document.getElementById("artifact-stage");if(!s)throw new Error("artifact-stage element not found");s.style.position="relative";let e=m_(),t=__(e);s.style.background=t.bg;let{renderer:n,scene:i,camera:r}=x_(s,t),o;try{o=g_(e.glb)}catch(c){jc(s,"Failed to decode embedded model: "+c.message);return}new Qo().parse(o,"",c=>{let l=c.scene||c.scenes?.[0];if(!l){jc(s,"Embedded GLB has no scene");return}y_(l),i.add(l);let h=null,u=v_(c.animations,e.idle);u&&(h=new $s(l),h.clipAction(u).play()),M_(s,e,t);let d=new Js,p=0,g=l.scale.clone();function _(){requestAnimationFrame(_);let m=d.getDelta();p+=m,h&&h.update(m),p_||(l.rotation.y+=m*.32,l.scale.y=g.y*(1+Math.sin(p*1.1)*.006)),n.render(i,r)}_()},c=>{jc(s,"Model parse failed: "+(c?.message||c))})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{vu().catch(s=>console.error("[artifact-viewer]",s))}):vu().catch(s=>console.error("[artifact-viewer]",s));})();
diff --git a/public/artifact/index.html b/public/artifact/index.html
index cb3206343..848fa02b7 100644
--- a/public/artifact/index.html
+++ b/public/artifact/index.html
@@ -12,7 +12,7 @@
<style>
body {
overflow: auto;
- background: radial-gradient(circle at 50% 0%, #1a0d3a 0%, #0a0e27 50%, #06081a 100%);
+ background: radial-gradient(circle at 50% 0%, #131313 0%, #0f0f0f 50%, #090909 100%);
}
.artifact-page {
@@ -337,7 +337,7 @@
details.snippet pre {
margin: var(--space-sm) 0 0;
padding: var(--space-md);
- background: #06081a;
+ background: #090909;
border-radius: var(--radius-md);
color: #d8d4ff;
font-family: var(--font-mono);
@@ -380,7 +380,7 @@
left: 50%;
bottom: 32px;
transform: translate(-50%, 24px);
- background: #14141c;
+ background: #151515;
color: #fff;
padding: 10px 18px;
border-radius: 999px;
diff --git a/public/avatar-sdk.css b/public/avatar-sdk.css
index e9a73d888..f6150075f 100644
--- a/public/avatar-sdk.css
+++ b/public/avatar-sdk.css
@@ -649,7 +649,7 @@ pre.sdk-pre .t-op { color: #a1a1a1; }
}
.sdk-playground-stage {
position: relative;
- background: #060608;
+ background: #060606;
border-right: 1px solid var(--stroke);
display: flex;
align-items: center;
diff --git a/public/bazaar.html b/public/bazaar.html
index 539da07f5..e8cd874c4 100644
--- a/public/bazaar.html
+++ b/public/bazaar.html
@@ -5,19 +5,19 @@
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>x402 Bazaar — discover paid APIs and MCP tools</title>
<meta name="description" content="Search and browse the x402 facilitator catalog. Filter by network, price, extensions. Pay any service in one click." />
-<meta name="theme-color" content="#0a0b10" />
+<meta name="theme-color" content="#0b0b0b" />
<link rel="stylesheet" href="/nav.css" />
<meta property="og:title" content="x402 Bazaar — discover paid APIs and MCP tools" />
<meta property="og:description" content="Search and browse the x402 facilitator catalog. Filter by network, price, extensions. Pay any service in one click." />
<meta property="og:type" content="website" />
<style>
:root {
- --bg: #0a0b10;
- --bg-2: #0f1119;
- --panel: #14161f;
- --panel-2: #1a1d29;
- --border: #232636;
- --border-strong: #2e3447;
+ --bg: #0b0b0b;
+ --bg-2: #111111;
+ --panel: #161616;
+ --panel-2: #1d1d1d;
+ --border: #272727;
+ --border-strong: #343434;
--text: #f0f2f8;
--muted: #8a90a8;
--muted-2: #6b7088;
@@ -151,7 +151,7 @@
.search-bar input[type=search]:focus { border-color: var(--accent-blue); }
.search-bar button {
background: var(--accent-blue);
- color: #0a0b10;
+ color: #0b0b0b;
border: none;
font-weight: 600;
padding: 0 20px;
@@ -291,7 +291,7 @@
.card .actions { display: flex; gap: 8px; margin-top: 4px; }
.btn-pay {
background: var(--accent-blue);
- color: #0a0b10;
+ color: #0b0b0b;
border: none;
padding: 9px 14px;
font-size: 13px;
diff --git a/public/brain.css b/public/brain.css
index 00c2d31fe..b327df967 100644
--- a/public/brain.css
+++ b/public/brain.css
@@ -76,7 +76,7 @@ body {
margin-bottom: 2px;
}
.br-sess:hover { background: #0e0e0e; color: #b0b0b0; }
-.br-sess.active { background: #12142a; color: #dde0f0; border-color: #222222; }
+.br-sess.active { background: #151515; color: #dde0f0; border-color: #222222; }
.br-sess-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.br-sess-del {
background: none;
@@ -269,7 +269,7 @@ body {
transition: all 0.18s;
text-align: center;
}
-.br-method-tab:hover { border-color: #2a2e50; background: #0f1125; }
+.br-method-tab:hover { border-color: #303030; background: #121212; }
.br-method-tab.active { border-color: #ffffff; background: #0d0d0d; }
.br-method-tab-icon { font-size: 24px; margin-bottom: 8px; display: block; color: #ffffff; }
.br-method-tab-title { font-size: 14px; font-weight: 600; color: #dde0f0; margin-bottom: 4px; }
@@ -305,7 +305,7 @@ body {
}
.br-q-input {
width: 100%;
- background: #07080f;
+ background: #080808;
border: 1px solid var(--bg-1);
border-radius: 10px;
color: var(--ink);
@@ -433,7 +433,7 @@ body {
.br-chip-blue { background: rgba(255,255,255,0.1); color: #ffffff; border: 1px solid rgba(255,255,255,0.25); }
.br-chip-purple { background: rgba(255,255,255,0.06); color: #ffffff; border: 1px solid rgba(255,255,255,0.15); }
.br-chip-red { background: rgba(255,100,100,0.08); color: #ff8a8a; border: 1px solid rgba(255,100,100,0.2); }
-.br-chip-muted { background: rgba(255,255,255,0.04); color: #8a8a8a; border: 1px solid #1e2035; }
+.br-chip-muted { background: rgba(255,255,255,0.04); color: #8a8a8a; border: 1px solid #212121; }
.br-pc-badge {
display: inline-block;
@@ -469,7 +469,7 @@ body {
margin-left: auto;
}
.br-agent-select {
- background: #0a0c18;
+ background: #0c0c0c;
border: 1px solid #222222;
border-radius: 8px;
color: #b0b0b0;
@@ -497,7 +497,7 @@ body {
}
.br-edit-input {
width: 100%;
- background: #07080f;
+ background: #080808;
border: 1px solid var(--bg-1);
border-radius: 8px;
color: var(--ink);
@@ -510,7 +510,7 @@ body {
.br-edit-input:focus { border-color: #3050a0; }
.br-edit-textarea {
width: 100%;
- background: #07080f;
+ background: #080808;
border: 1px solid var(--bg-1);
border-radius: 8px;
color: var(--ink);
@@ -528,7 +528,7 @@ body {
/* ── Raw JSON toggle ─────────────────────────────────────────────────────── */
.br-raw-json {
display: none;
- background: #07080f;
+ background: #080808;
border: 1px solid var(--bg-1);
border-radius: 10px;
padding: 14px 16px;
@@ -725,7 +725,7 @@ body {
font-size: 12.5px;
color: #6b70a0;
padding: 8px 12px;
- background: #0a0c18;
+ background: #0c0c0c;
border-radius: 10px;
border: 1px solid #141414;
}
@@ -872,7 +872,7 @@ body {
.br-send:disabled { opacity: 0.35; cursor: not-allowed; }
.br-hint {
font-size: 11px;
- color: #2d3050;
+ color: #323232;
margin-top: 6px;
display: flex;
gap: 14px;
@@ -899,7 +899,7 @@ body {
.md-ul, .md-ol { margin: 0.4em 0 0.6em 1.4em; padding: 0; }
.md-ul li, .md-ol li { margin: 0.2em 0; }
.md-code {
- background: #0a0c18;
+ background: #0c0c0c;
border: 1px solid var(--bg-1);
border-radius: 9px;
padding: 12px 14px;
diff --git a/public/buttons.css b/public/buttons.css
index 24a5e4f8d..e6f589587 100644
--- a/public/buttons.css
+++ b/public/buttons.css
@@ -28,7 +28,7 @@
:root {
/* Primary — white fill, dark ink (the main CTA per surface) */
--btn-primary-bg: var(--accent, #ffffff);
- --btn-primary-fg: #0a0a0f;
+ --btn-primary-fg: #0a0a0a;
--btn-primary-border: transparent;
--btn-primary-bg-hover: rgba(255, 255, 255, 0.88);
--btn-primary-bg-active: rgba(255, 255, 255, 0.76);
diff --git a/public/cz/index.html b/public/cz/index.html
index d22382850..6c30ffe6c 100644
--- a/public/cz/index.html
+++ b/public/cz/index.html
@@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>CZ · Claim Your three.ws</title>
<meta name="description" content="Connect your wallet and claim your on-chain three.ws." />
- <meta name="theme-color" content="#080814" />
+ <meta name="theme-color" content="#090909" />
<link rel="icon" href="/favicon.ico" />
<link rel="stylesheet" href="./cz.css" />
<script type="module">
diff --git a/public/cz/offline/index.html b/public/cz/offline/index.html
index f7ecae8a9..94c25daf2 100644
--- a/public/cz/offline/index.html
+++ b/public/cz/offline/index.html
@@ -13,7 +13,7 @@
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
- background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
+ background: linear-gradient(135deg, #1b1b1b 0%, #212121 100%);
color: #fff;
overflow: hidden;
height: 100vh;
@@ -107,7 +107,7 @@
}
.modal-content {
- background: #16213e;
+ background: #212121;
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 12px;
padding: 40px;
@@ -351,7 +351,7 @@
// For now, just show a placeholder
viewer.style.background =
- 'radial-gradient(ellipse at center, #2d3d5c 0%, #1a1a2e 100%)';
+ 'radial-gradient(ellipse at center, #2d3d5c 0%, #1b1b1b 100%)';
const ctx = viewer.getContext('2d');
if (ctx) {
ctx.fillStyle = '#667eea';
@@ -377,14 +377,14 @@
// For now, just show a placeholder
fallback.style.display = 'block';
fallback.style.background =
- 'radial-gradient(ellipse at center, #2d3d5c 0%, #1a1a2e 100%)';
+ 'radial-gradient(ellipse at center, #2d3d5c 0%, #1b1b1b 100%)';
// Create a canvas fallback
const canvas = document.createElement('canvas');
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
const ctx = canvas.getContext('2d');
- ctx.fillStyle = '#1a1a2e';
+ ctx.fillStyle = '#1b1b1b';
ctx.fillRect(0, 0, canvas.width, canvas.height);
ctx.fillStyle = '#667eea';
ctx.font = 'bold 48px sans-serif';
diff --git a/public/dashboard-next/shell.css b/public/dashboard-next/shell.css
index 5d9823b69..928505f4d 100644
--- a/public/dashboard-next/shell.css
+++ b/public/dashboard-next/shell.css
@@ -349,7 +349,7 @@ button { font: inherit; color: inherit; background: none; border: none; cursor:
.dn-btn.primary {
background: var(--nxt-accent);
border-color: var(--nxt-accent);
- color: #0c0512;
+ color: #070707;
font-weight: 600;
}
.dn-btn.primary:hover { background: var(--nxt-accent-strong); border-color: var(--nxt-accent-strong); }
@@ -690,7 +690,7 @@ button { font: inherit; color: inherit; background: none; border: none; cursor:
z-index: 200;
padding: 8px 14px;
background: var(--nxt-accent);
- color: #0c0512;
+ color: #070707;
font-weight: 600;
font-size: 13px;
border-radius: var(--nxt-radius-sm);
diff --git a/public/dashboard/agent-pumpfun.html b/public/dashboard/agent-pumpfun.html
index 1710aed9f..ec1976c2d 100644
--- a/public/dashboard/agent-pumpfun.html
+++ b/public/dashboard/agent-pumpfun.html
@@ -110,7 +110,7 @@
margin-top: 40px;
padding: 28px 24px 36px;
border-top: 1px solid var(--border);
- background: #06060a;
+ background: #060606;
color: var(--muted);
font-size: 13px;
}
@@ -226,7 +226,7 @@
.btn {
padding: 8px 14px;
border-radius: 6px;
- border: 1px solid #2a2a36;
+ border: 1px solid #2b2b2b;
font: inherit;
font-weight: 600;
cursor: pointer;
@@ -235,8 +235,8 @@
transition: border-color 0.12s ease, background 0.12s ease;
}
.btn:hover:not(:disabled) {
- border-color: #3d3d52;
- background: #0a0a12;
+ border-color: #3f3f3f;
+ background: #0b0b0b;
}
.btn:disabled {
opacity: 0.45;
@@ -248,8 +248,8 @@
color: #ddd;
}
.btn.ghost:hover:not(:disabled) {
- background: #15151d;
- border-color: #2e2e3e;
+ background: #161616;
+ border-color: #2f2f2f;
}
.btn.danger {
background: #3a1d22;
@@ -411,7 +411,7 @@
min-width: 80px;
height: 12px;
border-radius: 4px;
- background: linear-gradient(90deg, #1a1a1a 0%, #24242e 50%, #1a1a1a 100%);
+ background: linear-gradient(90deg, #1a1a1a 0%, #252525 50%, #1a1a1a 100%);
background-size: 200% 100%;
animation: shimmer 1.2s linear infinite;
vertical-align: middle;
@@ -782,7 +782,7 @@
max-width: 100%;
border: 1px solid var(--border);
border-radius: 8px;
- background: #0a0a12;
+ background: #0b0b0b;
"
></canvas>
</section>
@@ -1544,7 +1544,7 @@
if (ts.graduated) {
const a = ts.amm || {};
body =
- `<span class="tag" style="background:#5c8fff22;color:#9bf;border-color:#2a3a55">graduated · AMM</span>` +
+ `<span class="tag" style="background:#5c8fff22;color:#9bf;border-color:#393939">graduated · AMM</span>` +
` <span class="muted">refreshed ${refreshedAgo}</span>` +
`<div class="stat-grid" style="margin-top:10px">` +
`<div class="stat-card"><div class="v">${fmtSolLamports(a.quote_reserve)}</div><div class="l">Pool quote</div></div>` +
diff --git a/public/dashboard/embed-policy.html b/public/dashboard/embed-policy.html
index 189714965..6598bfdaf 100644
--- a/public/dashboard/embed-policy.html
+++ b/public/dashboard/embed-policy.html
@@ -15,9 +15,9 @@
color-scheme: dark;
--accent: #ffffff;
--accent2: #ffffff;
- --border: #22222e;
+ --border: #232323;
--bg: #000;
- --panel: #14141c;
+ --panel: #151515;
}
* {
box-sizing: border-box;
@@ -109,7 +109,7 @@
input,
select,
textarea {
- background: #0f0f17;
+ background: #101010;
border: 1px solid var(--border);
color: #eee;
padding: 9px 11px;
@@ -154,7 +154,7 @@
.btn {
padding: 8px 14px;
border-radius: 6px;
- border: 1px solid #2a2a36;
+ border: 1px solid #2b2b2b;
font-size: 13px;
font-weight: 600;
cursor: pointer;
@@ -163,20 +163,20 @@
transition: border-color 0.12s ease, background 0.12s ease;
}
.btn:hover:not(:disabled) {
- border-color: #3d3d52;
- background: #0a0a12;
+ border-color: #3f3f3f;
+ background: #0b0b0b;
}
.btn.sec {
- background: #15151d;
+ background: #161616;
color: #ddd;
- border-color: #22222e;
+ border-color: #232323;
}
.btn.sec:hover:not(:disabled) {
- background: #1c1c26;
- border-color: #2e2e3e;
+ background: #1d1d1d;
+ border-color: #2f2f2f;
}
.btn.danger {
- background: #15151d;
+ background: #161616;
border-color: rgba(204, 64, 64, 0.4);
color: #ff9c9c;
}
@@ -210,7 +210,7 @@
SF Mono,
Menlo,
monospace;
- background: #0f0f17;
+ background: #101010;
border: 1px solid var(--border);
border-radius: 4px;
padding: 1px 6px;
diff --git a/public/dashboard/index.html b/public/dashboard/index.html
index 52e91258b..3da29c691 100644
--- a/public/dashboard/index.html
+++ b/public/dashboard/index.html
@@ -160,7 +160,7 @@
}
.preview {
aspect-ratio: 1/1;
- background: #0f0f17;
+ background: #101010;
border-radius: 10px;
margin-bottom: 10px;
overflow: hidden;
@@ -190,20 +190,20 @@
padding: 6px 12px;
border-radius: 6px;
border: 1px solid #222222;
- background: #15151d;
+ background: #161616;
color: #ddd;
font-size: 12px;
cursor: pointer;
transition: border-color 0.12s ease, background 0.12s ease;
}
.preview .ph button:hover {
- background: #1c1c26;
- border-color: #2e2e3e;
+ background: #1d1d1d;
+ border-color: #2f2f2f;
}
.preview .spinner {
width: 22px;
height: 22px;
- border: 2px solid #2a2a36;
+ border: 2px solid #2b2b2b;
border-top-color: var(--accent);
border-radius: 50%;
animation: spin 0.7s linear infinite;
@@ -272,7 +272,7 @@
}
.more-menu-item:hover,
.more-menu-item:focus {
- background: #1d1d28;
+ background: #1e1e1e;
color: #fff;
outline: none;
}
@@ -331,15 +331,15 @@
padding: 8px 18px;
border-radius: 6px;
border: 1px solid #222222;
- background: #15151d;
+ background: #161616;
color: #ddd;
font-size: 13px;
cursor: pointer;
transition: border-color 0.12s ease, background 0.12s ease;
}
.load-more button:hover:not(:disabled) {
- background: #1c1c26;
- border-color: #2e2e3e;
+ background: #1d1d1d;
+ border-color: #2f2f2f;
}
.load-more button:disabled {
opacity: 0.6;
@@ -354,13 +354,13 @@
font-size: 11px;
padding: 2px 7px;
border-radius: 99px;
- background: #20202c;
+ background: #212121;
color: #ccc;
}
.btn {
padding: 8px 14px;
border-radius: 6px;
- border: 1px solid #2a2a36;
+ border: 1px solid #2b2b2b;
font-size: 13px;
font-weight: 600;
cursor: pointer;
@@ -369,8 +369,8 @@
transition: border-color 0.12s ease, background 0.12s ease;
}
.btn:hover:not(:disabled) {
- border-color: #3d3d52;
- background: #0a0a12;
+ border-color: #3f3f3f;
+ background: #0b0b0b;
filter: none;
}
.btn:disabled {
@@ -378,13 +378,13 @@
cursor: not-allowed;
}
.btn.sec {
- background: #15151d;
+ background: #161616;
color: #ddd;
border-color: #222222;
}
.btn.sec:hover:not(:disabled) {
- background: #1c1c26;
- border-color: #2e2e3e;
+ background: #1d1d1d;
+ border-color: #2f2f2f;
}
.empty {
text-align: center;
@@ -408,7 +408,7 @@
margin-bottom: 14px;
}
pre {
- background: #0f0f17;
+ background: #101010;
border: 1px solid var(--border);
border-radius: 8px;
padding: 10px 12px;
@@ -442,7 +442,7 @@
input,
textarea,
select {
- background: #0f0f17;
+ background: #101010;
border: 1px solid var(--border);
color: #eee;
padding: 9px 11px;
@@ -462,7 +462,7 @@
display: inline-block;
padding: 8px 14px;
border-radius: 6px;
- border: 1px solid #2a2a36;
+ border: 1px solid #2b2b2b;
font-size: 13px;
font-weight: 600;
cursor: pointer;
@@ -472,12 +472,12 @@
transition: border-color 0.12s ease, background 0.12s ease;
}
.btn-primary:hover {
- border-color: #3d3d52;
- background: #0a0a12;
+ border-color: #3f3f3f;
+ background: #0b0b0b;
filter: none;
}
.btn-danger {
- background: #15151d;
+ background: #161616;
border-color: rgba(204, 64, 64, 0.4);
color: #ffb3b3;
}
@@ -523,11 +523,11 @@
transition: border-color 0.15s;
}
.widget-card:hover {
- border-color: #2c2c40;
+ border-color: #2d2d2d;
}
.widget-card .frame {
aspect-ratio: 1/1;
- background: #0f0f17;
+ background: #101010;
border-radius: 10px;
overflow: hidden;
position: relative;
@@ -575,7 +575,7 @@
font-size: 11px;
padding: 2px 8px;
border-radius: 99px;
- background: #20202c;
+ background: #212121;
color: #ccc;
white-space: nowrap;
}
@@ -631,7 +631,7 @@
.toggle .track {
width: 30px;
height: 17px;
- background: #2a2a36;
+ background: #2b2b2b;
border-radius: 99px;
position: relative;
transition: background 0.15s;
@@ -685,7 +685,7 @@
top: 0;
bottom: 0;
width: min(560px, 100vw);
- background: #0e0e16;
+ background: #0f0f0f;
border-left: 1px solid var(--border);
transform: translateX(100%);
transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
@@ -703,7 +703,7 @@
border-bottom: 1px solid var(--border);
position: sticky;
top: 0;
- background: #0e0e16;
+ background: #0f0f0f;
z-index: 1;
}
.drawer header h2 {
@@ -718,7 +718,7 @@
}
.drawer .frame-lg {
aspect-ratio: 1/1;
- background: #0f0f17;
+ background: #101010;
border-radius: 10px;
overflow: hidden;
}
@@ -733,7 +733,7 @@
gap: 10px;
}
.drawer .stat {
- background: #13131c;
+ background: #141414;
border: 1px solid var(--border);
border-radius: 10px;
padding: 12px 14px;
@@ -802,7 +802,7 @@
pointer-events: auto;
}
.modal {
- background: #0e0e16;
+ background: #0f0f0f;
border: 1px solid var(--border);
border-radius: 14px;
padding: 22px;
@@ -827,7 +827,7 @@
padding: 6px 12px;
border-radius: 99px;
border: 1px solid var(--border);
- background: #13131c;
+ background: #141414;
color: #ccc;
font-size: 12px;
cursor: pointer;
@@ -875,7 +875,7 @@
margin-bottom: 8px;
}
.preview-wrap {
- background: #0f0f17;
+ background: #101010;
border: 1px solid var(--border);
border-radius: 10px;
padding: 12px;
@@ -883,13 +883,13 @@
}
.preview-checkered {
background-image:
- linear-gradient(45deg, #2a2a3a 25%, transparent 25%),
- linear-gradient(-45deg, #2a2a3a 25%, transparent 25%),
- linear-gradient(45deg, transparent 75%, #2a2a3a 75%),
- linear-gradient(-45deg, transparent 75%, #2a2a3a 75%);
+ linear-gradient(45deg, #2b2b2b 25%, transparent 25%),
+ linear-gradient(-45deg, #2b2b2b 25%, transparent 25%),
+ linear-gradient(45deg, transparent 75%, #2b2b2b 75%),
+ linear-gradient(-45deg, transparent 75%, #2b2b2b 75%);
background-size: 10px 10px;
background-position: 0 0, 0 5px, 5px -5px, -5px 0px;
- background-color: #1a1a28;
+ background-color: #1b1b1b;
}
.preview-frame-wrap {
overflow: hidden;
@@ -1024,7 +1024,7 @@
font-size: 11px;
padding: 2px 8px;
border-radius: 99px;
- background: #20202c;
+ background: #212121;
color: #aaa;
text-transform: capitalize;
}
@@ -1191,7 +1191,7 @@
.preview-stage {
width: 100%;
aspect-ratio: 1 / 1;
- background: #0f0f17;
+ background: #101010;
border: 1px solid var(--border);
border-radius: 10px;
overflow: hidden;
diff --git a/public/dashboard/memory.html b/public/dashboard/memory.html
index 16c3284df..72b47c313 100644
--- a/public/dashboard/memory.html
+++ b/public/dashboard/memory.html
@@ -43,7 +43,7 @@
.mem-search {
flex: 1;
min-width: 180px;
- background: #0f0f17;
+ background: #101010;
color: #eee;
border: 1px solid var(--border);
border-radius: 8px;
@@ -80,7 +80,7 @@
margin-bottom: 8px;
transition: border-color .15s;
}
- .mem-card:hover { border-color: #2f2f40; }
+ .mem-card:hover { border-color: #303030; }
.mem-card-header {
display: flex;
align-items: flex-start;
@@ -178,7 +178,7 @@
font-family: inherit;
transition: all .12s;
}
- .mem-action-btn:hover { background: #1f1f2c; border-color: var(--border); color: #ccc; }
+ .mem-action-btn:hover { background: #202020; border-color: var(--border); color: #ccc; }
.mem-action-btn.danger:hover { color: #ff8a9c; border-color: #3a2530; background: #2a1820; }
/* ── Edit form (inline) ─────────────────────────────────────── */
@@ -233,7 +233,7 @@
/* ── Sort control ───────────────────────────────────────────── */
.mem-sort {
- background: #0f0f17;
+ background: #101010;
color: #aaa;
border: 1px solid var(--border);
border-radius: 8px;
diff --git a/public/dashboard/portfolio-asset.html b/public/dashboard/portfolio-asset.html
index 206cf17d7..e0a17bf5e 100644
--- a/public/dashboard/portfolio-asset.html
+++ b/public/dashboard/portfolio-asset.html
@@ -13,11 +13,11 @@
--ok: #2ed4a3;
--warn: #ffb35c;
--err: #ff6a6a;
- --border: #161620;
- --border-2: #1f1f2c;
+ --border: #171717;
+ --border-2: #202020;
--bg: #000;
- --panel: #0c0c12;
- --panel-2: #10101a;
+ --panel: #0c0c0c;
+ --panel-2: #111111;
--text: #f3f3f7;
--muted: #7c7c8a;
}
@@ -51,7 +51,7 @@
font-family: inherit;
}
.btn:hover { filter: brightness(1.08); }
- .btn.sec { background: #1a1a26; color: #ddd; }
+ .btn.sec { background: #1b1b1b; color: #ddd; }
.btn.ghost { background: transparent; color: #ccc; border: 1px solid var(--border-2); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.sm { padding: 6px 10px; font-size: 12px; }
@@ -59,7 +59,7 @@
.pill {
display: inline-flex; align-items: center; gap: 6px;
font-size: 10.5px; padding: 3px 8px; border-radius: 99px;
- background: #15151f; color: #ccc; white-space: nowrap;
+ background: #161616; color: #ccc; white-space: nowrap;
text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600;
}
.pill.sol { background: rgba(20,241,149,0.12); color: var(--ok); }
@@ -71,13 +71,13 @@
}
.chip.up { background: rgba(46,212,163,0.12); color: var(--ok); }
.chip.down { background: rgba(255,106,106,0.12); color: var(--err); }
- .chip.flat { background: #1a1a26; color: #aaa; }
+ .chip.flat { background: #1b1b1b; color: #aaa; }
.hero {
background:
radial-gradient(900px 240px at 20% -40%, rgba(255,255,255,0.08), transparent 60%),
radial-gradient(600px 200px at 90% -20%, rgba(255,92,168,0.12), transparent 60%),
- #06060a;
+ #060606;
border: 1px solid var(--border-2);
border-radius: 18px;
padding: 26px;
@@ -86,7 +86,7 @@
.hero-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.tok-logo {
width: 56px; height: 56px; border-radius: 50%;
- background: #161620; flex-shrink: 0;
+ background: #171717; flex-shrink: 0;
display: inline-flex; align-items: center; justify-content: center;
font-size: 18px; font-weight: 700; color: #ccc;
overflow: hidden;
@@ -154,9 +154,9 @@
font-family: inherit;
}
.range-tab:hover { color: #ccc; }
- .range-tab[aria-pressed="true"] { background: #16161f; color: var(--text); }
+ .range-tab[aria-pressed="true"] { background: #171717; color: var(--text); }
- .holding-summary { padding: 14px; border-radius: 10px; background: #08080d; margin-bottom: 14px; border: 1px solid var(--border); }
+ .holding-summary { padding: 14px; border-radius: 10px; background: #080808; margin-bottom: 14px; border: 1px solid var(--border); }
.holding-summary .lbl { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.holding-summary .v { font-size: 22px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.holding-summary .s { color: var(--muted); font-size: 13px; margin-top: 2px; font-variant-numeric: tabular-nums; }
@@ -164,7 +164,7 @@
.wallet-row {
display: flex; align-items: center; justify-content: space-between;
gap: 10px; padding: 10px 12px; border-radius: 9px;
- border: 1px solid var(--border); background: #08080d;
+ border: 1px solid var(--border); background: #080808;
margin-bottom: 8px;
}
.wallet-row:last-child { margin-bottom: 0; }
@@ -188,7 +188,7 @@
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
font-size: 11.5px; color: var(--muted);
padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px;
- background: #08080d;
+ background: #080808;
}
.copy-btn {
background: none; border: none; color: #555; cursor: pointer;
@@ -223,7 +223,7 @@
.modal label span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.modal input, .modal select {
width: 100%; padding: 10px 12px; border-radius: 8px;
- border: 1px solid var(--border-2); background: #08080d; color: #eee;
+ border: 1px solid var(--border-2); background: #080808; color: #eee;
font-size: 14px; font-family: inherit;
}
.modal input[data-mono] { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
@@ -533,12 +533,12 @@
chartTooltip = $$('chart-tooltip');
chart = createChart(chartEl, {
layout: { background: { color: 'transparent' }, textColor: '#666', fontFamily: 'inherit', fontSize: 11 },
- grid: { vertLines: { visible: false }, horzLines: { color: '#0e0e16' } },
+ grid: { vertLines: { visible: false }, horzLines: { color: '#0f0f0f' } },
rightPriceScale: { borderVisible: false, scaleMargins: { top: 0.15, bottom: 0.05 } },
timeScale: { borderVisible: false, timeVisible: false, secondsVisible: false },
crosshair: {
- vertLine: { color: '#2a2a36', style: 0, width: 1, labelVisible: false },
- horzLine: { color: '#2a2a36', style: 0, width: 1, labelVisible: true },
+ vertLine: { color: '#2b2b2b', style: 0, width: 1, labelVisible: false },
+ horzLine: { color: '#2b2b2b', style: 0, width: 1, labelVisible: true },
},
handleScroll: false,
handleScale: false,
diff --git a/public/dashboard/portfolio.html b/public/dashboard/portfolio.html
index 5e2a48aff..1342e5b4c 100644
--- a/public/dashboard/portfolio.html
+++ b/public/dashboard/portfolio.html
@@ -17,11 +17,11 @@
--ok: #2ed4a3;
--warn: #ffb35c;
--err: #ff6a6a;
- --border: #1c1c28;
- --border-2: #232336;
+ --border: #1d1d1d;
+ --border-2: #242424;
--bg: #000;
- --panel: #0b0b13;
- --panel-2: #0f0f1a;
+ --panel: #0c0c0c;
+ --panel-2: #101010;
--text: #f0f0f5;
--muted: #6e6e82;
--muted-2: #9a9ab0;
@@ -183,8 +183,8 @@
.btn:active { transform: scale(0.98); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: rgba(255,255,255,0.9); border-color: rgba(255,255,255,0.9); }
- .btn.sec { background: #16161f; color: #d0d0e0; border-color: var(--border); }
- .btn.sec:hover { background: #1e1e2a; }
+ .btn.sec { background: #171717; color: #d0d0e0; border-color: var(--border); }
+ .btn.sec:hover { background: #1f1f1f; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted-2); }
.btn.ghost:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.btn.sm { padding: 5px 10px; font-size: 12px; border-radius: 6px; }
@@ -442,7 +442,7 @@
}
.scrim[data-open="true"] { display: flex; }
.modal {
- background: #0d0d17; border: 1px solid var(--border-2);
+ background: #0e0e0e; border: 1px solid var(--border-2);
border-radius: 14px; padding: 24px;
width: 100%; max-width: 460px; max-height: 90vh; overflow-y: auto;
box-shadow: 0 20px 60px rgba(0,0,0,0.6);
@@ -453,7 +453,7 @@
.modal label span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; font-weight: 500; }
.modal input, .modal select {
width: 100%; padding: 10px 12px; border-radius: 8px;
- border: 1px solid var(--border-2); background: #080810; color: #eee;
+ border: 1px solid var(--border-2); background: #090909; color: #eee;
font-size: 14px; font-family: inherit;
transition: border-color 0.13s, box-shadow 0.13s;
}
@@ -1105,12 +1105,12 @@
chartTooltip = $('chart-tooltip');
chart = createChart(chartEl, {
layout: { background: { color: 'transparent' }, textColor: '#555', fontFamily: 'inherit', fontSize: 11 },
- grid: { vertLines: { visible: false }, horzLines: { color: '#0e0e1a' } },
+ grid: { vertLines: { visible: false }, horzLines: { color: '#0f0f0f' } },
rightPriceScale: { borderVisible: false, scaleMargins: { top: 0.15, bottom: 0.05 } },
timeScale: { borderVisible: false, timeVisible: false, secondsVisible: false },
crosshair: {
- vertLine: { color: '#2a2a40', style: 0, width: 1, labelVisible: false },
- horzLine: { color: '#2a2a40', style: 0, width: 1, labelVisible: true },
+ vertLine: { color: '#2c2c2c', style: 0, width: 1, labelVisible: false },
+ horzLine: { color: '#2c2c2c', style: 0, width: 1, labelVisible: true },
},
handleScroll: false,
handleScale: false,
diff --git a/public/dashboard/sessions.html b/public/dashboard/sessions.html
index abd3f4adc..61d404681 100644
--- a/public/dashboard/sessions.html
+++ b/public/dashboard/sessions.html
@@ -9,9 +9,9 @@
:root {
color-scheme: dark;
--accent: #ffffff;
- --border: #22222e;
+ --border: #232323;
--bg: #000;
- --panel: #14141c;
+ --panel: #151515;
}
* {
box-sizing: border-box;
@@ -69,7 +69,7 @@
.btn {
padding: 8px 14px;
border-radius: 6px;
- border: 1px solid #2a2a36;
+ border: 1px solid #2b2b2b;
font-size: 13px;
font-weight: 600;
cursor: pointer;
@@ -78,24 +78,24 @@
transition: border-color 0.12s ease, background 0.12s ease;
}
.btn:hover:not(:disabled) {
- border-color: #3d3d52;
- background: #0a0a12;
+ border-color: #3f3f3f;
+ background: #0b0b0b;
}
.btn:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.btn.sec {
- background: #15151d;
+ background: #161616;
color: #ddd;
- border-color: #22222e;
+ border-color: #232323;
}
.btn.sec:hover:not(:disabled) {
- background: #1c1c26;
- border-color: #2e2e3e;
+ background: #1d1d1d;
+ border-color: #2f2f2f;
}
.btn.danger {
- background: #15151d;
+ background: #161616;
border-color: rgba(204, 64, 64, 0.4);
color: #ffb3b3;
}
@@ -117,7 +117,7 @@
background: var(--panel);
}
thead {
- background: #0f0f17;
+ background: #101010;
border-bottom: 1px solid var(--border);
}
th {
@@ -171,7 +171,7 @@
bottom: 24px;
left: 50%;
transform: translateX(-50%);
- background: #1a1a24;
+ background: #1b1b1b;
border: 1px solid var(--border);
padding: 10px 18px;
border-radius: 99px;
@@ -197,7 +197,7 @@
}
}
.btn-sec {
- background: #222230;
+ background: #232323;
color: #ddd;
}
body[data-auth-pending] {
diff --git a/public/dashboard/sns.html b/public/dashboard/sns.html
index 8ebc411c6..20af04284 100644
--- a/public/dashboard/sns.html
+++ b/public/dashboard/sns.html
@@ -259,7 +259,7 @@
<p class="dash-muted">Buy a <code class="dash-mono">.sol</code> with USDC, paid by either this agent's wallet or your linked browser wallet.</p>
<div class="dash-row" style="gap:8px;margin-top:8px;flex-wrap:wrap">
<input id="register-input" type="text" placeholder="yourname" autocomplete="off" spellcheck="false"
- style="flex:1;min-width:220px;padding:8px 10px;border-radius:8px;border:1px solid var(--dash-line,#2a2a36);background:#0e0e16;color:inherit;font-family:ui-monospace,monospace" />
+ style="flex:1;min-width:220px;padding:8px 10px;border-radius:8px;border:1px solid var(--dash-line,#2b2b2b);background:#0f0f0f;color:inherit;font-family:ui-monospace,monospace" />
<span class="dash-muted" style="font-family:ui-monospace,monospace">.sol</span>
<button class="dash-btn" id="register-check">Check</button>
</div>
diff --git a/public/dashboard/storage.html b/public/dashboard/storage.html
index 524778af1..19e2648be 100644
--- a/public/dashboard/storage.html
+++ b/public/dashboard/storage.html
@@ -10,9 +10,9 @@
color-scheme: dark;
--accent: #ffffff;
--accent2: #ffffff;
- --border: #22222e;
+ --border: #232323;
--bg: #000;
- --panel: #14141c;
+ --panel: #151515;
}
* {
box-sizing: border-box;
@@ -91,7 +91,7 @@
}
input,
select {
- background: #0f0f17;
+ background: #101010;
border: 1px solid var(--border);
color: #eee;
padding: 9px 11px;
@@ -147,7 +147,7 @@
.btn {
padding: 8px 14px;
border-radius: 6px;
- border: 1px solid #2a2a36;
+ border: 1px solid #2b2b2b;
font-size: 13px;
font-weight: 600;
cursor: pointer;
@@ -156,21 +156,21 @@
transition: border-color 0.12s ease, background 0.12s ease;
}
.btn:hover:not(:disabled) {
- border-color: #3d3d52;
- background: #0a0a12;
+ border-color: #3f3f3f;
+ background: #0b0b0b;
}
.btn:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.btn.sec {
- background: #15151d;
+ background: #161616;
color: #ddd;
- border-color: #22222e;
+ border-color: #232323;
}
.btn.sec:hover:not(:disabled) {
- background: #1c1c26;
- border-color: #2e2e3e;
+ background: #1d1d1d;
+ border-color: #2f2f2f;
}
.muted {
color: #888;
@@ -198,7 +198,7 @@
SF Mono,
Menlo,
monospace;
- background: #0f0f17;
+ background: #101010;
border: 1px solid var(--border);
border-radius: 4px;
padding: 1px 6px;
diff --git a/public/dashboard/tokens.html b/public/dashboard/tokens.html
index 84eb441be..7c013c231 100644
--- a/public/dashboard/tokens.html
+++ b/public/dashboard/tokens.html
@@ -94,7 +94,7 @@
<div class="dash-card">
<h2>${escapeHtml(token.name || 'Token')} · ${escapeHtml(token.symbol || '')}</h2>
<div class="dash-row" style="gap:18px;flex-wrap:wrap;margin-bottom:14px">
- ${token.image ? `<img src="${escapeHtml(token.image)}" alt="" width="64" height="64" style="border-radius:10px;background:#1a1a24" />` : ''}
+ ${token.image ? `<img src="${escapeHtml(token.image)}" alt="" width="64" height="64" style="border-radius:10px;background:#1b1b1b" />` : ''}
<div style="flex:1;min-width:240px">
<div class="dash-mono">${escapeHtml(token.mint)}</div>
<div class="dash-muted" style="margin-top:4px">
diff --git a/public/dashboard/usage.html b/public/dashboard/usage.html
index 37fb37079..f2922e960 100644
--- a/public/dashboard/usage.html
+++ b/public/dashboard/usage.html
@@ -90,7 +90,7 @@
h2 {
font-size: 1rem;
margin-bottom: 0.5rem;
- color: #374151;
+ color: #404040;
}
</style>
</head>
diff --git a/public/dashboard/wallets.html b/public/dashboard/wallets.html
index 26c2c9650..805fb267c 100644
--- a/public/dashboard/wallets.html
+++ b/public/dashboard/wallets.html
@@ -10,9 +10,9 @@
color-scheme: dark;
--accent: #ffffff;
--accent2: #ffffff;
- --border: #22222e;
+ --border: #232323;
--bg: #000;
- --panel: #14141c;
+ --panel: #151515;
}
* {
box-sizing: border-box;
@@ -71,7 +71,7 @@
.btn {
padding: 8px 14px;
border-radius: 6px;
- border: 1px solid #2a2a36;
+ border: 1px solid #2b2b2b;
font-size: 13px;
font-weight: 600;
cursor: pointer;
@@ -80,20 +80,20 @@
transition: border-color 0.12s ease, background 0.12s ease;
}
.btn:hover:not(:disabled) {
- border-color: #3d3d52;
- background: #0a0a12;
+ border-color: #3f3f3f;
+ background: #0b0b0b;
}
.btn.sec {
- background: #15151d;
+ background: #161616;
color: #ddd;
- border-color: #22222e;
+ border-color: #232323;
}
.btn.sec:hover:not(:disabled) {
- background: #1c1c26;
- border-color: #2e2e3e;
+ background: #1d1d1d;
+ border-color: #2f2f2f;
}
.btn.danger {
- background: #15151d;
+ background: #161616;
border-color: rgba(204, 64, 64, 0.4);
color: #ffb3b3;
}
@@ -157,7 +157,7 @@
font-size: 11px;
padding: 3px 8px;
border-radius: 99px;
- background: #20202c;
+ background: #212121;
color: #ccc;
white-space: nowrap;
}
diff --git a/public/dashboard/x402.html b/public/dashboard/x402.html
index b7825ad0a..a6320f2a9 100644
--- a/public/dashboard/x402.html
+++ b/public/dashboard/x402.html
@@ -8,12 +8,12 @@
<style>
:root {
color-scheme: dark;
- --bg: #0a0b10;
- --bg-2: #0f1119;
- --panel: #14161f;
- --panel-2: #1a1d29;
- --border: #232636;
- --border-strong: #2e3447;
+ --bg: #0b0b0b;
+ --bg-2: #111111;
+ --panel: #161616;
+ --panel-2: #1d1d1d;
+ --border: #272727;
+ --border-strong: #343434;
--text: #f0f2f8;
--muted: #8a90a8;
--muted-2: #6b7088;
@@ -55,7 +55,7 @@
header .right { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.btn {
padding: 9px 16px;
- background: #ffffff; color: #0a0b10;
+ background: #ffffff; color: #0b0b0b;
border: none; border-radius: 9px;
font-size: 13px; font-weight: 600; font-family: inherit;
cursor: pointer;
diff --git a/public/demo/coin/index.html b/public/demo/coin/index.html
index 1f94791f4..318c50925 100644
--- a/public/demo/coin/index.html
+++ b/public/demo/coin/index.html
@@ -28,10 +28,10 @@
--accent: #ffffff;
--accent-2: #ff6ad6;
--accent-3: #ffba2e;
- --border: #1f1f29;
- --bg: #0a0a0f;
- --panel: #14141c;
- --panel-hi: #181822;
+ --border: #202020;
+ --bg: #0a0a0a;
+ --panel: #151515;
+ --panel-hi: #191919;
--muted: #888;
--header-h: 48px;
--ok: #4ade80;
@@ -60,12 +60,12 @@
.address-row { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; font-family: ui-monospace, SFMono-Regular, monospace; margin-bottom: 18px; }
.address-row .copy { cursor: pointer; padding: 2px 6px; border: 1px solid var(--border); border-radius: 4px; background: var(--panel); color: var(--muted); }
- .address-row .copy:hover { color: #eee; border-color: #2a2a36; }
+ .address-row .copy:hover { color: #eee; border-color: #2b2b2b; }
.pots-card { background: linear-gradient(180deg, var(--panel-hi), var(--panel));
border: 1px solid var(--border); border-radius: 14px; padding: 20px 22px; }
.pots-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
- .pot { padding: 14px 16px; border-radius: 10px; border: 1px solid var(--border); background: #0e0e16; }
+ .pot { padding: 14px 16px; border-radius: 10px; border: 1px solid var(--border); background: #0f0f0f; }
.pot .label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.pot .value { font-size: 26px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; }
.pot .value .sol { font-size: 14px; color: var(--muted); font-weight: 500; margin-left: 4px; }
@@ -75,7 +75,7 @@
.pot.reflection .value { color: var(--accent); }
.next-draw { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px;
- background: #0e0e16; border: 1px solid var(--border); border-radius: 10px; font-size: 13px; }
+ background: #0f0f0f; border: 1px solid var(--border); border-radius: 10px; font-size: 13px; }
.next-draw .label { color: var(--muted); }
.next-draw .countdown { font-variant-numeric: tabular-nums; font-weight: 600; }
@@ -91,18 +91,18 @@
margin: 0 0 12px; font-weight: 600; }
.wallet-controls { display: flex; gap: 8px; flex-wrap: wrap; }
- .wallet-controls input[type="text"] { flex: 1; min-width: 220px; background: #0e0e16; color: #eee;
+ .wallet-controls input[type="text"] { flex: 1; min-width: 220px; background: #0f0f0f; color: #eee;
border: 1px solid var(--border); border-radius: 6px; padding: 8px 11px; font-size: 13px; font-family: ui-monospace, SFMono-Regular, monospace; }
.wallet-controls input:focus { outline: none; border-color: var(--accent); }
.wallet-controls button { background: var(--accent); border: 0; color: #fff;
border-radius: 6px; padding: 8px 16px; font-size: 13px; cursor: pointer; font-weight: 600; }
.wallet-controls button:hover { filter: brightness(1.1); }
.wallet-controls button.ghost { background: transparent; border: 1px solid var(--border); color: var(--muted); }
- .wallet-controls button.ghost:hover { color: #eee; border-color: #2a2a36; }
+ .wallet-controls button.ghost:hover { color: #eee; border-color: #2b2b2b; }
.wallet-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
gap: 12px; margin-top: 14px; }
- .wallet-stats .stat { padding: 12px; border: 1px solid var(--border); border-radius: 8px; background: #0e0e16; }
+ .wallet-stats .stat { padding: 12px; border: 1px solid var(--border); border-radius: 8px; background: #0f0f0f; }
.wallet-stats .stat .label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.wallet-stats .stat .value { font-size: 18px; font-weight: 600; margin-top: 6px; font-variant-numeric: tabular-nums; }
.wallet-stats .stat .value .unit { font-size: 11px; color: var(--muted); margin-left: 4px; font-weight: 500; }
@@ -110,7 +110,7 @@
table { width: 100%; border-collapse: collapse; font-size: 13px; }
table th { text-align: left; color: var(--muted); font-size: 11px; text-transform: uppercase;
letter-spacing: 0.05em; padding: 8px 12px; border-bottom: 1px solid var(--border); font-weight: 600; }
- table td { padding: 10px 12px; border-bottom: 1px solid #15151e; font-variant-numeric: tabular-nums; }
+ table td { padding: 10px 12px; border-bottom: 1px solid #161616; font-variant-numeric: tabular-nums; }
table td.wallet { font-family: ui-monospace, SFMono-Regular, monospace; font-size: 12px; }
table tr:hover td { background: rgba(255,255,255,0.02); }
table tr.you td { background: rgba(255,255,255,0.04); }
@@ -127,9 +127,9 @@
.tabs button:hover { color: #eee; }
.tabs button[aria-selected="true"] { color: #eee; border-bottom-color: var(--accent); }
- .transparency { font-size: 12px; color: var(--muted); padding: 12px; background: #0e0e16;
+ .transparency { font-size: 12px; color: var(--muted); padding: 12px; background: #0f0f0f;
border: 1px dashed var(--border); border-radius: 8px; margin-top: 14px; line-height: 1.55; }
- .transparency code { background: #1a1a24; padding: 1px 5px; border-radius: 4px; color: #cbd5e1; font-size: 11px; }
+ .transparency code { background: #1b1b1b; padding: 1px 5px; border-radius: 4px; color: #cbd5e1; font-size: 11px; }
.tagline { color: var(--muted); font-size: 14px; margin: -4px 0 18px;
max-width: 720px; line-height: 1.5; }
diff --git a/public/demos/3d-home.html b/public/demos/3d-home.html
index 8f84307a4..3ade80967 100644
--- a/public/demos/3d-home.html
+++ b/public/demos/3d-home.html
@@ -9,7 +9,7 @@
<style>
:root { color-scheme: dark; }
*, *::before, *::after { box-sizing: border-box; }
- html, body { height: 100%; margin: 0; background: #04050d; color: #eee; font: 15px/1.5 'Inter', -apple-system, system-ui, sans-serif; }
+ html, body { height: 100%; margin: 0; background: #050505; color: #eee; font: 15px/1.5 'Inter', -apple-system, system-ui, sans-serif; }
/* Canvas sits above all HTML — pointer-events:none so clicks pass through */
#avatar-canvas {
@@ -79,7 +79,7 @@
}
.btn-primary {
background: linear-gradient(160deg, #5ad1ff, #2cb0ef);
- color: #0a0b0f;
+ color: #0b0b0b;
box-shadow: 0 8px 0 0 #005a8a, 0 10px 28px rgba(61, 193, 255,0.28);
}
.btn-primary:hover { filter: brightness(1.07); }
diff --git a/public/demos/404.html b/public/demos/404.html
index bd06a1929..e3aa35fd4 100644
--- a/public/demos/404.html
+++ b/public/demos/404.html
@@ -9,7 +9,7 @@
<style>
:root { color-scheme: dark; }
*, *::before, *::after { box-sizing: border-box; }
- html, body { height: 100%; margin: 0; background: #04050d; color: #eee; font: 15px/1.5 'Inter', -apple-system, system-ui, sans-serif; overflow: hidden; }
+ html, body { height: 100%; margin: 0; background: #050505; color: #eee; font: 15px/1.5 'Inter', -apple-system, system-ui, sans-serif; overflow: hidden; }
#avatar-canvas {
position: fixed; inset: 0;
@@ -80,7 +80,7 @@
}
.btn-primary {
background: linear-gradient(160deg, #5ad1ff, #2cb0ef);
- color: #0a0b0f;
+ color: #0b0b0b;
box-shadow: 0 7px 0 0 #005a8a, 0 9px 24px rgba(61, 193, 255,0.25);
}
.btn-primary:hover { filter: brightness(1.07); }
diff --git a/public/demos/agents/_shared.css b/public/demos/agents/_shared.css
index e92c4c53e..b17d922d9 100644
--- a/public/demos/agents/_shared.css
+++ b/public/demos/agents/_shared.css
@@ -3,7 +3,7 @@
*, *::before, *::after { box-sizing: border-box; }
html, body {
height: 100%; margin: 0;
- background: #04050d; color: #eee;
+ background: #050505; color: #eee;
font: 15px/1.55 'Inter', -apple-system, system-ui, sans-serif;
}
@@ -74,7 +74,7 @@ html, body {
}
.btn-primary {
background: linear-gradient(160deg, #5ad1ff, #2cb0ef);
- color: #0a0b0f;
+ color: #0b0b0b;
box-shadow: 0 8px 0 0 #005a8a, 0 10px 28px rgba(61, 193, 255,0.28);
}
.btn-primary:hover { filter: brightness(1.07); }
diff --git a/public/demos/agents/auto-rig.html b/public/demos/agents/auto-rig.html
index a5b3ca438..c0082eafb 100644
--- a/public/demos/agents/auto-rig.html
+++ b/public/demos/agents/auto-rig.html
@@ -8,7 +8,7 @@
<link rel="stylesheet" href="/fonts/fonts.css" />
<link rel="stylesheet" href="/demos/agents/_shared.css" />
<style>
- body { overflow: hidden; background: #04050d; }
+ body { overflow: hidden; background: #050505; }
.lab {
position: fixed; inset: 56px 0 0 0;
@@ -18,7 +18,7 @@
/* ── Sidebar ─────────────────────────────────────────────── */
.panel {
- background: #06070f;
+ background: #070707;
padding: 24px 22px 22px;
overflow-y: auto;
font-size: 13px;
@@ -45,11 +45,11 @@
text-align: center;
cursor: pointer;
transition: border-color 0.15s, background 0.15s;
- background: #0b0d17;
+ background: #0d0d0d;
margin-bottom: 16px;
}
.drop:hover, .drop.active {
- border-color: #3dc1ff; background: #11141e;
+ border-color: #3dc1ff; background: #141414;
}
.drop .ico { font-size: 26px; margin-bottom: 8px; }
.drop h3 { margin: 0 0 4px; font: 700 14px/1.2 'Space Grotesk','Inter',sans-serif; color: #fff; }
@@ -81,7 +81,7 @@
width: 100%; margin-top: 18px;
padding: 14px 18px; border: none; border-radius: 12px;
background: linear-gradient(160deg, #5ad1ff, #2cb0ef);
- color: #0a0b0f; font: 700 14px/1 'Inter', sans-serif;
+ color: #0b0b0b; font: 700 14px/1 'Inter', sans-serif;
cursor: pointer; transition: filter 0.15s, transform 0.1s;
box-shadow: 0 6px 0 0 #005a8a, 0 8px 20px rgba(61, 193, 255,0.25);
}
@@ -92,7 +92,7 @@
.status {
margin-top: 16px;
padding: 12px 14px;
- background: #0b0d17;
+ background: #0d0d0d;
border: 1px solid rgba(255,255,255,0.05);
border-radius: 10px;
font: 12px/1.55 'JetBrains Mono', ui-monospace, monospace;
@@ -118,7 +118,7 @@
/* ── Viewers ─────────────────────────────────────────────── */
.viewer {
- position: relative; background: #04050d;
+ position: relative; background: #050505;
overflow: hidden;
}
.viewer canvas { display: block; width: 100%; height: 100%; }
@@ -140,7 +140,7 @@
.viewer .empty {
position: absolute; inset: 0;
display: flex; align-items: center; justify-content: center;
- color: #2f3346; font-size: 13px;
+ color: #343434; font-size: 13px;
pointer-events: none;
}
.viewer.has-content .empty { display: none; }
diff --git a/public/demos/agents/face-mocap.html b/public/demos/agents/face-mocap.html
index 0917d60de..d3c57f589 100644
--- a/public/demos/agents/face-mocap.html
+++ b/public/demos/agents/face-mocap.html
@@ -30,7 +30,7 @@
position: fixed; inset: 0; z-index: 60;
display: flex; flex-direction: column;
align-items: center; justify-content: center;
- background: radial-gradient(ellipse at center, #0c0e16 0%, #04050d 70%);
+ background: radial-gradient(ellipse at center, #0e0e0e 0%, #050505 70%);
gap: 18px;
transition: opacity 0.45s;
}
@@ -55,7 +55,7 @@
padding: 16px 36px;
border: none; border-radius: 100px;
background: linear-gradient(160deg,#5ad1ff,#2cb0ef);
- color: #0a0b0f;
+ color: #0b0b0b;
font: 700 15px/1 'Space Grotesk','Inter',sans-serif;
letter-spacing: 0.01em;
cursor: pointer;
@@ -127,7 +127,7 @@
.cam-body {
position: relative;
- background: #04050d;
+ background: #050505;
aspect-ratio: 4/3;
overflow: hidden;
}
@@ -261,14 +261,14 @@
}
#controls button.primary {
background: linear-gradient(160deg,#5ad1ff,#2cb0ef);
- color: #0a0b0f;
+ color: #0b0b0b;
border-color: transparent;
box-shadow: 0 4px 14px rgba(61, 193, 255,0.28);
}
#controls button.primary:hover { filter: brightness(1.07); }
#controls button.recording {
background: linear-gradient(160deg,#ff7891,#ff4d6d);
- color: #0a0b0f; border-color: transparent;
+ color: #0b0b0b; border-color: transparent;
box-shadow: 0 4px 14px rgba(255,77,109,0.35);
animation: pulse 1.6s ease-in-out infinite;
}
diff --git a/public/demos/agents/gemini-live.html b/public/demos/agents/gemini-live.html
index dd0007660..9b695c350 100644
--- a/public/demos/agents/gemini-live.html
+++ b/public/demos/agents/gemini-live.html
@@ -15,7 +15,7 @@
position: fixed; inset: 0; z-index: 50;
display: flex; flex-direction: column;
align-items: center; justify-content: center;
- background: #04050d; gap: 18px;
+ background: #050505; gap: 18px;
transition: opacity 0.5s;
}
#overlay.hidden { opacity: 0; pointer-events: none; }
@@ -38,7 +38,7 @@
}
.voice-row label { color: #888; font-weight: 500; }
#voice-select {
- background: #0c0e16; border: 1px solid rgba(255,255,255,0.12);
+ background: #0e0e0e; border: 1px solid rgba(255,255,255,0.12);
color: #fff; padding: 6px 10px; border-radius: 8px;
font: 500 13px/1 'Inter', sans-serif; cursor: pointer;
outline: none;
@@ -201,7 +201,7 @@
width: 130px; aspect-ratio: 4/3;
border-radius: 10px; overflow: hidden;
border: 1.5px solid rgba(255,255,255,0.09);
- background: #0c0e16;
+ background: #0e0e0e;
opacity: 0; transition: opacity 0.5s; z-index: 20;
}
#pip.visible { opacity: 1; }
diff --git a/public/demos/agents/index.html b/public/demos/agents/index.html
index e40c51e38..d32419fd4 100644
--- a/public/demos/agents/index.html
+++ b/public/demos/agents/index.html
@@ -40,7 +40,7 @@
.card {
display: block; padding: 18px 18px 16px;
border-radius: 14px;
- background: #0c0e16;
+ background: #0e0e0e;
border: 1.5px solid rgba(255,255,255,0.06);
text-decoration: none; color: inherit;
transition: transform 0.15s, border-color 0.15s, background 0.15s;
@@ -48,7 +48,7 @@
.card:hover {
transform: translateY(-2px);
border-color: rgba(61, 193, 255,0.4);
- background: #11141e;
+ background: #141414;
}
.card h3 { margin: 0 0 6px; font-size: 15px; font-weight: 700; letter-spacing: -0.005em; color: #fff; }
.card p { margin: 0; color: #6c7088; font-size: 12.5px; line-height: 1.55; }
diff --git a/public/demos/avatar-sdk.html b/public/demos/avatar-sdk.html
index 2208884cf..d21d9affb 100644
--- a/public/demos/avatar-sdk.html
+++ b/public/demos/avatar-sdk.html
@@ -9,24 +9,24 @@
<link rel="stylesheet" href="/nav.css" />
<style>
:root { color-scheme: dark; }
- body { background: #05060a; color: #eee; font: 15px/1.5 -apple-system, system-ui, sans-serif; margin: 0; }
+ body { background: #060606; color: #eee; font: 15px/1.5 -apple-system, system-ui, sans-serif; margin: 0; }
.stage { max-width: 1000px; margin: 0 auto; padding: 48px 24px 80px; }
.crumb a { color: #8a8d98; text-decoration: none; }
.crumb a:hover { color: #3dc1ff; }
h1 { font-size: 28px; font-weight: 600; letter-spacing: -0.015em; margin: 14px 0 8px; }
.sub { color: #8a8d98; max-width: 64ch; margin: 0 0 30px; }
pre {
- background: #07080d; border: 1px solid #1e1f2b; border-radius: 9px;
+ background: #080808; border: 1px solid #202020; border-radius: 9px;
padding: 14px 16px; font-family: ui-monospace, monospace; font-size: 12.5px;
color: #3dc1ff; overflow-x: auto;
}
.card {
- background: #0f1018; border: 1.5px solid #1e1f2b; border-radius: 14px;
+ background: #101010; border: 1.5px solid #202020; border-radius: 14px;
padding: 22px; margin: 16px 0;
}
.viewer-host {
min-height: 460px;
- background: #0a0b12; border-radius: 10px; overflow: hidden;
+ background: #0b0b0b; border-radius: 10px; overflow: hidden;
margin-top: 14px;
}
.viewer-host agent-3d { width: 100%; height: 460px; display: block; }
@@ -36,7 +36,7 @@
}
.log {
margin-top: 14px;
- background: #07080d; border: 1px solid #1e1f2b; border-radius: 9px;
+ background: #080808; border: 1px solid #202020; border-radius: 9px;
padding: 12px; font-family: ui-monospace, monospace; font-size: 12px;
color: #8a8d98; max-height: 200px; overflow: auto; white-space: pre-wrap;
}
diff --git a/public/demos/bonding-curve.html b/public/demos/bonding-curve.html
index 276b162c5..41a4759b2 100644
--- a/public/demos/bonding-curve.html
+++ b/public/demos/bonding-curve.html
@@ -9,7 +9,7 @@
<link rel="stylesheet" href="/nav.css" />
<style>
:root { color-scheme: dark; }
- body { background: #05060a; color: #eee; font: 15px/1.5 -apple-system, system-ui, sans-serif; margin: 0; }
+ body { background: #060606; color: #eee; font: 15px/1.5 -apple-system, system-ui, sans-serif; margin: 0; }
.stage { max-width: 1200px; margin: 0 auto; padding: 48px 24px 80px; }
.crumb a { color: #8a8d98; text-decoration: none; }
.crumb a:hover { color: #3dc1ff; }
@@ -21,27 +21,27 @@
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-top: 24px; }
@media (max-width: 820px) { .row3 { grid-template-columns: 1fr; } }
.panel {
- background: #0f1018; border: 1.5px solid #1e1f2b; border-radius: 14px;
+ background: #101010; border: 1.5px solid #202020; border-radius: 14px;
padding: 20px; display: flex; flex-direction: column; gap: 14px;
}
.chart-card {
- background: #0f1018; border: 1.5px solid #1e1f2b; border-radius: 14px;
+ background: #101010; border: 1.5px solid #202020; border-radius: 14px;
padding: 16px; display: flex; flex-direction: column; gap: 10px;
}
- canvas.chart { width: 100%; height: 400px; background: #07080d; border-radius: 9px; display: block; }
+ canvas.chart { width: 100%; height: 400px; background: #080808; border-radius: 9px; display: block; }
label { font-size: 12.5px; color: #8a8d98; text-transform: uppercase; letter-spacing: 0.06em; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-row { display: grid; grid-template-columns: 1fr 110px; gap: 8px; align-items: center; }
input[type=number], input[type=text] {
width: 100%; padding: 9px 11px; border-radius: 9px;
- background: #07080d; color: #eee; border: 1px solid #1e1f2b;
+ background: #080808; color: #eee; border: 1px solid #202020;
font: inherit; box-sizing: border-box;
}
input[type=range] { width: 100%; accent-color: #3dc1ff; }
.radios { display: flex; gap: 6px; flex-wrap: wrap; }
.radios label.opt {
flex: 1; min-width: 60px; text-align: center; padding: 8px 4px;
- background: #07080d; border: 1px solid #1e1f2b; border-radius: 8px;
+ background: #080808; border: 1px solid #202020; border-radius: 8px;
color: #8a8d98; cursor: pointer; text-transform: none; letter-spacing: 0;
font-size: 13px;
}
@@ -65,7 +65,7 @@
.badge.warn { background: rgba(255,193,7,0.16); color: #ffce4d; }
.badge.live { background: rgba(102,217,239,0.15); color: #66d9ef; }
.log {
- background: #07080d; border: 1px solid #1e1f2b; border-radius: 9px;
+ background: #080808; border: 1px solid #202020; border-radius: 9px;
padding: 12px; font-family: ui-monospace, monospace; font-size: 12px;
line-height: 1.6; color: #8a8d98; max-height: 320px; overflow: auto; white-space: pre-wrap;
}
@@ -76,12 +76,12 @@
.trade-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
.trade-result { font-size: 12px; color: #8a8d98; font-family: ui-monospace, monospace; line-height: 1.55; }
.trade-result b { color: #eee; }
- .divider { height: 1px; background: #1e1f2b; margin: 4px 0; }
- .mini-chart { width: 100%; height: 160px; background: #07080d; border-radius: 9px; display: block; }
- .compare-card { display: flex; flex-direction: column; gap: 8px; padding: 14px; background: #0f1018; border: 1.5px solid #1e1f2b; border-radius: 12px; }
+ .divider { height: 1px; background: #202020; margin: 4px 0; }
+ .mini-chart { width: 100%; height: 160px; background: #080808; border-radius: 9px; display: block; }
+ .compare-card { display: flex; flex-direction: column; gap: 8px; padding: 14px; background: #101010; border: 1.5px solid #202020; border-radius: 12px; }
.compare-card h3 { margin: 0; font-size: 14px; color: #3dc1ff; }
.compare-card .meta { font-size: 12px; color: #8a8d98; font-family: ui-monospace, monospace; }
- .kbd { font-family: ui-monospace, monospace; font-size: 12px; padding: 1px 5px; background: #07080d; border: 1px solid #1e1f2b; border-radius: 4px; color: #3dc1ff; }
+ .kbd { font-family: ui-monospace, monospace; font-size: 12px; padding: 1px 5px; background: #080808; border: 1px solid #202020; border-radius: 4px; color: #3dc1ff; }
</style>
</head>
<body>
@@ -335,7 +335,7 @@
const Y = (y) => padT + innerH - ((y - yMin) / (yMax - yMin)) * innerH;
// grid
- ctx.strokeStyle = '#16182260';
+ ctx.strokeStyle = '#18181860';
ctx.lineWidth = 1;
ctx.font = '11px ui-monospace, monospace';
ctx.fillStyle = '#5a5d6a';
diff --git a/public/demos/brain.html b/public/demos/brain.html
index 5196c5eb4..d0f657f68 100644
--- a/public/demos/brain.html
+++ b/public/demos/brain.html
@@ -17,7 +17,7 @@
<script src="https://cdn.jsdelivr.net/gh/highlightjs/[email protected]/build/highlight.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/marked@12/marked.min.js"></script>
<style>
-:root{color-scheme:dark;--bg:#05060a;--s0:#0a0b11;--s1:#0e0f17;--s2:#13141e;--b0:#1a1b28;--b1:#24253a;--b2:#2e3050;--t0:#e8e9f0;--t1:#a0a2b4;--t2:#6e7088;--t3:#484a60;--accent:#3dc1ff;--accent-dim:rgba(61,193,255,0.1);--ok:#22d17a;--ok-dim:rgba(34,209,122,0.12);--warn:#f5a623;--err:#ff5a5a;--r:12px;--rs:8px;--sidebar-w:260px}
+:root{color-scheme:dark;--bg:#060606;--s0:#0b0b0b;--s1:#0f0f0f;--s2:#151515;--b0:#1c1c1c;--b1:#262626;--b2:#323232;--t0:#e8e9f0;--t1:#a0a2b4;--t2:#6e7088;--t3:#484a60;--accent:#3dc1ff;--accent-dim:rgba(61,193,255,0.1);--ok:#22d17a;--ok-dim:rgba(34,209,122,0.12);--warn:#f5a623;--err:#ff5a5a;--r:12px;--rs:8px;--sidebar-w:260px}
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html,body{background:var(--bg);color:var(--t0);font:14px/1.55 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;height:100vh;overflow:hidden}
a{color:inherit;text-decoration:none}button{font-family:inherit;cursor:pointer;border:0;background:transparent}
@@ -75,7 +75,7 @@ a{color:inherit;text-decoration:none}button{font-family:inherit;cursor:pointer;b
.msg-body h1:first-child,.msg-body h2:first-child,.msg-body h3:first-child{margin-top:0}
.msg-body ul,.msg-body ol{margin:6px 0 12px;padding-left:22px}.msg-body li{margin:3px 0}.msg-body li>p{margin:0}
.msg-body code{font-family:"SF Mono",ui-monospace,Menlo,Consolas,monospace;font-size:12.5px;background:rgba(255,255,255,.07);padding:2px 6px;border-radius:4px;color:var(--accent)}
-.msg-body pre{background:#0d1117;border:1px solid var(--b0);border-radius:var(--rs);padding:14px 16px;overflow-x:auto;margin:12px 0;position:relative}
+.msg-body pre{background:#111111;border:1px solid var(--b0);border-radius:var(--rs);padding:14px 16px;overflow-x:auto;margin:12px 0;position:relative}
.msg-body pre code{background:transparent;padding:0;color:inherit;font-size:12.5px;line-height:1.55}
.pre-copy{position:absolute;top:8px;right:8px;padding:3px 8px;border-radius:5px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.1);color:var(--t2);font-size:10.5px;font-family:inherit;opacity:0;transition:opacity .15s}
.msg-body pre:hover .pre-copy{opacity:1}.pre-copy:hover{background:rgba(255,255,255,.1);color:var(--t0)}.pre-copy.copied{color:var(--ok)}
@@ -112,7 +112,7 @@ a{color:inherit;text-decoration:none}button{font-family:inherit;cursor:pointer;b
.input-ta{width:100%;background:transparent;border:0;outline:none;color:var(--t0);font:inherit;font-size:14px;padding:14px 16px 0;resize:none;min-height:54px;max-height:200px;display:block;line-height:1.5}.input-ta::placeholder{color:var(--t3)}
.input-footer{display:flex;align-items:center;padding:6px 12px 10px 16px;gap:8px}.input-hint{font-size:11px;color:var(--t3);flex:1}
.btn-stop{display:none;align-items:center;gap:5px;background:var(--err);color:#fff;border-radius:7px;font-size:12.5px;font-weight:600;padding:6px 14px}.btn-stop.visible{display:flex}
-.btn-send{background:var(--accent);color:#04090f;border-radius:7px;font-size:13px;font-weight:600;padding:6px 16px;display:flex;align-items:center;gap:6px;transition:opacity .12s}
+.btn-send{background:var(--accent);color:#080808;border-radius:7px;font-size:13px;font-weight:600;padding:6px 16px;display:flex;align-items:center;gap:6px;transition:opacity .12s}
.btn-send:hover{opacity:.9}.btn-send:disabled{opacity:.35;cursor:not-allowed}.btn-send .sc{font-size:10px;opacity:.6;font-family:ui-monospace,monospace}
.input-sub{text-align:center;padding-top:6px;font-size:11px;color:var(--t3)}.input-sub a{color:var(--t2);text-decoration:underline;text-underline-offset:2px}
.cmp-top{padding:16px 24px;display:flex;flex-direction:column;gap:12px;border-bottom:1px solid var(--b0);flex-shrink:0}
@@ -128,7 +128,7 @@ a{color:inherit;text-decoration:none}button{font-family:inherit;cursor:pointer;b
.cmp-controls{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.cmp-controls label{font-size:12px;color:var(--t2);white-space:nowrap}
.cmp-controls input[type="number"]{background:var(--s1);border:1px solid var(--b0);color:var(--t0);padding:5px 10px;border-radius:var(--rs);font:inherit;font-size:12.5px;width:80px;outline:none}
.cmp-spacer{flex:1}
-.cmp-btn-run{background:var(--accent);color:#04090f;border-radius:7px;font-size:13px;font-weight:600;padding:8px 20px}.cmp-btn-run:hover{opacity:.9}.cmp-btn-run:disabled{opacity:.35;cursor:not-allowed}
+.cmp-btn-run{background:var(--accent);color:#080808;border-radius:7px;font-size:13px;font-weight:600;padding:8px 20px}.cmp-btn-run:hover{opacity:.9}.cmp-btn-run:disabled{opacity:.35;cursor:not-allowed}
.cmp-btn-clear{padding:7px 14px;border-radius:7px;font-size:12.5px;color:var(--t2);border:1px solid var(--b0)}.cmp-btn-clear:hover{border-color:var(--b1);color:var(--t0)}
.cmp-grid{flex:1;overflow-y:auto;padding:16px 24px;display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:12px;align-content:start}
.cmp-grid::-webkit-scrollbar{width:4px}.cmp-grid::-webkit-scrollbar-thumb{background:var(--b1);border-radius:4px}
@@ -144,7 +144,7 @@ a{color:inherit;text-decoration:none}button{font-family:inherit;cursor:pointer;b
.cmp-card-body.waiting{color:var(--t3);font-style:italic}.cmp-card-body.errored{color:var(--err)}
.cmp-card-body p{margin:0 0 8px}.cmp-card-body p:last-child{margin:0}
.cmp-card-body code{font-family:ui-monospace,monospace;font-size:12px;background:rgba(255,255,255,.06);padding:1px 5px;border-radius:3px}
-.cmp-card-body pre{background:#0d1117;border:1px solid var(--b0);border-radius:6px;padding:10px 12px;overflow-x:auto;margin:8px 0}
+.cmp-card-body pre{background:#111111;border:1px solid var(--b0);border-radius:6px;padding:10px 12px;overflow-x:auto;margin:8px 0}
.cmp-card-body pre code{background:transparent;padding:0;font-size:12px}.cmp-card-body strong{font-weight:600}
.cmp-card-body ul,.cmp-card-body ol{margin:4px 0;padding-left:18px}.cmp-card-body li{margin:2px 0}
.cmp-card-foot{padding:8px 14px;border-top:1px solid var(--b0);display:flex;gap:10px;align-items:center;flex-wrap:wrap}
diff --git a/public/demos/button-jump.html b/public/demos/button-jump.html
index 2b6c8d310..4fddd8bfd 100644
--- a/public/demos/button-jump.html
+++ b/public/demos/button-jump.html
@@ -7,12 +7,12 @@
<meta name="robots" content="noindex" />
<style>
*, *::before, *::after { box-sizing: border-box; }
- html, body { height: 100%; margin: 0; background: #02030a; overflow: hidden; }
+ html, body { height: 100%; margin: 0; background: #030303; overflow: hidden; }
canvas { display: block; width: 100%; height: 100%; }
.hint {
position: fixed; bottom: 22px; left: 50%;
transform: translateX(-50%);
- color: #1e2030; font: 12px/1 -apple-system, system-ui, sans-serif;
+ color: #212121; font: 12px/1 -apple-system, system-ui, sans-serif;
letter-spacing: 0.08em; pointer-events: none; z-index: 2;
}
</style>
@@ -68,7 +68,7 @@
const skyC = document.createElement('canvas');
skyC.width = 2048; skyC.height = 1024;
const skyCtx = skyC.getContext('2d');
- skyCtx.fillStyle = '#02030b';
+ skyCtx.fillStyle = '#030303';
skyCtx.fillRect(0, 0, 2048, 1024);
// Nebula smear
const neb = skyCtx.createRadialGradient(900, 400, 0, 900, 400, 600);
@@ -134,10 +134,10 @@
const gridC = document.createElement('canvas');
gridC.width = gridC.height = 512;
const gc = gridC.getContext('2d');
- gc.fillStyle = '#04050f';
+ gc.fillStyle = '#060606';
gc.fillRect(0, 0, 512, 512);
// Fine grid
- gc.strokeStyle = '#0d0f22'; gc.lineWidth = 1;
+ gc.strokeStyle = '#101010'; gc.lineWidth = 1;
for (let i = 0; i <= 512; i += 32) {
gc.beginPath(); gc.moveTo(i,0); gc.lineTo(i,512); gc.stroke();
gc.beginPath(); gc.moveTo(0,i); gc.lineTo(512,i); gc.stroke();
diff --git a/public/demos/button.html b/public/demos/button.html
index 2b6c8d310..4fddd8bfd 100644
--- a/public/demos/button.html
+++ b/public/demos/button.html
@@ -7,12 +7,12 @@
<meta name="robots" content="noindex" />
<style>
*, *::before, *::after { box-sizing: border-box; }
- html, body { height: 100%; margin: 0; background: #02030a; overflow: hidden; }
+ html, body { height: 100%; margin: 0; background: #030303; overflow: hidden; }
canvas { display: block; width: 100%; height: 100%; }
.hint {
position: fixed; bottom: 22px; left: 50%;
transform: translateX(-50%);
- color: #1e2030; font: 12px/1 -apple-system, system-ui, sans-serif;
+ color: #212121; font: 12px/1 -apple-system, system-ui, sans-serif;
letter-spacing: 0.08em; pointer-events: none; z-index: 2;
}
</style>
@@ -68,7 +68,7 @@
const skyC = document.createElement('canvas');
skyC.width = 2048; skyC.height = 1024;
const skyCtx = skyC.getContext('2d');
- skyCtx.fillStyle = '#02030b';
+ skyCtx.fillStyle = '#030303';
skyCtx.fillRect(0, 0, 2048, 1024);
// Nebula smear
const neb = skyCtx.createRadialGradient(900, 400, 0, 900, 400, 600);
@@ -134,10 +134,10 @@
const gridC = document.createElement('canvas');
gridC.width = gridC.height = 512;
const gc = gridC.getContext('2d');
- gc.fillStyle = '#04050f';
+ gc.fillStyle = '#060606';
gc.fillRect(0, 0, 512, 512);
// Fine grid
- gc.strokeStyle = '#0d0f22'; gc.lineWidth = 1;
+ gc.strokeStyle = '#101010'; gc.lineWidth = 1;
for (let i = 0; i <= 512; i += 32) {
gc.beginPath(); gc.moveTo(i,0); gc.lineTo(i,512); gc.stroke();
gc.beginPath(); gc.moveTo(0,i); gc.lineTo(512,i); gc.stroke();
diff --git a/public/demos/checkout.html b/public/demos/checkout.html
index cf46fc09a..875ba6127 100644
--- a/public/demos/checkout.html
+++ b/public/demos/checkout.html
@@ -9,7 +9,7 @@
<style>
:root { color-scheme: dark; }
*, *::before, *::after { box-sizing: border-box; }
- html, body { height: 100%; margin: 0; background: #04050d; color: #eee; font: 15px/1.5 'Inter', -apple-system, system-ui, sans-serif; overflow-x: hidden; }
+ html, body { height: 100%; margin: 0; background: #050505; color: #eee; font: 15px/1.5 'Inter', -apple-system, system-ui, sans-serif; overflow-x: hidden; }
#avatar-canvas {
position: fixed; inset: 0;
@@ -49,9 +49,9 @@
padding: 0 5px;
border-radius: 999px;
background: #3dc1ff;
- color: #0a0b0f;
+ color: #0b0b0b;
font: 700 11px/18px 'Inter', sans-serif; text-align: center;
- box-shadow: 0 0 0 2px #04050d;
+ box-shadow: 0 0 0 2px #050505;
transform: scale(0);
transition: transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
@@ -86,7 +86,7 @@
background:
radial-gradient(circle at 30% 25%, rgba(61, 193, 255,0.35), transparent 55%),
radial-gradient(circle at 70% 80%, rgba(74,140,255,0.35), transparent 60%),
- #0e1020;
+ #111111;
border: 1px solid rgba(255,255,255,0.06);
overflow: hidden;
}
@@ -129,7 +129,7 @@
padding: 16px 30px; border: none; border-radius: 14px;
font: 700 15px/1 'Inter', inherit; cursor: pointer;
background: linear-gradient(160deg, #5ad1ff, #2cb0ef);
- color: #0a0b0f;
+ color: #0b0b0b;
box-shadow: 0 8px 0 0 #005a8a, 0 10px 28px rgba(61, 193, 255,0.28);
transform-origin: bottom center;
will-change: transform;
diff --git a/public/demos/create-v2.html b/public/demos/create-v2.html
index 522e4e87b..4e7fcd7f8 100644
--- a/public/demos/create-v2.html
+++ b/public/demos/create-v2.html
@@ -11,9 +11,9 @@
color-scheme: dark;
--accent: #3dc1ff;
--accent-ink: #0a0a0a;
- --bg: #05060a;
- --panel: #0f1018;
- --border: #1e1f2b;
+ --bg: #060606;
+ --panel: #101010;
+ --border: #202020;
--text: #eee;
--muted: #8a8d98;
}
@@ -34,7 +34,7 @@
background:
radial-gradient(800px 500px at 50% -100px, rgba(255,255,255,.06) 0, transparent 70%),
radial-gradient(600px 400px at 50% 110%, rgba(61, 193, 255,.05) 0, transparent 70%),
- #05060a;
+ #060606;
}
/* ── demo banner ─────────────────────────────────────────────── */
@@ -140,7 +140,7 @@
.create-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.create-card:hover {
transform: translateY(-2px);
- border-color: #2c2d3d;
+ border-color: #2e2e2e;
box-shadow: 0 14px 36px rgba(0,0,0,.45);
}
diff --git a/public/demos/eas-reputation.html b/public/demos/eas-reputation.html
index 416df072c..d4ccea915 100644
--- a/public/demos/eas-reputation.html
+++ b/public/demos/eas-reputation.html
@@ -10,26 +10,26 @@
<link rel="stylesheet" href="/nav.css" />
<style>
:root { color-scheme: dark; }
- body { background: #05060a; color: #eee; font: 15px/1.5 -apple-system, system-ui, sans-serif; margin: 0; }
+ body { background: #060606; color: #eee; font: 15px/1.5 -apple-system, system-ui, sans-serif; margin: 0; }
.stage { max-width: 1080px; margin: 0 auto; padding: 48px 24px 80px; }
.crumb a { color: #8a8d98; text-decoration: none; }
.crumb a:hover { color: #3dc1ff; }
h1 { font-size: 28px; font-weight: 600; letter-spacing: -0.015em; margin: 14px 0 8px; }
.sub { color: #8a8d98; max-width: 72ch; margin: 0 0 26px; }
- .sub code { background: #0f1018; padding: 1px 6px; border-radius: 5px; font-size: 12.5px; color: #3dc1ff; }
+ .sub code { background: #101010; padding: 1px 6px; border-radius: 5px; font-size: 12.5px; color: #3dc1ff; }
h2 { font-size: 18px; font-weight: 600; margin: 0 0 14px; letter-spacing: -0.01em; }
- .card { background: #0f1018; border: 1.5px solid #1e1f2b; border-radius: 14px; padding: 22px; margin: 0 0 22px; }
+ .card { background: #101010; border: 1.5px solid #202020; border-radius: 14px; padding: 22px; margin: 0 0 22px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: #8a8d98; text-transform: uppercase; letter-spacing: 0.08em; flex: 1 1 240px; }
input[type=text], input[type=number] {
- background: #07080d; border: 1px solid #1e1f2b; color: #eee;
+ background: #080808; border: 1px solid #202020; color: #eee;
padding: 9px 11px; border-radius: 9px; font: inherit;
}
button {
background: #3dc1ff; color: #0a0a0a; border: 0; border-radius: 9px;
padding: 9px 16px; font-weight: 600; cursor: pointer; font: inherit;
}
- button.secondary { background: rgba(255,255,255,0.06); color: #eee; border: 1px solid #1e1f2b; }
+ button.secondary { background: rgba(255,255,255,0.06); color: #eee; border: 1px solid #202020; }
button:disabled { opacity: 0.35; cursor: not-allowed; }
.pill {
display: inline-flex; align-items: center; gap: 6px;
@@ -39,7 +39,7 @@
border: 1px solid rgba(61, 193, 255,0.2);
}
.pill.bad { background: rgba(255,138,138,0.08); color: #ff8a8a; border-color: rgba(255,138,138,0.25); }
- .pill.muted { background: rgba(255,255,255,0.04); color: #8a8d98; border-color: #1e1f2b; }
+ .pill.muted { background: rgba(255,255,255,0.04); color: #8a8d98; border-color: #202020; }
.notice {
padding: 11px 14px; border-radius: 10px; font-size: 13px; margin: 12px 0;
background: rgba(154,212,255,0.06); border: 1px solid rgba(154,212,255,0.2); color: #9ad4ff;
@@ -47,13 +47,13 @@
.notice.warn { background: rgba(255,196,87,0.07); border-color: rgba(255,196,87,0.3); color: #ffc457; }
.notice.err { background: rgba(255,138,138,0.07); border-color: rgba(255,138,138,0.3); color: #ff8a8a; }
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
- th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid #1e1f2b; vertical-align: top; }
+ th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid #202020; vertical-align: top; }
th { color: #8a8d98; font-weight: 500; text-transform: uppercase; font-size: 10.5px; letter-spacing: 0.08em; }
td { font-family: ui-monospace, monospace; color: #ddd; word-break: break-word; }
td .score { color: #3dc1ff; font-weight: 600; }
td a { color: #9ad4ff; }
.log {
- background: #07080d; border: 1px solid #1e1f2b; border-radius: 9px;
+ background: #080808; border: 1px solid #202020; border-radius: 9px;
padding: 12px; font-family: ui-monospace, monospace; font-size: 12px;
line-height: 1.6; color: #8a8d98; max-height: 280px; overflow: auto; white-space: pre-wrap;
}
@@ -66,7 +66,7 @@
.kv dd a { color: #9ad4ff; }
.full { flex-basis: 100%; }
details summary { cursor: pointer; color: #8a8d98; font-size: 12px; padding: 4px 0; }
- details pre { background: #07080d; border: 1px solid #1e1f2b; border-radius: 8px; padding: 12px; font-size: 11.5px; color: #b6b6cf; overflow-x: auto; }
+ details pre { background: #080808; border: 1px solid #202020; border-radius: 8px; padding: 12px; font-size: 11.5px; color: #b6b6cf; overflow-x: auto; }
</style>
<script type="importmap">
{
diff --git a/public/demos/erc8004.html b/public/demos/erc8004.html
index d7a685759..a41058b4a 100644
--- a/public/demos/erc8004.html
+++ b/public/demos/erc8004.html
@@ -10,20 +10,20 @@
<link rel="stylesheet" href="/nav.css" />
<style>
:root { color-scheme: dark; }
- body { background: #05060a; color: #eee; font: 15px/1.5 -apple-system, system-ui, sans-serif; margin: 0; }
+ body { background: #060606; color: #eee; font: 15px/1.5 -apple-system, system-ui, sans-serif; margin: 0; }
.stage { max-width: 1080px; margin: 0 auto; padding: 48px 24px 80px; }
.crumb a { color: #8a8d98; text-decoration: none; }
.crumb a:hover { color: #3dc1ff; }
h1 { font-size: 28px; font-weight: 600; letter-spacing: -0.015em; margin: 14px 0 8px; }
.sub { color: #8a8d98; max-width: 64ch; margin: 0 0 26px; }
- .controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; background: #0f1018; border: 1.5px solid #1e1f2b; border-radius: 14px; padding: 16px; margin-bottom: 22px; }
+ .controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; background: #101010; border: 1.5px solid #202020; border-radius: 14px; padding: 16px; margin-bottom: 22px; }
.controls label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: #8a8d98; text-transform: uppercase; letter-spacing: 0.08em; }
- .controls select, .controls input { background: #07080d; border: 1px solid #1e1f2b; color: #eee; padding: 9px 11px; border-radius: 9px; font: inherit; }
+ .controls select, .controls input { background: #080808; border: 1px solid #202020; color: #eee; padding: 9px 11px; border-radius: 9px; font: inherit; }
.controls input { min-width: 260px; }
.controls button { background: #3dc1ff; color: #0a0a0a; border: 0; border-radius: 9px; padding: 9px 16px; font-weight: 600; cursor: pointer; font: inherit; }
.controls button:disabled { opacity: 0.4; cursor: not-allowed; }
.results { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
- .agent { background: #0f1018; border: 1.5px solid #1e1f2b; border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; transition: border-color 0.15s, transform 0.15s; }
+ .agent { background: #101010; border: 1.5px solid #202020; border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; transition: border-color 0.15s, transform 0.15s; }
.agent:hover { border-color: rgba(61, 193, 255,0.4); transform: translateY(-1px); }
.agent-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.agent-name { font-size: 15px; font-weight: 600; margin: 0; }
@@ -32,15 +32,15 @@
.agent-meta { display: flex; gap: 10px; font-size: 11px; color: #8a8d98; font-family: ui-monospace, monospace; margin-top: 4px; flex-wrap: wrap; }
.agent-meta b { color: #3dc1ff; font-weight: 600; }
.notice { padding: 12px 16px; border-radius: 10px; background: rgba(154,212,255,0.06); border: 1px solid rgba(154,212,255,0.2); color: #9ad4ff; font-size: 13px; margin-bottom: 14px; }
- .notice.empty { background: rgba(255,255,255,0.02); border-color: #1e1f2b; color: #8a8d98; }
+ .notice.empty { background: rgba(255,255,255,0.02); border-color: #202020; color: #8a8d98; }
.notice.err { background: rgba(255,138,138,0.06); border-color: rgba(255,138,138,0.3); color: #ff8a8a; }
- .detail { background: #0f1018; border: 1.5px solid #1e1f2b; border-radius: 14px; padding: 22px; margin-bottom: 22px; }
+ .detail { background: #101010; border: 1.5px solid #202020; border-radius: 14px; padding: 22px; margin-bottom: 22px; }
.detail h2 { margin: 0 0 6px; font-size: 18px; }
.detail-grid { display: grid; grid-template-columns: 140px 1fr; gap: 6px 14px; font-size: 13px; margin-top: 14px; }
.detail-grid dt { color: #8a8d98; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; padding-top: 2px; }
.detail-grid dd { margin: 0; font-family: ui-monospace, monospace; word-break: break-all; color: #ddd; font-size: 12.5px; line-height: 1.55; }
.detail-grid dd a { color: #9ad4ff; }
- .detail-close { float: right; background: rgba(255,255,255,0.06); color: #eee; border: 1px solid #1e1f2b; border-radius: 7px; padding: 4px 10px; font-size: 12px; cursor: pointer; }
+ .detail-close { float: right; background: rgba(255,255,255,0.06); color: #eee; border: 1px solid #202020; border-radius: 7px; padding: 4px 10px; font-size: 12px; cursor: pointer; }
</style>
</head>
<body>
diff --git a/public/demos/gallery-picker.html b/public/demos/gallery-picker.html
index be5038b43..8288ad061 100644
--- a/public/demos/gallery-picker.html
+++ b/public/demos/gallery-picker.html
@@ -13,7 +13,7 @@
></script>
<style>
:root { color-scheme: dark; }
- body { background: #05060a; color: #eee; font: 15px/1.5 -apple-system, system-ui, sans-serif; margin: 0; }
+ body { background: #060606; color: #eee; font: 15px/1.5 -apple-system, system-ui, sans-serif; margin: 0; }
.stage { max-width: 1280px; margin: 0 auto; padding: 48px 24px 80px; }
.crumb a { color: #8a8d98; text-decoration: none; }
.crumb a:hover { color: #3dc1ff; }
@@ -28,10 +28,10 @@
.search-wrap { position: relative; flex: 1 1 280px; min-width: 220px; }
.search-wrap input {
width: 100%; padding: 10px 36px 10px 14px; border-radius: 9px;
- background: #07080d; color: #eee; border: 1px solid #1e1f2b;
+ background: #080808; color: #eee; border: 1px solid #202020;
font: inherit;
}
- .search-wrap input:focus { outline: none; border-color: #2b2d3e; }
+ .search-wrap input:focus { outline: none; border-color: #2e2e2e; }
.search-clear {
position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
background: transparent; border: 0; color: #8a8d98; cursor: pointer;
@@ -49,11 +49,11 @@
}
.tag-chip {
background: rgba(255,255,255,0.05); color: #cfd1dc;
- border: 1px solid #1e1f2b; border-radius: 999px;
+ border: 1px solid #202020; border-radius: 999px;
padding: 5px 11px; font-size: 12.5px; cursor: pointer;
font: inherit;
}
- .tag-chip:hover { border-color: #2b2d3e; color: #eee; }
+ .tag-chip:hover { border-color: #2e2e2e; color: #eee; }
.tag-chip.is-active { background: #3dc1ff; color: #0a0a0a; border-color: #3dc1ff; }
.row { display: grid; grid-template-columns: 1fr 420px; gap: 24px; align-items: start; }
@@ -67,25 +67,25 @@
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }
.card {
- background: #0f1018; border: 1.5px solid #1e1f2b; border-radius: 12px;
+ background: #101010; border: 1.5px solid #202020; border-radius: 12px;
overflow: hidden; cursor: pointer; display: flex; flex-direction: column;
transition: border-color 120ms ease, transform 120ms ease;
text-align: left;
color: inherit; font: inherit; padding: 0;
}
- .card:hover { border-color: #2b2d3e; }
+ .card:hover { border-color: #2e2e2e; }
.card.is-selected { border-color: #3dc1ff; box-shadow: 0 0 0 1px #3dc1ff inset; }
.thumb {
- aspect-ratio: 1 / 1; background: #14151f; position: relative;
+ aspect-ratio: 1 / 1; background: #161616; position: relative;
display: flex; align-items: center; justify-content: center;
overflow: hidden;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-ph {
width: 100%; height: 100%;
- background: linear-gradient(135deg, #1a1c28 0%, #14151f 100%);
+ background: linear-gradient(135deg, #1c1c1c 0%, #161616 100%);
display: flex; align-items: center; justify-content: center;
- color: #3a3d4e; font-size: 28px;
+ color: #3e3e3e; font-size: 28px;
}
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.card-name {
@@ -97,7 +97,7 @@
.card-tag {
font-size: 11px; color: #8a8d98;
background: rgba(255,255,255,0.04); border-radius: 999px;
- padding: 2px 7px; border: 1px solid #1e1f2b;
+ padding: 2px 7px; border: 1px solid #202020;
}
.card-meta {
display: flex; justify-content: space-between; align-items: center;
@@ -106,15 +106,15 @@
.preview {
position: sticky; top: 20px;
- background: #0f1018; border: 1.5px solid #1e1f2b; border-radius: 14px;
+ background: #101010; border: 1.5px solid #202020; border-radius: 14px;
padding: 16px; display: flex; flex-direction: column; gap: 14px;
}
.preview-stage {
aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden;
- background: #07080d; border: 1px solid #1e1f2b;
+ background: #080808; border: 1px solid #202020;
display: flex; align-items: center; justify-content: center;
}
- model-viewer { width: 100%; height: 100%; --poster-color: transparent; background: #07080d; }
+ model-viewer { width: 100%; height: 100%; --poster-color: transparent; background: #080808; }
.preview-empty { color: #4a4d5e; font-size: 13px; text-align: center; padding: 0 20px; }
.preview h2 {
@@ -123,14 +123,14 @@
}
.preview-sub { color: #8a8d98; font-size: 12.5px; margin: 0; }
- .mode-radio { display: flex; gap: 4px; background: #07080d; border: 1px solid #1e1f2b; border-radius: 9px; padding: 3px; }
+ .mode-radio { display: flex; gap: 4px; background: #080808; border: 1px solid #202020; border-radius: 9px; padding: 3px; }
.mode-radio label {
flex: 1; text-align: center; padding: 7px 4px;
font-size: 12px; color: #8a8d98; cursor: pointer;
border-radius: 7px; transition: background 120ms ease, color 120ms ease;
}
.mode-radio input { display: none; }
- .mode-radio input:checked + span { background: #1e1f2b; color: #eee; }
+ .mode-radio input:checked + span { background: #202020; color: #eee; }
.mode-radio label span { display: block; padding: 7px 4px; border-radius: 7px; }
button.cta {
@@ -143,24 +143,24 @@
.preview-foot {
font-family: ui-monospace, monospace; font-size: 11.5px;
- color: #8a8d98; background: #07080d; border: 1px solid #1e1f2b;
+ color: #8a8d98; background: #080808; border: 1px solid #202020;
border-radius: 8px; padding: 9px 11px; word-break: break-all;
max-height: 110px; overflow: auto; white-space: pre-wrap;
}
.load-more-wrap { display: flex; justify-content: center; margin-top: 22px; }
button.load-more {
- background: rgba(255,255,255,0.06); color: #eee; border: 1px solid #1e1f2b;
+ background: rgba(255,255,255,0.06); color: #eee; border: 1px solid #202020;
border-radius: 9px; padding: 10px 22px; cursor: pointer; font: inherit;
}
- button.load-more:hover { border-color: #2b2d3e; }
+ button.load-more:hover { border-color: #2e2e2e; }
button.load-more:disabled { opacity: 0.5; cursor: not-allowed; }
.sentinel { height: 1px; }
.empty, .error {
grid-column: 1 / -1;
padding: 40px 16px; text-align: center;
- color: #8a8d98; border: 1.5px dashed #1e1f2b; border-radius: 12px;
+ color: #8a8d98; border: 1.5px dashed #202020; border-radius: 12px;
}
.error { color: #ff8888; border-color: #3a1f2b; }
</style>
diff --git a/public/demos/halfbody-xr.html b/public/demos/halfbody-xr.html
index c68cf5f05..89dba420e 100644
--- a/public/demos/halfbody-xr.html
+++ b/public/demos/halfbody-xr.html
@@ -9,7 +9,7 @@
<link rel="stylesheet" href="/nav.css" />
<style>
:root { color-scheme: dark; }
- body { background: #05060a; color: #eee; font: 15px/1.5 -apple-system, system-ui, sans-serif; margin: 0; }
+ body { background: #060606; color: #eee; font: 15px/1.5 -apple-system, system-ui, sans-serif; margin: 0; }
.stage { max-width: 1000px; margin: 0 auto; padding: 48px 24px 80px; }
.crumb a { color: #8a8d98; text-decoration: none; }
.crumb a:hover { color: #3dc1ff; }
@@ -18,7 +18,7 @@
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 720px) { .row { grid-template-columns: 1fr; } }
.viewer {
- background: #0f1018; border: 1.5px solid #1e1f2b; border-radius: 14px;
+ background: #101010; border: 1.5px solid #202020; border-radius: 14px;
min-height: 420px; position: relative; overflow: hidden;
}
.viewer canvas { display: block; width: 100%; height: 100%; }
@@ -30,7 +30,7 @@
.controls {
margin-top: 24px;
display: flex; gap: 10px; flex-wrap: wrap;
- background: #0f1018; border: 1.5px solid #1e1f2b;
+ background: #101010; border: 1.5px solid #202020;
border-radius: 14px; padding: 18px;
}
button {
@@ -43,7 +43,7 @@
button.active { background: #ff6b6b; color: #fff; }
.log {
margin-top: 16px;
- background: #07080d; border: 1px solid #1e1f2b; border-radius: 9px;
+ background: #080808; border: 1px solid #202020; border-radius: 9px;
padding: 12px; font-family: ui-monospace, monospace; font-size: 12px;
line-height: 1.6; color: #8a8d98; max-height: 220px; overflow: auto; white-space: pre-wrap;
}
@@ -52,7 +52,7 @@
.log .info { color: #66d9ef; }
.xr-link {
display: inline-flex; align-items: center; gap: 6px;
- background: linear-gradient(135deg, #1a1b2e, #12132a);
+ background: linear-gradient(135deg, #1c1c1c, #141414);
border: 1.5px solid rgba(61,193,255,0.3); border-radius: 12px;
padding: 14px 20px; text-decoration: none; color: #3dc1ff;
font-weight: 600; font-size: 14px; margin-top: 4px;
diff --git a/public/demos/index.html b/public/demos/index.html
index 3a589d2e9..950639552 100644
--- a/public/demos/index.html
+++ b/public/demos/index.html
@@ -10,7 +10,7 @@
<style>
:root { color-scheme: dark; }
body {
- background: #05060a;
+ background: #060606;
color: #eee;
font: 15px/1.5 -apple-system, system-ui, 'Segoe UI', Roboto, sans-serif;
margin: 0;
@@ -25,13 +25,13 @@
display: block;
padding: 22px 22px 20px;
border-radius: 16px;
- background: #0f1018;
- border: 1.5px solid #1e1f2b;
+ background: #101010;
+ border: 1.5px solid #202020;
text-decoration: none;
color: inherit;
transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
- .demo-card:hover { transform: translateY(-2px); border-color: #2c2d3d; box-shadow: 0 14px 30px rgba(0,0,0,0.4); }
+ .demo-card:hover { transform: translateY(-2px); border-color: #2e2e2e; box-shadow: 0 14px 30px rgba(0,0,0,0.4); }
.demo-card h2 { margin: 0 0 6px; font-size: 17px; font-weight: 600; letter-spacing: -0.005em; }
.demo-card p { margin: 0; color: #8a8d98; font-size: 13.5px; line-height: 1.55; }
.demo-status {
@@ -50,7 +50,7 @@
.demo-status.feature { background: rgba(154,124,255,0.18); color: #b9a4ff; border: 1px solid rgba(154,124,255,0.5); }
.demo-card--feature {
grid-column: 1 / -1;
- background: linear-gradient(135deg, #11121c 0%, #14101e 100%);
+ background: linear-gradient(135deg, #131313 0%, #121212 100%);
border: 1.5px solid rgba(154,124,255,0.35);
box-shadow: 0 0 0 1px rgba(154,124,255,0.08), 0 18px 50px rgba(0,0,0,0.45);
position: relative;
diff --git a/public/demos/lipsync-mic.html b/public/demos/lipsync-mic.html
index 4339b46ea..544287215 100644
--- a/public/demos/lipsync-mic.html
+++ b/public/demos/lipsync-mic.html
@@ -14,7 +14,7 @@
<link rel="stylesheet" href="/nav.css" />
<style>
:root { color-scheme: dark; }
- body { background: #05060a; color: #eee; font: 15px/1.5 -apple-system, system-ui, sans-serif; margin: 0; }
+ body { background: #060606; color: #eee; font: 15px/1.5 -apple-system, system-ui, sans-serif; margin: 0; }
.stage { max-width: 1000px; margin: 0 auto; padding: 48px 24px 80px; }
.crumb a { color: #8a8d98; text-decoration: none; }
.crumb a:hover { color: #3dc1ff; }
@@ -23,12 +23,12 @@
.row { display: grid; grid-template-columns: 1fr 320px; gap: 24px; }
@media (max-width: 800px) { .row { grid-template-columns: 1fr; } }
.viewer-host {
- background: #0f1018; border: 1.5px solid #1e1f2b; border-radius: 14px;
+ background: #101010; border: 1.5px solid #202020; border-radius: 14px;
min-height: 460px; position: relative; overflow: hidden;
}
.viewer-host canvas { width: 100%; height: 100%; display: block; }
.panel {
- background: #0f1018; border: 1.5px solid #1e1f2b; border-radius: 14px;
+ background: #101010; border: 1.5px solid #202020; border-radius: 14px;
padding: 20px; display: flex; flex-direction: column; gap: 12px;
}
button {
@@ -47,7 +47,7 @@
.viseme-row { display: flex; justify-content: space-between; font-size: 12px; color: #8a8d98; }
.viseme-row code { color: #3dc1ff; font-weight: 600; }
.log {
- background: #07080d; border: 1px solid #1e1f2b; border-radius: 9px;
+ background: #080808; border: 1px solid #202020; border-radius: 9px;
padding: 12px; font-family: ui-monospace, monospace; font-size: 12px;
color: #8a8d98; line-height: 1.6;
}
diff --git a/public/demos/lipsync-tts.html b/public/demos/lipsync-tts.html
index d606c591f..190a0a03e 100644
--- a/public/demos/lipsync-tts.html
+++ b/public/demos/lipsync-tts.html
@@ -14,7 +14,7 @@
<link rel="stylesheet" href="/nav.css" />
<style>
:root { color-scheme: dark; }
- body { background: #05060a; color: #eee; font: 15px/1.5 -apple-system, system-ui, sans-serif; margin: 0; }
+ body { background: #060606; color: #eee; font: 15px/1.5 -apple-system, system-ui, sans-serif; margin: 0; }
.stage { max-width: 1080px; margin: 0 auto; padding: 48px 24px 80px; }
.crumb a { color: #8a8d98; text-decoration: none; }
.crumb a:hover { color: #3dc1ff; }
@@ -22,12 +22,12 @@
.sub { color: #8a8d98; max-width: 64ch; margin: 0 0 26px; }
.row { display: grid; grid-template-columns: 1fr 320px; gap: 22px; }
@media (max-width: 880px) { .row { grid-template-columns: 1fr; } }
- .viewer-host { background: #0f1018; border: 1.5px solid #1e1f2b; border-radius: 14px; min-height: 480px; position: relative; overflow: hidden; }
+ .viewer-host { background: #101010; border: 1.5px solid #202020; border-radius: 14px; min-height: 480px; position: relative; overflow: hidden; }
.viewer-host canvas { display: block; width: 100%; height: 100%; }
.viewer-label { position: absolute; top: 12px; left: 12px; background: rgba(0,0,0,0.55); padding: 4px 10px; border-radius: 999px; font-size: 11.5px; color: #3dc1ff; font-weight: 600; }
- .panel { background: #0f1018; border: 1.5px solid #1e1f2b; border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
- .panel textarea { background: #07080d; border: 1px solid #1e1f2b; color: #eee; padding: 11px 12px; border-radius: 9px; font: inherit; min-height: 92px; resize: vertical; }
- .panel select { background: #07080d; border: 1px solid #1e1f2b; color: #eee; padding: 8px 10px; border-radius: 9px; font: inherit; }
+ .panel { background: #101010; border: 1.5px solid #202020; border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
+ .panel textarea { background: #080808; border: 1px solid #202020; color: #eee; padding: 11px 12px; border-radius: 9px; font: inherit; min-height: 92px; resize: vertical; }
+ .panel select { background: #080808; border: 1px solid #202020; color: #eee; padding: 8px 10px; border-radius: 9px; font: inherit; }
.panel label { font-size: 11px; color: #8a8d98; text-transform: uppercase; letter-spacing: 0.08em; }
.panel button { background: #3dc1ff; color: #0a0a0a; border: 0; border-radius: 9px; padding: 11px 14px; font-weight: 600; cursor: pointer; font: inherit; }
.panel button.secondary { background: rgba(255,255,255,0.06); color: #eee; }
@@ -36,7 +36,7 @@
.viseme-row code { color: #3dc1ff; font-weight: 600; }
.bar { display: inline-block; height: 6px; vertical-align: middle; border-radius: 3px; background: rgba(61, 193, 255,0.18); margin-left: 8px; }
.bar > span { display: block; height: 100%; background: #3dc1ff; border-radius: 3px; transition: width 0.04s linear; }
- .log { background: #07080d; border: 1px solid #1e1f2b; border-radius: 9px; padding: 12px; font-family: ui-monospace, monospace; font-size: 11.5px; color: #8a8d98; line-height: 1.55; min-height: 60px; max-height: 140px; overflow-y: auto; }
+ .log { background: #080808; border: 1px solid #202020; border-radius: 9px; padding: 12px; font-family: ui-monospace, monospace; font-size: 11.5px; color: #8a8d98; line-height: 1.55; min-height: 60px; max-height: 140px; overflow-y: auto; }
.log .ok { color: #3dc1ff; }
.log .err { color: #ff8a8a; }
.log .info { color: #9ad4ff; }
diff --git a/public/demos/livepeer-inference.html b/public/demos/livepeer-inference.html
index a179ae5b1..9126913fd 100644
--- a/public/demos/livepeer-inference.html
+++ b/public/demos/livepeer-inference.html
@@ -13,7 +13,7 @@
<link rel="stylesheet" href="/nav.css" />
<style>
:root { color-scheme: dark; }
- body { background: #05060a; color: #eee; font: 15px/1.5 -apple-system, system-ui, 'Segoe UI', Roboto, sans-serif; margin: 0; }
+ body { background: #060606; color: #eee; font: 15px/1.5 -apple-system, system-ui, 'Segoe UI', Roboto, sans-serif; margin: 0; }
.stage { max-width: 1100px; margin: 0 auto; padding: 48px 24px 80px; }
.crumb a { color: #8a8d98; text-decoration: none; }
.crumb a:hover { color: #3dc1ff; }
@@ -22,12 +22,12 @@
.composer {
display: flex; flex-direction: column; gap: 12px;
- background: #0f1018; border: 1.5px solid #1e1f2b; border-radius: 14px;
+ background: #101010; border: 1.5px solid #202020; border-radius: 14px;
padding: 18px; margin-bottom: 18px;
}
.composer textarea {
width: 100%; min-height: 96px; resize: vertical;
- padding: 12px 14px; background: #07080d; border: 1px solid #1e1f2b;
+ padding: 12px 14px; background: #080808; border: 1px solid #202020;
border-radius: 10px; color: #eee; font: inherit; line-height: 1.5;
}
.row {
@@ -35,7 +35,7 @@
}
.row label { font-size: 12px; color: #8a8d98; text-transform: uppercase; letter-spacing: 0.08em; }
.row select, .row input[type="text"] {
- background: #07080d; border: 1px solid #1e1f2b; color: #eee;
+ background: #080808; border: 1px solid #202020; color: #eee;
padding: 8px 10px; border-radius: 9px; font: inherit;
}
button {
@@ -46,7 +46,7 @@
button:disabled { opacity: 0.4; cursor: not-allowed; }
details.drawer {
- background: #0f1018; border: 1.5px solid #1e1f2b; border-radius: 14px;
+ background: #101010; border: 1.5px solid #202020; border-radius: 14px;
padding: 0; margin-bottom: 18px;
}
details.drawer > summary {
@@ -68,7 +68,7 @@
@media (max-width: 820px) { .grid { grid-template-columns: 1fr; } }
.card {
- background: #0f1018; border: 1.5px solid #1e1f2b; border-radius: 14px;
+ background: #101010; border: 1.5px solid #202020; border-radius: 14px;
padding: 18px; display: flex; flex-direction: column; min-height: 320px;
}
.card.claude { border-color: #2c3a5a; }
@@ -95,7 +95,7 @@
.stats strong { color: #3dc1ff; font-weight: 600; font-size: 12px; }
.card-body {
- flex: 1; padding: 14px; background: #07080d; border: 1px solid #1e1f2b;
+ flex: 1; padding: 14px; background: #080808; border: 1px solid #202020;
border-radius: 9px; font-size: 13.5px; line-height: 1.6; color: #ddd;
white-space: pre-wrap; min-height: 160px; max-height: 380px; overflow-y: auto;
}
@@ -115,7 +115,7 @@
@keyframes pulse { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
.log {
- background: #07080d; border: 1px solid #1e1f2b; border-radius: 10px;
+ background: #080808; border: 1px solid #202020; border-radius: 10px;
padding: 12px 14px; font-family: ui-monospace, 'SF Mono', Menlo, monospace;
font-size: 12px; line-height: 1.65; color: #8a8d98;
max-height: 240px; overflow: auto; white-space: pre-wrap;
@@ -127,7 +127,7 @@
.log .dim { color: #565762; }
.footnote {
- margin-top: 28px; padding-top: 16px; border-top: 1px solid #1e1f2b;
+ margin-top: 28px; padding-top: 16px; border-top: 1px solid #202020;
color: #565762; font-size: 12px;
}
.footnote a { color: #8a8d98; text-decoration: none; }
diff --git a/public/demos/login-2.html b/public/demos/login-2.html
index 3b5e32009..bc81f7e6e 100644
--- a/public/demos/login-2.html
+++ b/public/demos/login-2.html
@@ -9,7 +9,7 @@
<style>
:root { color-scheme: dark; }
*, *::before, *::after { box-sizing: border-box; }
- html, body { height: 100%; margin: 0; background: #04050d; color: #eee; font: 15px/1.5 'Inter', -apple-system, system-ui, sans-serif; }
+ html, body { height: 100%; margin: 0; background: #050505; color: #eee; font: 15px/1.5 'Inter', -apple-system, system-ui, sans-serif; }
#avatar-canvas {
position: fixed; inset: 0;
@@ -120,7 +120,7 @@
padding: 14px 24px; border: none; border-radius: 12px;
font: 700 15px/1 'Inter', inherit; cursor: pointer;
background: linear-gradient(160deg, #5ad1ff, #2cb0ef);
- color: #0a0b0f;
+ color: #0b0b0b;
box-shadow: 0 6px 0 0 #005a8a, 0 8px 24px rgba(61, 193, 255,0.25);
transform-origin: bottom center;
will-change: transform;
diff --git a/public/demos/login.html b/public/demos/login.html
index d296cc9ed..b08e62b2e 100644
--- a/public/demos/login.html
+++ b/public/demos/login.html
@@ -9,7 +9,7 @@
<style>
:root { color-scheme: dark; }
*, *::before, *::after { box-sizing: border-box; }
- html, body { height: 100%; margin: 0; background: #04050d; color: #eee; font: 15px/1.5 'Inter', -apple-system, system-ui, sans-serif; }
+ html, body { height: 100%; margin: 0; background: #050505; color: #eee; font: 15px/1.5 'Inter', -apple-system, system-ui, sans-serif; }
#avatar-canvas {
position: fixed; inset: 0;
@@ -120,7 +120,7 @@
padding: 14px 24px; border: none; border-radius: 12px;
font: 700 15px/1 'Inter', inherit; cursor: pointer;
background: linear-gradient(160deg, #5ad1ff, #2cb0ef);
- color: #0a0b0f;
+ color: #0b0b0b;
box-shadow: 0 6px 0 0 #005a8a, 0 8px 24px rgba(61, 193, 255,0.25);
transform-origin: bottom center;
will-change: transform;
diff --git a/public/demos/memory-seed.html b/public/demos/memory-seed.html
index 22c2c0a84..88b593455 100644
--- a/public/demos/memory-seed.html
+++ b/public/demos/memory-seed.html
@@ -10,7 +10,7 @@
<link rel="stylesheet" href="/nav.css" />
<style>
:root { color-scheme: dark; }
- body { background: #05060a; color: #eee; font: 15px/1.5 -apple-system, system-ui, sans-serif; margin: 0; }
+ body { background: #060606; color: #eee; font: 15px/1.5 -apple-system, system-ui, sans-serif; margin: 0; }
.stage { max-width: 1080px; margin: 0 auto; padding: 48px 24px 80px; }
.crumb a { color: #8a8d98; text-decoration: none; }
.crumb a:hover { color: #3dc1ff; }
@@ -21,7 +21,7 @@
@media (max-width: 920px) { .row { grid-template-columns: 1fr; } }
.card {
- background: #0f1018; border: 1.5px solid #1e1f2b; border-radius: 14px;
+ background: #101010; border: 1.5px solid #202020; border-radius: 14px;
padding: 16px; display: flex; flex-direction: column; gap: 12px; min-height: 100%;
}
.card .chip {
@@ -34,10 +34,10 @@
.card .chip.muted { background: rgba(255,255,255,0.05); color: #8a8d98; }
input[type=text] {
width: 100%; padding: 10px 12px; border-radius: 9px;
- background: #07080d; color: #eee; border: 1px solid #1e1f2b;
+ background: #080808; color: #eee; border: 1px solid #202020;
font: inherit; box-sizing: border-box;
}
- input[type=text]:focus { outline: none; border-color: #2a2b3a; }
+ input[type=text]:focus { outline: none; border-color: #2c2c2c; }
.input-row { display: flex; gap: 8px; }
.input-row input { flex: 1; }
button {
@@ -51,12 +51,12 @@
.connector-detail {
display: flex; flex-direction: column; gap: 10px;
- padding: 12px; background: #07080d; border-radius: 9px;
- border: 1px solid #1e1f2b;
+ padding: 12px; background: #080808; border-radius: 9px;
+ border: 1px solid #202020;
}
.connector-detail.empty { color: #555866; font-style: italic; padding: 24px 12px; text-align: center; }
.profile-head { display: flex; gap: 12px; align-items: center; }
- .profile-head img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: #1e1f2b; }
+ .profile-head img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: #202020; }
.profile-head .name { font-weight: 600; }
.profile-head .sub-text { color: #8a8d98; font-size: 12.5px; }
.bio { color: #c8cad6; font-size: 13.5px; line-height: 1.45; }
@@ -64,17 +64,17 @@
.stats { display: flex; gap: 14px; font-size: 12px; color: #8a8d98; }
.stats b { color: #3dc1ff; font-weight: 600; }
.items { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; }
- .items .item { padding: 8px 10px; background: #0a0b12; border-radius: 7px; border: 1px solid #1e1f2b; }
+ .items .item { padding: 8px 10px; background: #0b0b0b; border-radius: 7px; border: 1px solid #202020; }
.items .item b { color: #3dc1ff; font-weight: 600; }
.items .item .meta { color: #8a8d98; font-size: 11.5px; margin-top: 2px; }
.synth-section {
- margin-top: 32px; background: #0f1018; border: 1.5px solid #1e1f2b;
+ margin-top: 32px; background: #101010; border: 1.5px solid #202020;
border-radius: 14px; padding: 22px; display: flex; flex-direction: column; gap: 16px;
}
.synth-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.synth-output {
- background: #07080d; border: 1px solid #1e1f2b; border-radius: 9px;
+ background: #080808; border: 1px solid #202020; border-radius: 9px;
padding: 20px; min-height: 80px;
font-family: ui-serif, Georgia, serif; font-size: 14.5px; line-height: 1.65;
color: #e8ebf0; white-space: pre-wrap;
@@ -91,7 +91,7 @@
.log {
margin-top: 32px;
- background: #07080d; border: 1px solid #1e1f2b; border-radius: 9px;
+ background: #080808; border: 1px solid #202020; border-radius: 9px;
padding: 12px; font-family: ui-monospace, monospace; font-size: 12px;
line-height: 1.6; color: #8a8d98; max-height: 220px; overflow: auto; white-space: pre-wrap;
}
@@ -215,7 +215,7 @@
function renderProfileHead(avatarUrl, name, sub) {
const img = avatarUrl
? `<img src="${escapeHtml(avatarUrl)}" alt="" referrerpolicy="no-referrer" />`
- : `<div style="width:44px;height:44px;border-radius:50%;background:#1e1f2b"></div>`;
+ : `<div style="width:44px;height:44px;border-radius:50%;background:#202020"></div>`;
return `
<div class="profile-head">
${img}
diff --git a/public/demos/persona-extract.html b/public/demos/persona-extract.html
index 9bb8d776e..670db5d11 100644
--- a/public/demos/persona-extract.html
+++ b/public/demos/persona-extract.html
@@ -9,7 +9,7 @@
<link rel="stylesheet" href="/nav.css" />
<style>
:root { color-scheme: dark; }
- body { background: #05060a; color: #eee; font: 15px/1.5 -apple-system, system-ui, sans-serif; margin: 0; }
+ body { background: #060606; color: #eee; font: 15px/1.5 -apple-system, system-ui, sans-serif; margin: 0; }
.stage { max-width: 1080px; margin: 0 auto; padding: 48px 24px 80px; }
.crumb a { color: #8a8d98; text-decoration: none; }
.crumb a:hover { color: #3dc1ff; }
@@ -27,7 +27,7 @@
.col-side { display: flex; flex-direction: column; gap: 20px; }
.panel {
- background: #0f1018; border: 1.5px solid #1e1f2b; border-radius: 14px;
+ background: #101010; border: 1.5px solid #202020; border-radius: 14px;
padding: 20px; display: flex; flex-direction: column; gap: 14px;
}
@@ -38,7 +38,7 @@
.qa textarea {
width: 100%; min-height: 70px; resize: vertical;
padding: 10px 12px; border-radius: 9px;
- background: #07080d; color: #eee; border: 1px solid #1e1f2b;
+ background: #080808; color: #eee; border: 1px solid #202020;
font: inherit;
}
.qa textarea:focus { outline: none; border-color: #3dc1ff; }
@@ -50,7 +50,7 @@
}
button:disabled { opacity: 0.4; cursor: not-allowed; }
button.secondary { background: rgba(255,255,255,0.06); color: #eee; }
- button.ghost { background: transparent; color: #8a8d98; border: 1px solid #1e1f2b; }
+ button.ghost { background: transparent; color: #8a8d98; border: 1px solid #202020; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
@@ -74,7 +74,7 @@
}
.chip.muted {
background: rgba(255,255,255,0.05); color: #cfd2dc;
- border-color: #1e1f2b;
+ border-color: #202020;
}
.badge {
display: inline-block;
@@ -91,7 +91,7 @@
}
pre.raw {
- background: #07080d; border: 1px solid #1e1f2b; border-radius: 9px;
+ background: #080808; border: 1px solid #202020; border-radius: 9px;
padding: 12px; font-family: ui-monospace, monospace; font-size: 12px;
color: #cfd2dc; max-height: 320px; overflow: auto;
white-space: pre-wrap; word-break: break-word;
@@ -117,7 +117,7 @@
}
.bubble.agent {
align-self: flex-start;
- background: #1e1f2b; color: #eee;
+ background: #202020; color: #eee;
border-bottom-left-radius: 4px;
}
.bubble.meta {
@@ -129,13 +129,13 @@
.chat-input { display: flex; gap: 8px; }
.chat-input input {
flex: 1; padding: 10px 12px; border-radius: 9px;
- background: #07080d; color: #eee; border: 1px solid #1e1f2b;
+ background: #080808; color: #eee; border: 1px solid #202020;
font: inherit;
}
.chat-input input:focus { outline: none; border-color: #3dc1ff; }
.log {
- background: #07080d; border: 1px solid #1e1f2b; border-radius: 9px;
+ background: #080808; border: 1px solid #202020; border-radius: 9px;
padding: 12px; font-family: ui-monospace, monospace; font-size: 12px;
line-height: 1.6; color: #8a8d98; max-height: 320px; overflow: auto; white-space: pre-wrap;
}
@@ -145,7 +145,7 @@
.step-marker {
display: inline-block; width: 22px; height: 22px;
- background: #1e1f2b; color: #3dc1ff;
+ background: #202020; color: #3dc1ff;
border-radius: 50%;
text-align: center; line-height: 22px;
font-size: 12px; font-weight: 700;
diff --git a/public/demos/pricing.html b/public/demos/pricing.html
index 2444a0404..7e4162209 100644
--- a/public/demos/pricing.html
+++ b/public/demos/pricing.html
@@ -9,7 +9,7 @@
<style>
:root { color-scheme: dark; }
*, *::before, *::after { box-sizing: border-box; }
- html, body { height: 100%; margin: 0; background: #04050d; color: #eee; font: 15px/1.5 'Inter', -apple-system, system-ui, sans-serif; }
+ html, body { height: 100%; margin: 0; background: #050505; color: #eee; font: 15px/1.5 'Inter', -apple-system, system-ui, sans-serif; }
#avatar-canvas {
position: fixed; inset: 0;
@@ -194,7 +194,7 @@
.tier:hover { transform: rotateX(10deg) translateY(-6px); }
.tier.is-active .cta {
background: linear-gradient(160deg, #5ad1ff, #2cb0ef);
- color: #0a0b0f; border-color: transparent;
+ color: #0b0b0b; border-color: transparent;
box-shadow: 0 4px 0 0 #005a8a;
}
@@ -211,7 +211,7 @@
transform: translateX(-50%) rotateX(-10deg);
transform-origin: 50% 100%;
background: linear-gradient(160deg, #5ad1ff, #2cb0ef);
- color: #0a0b0f;
+ color: #0b0b0b;
font: 700 10.5px/1 'Space Grotesk','Inter',sans-serif;
letter-spacing: 0.12em; text-transform: uppercase;
padding: 6px 12px; border-radius: 999px;
diff --git a/public/demos/react-sdk.html b/public/demos/react-sdk.html
index f8cdaf207..369669093 100644
--- a/public/demos/react-sdk.html
+++ b/public/demos/react-sdk.html
@@ -9,24 +9,24 @@
<link rel="stylesheet" href="/nav.css" />
<style>
:root { color-scheme: dark; }
- body { background: #05060a; color: #eee; font: 15px/1.5 -apple-system, system-ui, sans-serif; margin: 0; }
+ body { background: #060606; color: #eee; font: 15px/1.5 -apple-system, system-ui, sans-serif; margin: 0; }
.stage { max-width: 1000px; margin: 0 auto; padding: 48px 24px 80px; }
.crumb a { color: #8a8d98; text-decoration: none; }
.crumb a:hover { color: #3dc1ff; }
h1 { font-size: 28px; font-weight: 600; letter-spacing: -0.015em; margin: 14px 0 8px; }
.sub { color: #8a8d98; max-width: 64ch; margin: 0 0 30px; }
pre {
- background: #07080d; border: 1px solid #1e1f2b; border-radius: 9px;
+ background: #080808; border: 1px solid #202020; border-radius: 9px;
padding: 14px 16px; font-family: ui-monospace, monospace; font-size: 12.5px;
color: #3dc1ff; overflow-x: auto;
}
.card {
- background: #0f1018; border: 1.5px solid #1e1f2b; border-radius: 14px;
+ background: #101010; border: 1.5px solid #202020; border-radius: 14px;
padding: 22px; margin: 16px 0;
}
.viewer-host {
min-height: 460px;
- background: #0a0b12; border-radius: 10px; overflow: hidden;
+ background: #0b0b0b; border-radius: 10px; overflow: hidden;
margin-top: 14px; height: 460px;
}
.viewer-host three-ws-viewer,
@@ -35,11 +35,11 @@
background: #3dc1ff; color: #0a0a0a; border: 0; border-radius: 9px;
padding: 10px 14px; font-weight: 600; cursor: pointer; font: inherit;
}
- button.secondary { background: #1e1f2b; color: #eee; }
+ button.secondary { background: #202020; color: #eee; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.log {
margin-top: 14px;
- background: #07080d; border: 1px solid #1e1f2b; border-radius: 9px;
+ background: #080808; border: 1px solid #202020; border-radius: 9px;
padding: 12px; font-family: ui-monospace, monospace; font-size: 12px;
color: #8a8d98; max-height: 200px; overflow: auto; white-space: pre-wrap;
}
@@ -47,7 +47,7 @@
.log .err { color: #ff6b6b; }
.log .info { color: #66d9ef; }
input[type="text"] {
- background: #07080d; border: 1px solid #1e1f2b; border-radius: 9px;
+ background: #080808; border: 1px solid #202020; border-radius: 9px;
color: #eee; padding: 9px 12px; font: inherit; min-width: 280px;
}
</style>
diff --git a/public/demos/selfie-fit.html b/public/demos/selfie-fit.html
index 2ce6fb800..c243b7431 100644
--- a/public/demos/selfie-fit.html
+++ b/public/demos/selfie-fit.html
@@ -9,7 +9,7 @@
<link rel="stylesheet" href="/nav.css" />
<style>
:root { color-scheme: dark; }
- body { background: #05060a; color: #eee; font: 15px/1.5 -apple-system, system-ui, sans-serif; margin: 0; }
+ body { background: #060606; color: #eee; font: 15px/1.5 -apple-system, system-ui, sans-serif; margin: 0; }
.stage { max-width: 1100px; margin: 0 auto; padding: 48px 24px 80px; }
.crumb a { color: #8a8d98; text-decoration: none; }
.crumb a:hover { color: #3dc1ff; }
@@ -19,20 +19,20 @@
.grid { display: grid; grid-template-columns: 1fr 360px; gap: 24px; }
@media (max-width: 880px) { .grid { grid-template-columns: 1fr; } }
.panel {
- background: #0f1018; border: 1.5px solid #1e1f2b; border-radius: 14px;
+ background: #101010; border: 1.5px solid #202020; border-radius: 14px;
padding: 22px; display: flex; flex-direction: column; gap: 14px;
}
.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 600px) { .slots { grid-template-columns: 1fr; } }
.slot {
- background: #07080d; border: 1.5px dashed #1e1f2b; border-radius: 12px;
+ background: #080808; border: 1.5px dashed #202020; border-radius: 12px;
aspect-ratio: 3 / 4; position: relative; overflow: hidden; cursor: pointer;
display: flex; align-items: center; justify-content: center;
transition: border-color 0.15s, transform 0.15s;
}
- .slot:hover { border-color: #2c2d3d; }
+ .slot:hover { border-color: #2e2e2e; }
.slot.active { border-color: #3dc1ff; border-style: solid; }
- .slot.filled { border-style: solid; border-color: #2c2d3d; cursor: default; }
+ .slot.filled { border-style: solid; border-color: #2e2e2e; cursor: default; }
.slot .placeholder {
color: #6a6d7c; font-size: 12px; text-align: center; padding: 12px;
display: flex; flex-direction: column; align-items: center; gap: 6px;
@@ -79,11 +79,11 @@
.radios { display: flex; gap: 8px; flex-wrap: wrap; }
.radio {
display: flex; align-items: center; gap: 6px; cursor: pointer;
- background: #07080d; border: 1px solid #1e1f2b; border-radius: 9px;
+ background: #080808; border: 1px solid #202020; border-radius: 9px;
padding: 8px 12px; font-size: 13px;
}
.radio input { accent-color: #3dc1ff; }
- .radio:hover { border-color: #2c2d3d; }
+ .radio:hover { border-color: #2e2e2e; }
.radio.selected { border-color: #3dc1ff; color: #3dc1ff; }
button.submit {
@@ -94,7 +94,7 @@
button.submit:disabled { opacity: 0.35; cursor: not-allowed; }
.log {
- background: #07080d; border: 1px solid #1e1f2b; border-radius: 9px;
+ background: #080808; border: 1px solid #202020; border-radius: 9px;
padding: 12px; font-family: ui-monospace, monospace; font-size: 12px;
line-height: 1.6; color: #8a8d98; max-height: 320px; overflow: auto; white-space: pre-wrap;
}
@@ -111,7 +111,7 @@
.result-card.show { display: block; }
.result-card .url {
font-family: ui-monospace, monospace; font-size: 12px; color: #8a8d98;
- background: #07080d; border: 1px solid #1e1f2b; border-radius: 9px;
+ background: #080808; border: 1px solid #202020; border-radius: 9px;
padding: 10px 12px; margin: 10px 0; overflow-x: auto; white-space: nowrap;
}
@@ -123,8 +123,8 @@
.iframe-modal.open { display: flex; }
.iframe-modal .frame-shell {
position: relative; width: 100%; max-width: 980px; height: 100%; max-height: 720px;
- background: #0a0b12; border-radius: 14px; overflow: hidden;
- border: 1.5px solid #1e1f2b;
+ background: #0b0b0b; border-radius: 14px; overflow: hidden;
+ border: 1.5px solid #202020;
}
.iframe-modal iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.iframe-modal .close {
@@ -1064,7 +1064,7 @@
Mint as agent →
</a>
<a href="${glbUrl}" target="_blank" rel="noopener"
- class="submit" style="text-decoration:none;display:inline-flex;align-items:center;gap:6px;background:#1e1f2b;color:#eee">
+ class="submit" style="text-decoration:none;display:inline-flex;align-items:center;gap:6px;background:#202020;color:#eee">
Download GLB ↓
</a>
</div>
diff --git a/public/demos/skill-royalty.html b/public/demos/skill-royalty.html
index a8acc346a..1e69a2738 100644
--- a/public/demos/skill-royalty.html
+++ b/public/demos/skill-royalty.html
@@ -11,11 +11,11 @@
<style>
:root {
color-scheme: dark;
- --bg: #03040a;
- --surface: #0a0b14;
- --surface-2: #0f1020;
- --border: #1e2035;
- --border-2: #2a2d47;
+ --bg: #040404;
+ --surface: #0b0b0b;
+ --surface-2: #111111;
+ --border: #212121;
+ --border-2: #2e2e2e;
--text: #e8eaf0;
--text-2: #8a8faa;
--text-3: #565870;
@@ -145,7 +145,7 @@
}
.step-btn.active .num {
background: var(--accent);
- color: #03040a;
+ color: #040404;
}
.step-btn.done .num {
background: rgba(74, 222, 128, 0.15);
@@ -215,7 +215,7 @@
.btn:disabled { opacity: 0.35; cursor: not-allowed; }
.btn-primary {
background: var(--accent);
- color: #03040a;
+ color: #040404;
}
.btn-primary:not(:disabled):hover { background: #5dceff; }
.btn-secondary {
diff --git a/public/demos/usdz-ar.html b/public/demos/usdz-ar.html
index da4b81a97..ab8792b7a 100644
--- a/public/demos/usdz-ar.html
+++ b/public/demos/usdz-ar.html
@@ -13,7 +13,7 @@
></script>
<style>
:root { color-scheme: dark; }
- body { background: #05060a; color: #eee; font: 15px/1.5 -apple-system, system-ui, sans-serif; margin: 0; }
+ body { background: #060606; color: #eee; font: 15px/1.5 -apple-system, system-ui, sans-serif; margin: 0; }
.stage { max-width: 1000px; margin: 0 auto; padding: 48px 24px 80px; }
.crumb a { color: #8a8d98; text-decoration: none; }
.crumb a:hover { color: #3dc1ff; }
@@ -22,15 +22,15 @@
.row { display: grid; grid-template-columns: 1fr 360px; gap: 24px; }
@media (max-width: 820px) { .row { grid-template-columns: 1fr; } }
.viewer-card {
- background: #0f1018; border: 1.5px solid #1e1f2b; border-radius: 14px;
+ background: #101010; border: 1.5px solid #202020; border-radius: 14px;
overflow: hidden; aspect-ratio: 1 / 1; min-height: 400px;
}
- model-viewer { width: 100%; height: 100%; --poster-color: transparent; background: #0a0b12; }
- .panel { background: #0f1018; border: 1.5px solid #1e1f2b; border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
+ model-viewer { width: 100%; height: 100%; --poster-color: transparent; background: #0b0b0b; }
+ .panel { background: #101010; border: 1.5px solid #202020; border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
label { font-size: 12.5px; color: #8a8d98; text-transform: uppercase; letter-spacing: 0.06em; }
input[type=text], input[type=file], select {
width: 100%; padding: 10px 12px; border-radius: 9px;
- background: #07080d; color: #eee; border: 1px solid #1e1f2b;
+ background: #080808; color: #eee; border: 1px solid #202020;
font: inherit;
}
button {
@@ -41,7 +41,7 @@
button:disabled { opacity: 0.4; cursor: not-allowed; }
button.secondary { background: rgba(255,255,255,0.06); color: #eee; }
.log {
- background: #07080d; border: 1px solid #1e1f2b; border-radius: 9px;
+ background: #080808; border: 1px solid #202020; border-radius: 9px;
padding: 12px; font-family: ui-monospace, monospace; font-size: 12px;
line-height: 1.6; color: #8a8d98; max-height: 280px; overflow: auto; white-space: pre-wrap;
}
diff --git a/public/demos/voice-clone.html b/public/demos/voice-clone.html
index 64c62a52b..6182a77d1 100644
--- a/public/demos/voice-clone.html
+++ b/public/demos/voice-clone.html
@@ -9,7 +9,7 @@
<link rel="stylesheet" href="/nav.css" />
<style>
:root { color-scheme: dark; }
- body { background: #05060a; color: #eee; font: 15px/1.5 -apple-system, system-ui, sans-serif; margin: 0; }
+ body { background: #060606; color: #eee; font: 15px/1.5 -apple-system, system-ui, sans-serif; margin: 0; }
.stage { max-width: 1000px; margin: 0 auto; padding: 48px 24px 80px; }
.crumb a { color: #8a8d98; text-decoration: none; }
.crumb a:hover { color: #3dc1ff; }
@@ -18,11 +18,11 @@
.row { display: grid; grid-template-columns: 1fr 360px; gap: 24px; }
@media (max-width: 820px) { .row { grid-template-columns: 1fr; } }
.recorder-card {
- background: #0f1018; border: 1.5px solid #1e1f2b; border-radius: 14px;
+ background: #101010; border: 1.5px solid #202020; border-radius: 14px;
padding: 20px; min-height: 400px; display: flex; flex-direction: column; gap: 14px;
}
.wave-wrap {
- background: #07080d; border: 1px solid #1e1f2b; border-radius: 9px;
+ background: #080808; border: 1px solid #202020; border-radius: 9px;
height: 140px; position: relative; overflow: hidden;
}
canvas#wave { display: block; width: 100%; height: 100%; }
@@ -37,13 +37,13 @@
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.panel {
- background: #0f1018; border: 1.5px solid #1e1f2b; border-radius: 14px;
+ background: #101010; border: 1.5px solid #202020; border-radius: 14px;
padding: 20px; display: flex; flex-direction: column; gap: 14px;
}
label { font-size: 12.5px; color: #8a8d98; text-transform: uppercase; letter-spacing: 0.06em; }
input[type=text], textarea {
width: 100%; padding: 10px 12px; border-radius: 9px;
- background: #07080d; color: #eee; border: 1px solid #1e1f2b;
+ background: #080808; color: #eee; border: 1px solid #202020;
font: inherit; box-sizing: border-box;
}
textarea { min-height: 90px; resize: vertical; }
@@ -58,7 +58,7 @@
.btn-row button { flex: 1; min-width: 120px; }
audio { width: 100%; height: 38px; }
.log {
- background: #07080d; border: 1px solid #1e1f2b; border-radius: 9px;
+ background: #080808; border: 1px solid #202020; border-radius: 9px;
padding: 12px; font-family: ui-monospace, monospace; font-size: 12px;
line-height: 1.6; color: #8a8d98; max-height: 280px; overflow: auto; white-space: pre-wrap;
}
@@ -195,7 +195,7 @@
function drawIdle() {
wctx.clearRect(0, 0, wave.clientWidth, wave.clientHeight);
- wctx.strokeStyle = '#1e1f2b';
+ wctx.strokeStyle = '#202020';
wctx.lineWidth = 1;
wctx.beginPath();
wctx.moveTo(0, wave.clientHeight / 2);
@@ -210,7 +210,7 @@
const buf = new Uint8Array(analyser.fftSize);
analyser.getByteTimeDomainData(buf);
const w = wave.clientWidth, h = wave.clientHeight;
- wctx.fillStyle = '#07080d';
+ wctx.fillStyle = '#080808';
wctx.fillRect(0, 0, w, h);
wctx.strokeStyle = '#3dc1ff';
wctx.lineWidth = 1.6;
diff --git a/public/demos/walk-embed-sdk.html b/public/demos/walk-embed-sdk.html
index 861e65259..adb40c54b 100644
--- a/public/demos/walk-embed-sdk.html
+++ b/public/demos/walk-embed-sdk.html
@@ -12,7 +12,7 @@
margin: 0;
padding: 0;
min-height: 100vh;
- background: linear-gradient(180deg, #0b0d12 0%, #14171f 100%);
+ background: linear-gradient(180deg, #0d0d0d 0%, #171717 100%);
color: #e6e9ef;
font-family: 'Inter', system-ui, -apple-system, Segoe UI, sans-serif;
-webkit-font-smoothing: antialiased;
diff --git a/public/discover/detail.css b/public/discover/detail.css
index 386202471..8fd06419a 100644
--- a/public/discover/detail.css
+++ b/public/discover/detail.css
@@ -99,7 +99,7 @@ body.detail-page {
border-radius: 14px;
overflow: hidden;
aspect-ratio: 1 / 1;
- background: linear-gradient(135deg, #111 0%, #1a1a1f 100%);
+ background: linear-gradient(135deg, #111 0%, #1a1a1a 100%);
border: 1px solid rgba(255, 255, 255, 0.07);
display: flex;
align-items: center;
@@ -241,7 +241,7 @@ body.detail-page {
border-radius: 14px;
overflow: hidden;
border: 1px solid rgba(255, 255, 255, 0.07);
- background: #0b0b0e;
+ background: #0b0b0b;
height: 480px;
position: relative;
}
diff --git a/public/embed.js b/public/embed.js
index c7fb830e6..d59f7b477 100644
--- a/public/embed.js
+++ b/public/embed.js
@@ -109,9 +109,9 @@
// spinner skeleton.
var wrapper = document.createElement('div');
var bgCss = poster
- ? 'background:#0c0c12 url(' + JSON.stringify(poster).slice(1, -1) +
+ ? 'background:#0c0c0c url(' + JSON.stringify(poster).slice(1, -1) +
') center/contain no-repeat;'
- : 'background:#0c0c12;';
+ : 'background:#0c0c0c;';
wrapper.style.cssText =
'position:relative;display:inline-block;max-width:100%;' +
'width:' + width + 'px;height:' + height + 'px;' +
diff --git a/public/embed/v1.js b/public/embed/v1.js
index b43b8a801..9b7364f13 100644
--- a/public/embed/v1.js
+++ b/public/embed/v1.js
@@ -108,7 +108,7 @@
var STYLE = ''
+ ':host{display:inline-block;position:relative;width:100%;max-width:100%;'
- + 'background:#0a0a0c;border-radius:14px;overflow:hidden;'
+ + 'background:#0a0a0a;border-radius:14px;overflow:hidden;'
+ 'font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Inter,sans-serif;'
+ 'color:#fff;line-height:1.4;contain:layout style;}'
+ ':host([theme="light"]){background:#f7f7f8;color:#111;}'
@@ -118,7 +118,7 @@
+ 'model-viewer{width:100%;height:100%;display:block;background:transparent;'
+ '--poster-color:transparent;--progress-bar-color:rgba(255,255,255,.5);--progress-bar-height:2px;}'
+ '.poster{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;'
- + 'background:linear-gradient(135deg,#111 0%,#1c1c22 100%);transition:opacity .35s;}'
+ + 'background:linear-gradient(135deg,#111 0%,#1c1c1c 100%);transition:opacity .35s;}'
+ '.poster--gone{opacity:0;pointer-events:none;}'
+ '.chrome{position:absolute;left:10px;right:10px;bottom:10px;display:flex;'
+ 'align-items:center;gap:8px;pointer-events:none;}'
diff --git a/public/embed/v1/preview.html b/public/embed/v1/preview.html
index 4c00838a9..326b018aa 100644
--- a/public/embed/v1/preview.html
+++ b/public/embed/v1/preview.html
@@ -10,11 +10,11 @@
<link rel="canonical" href="https://three.ws/embed/v1/preview" />
<style>
:root {
- --bg: #07070a;
- --panel: #0e0e12;
+ --bg: #070707;
+ --panel: #0e0e0e;
--ink: #f5f5f7;
--ink-dim: #8a8a93;
- --ink-faint: #45454c;
+ --ink-faint: #464646;
--accent: #ffffff;
--ring: rgba(255, 255, 255, 0.08);
--ring-strong: rgba(255, 255, 255, 0.16);
@@ -56,7 +56,7 @@
max-width: 620px; margin: 0 auto 32px; line-height: 1.5;
}
.snippet {
- display: inline-block; text-align: left; background: #0a0a0d;
+ display: inline-block; text-align: left; background: #0a0a0a;
border: 1px solid var(--ring); border-radius: 12px;
padding: 14px 18px; font-family: var(--mono); font-size: 13px;
color: #e8e8ec; max-width: 100%; overflow-x: auto;
@@ -102,19 +102,19 @@
color: var(--ink-dim); letter-spacing: 0.06em; text-transform: uppercase;
}
.surface .bar .dot {
- width: 9px; height: 9px; border-radius: 50%; background: #2a2a31;
+ width: 9px; height: 9px; border-radius: 50%; background: #2b2b2b;
}
.surface .bar .pull { margin-left: auto; color: var(--ink-faint); font-size: 10px; }
/* ---- Surface: Twitter / X ------------------------------------ */
- .x-post { padding: 18px 20px; background: #15171a; color: #e7e9ea; font-family: 'Helvetica Neue', system-ui, sans-serif; }
+ .x-post { padding: 18px 20px; background: #171717; color: #e7e9ea; font-family: 'Helvetica Neue', system-ui, sans-serif; }
.x-row { display: flex; gap: 12px; }
.x-av { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg,#1d9bf0,#7856ff); flex-shrink: 0; }
.x-name { font-weight: 700; font-size: 15px; }
.x-name .handle { color: #71767b; font-weight: 400; margin-left: 6px; }
.x-time { color: #71767b; font-size: 14px; }
.x-body { font-size: 15px; line-height: 1.4; margin: 6px 0 12px; color: #e7e9ea; }
- .x-embed { border-radius: 16px; overflow: hidden; border: 1px solid #2f3336; aspect-ratio: 16 / 10; background: #000; }
+ .x-embed { border-radius: 16px; overflow: hidden; border: 1px solid #323232; aspect-ratio: 16 / 10; background: #000; }
/* ---- Surface: Notion ----------------------------------------- */
.notion { padding: 32px 40px; background: #191919; color: #e7e7e6; font-family: 'Inter', system-ui; }
@@ -123,16 +123,16 @@
.notion .block { border-radius: 4px; aspect-ratio: 4 / 3; overflow: hidden; background: #2a2a2a; }
/* ---- Surface: Discord ---------------------------------------- */
- .discord { background: #313338; padding: 16px 18px; color: #dbdee1; font-family: 'gg sans','Noto Sans',system-ui; }
+ .discord { background: #333333; padding: 16px 18px; color: #dbdee1; font-family: 'gg sans','Noto Sans',system-ui; }
.dc-msg { display: flex; gap: 14px; align-items: flex-start; }
.dc-av { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg,#5865f2,#eb459e); flex-shrink: 0; }
.dc-meta { display: flex; align-items: baseline; gap: 8px; }
.dc-name { color: #f23f43; font-weight: 600; font-size: 16px; }
.dc-time { font-size: 12px; color: #949ba4; }
.dc-body { font-size: 15px; line-height: 1.375; color: #dbdee1; margin: 2px 0 8px; }
- .dc-embed { width: 100%; max-width: 420px; border-left: 4px solid #5865f2; background: #2b2d31; border-radius: 4px; padding: 12px; }
+ .dc-embed { width: 100%; max-width: 420px; border-left: 4px solid #5865f2; background: #2d2d2d; border-radius: 4px; padding: 12px; }
.dc-embed-title { font-size: 14px; font-weight: 600; color: #00a8fc; margin-bottom: 8px; }
- .dc-embed .stage { aspect-ratio: 1 / 1; border-radius: 4px; overflow: hidden; background: #1e1f22; }
+ .dc-embed .stage { aspect-ratio: 1 / 1; border-radius: 4px; overflow: hidden; background: #1f1f1f; }
/* ---- Surface: Shopify product -------------------------------- */
.shop { background: #fff; color: #111; padding: 0; font-family: 'Inter', system-ui; }
@@ -156,22 +156,22 @@
.news .caption { font-family: var(--sans); font-size: 12px; color: #66554a; text-align: center; margin-top: -8px; }
/* ---- Surface: Personal blog ---------------------------------- */
- .blog { background: #0f1419; color: #c9d1d9; padding: 36px 40px; font-family: 'Inter', system-ui; }
+ .blog { background: #131313; color: #c9d1d9; padding: 36px 40px; font-family: 'Inter', system-ui; }
.blog .meta { font-size: 12px; color: #6e7681; margin-bottom: 8px; }
.blog h3 { margin: 0 0 14px; font-size: 24px; font-weight: 700; color: #f0f6fc; letter-spacing: -0.01em; }
.blog p { font-size: 14px; line-height: 1.6; color: #b1bac4; margin: 0 0 16px; }
- .blog .embedded { aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; background: #0a0d11; border: 1px solid #21262d; }
+ .blog .embedded { aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; background: #0d0d0d; border: 1px solid #252525; }
/* ---- Install + docs section --------------------------------- */
- .docs { margin-top: 96px; padding: 48px; border: 1px solid var(--ring); border-radius: var(--radius); background: linear-gradient(180deg, #0c0c10 0%, #07070a 100%); }
+ .docs { margin-top: 96px; padding: 48px; border: 1px solid var(--ring); border-radius: var(--radius); background: linear-gradient(180deg, #0c0c0c 0%, #070707 100%); }
.docs h2 { margin: 0 0 8px; font-size: 26px; font-weight: 600; letter-spacing: -0.01em; }
.docs p.lead { color: var(--ink-dim); margin: 0 0 32px; font-size: 15px; }
.docs-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 800px) { .docs-grid { grid-template-columns: 1fr; } }
- .docs-card { padding: 20px; background: #0a0a0d; border: 1px solid var(--ring); border-radius: 10px; }
+ .docs-card { padding: 20px; background: #0a0a0a; border: 1px solid var(--ring); border-radius: 10px; }
.docs-card h3 { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--ink); }
.docs-card p { margin: 0 0 12px; font-size: 13px; color: var(--ink-dim); line-height: 1.5; }
- pre { margin: 0; padding: 12px 14px; background: #050507; border: 1px solid var(--ring); border-radius: 8px; font-family: var(--mono); font-size: 12px; color: #d6d6dd; overflow-x: auto; }
+ pre { margin: 0; padding: 12px 14px; background: #050505; border: 1px solid var(--ring); border-radius: 8px; font-family: var(--mono); font-size: 12px; color: #d6d6dd; overflow-x: auto; }
footer.foot {
margin-top: 96px; padding-top: 32px; border-top: 1px solid var(--ring);
diff --git a/public/features.css b/public/features.css
index 74af2b1f7..2d0985518 100644
--- a/public/features.css
+++ b/public/features.css
@@ -1388,13 +1388,13 @@
/* Embed code preview */
.feat-card-preview--embed-code {
padding: var(--space-md);
- background: #070709;
+ background: #070707;
}
.feat-code-block {
width: 100%;
max-width: 400px;
- background: #0a0a0f;
+ background: #0a0a0a;
border: 1px solid rgba(255,255,255,0.07);
border-radius: var(--radius-lg);
overflow: hidden;
diff --git a/public/feed.js b/public/feed.js
index edb7658b3..a796d9378 100644
--- a/public/feed.js
+++ b/public/feed.js
@@ -120,6 +120,16 @@
href: function () { return '/play'; },
parts: function (e) { return [bold(e.actor || 'A player'), ' won ', bold(e.reward || 'the jackpot')]; },
},
+ 'mission-complete': {
+ icon: '◈',
+ href: function (e) { return e.coin ? '/play?coin=' + encodeURIComponent(e.coin) : '/play'; },
+ parts: function (e) {
+ var verb = e.coop ? ' pulled off the heist ' : ' completed ';
+ var out = [bold(e.actor || 'A player'), verb, bold(e.mission || 'a job')];
+ if (e.gold) out.push(' for ', bold(Number(e.gold).toLocaleString() + ' gold'));
+ return out;
+ },
+ },
payment: {
icon: '✓',
href: function (e) { return e.explorerUrl || null; },
diff --git a/public/first-meet/index.html b/public/first-meet/index.html
index e81cad816..300663648 100644
--- a/public/first-meet/index.html
+++ b/public/first-meet/index.html
@@ -10,9 +10,9 @@
color-scheme: dark;
--accent: #ffffff;
--accent2: #ffffff;
- --border: #22222e;
+ --border: #232323;
--bg: #000;
- --panel: #14141c;
+ --panel: #151515;
}
* {
box-sizing: border-box;
@@ -55,7 +55,7 @@
height: 100%;
max-height: 600px;
border-radius: 8px;
- background: linear-gradient(135deg, #1a1a24 0%, #0f0f14 100%);
+ background: linear-gradient(135deg, #1b1b1b 0%, #0f0f0f 100%);
}
.preview-col .loading,
.preview-col .error-msg {
diff --git a/public/forever.html b/public/forever.html
index ac957c863..95f9d8db3 100644
--- a/public/forever.html
+++ b/public/forever.html
@@ -19,13 +19,13 @@
<style>
:root {
--bg: #000000;
- --bg-2: #07070a;
+ --bg-2: #070707;
--ink: #ffffff;
--ink-2: #c5c8d4;
--ink-3: #7a7e8e;
--ink-4: #4a4d5a;
- --line: #1a1a22;
- --line-strong: #2a2a36;
+ --line: #1b1b1b;
+ --line-strong: #2b2b2b;
--btc: #f7931a;
--btc-glow: rgba(247, 147, 26, 0.35);
--ok: #4ade80;
diff --git a/public/galaxy.css b/public/galaxy.css
index 1778a2e82..efa7b6892 100644
--- a/public/galaxy.css
+++ b/public/galaxy.css
@@ -14,7 +14,7 @@
.gx-body {
margin: 0;
- background: #05060a;
+ background: #060606;
color: var(--ink);
overflow: hidden;
overscroll-behavior: none;
@@ -36,7 +36,7 @@
background:
radial-gradient(1200px 800px at 70% -10%, rgba(15, 98, 254, 0.16), transparent 60%),
radial-gradient(900px 700px at 10% 110%, rgba(120, 169, 255, 0.10), transparent 55%),
- #05060a;
+ #060606;
}
.gx-canvas {
position: absolute;
diff --git a/public/gallery/gallery.css b/public/gallery/gallery.css
index 887b3248a..ec8e9500d 100644
--- a/public/gallery/gallery.css
+++ b/public/gallery/gallery.css
@@ -27,7 +27,7 @@ body.gallery-page {
rgba(236, 72, 153, 0.12),
transparent 60%
),
- #05050b;
+ #050505;
color: #fff;
padding: 0;
}
@@ -128,9 +128,11 @@ body.gallery-page {
border: 1px solid rgba(255, 255, 255, 0.18);
background: rgba(255, 255, 255, 0.05);
color: rgba(255, 255, 255, 0.9);
+ font-family: inherit;
font-size: 13.5px;
font-weight: 600;
text-decoration: none;
+ cursor: pointer;
transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.gallery-hero-btn:hover {
diff --git a/public/gallery/index.html b/public/gallery/index.html
index 70809c2cd..f30d00fe3 100644
--- a/public/gallery/index.html
+++ b/public/gallery/index.html
@@ -79,7 +79,8 @@
</div>
<div class="gallery-hero-ctas">
- <a class="gallery-hero-btn gallery-hero-btn--primary" href="/create/selfie">Create from selfie</a>
+ <button type="button" class="gallery-hero-btn gallery-hero-btn--primary" data-create-from-template>Create from template</button>
+ <a class="gallery-hero-btn" href="/create/selfie">Create from selfie</a>
<a class="gallery-hero-btn" href="/dashboard/avatars">Upload avatar</a>
</div>
@@ -148,6 +149,8 @@
<!-- Sets window.twsOnchainBadge for the static gallery.js (bundled by Vite). -->
<script type="module">import '/src/shared/onchain-badge.js';</script>
+ <!-- Wires the hero "Create from template" button. -->
+ <script type="module">import '/src/shared/template-picker.js';</script>
<script type="module" src="/gallery/gallery.js"></script>
<script src="/brand.js" defer></script>
</body>
diff --git a/public/getting-started.css b/public/getting-started.css
index 61b3c3250..d9e74e8b5 100644
--- a/public/getting-started.css
+++ b/public/getting-started.css
@@ -66,7 +66,7 @@
position: absolute;
inset: 2px;
border-radius: 50%;
- background: #14151c;
+ background: #151515;
}
.twg-pill-glyph {
position: relative;
@@ -400,7 +400,7 @@
.twg-btn-primary {
flex: 1;
background: var(--accent, #fff);
- color: #0b0c10;
+ color: #0c0c0c;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.twg-btn-primary:hover { transform: translateY(-1px); opacity: 0.92; }
diff --git a/public/home.css b/public/home.css
index aef3adf2a..e39be948c 100644
--- a/public/home.css
+++ b/public/home.css
@@ -267,7 +267,7 @@
z-index: 30;
background:
radial-gradient(ellipse at 0% 0%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
- radial-gradient(ellipse at 100% 100%, rgba(140, 80, 220, 0.05) 0%, transparent 50%), #06070b;
+ radial-gradient(ellipse at 100% 100%, rgba(140, 80, 220, 0.05) 0%, transparent 50%), #070707;
padding: clamp(5rem, 10vh, 9rem) var(--space-lg);
max-width: 1200px;
margin: 0 auto;
@@ -595,7 +595,7 @@
}
.h-dev-code {
- background: #0a0a0e;
+ background: #0a0a0a;
border: 1px solid rgba(255, 255, 255, 0.07);
border-radius: var(--radius-sm);
overflow: hidden;
@@ -1703,7 +1703,7 @@
.home-parallax .h-footer {
position: relative;
z-index: 30;
- background: #06070b;
+ background: #070707;
}
.home-parallax .h-section-dark {
@@ -2500,7 +2500,7 @@
background:
radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.18) 0%, transparent 50%),
radial-gradient(ellipse at 50% 100%, rgba(140, 80, 220, 0.12) 0%, transparent 50%),
- linear-gradient(180deg, rgba(26, 14, 8, 0.6) 0%, #06070b 80%);
+ linear-gradient(180deg, rgba(26, 14, 8, 0.6) 0%, #070707 80%);
overflow: hidden;
}
diff --git a/public/ibm.css b/public/ibm.css
index d8e093abf..d0563c384 100644
--- a/public/ibm.css
+++ b/public/ibm.css
@@ -37,7 +37,7 @@
* --brand-blue-stroke (the IBM blue variant). Use --brand-blue-stroke
* explicitly where blue borders are intentional. */
- --bg: #05070d;
+ --bg: #070707;
--panel: var(--surface-1);
--panel-solid: var(--surface-1);
--panel-2: var(--surface-2);
@@ -95,7 +95,7 @@
============================================================================= */
.ibm-scope, body.ibm {
- background: #05070d;
+ background: #070707;
color: var(--ink);
font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
-webkit-font-smoothing: antialiased;
diff --git a/public/launch-week.html b/public/launch-week.html
index 2dd17b812..7effee1f3 100644
--- a/public/launch-week.html
+++ b/public/launch-week.html
@@ -9,11 +9,11 @@
<style>
:root {
--bg: #0a0a0b;
- --bg-elevated: #111113;
- --bg-card: #161619;
- --bg-card-hover: #1c1c20;
- --border: #2a2a2f;
- --border-accent: #3d3d44;
+ --bg-elevated: #111111;
+ --bg-card: #161616;
+ --bg-card-hover: #1c1c1c;
+ --border: #2a2a2a;
+ --border-accent: #3e3e3e;
--text: #e8e8ed;
--text-muted: #8a8a96;
--text-dim: #5c5c66;
@@ -1524,7 +1524,7 @@
<stop offset="100%" stop-color="#9945FF" stop-opacity="0.6"/>
</linearGradient>
</defs>
- <g stroke="#2a2a2f" stroke-width="1">
+ <g stroke="#2a2a2a" stroke-width="1">
<line x1="50" y1="40" x2="690" y2="40" stroke-dasharray="2 4"/>
<line x1="50" y1="100" x2="690" y2="100" stroke-dasharray="2 4"/>
<line x1="50" y1="160" x2="690" y2="160" stroke-dasharray="2 4"/>
@@ -1536,7 +1536,7 @@
<text x="42" y="164" text-anchor="end">15K</text>
<text x="42" y="224" text-anchor="end">0</text>
</g>
- <line x1="50" y1="220" x2="690" y2="220" stroke="#3d3d44" stroke-width="1"/>
+ <line x1="50" y1="220" x2="690" y2="220" stroke="#3e3e3e" stroke-width="1"/>
<g>
<rect x="69" y="124" width="38" height="96" fill="url(#barGrad)" rx="2"/>
<rect x="125" y="148" width="38" height="72" fill="url(#barGrad)" rx="2"/>
@@ -1587,7 +1587,7 @@
<stop offset="100%" stop-color="#9945FF" stop-opacity="0.6"/>
</linearGradient>
</defs>
- <g stroke="#2a2a2f" stroke-width="1">
+ <g stroke="#2a2a2a" stroke-width="1">
<line x1="50" y1="40" x2="490" y2="40" stroke-dasharray="2 4"/>
<line x1="50" y1="100" x2="490" y2="100" stroke-dasharray="2 4"/>
<line x1="50" y1="160" x2="490" y2="160" stroke-dasharray="2 4"/>
@@ -1599,7 +1599,7 @@
<text x="42" y="164" text-anchor="end">342</text>
<text x="42" y="224" text-anchor="end">0</text>
</g>
- <line x1="50" y1="220" x2="490" y2="220" stroke="#3d3d44" stroke-width="1"/>
+ <line x1="50" y1="220" x2="490" y2="220" stroke="#3e3e3e" stroke-width="1"/>
<g>
<rect x="63" y="216" width="26" height="4" fill="url(#followGrad)" rx="2"/>
<rect x="103" y="218" width="26" height="2" fill="url(#followGrad)" rx="2"/>
diff --git a/public/lobehub/iframe/boot.js b/public/lobehub/iframe/boot.js
index a24cebefa..adac72227 100644
--- a/public/lobehub/iframe/boot.js
+++ b/public/lobehub/iframe/boot.js
@@ -388,7 +388,7 @@ function onMessage(ev) {
// ── Theme ─────────────────────────────────────────────────────────────────────
function applyTheme({ mode, accent } = {}) {
- if (mode === 'dark') document.body.style.background = '#0b0d10';
+ if (mode === 'dark') document.body.style.background = '#0d0d0d';
else if (mode === 'light') document.body.style.background = '#f5f5f5';
else if (mode === 'transparent') document.body.style.background = 'transparent';
if (accent) document.documentElement.style.setProperty('--agent-accent', accent);
diff --git a/public/login.html b/public/login.html
index bbc0e817e..9b68b1ce8 100644
--- a/public/login.html
+++ b/public/login.html
@@ -77,8 +77,8 @@
width: auto;
height: auto;
padding: 0.5rem 1rem;
- background: #05060a;
- border: 1px solid #1e1f2b;
+ background: #060606;
+ border: 1px solid #202020;
border-radius: 6px;
z-index: 9999;
}
diff --git a/public/marketplace-v2.css b/public/marketplace-v2.css
index 8d883b1fb..3404f316f 100644
--- a/public/marketplace-v2.css
+++ b/public/marketplace-v2.css
@@ -70,7 +70,7 @@ body.market-page > #footer-container {
/* ── Live chat preview on agent detail ─────────────────────────────────── */
.market-preview-card {
margin-top: 16px;
- background: linear-gradient(180deg, #0e0e10, var(--bg-0));
+ background: linear-gradient(180deg, #0e0e0e, var(--bg-0));
border: 1px solid #1f1f1f;
border-radius: 16px;
padding: 18px;
@@ -132,7 +132,7 @@ body.market-page > #footer-container {
border-color: #fafafa;
}
.market-preview-msg.assistant .market-preview-bubble {
- background: #131316;
+ background: #131313;
}
.market-preview-bubble.streaming::after {
content: '▌';
@@ -151,7 +151,7 @@ body.market-page > #footer-container {
}
.market-preview-input {
flex: 1;
- background: #0d0d0f;
+ background: #0d0d0d;
border: 1px solid #2a2a2a;
border-radius: 10px;
padding: 10px 14px;
@@ -441,7 +441,7 @@ body.market-page > #footer-container {
background: none;
border: none;
font-size: 22px;
- color: #3f3f46;
+ color: #404040;
cursor: pointer;
padding: 2px;
line-height: 1;
@@ -475,7 +475,7 @@ body.market-page > #footer-container {
#d-rating-input textarea:focus,
#d-review-body:focus,
#d-review-body-edit:focus {
- border-color: #3f3f46;
+ border-color: #404040;
}
.submit-review {
margin-top: 10px;
@@ -529,7 +529,7 @@ body.market-page > #footer-container {
}
.review-edit-btn:hover { border-color: #4a4a4a; color: #fafafa; }
.review-delete-btn:hover { border-color: #7f1d1d; color: var(--danger); }
-.review-cancel-btn:hover { border-color: #3f3f46; color: #d4d4d8; }
+.review-cancel-btn:hover { border-color: #404040; color: #d4d4d8; }
.review-edit-form {
margin-top: 12px;
}
@@ -625,7 +625,7 @@ body.market-page > #footer-container {
}
.reviews-empty-hint {
font-size: 12px;
- color: #3f3f46;
+ color: #404040;
}
.review-skeleton-line {
height: 12px;
diff --git a/public/marketplace.css b/public/marketplace.css
index 336b62afc..f73464c45 100644
--- a/public/marketplace.css
+++ b/public/marketplace.css
@@ -289,7 +289,7 @@ body.market-page > header {
background:
radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.12), transparent 65%),
radial-gradient(circle at 50% 95%, rgba(255, 255, 255, 0.08), transparent 70%),
- linear-gradient(180deg, #0a0a0d, #050507) center/cover no-repeat;
+ linear-gradient(180deg, #0a0a0a, #050505) center/cover no-repeat;
border-bottom: 1px solid var(--card-border);
border-top-left-radius: var(--card-radius);
border-top-right-radius: var(--card-radius);
@@ -308,7 +308,7 @@ body.market-page > header {
background:
radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.1), transparent 65%),
radial-gradient(circle at 50% 95%, rgba(255, 255, 255, 0.06), transparent 70%),
- linear-gradient(180deg, #0a0a0d, #050507);
+ linear-gradient(180deg, #0a0a0a, #050505);
}
.market-card-agent .thumb .mv-placeholder-initial {
font-family: 'Space Grotesk', sans-serif;
@@ -485,7 +485,7 @@ body.market-page > header {
}
.market-avatar-detail-stage {
position: relative;
- background: linear-gradient(180deg, #0a0a0c 0%, #0d0d10 100%);
+ background: linear-gradient(180deg, #0a0a0a 0%, #0d0d0d 100%);
border: 1px solid var(--stroke);
border-radius: var(--radius-lg);
overflow: hidden;
@@ -962,7 +962,7 @@ body.market-page > header {
/* Onchain agent detail */
.onchain-detail-stage {
position: relative;
- background: linear-gradient(180deg, #0a0a0c 0%, #0d0d10 100%);
+ background: linear-gradient(180deg, #0a0a0a 0%, #0d0d0d 100%);
border: 1px solid var(--stroke);
border-radius: var(--radius-lg);
min-height: 380px;
@@ -1419,7 +1419,7 @@ body.market-page > header {
}
.skill-btn {
- background-color: #374151;
+ background-color: #404040;
color: #d1d5db;
border: none;
border-radius: var(--radius-sm);
@@ -1431,7 +1431,7 @@ body.market-page > header {
}
.skill-btn:disabled {
- background-color: #1f2937;
+ background-color: #282828;
color: #6b7280;
cursor: not-allowed;
}
@@ -3017,7 +3017,7 @@ body.market-page > header {
.market-card-avatar .thumb {
position: relative;
overflow: hidden;
- background: #0a0a0c;
+ background: #0a0a0a;
}
.market-card-avatar .thumb .mv-placeholder {
@@ -3033,7 +3033,7 @@ body.market-page > header {
background:
radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.08), transparent 65%),
radial-gradient(circle at 50% 90%, rgba(255, 255, 255, 0.05), transparent 70%),
- linear-gradient(180deg, #0b0b10, #050507);
+ linear-gradient(180deg, #0b0b0b, #050505);
transition: opacity 0.5s ease;
}
.market-card-avatar.mv-loaded .thumb .mv-placeholder {
@@ -3081,7 +3081,7 @@ body.market-page > header {
width: 100%;
height: 100%;
background: transparent;
- --poster-color: #0a0a0c;
+ --poster-color: #0a0a0a;
opacity: 0;
transition: opacity 0.4s ease;
z-index: 0;
@@ -3370,7 +3370,7 @@ body.market-page > header {
background:
radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.06), transparent 65%),
radial-gradient(circle at 50% 90%, rgba(255, 255, 255, 0.04), transparent 70%),
- linear-gradient(180deg, #0b0b10, #050507);
+ linear-gradient(180deg, #0b0b0b, #050505);
}
.market-card-avatar .thumb-fallback-initial {
font-size: 48px;
@@ -3392,7 +3392,7 @@ body.market-page > header {
justify-content: center;
background:
radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.06), transparent 65%),
- linear-gradient(180deg, #0b0b10, #050507);
+ linear-gradient(180deg, #0b0b0b, #050505);
}
.market-card-avatar .card-img-fallback::after {
content: '◎';
@@ -3407,7 +3407,7 @@ body.market-page > header {
justify-content: center;
background:
radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.08), transparent 65%),
- linear-gradient(180deg, #0a0a0d, #050507);
+ linear-gradient(180deg, #0a0a0a, #050505);
}
.market-card-agent .card-img-fallback::after {
content: '◎';
diff --git a/public/my-agents/my-agents.css b/public/my-agents/my-agents.css
index bc7c217f5..404222a95 100644
--- a/public/my-agents/my-agents.css
+++ b/public/my-agents/my-agents.css
@@ -441,9 +441,9 @@ a:hover {
flex-shrink: 0;
}
.my-agents-card__pill--chain {
- background: #16202c;
+ background: #1f1f1f;
color: #8fc3ff;
- border-color: #1f3a52;
+ border-color: #363636;
}
.my-agents-card__pill--source {
background: var(--bg-1);
diff --git a/public/nav.css b/public/nav.css
index 4ef859c4c..e6f67a660 100644
--- a/public/nav.css
+++ b/public/nav.css
@@ -144,7 +144,7 @@
.notif-panel {
position: fixed; z-index: 9999;
width: 360px; max-height: 480px;
- background: #0d0d0f;
+ background: #0d0d0d;
border: 1px solid rgba(255,255,255,0.12);
border-radius: 12px;
box-shadow: 0 8px 40px rgba(0,0,0,0.6), 0 2px 8px rgba(0,0,0,0.4);
diff --git a/public/next/index.html b/public/next/index.html
index 1bb57e9ce..eff458f30 100644
--- a/public/next/index.html
+++ b/public/next/index.html
@@ -18,7 +18,7 @@
--ink-3: #6b6b6b;
--ink-4: #2a2a2a;
--bg: #000;
- --panel: #0a0a0c;
+ --panel: #0a0a0a;
--mono: ui-monospace, 'JetBrains Mono', SFMono-Regular, Menlo, Consolas, monospace;
--display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
@@ -129,7 +129,7 @@
.stage {
position: relative;
border-radius: 24px;
- background: radial-gradient(ellipse at 50% 65%, #141418 0%, #050507 70%);
+ background: radial-gradient(ellipse at 50% 65%, #141414 0%, #050505 70%);
border: 1px solid var(--ink-4);
overflow: hidden;
aspect-ratio: 4 / 5;
@@ -215,7 +215,7 @@
border-radius: 8px;
border: 1px solid var(--ink-4);
overflow: hidden;
- background: radial-gradient(ellipse at 50% 70%, #18181c 0%, #050507 80%);
+ background: radial-gradient(ellipse at 50% 70%, #181818 0%, #050505 80%);
}
.tile three-d { width: 100%; height: 100%; display: block; }
.tile .cap {
@@ -235,7 +235,7 @@
}
@media (max-width: 920px) { .install-wrap { grid-template-columns: 1fr; } }
.code {
- background: #060608; border: 1px solid var(--ink-4); border-radius: 8px;
+ background: #060606; border: 1px solid var(--ink-4); border-radius: 8px;
padding: 24px 28px;
font-family: var(--mono); font-size: 13px; line-height: 1.8;
color: #d8d8de; overflow: auto;
diff --git a/public/p/index.html b/public/p/index.html
index c7e6ec163..6c4b26fb6 100644
--- a/public/p/index.html
+++ b/public/p/index.html
@@ -11,7 +11,7 @@
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
font: 16px/1.5 system-ui, -apple-system, 'Segoe UI', sans-serif;
- color: var(--page-fg, #0f172a);
+ color: var(--page-fg, #171717);
background: var(--page-bg, #ffffff);
transition: background 0.2s, color 0.2s;
}
@@ -20,7 +20,7 @@
display: flex;
flex-direction: column;
}
- .page.dark { --page-bg: #0b0d10; --page-fg: #f4f4f5; }
+ .page.dark { --page-bg: #0d0d0d; --page-fg: #f4f4f5; }
header.page-header {
padding: 22px 32px;
display: flex;
@@ -96,7 +96,7 @@
position: relative;
min-height: 480px;
border-radius: 22px;
- background: linear-gradient(160deg, var(--brand, #ffffff) 0%, #1e1b4b 100%);
+ background: linear-gradient(160deg, var(--brand, #ffffff) 0%, #1f1f1f 100%);
overflow: hidden;
box-shadow: 0 30px 80px -30px rgba(0,0,0,0.4);
}
@@ -124,7 +124,7 @@
}
.modal {
background: #fff;
- color: #0f172a;
+ color: #171717;
border-radius: 16px;
padding: 28px;
max-width: 460px;
@@ -150,7 +150,7 @@
.modal-actions button {
padding: 10px 16px; font: inherit; font-size: 14px; border-radius: 8px; cursor: pointer; border: 0;
}
- .modal-actions .secondary { background: #f1f5f9; color: #0f172a; }
+ .modal-actions .secondary { background: #f1f5f9; color: #171717; }
.modal-actions .primary { background: var(--brand, #ffffff); color: #fff; font-weight: 600; }
.status-msg { font-size: 13px; padding: 8px 0; min-height: 20px; }
.status-msg.ok { color: #16a34a; }
diff --git a/public/pay/c/index.html b/public/pay/c/index.html
index efe7c83cf..64c1a96a0 100644
--- a/public/pay/c/index.html
+++ b/public/pay/c/index.html
@@ -5,11 +5,11 @@
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Checkout · x402</title>
<meta name="description" content="Hosted x402 payment checkout. Pay with USDC on Base or Solana." />
-<meta name="theme-color" content="#0a0b10" />
+<meta name="theme-color" content="#0b0b0b" />
<style>
:root {
--bg: #fafbfc;
- --text: #0d0f15;
+ --text: #0f0f0f;
--muted: #5a6378;
--muted-2: #8a90a8;
--border: #e2e5ec;
@@ -19,12 +19,12 @@
}
@media (prefers-color-scheme: dark) {
:root {
- --bg: #0a0b10;
+ --bg: #0b0b0b;
--text: #f0f2f8;
--muted: #b0b6cc;
--muted-2: #6b7088;
- --border: #232636;
- --panel: #14161f;
+ --border: #272727;
+ --panel: #161616;
}
}
* { box-sizing: border-box; }
@@ -74,7 +74,7 @@
.pay-btn {
width: 100%; padding: 16px;
- background: #0d0f15; color: #fff;
+ background: #0f0f0f; color: #fff;
border: none; border-radius: 12px;
font-size: 15px; font-weight: 700; font-family: inherit;
cursor: pointer; letter-spacing: -0.005em;
@@ -82,10 +82,10 @@
margin-top: 8px;
}
@media (prefers-color-scheme: dark) {
- .pay-btn { background: #ffffff; color: #0d0f15; }
+ .pay-btn { background: #ffffff; color: #0f0f0f; }
.pay-btn:hover:not(:disabled) { background: #e7e9ee; }
}
- .pay-btn:hover:not(:disabled) { background: #1a1d28; }
+ .pay-btn:hover:not(:disabled) { background: #1d1d1d; }
.pay-btn:active:not(:disabled) { transform: translateY(1px); }
.pay-btn:disabled { opacity: 0.5; cursor: not-allowed; }
diff --git a/public/pay/calls/index.html b/public/pay/calls/index.html
index 2ed25a9ab..c038ddb95 100644
--- a/public/pay/calls/index.html
+++ b/public/pay/calls/index.html
@@ -12,13 +12,13 @@
<meta property="og:image:height" content="630" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:image" content="" id="twImage" />
-<meta name="theme-color" content="#0a0b10" />
+<meta name="theme-color" content="#0b0b0b" />
<script type="module" src="https://ajax.googleapis.com/ajax/libs/model-viewer/4.0.0/model-viewer.min.js"></script>
<style>
:root {
- --bg: #0a0b10; --bg-2: #0f1119;
- --panel: #14161f; --panel-2: #1a1d29;
- --border: #232636; --border-strong: #2e3447;
+ --bg: #0b0b0b; --bg-2: #111111;
+ --panel: #161616; --panel-2: #1d1d1d;
+ --border: #272727; --border-strong: #343434;
--text: #e6e8f0; --muted: #8a90a8;
--accent: #ffffff; --accent-2: #22d3ee;
--green: #22c55e; --orange: #f59e0b; --red: #ef4444;
@@ -110,7 +110,7 @@
.chip .k { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.chip .v { font-size: 16px; font-family: var(--mono); margin-top: 2px; }
- .mv-block { margin-top: 16px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: linear-gradient(180deg, #1a1d29, #0a0b10); }
+ .mv-block { margin-top: 16px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: linear-gradient(180deg, #1d1d1d, #0b0b0b); }
.mv-block model-viewer { width: 100%; height: 420px; display: block; --progress-bar-color: var(--accent); }
.mv-block .caption { padding: 8px 14px; font-size: 11px; color: var(--muted); border-top: 1px solid var(--border); font-family: var(--mono); }
diff --git a/public/pay/index.html b/public/pay/index.html
index 6e3d7f45d..7fddf1c34 100644
--- a/public/pay/index.html
+++ b/public/pay/index.html
@@ -14,17 +14,17 @@
<meta property="og:image:height" content="630" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:image" content="https://three.ws/api/x402-pay/og" />
-<meta name="theme-color" content="#0a0b10" />
+<meta name="theme-color" content="#0b0b0b" />
<link rel="preconnect" href="https://api.mainnet-beta.solana.com" />
<script type="module" src="https://ajax.googleapis.com/ajax/libs/model-viewer/4.0.0/model-viewer.min.js"></script>
<style>
:root {
- --bg: #0a0b10;
- --bg-2: #0f1119;
- --panel: #14161f;
- --panel-2: #1a1d29;
- --border: #232636;
- --border-strong: #2e3447;
+ --bg: #0b0b0b;
+ --bg-2: #111111;
+ --panel: #161616;
+ --panel-2: #1d1d1d;
+ --border: #272727;
+ --border-strong: #343434;
--text: #e6e8f0;
--muted: #8a90a8;
--accent: #ffffff;
@@ -94,7 +94,7 @@
animation: flash 0.6s ease-out;
}
@keyframes flash {
- 0% { background: var(--accent-2); color: #0a0b10; }
+ 0% { background: var(--accent-2); color: #0b0b0b; }
100% { background: var(--panel); }
}
@@ -127,10 +127,10 @@
display: flex; align-items: center; justify-content: center;
font-size: 13px; font-weight: 700;
}
- .msg.user .av { background: #2a2f44; color: #fff; }
+ .msg.user .av { background: #2f2f2f; color: #fff; }
.msg.agent .av {
background: conic-gradient(from 200deg, var(--accent), var(--accent-2));
- color: #0a0b10;
+ color: #0b0b0b;
}
.msg .body {
flex: 1; min-width: 0;
@@ -237,7 +237,7 @@
animation: spin 1.2s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
- .step.done .icon { background: var(--green); color: #0a0b10; border-color: var(--green); animation: none; }
+ .step.done .icon { background: var(--green); color: #0b0b0b; border-color: var(--green); animation: none; }
.step.error { border-color: var(--red); }
.step.error .icon { background: var(--red); color: #fff; border-color: var(--red); animation: none; }
.step .label { font-weight: 500; }
@@ -355,7 +355,7 @@
.avatar-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.avatar-card model-viewer {
width: 100%; height: 140px;
- background: linear-gradient(180deg, #1a1d29, #0a0b10);
+ background: linear-gradient(180deg, #1d1d1d, #0b0b0b);
--poster-color: transparent;
}
.avatar-card .body { padding: 8px 10px; }
@@ -367,7 +367,7 @@
margin-top: 10px;
border: 1px solid var(--border);
border-radius: 10px; overflow: hidden;
- background: linear-gradient(180deg, #1a1d29, #0a0b10);
+ background: linear-gradient(180deg, #1d1d1d, #0b0b0b);
}
.mv-block model-viewer {
width: 100%; height: 320px; display: block;
@@ -473,7 +473,7 @@
width: 24px; height: 24px; flex: 0 0 auto;
border-radius: 50%;
background: conic-gradient(from 200deg, var(--accent), var(--accent-2));
- color: #0a0b10; font-weight: 700;
+ color: #0b0b0b; font-weight: 700;
display: flex; align-items: center; justify-content: center;
font-size: 13px;
}
@@ -535,7 +535,7 @@
width: 24px; height: 24px; border-radius: 6px;
background: conic-gradient(from 200deg, var(--accent), var(--accent-2));
display: flex; align-items: center; justify-content: center;
- font-size: 10px; font-weight: 700; color: #0a0b10; flex: 0 0 auto;
+ font-size: 10px; font-weight: 700; color: #0b0b0b; flex: 0 0 auto;
}
.agent-card .av img { width: 24px; height: 24px; border-radius: 6px; object-fit: cover; }
.agent-card .name { font-weight: 600; }
@@ -618,7 +618,7 @@
.bsc-panel .bsc-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.bsc-connect {
background: linear-gradient(135deg, #F3BA2F, #E89C0C);
- color: #1a1d29; font-weight: 700; font-size: 13px;
+ color: #1d1d1d; font-weight: 700; font-size: 13px;
padding: 9px 16px; border-radius: 8px; border: none;
cursor: pointer; transition: filter .15s;
white-space: nowrap;
diff --git a/public/persona/authorize.html b/public/persona/authorize.html
index 7f0c4d05b..e39e954ac 100644
--- a/public/persona/authorize.html
+++ b/public/persona/authorize.html
@@ -8,9 +8,9 @@
<style>
:root {
color-scheme: light dark;
- --bg: #0c0d10;
- --bg-elev: #15171c;
- --border: #26282f;
+ --bg: #0d0d0d;
+ --bg-elev: #171717;
+ --border: #282828;
--text: #f2f3f5;
--text-dim: #8a8d96;
--accent: #6aa6ff;
@@ -80,7 +80,7 @@
aspect-ratio: 1 / 1;
object-fit: cover;
border-radius: 6px;
- background: #1d2026;
+ background: #202020;
display: block;
}
.avatar-card .name {
@@ -111,7 +111,7 @@
button.primary {
background: var(--accent);
border-color: var(--accent);
- color: #06203b;
+ color: #1c1c1c;
}
button.primary:hover { background: var(--accent-strong); }
button:disabled { opacity: 0.5; cursor: not-allowed; }
diff --git a/public/persona/demo.html b/public/persona/demo.html
index a7af78d09..1e04dec20 100644
--- a/public/persona/demo.html
+++ b/public/persona/demo.html
@@ -10,11 +10,11 @@
<style>
:root {
color-scheme: dark;
- --bg: #05060a;
- --panel: #0f1018;
- --panel-elev: #15171f;
- --border: #1e1f2b;
- --border-strong: #2a2c3a;
+ --bg: #060606;
+ --panel: #101010;
+ --panel-elev: #171717;
+ --border: #202020;
+ --border-strong: #2d2d2d;
--text: #eee;
--muted: #8a8d98;
--accent: #6aa6ff;
@@ -110,7 +110,7 @@
height: 64px;
border-radius: 10px;
object-fit: cover;
- background: #1d2026;
+ background: #202020;
}
.avatar-preview .info { flex: 1; min-width: 0; }
.avatar-preview .name { font-size: 15px; font-weight: 600; }
diff --git a/public/persona/widget.js b/public/persona/widget.js
index f60504561..88d2ce571 100644
--- a/public/persona/widget.js
+++ b/public/persona/widget.js
@@ -58,15 +58,15 @@
align-items: center;
gap: 8px;
padding: 9px 16px;
- background: #15171c;
+ background: #171717;
color: #f2f3f5;
- border: 1px solid #26282f;
+ border: 1px solid #282828;
border-radius: 8px;
font: 600 14px/1 -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
cursor: pointer;
transition: border-color 120ms, background 120ms;
}
- button:hover { border-color: #6aa6ff; background: #1a1d23; }
+ button:hover { border-color: #6aa6ff; background: #1d1d1d; }
button:focus-visible { outline: 2px solid #6aa6ff; outline-offset: 2px; }
button:disabled { opacity: 0.6; cursor: progress; }
.dot {
diff --git a/public/providers.html b/public/providers.html
index 7661221c3..bd6b9c03d 100644
--- a/public/providers.html
+++ b/public/providers.html
@@ -5,16 +5,16 @@
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>x402 Providers — operator profiles for the bazaar</title>
<meta name="description" content="Quantified provider profiles for the x402 paid API catalog. Service counts, price bands, dominant categories, and the underlying listings." />
-<meta name="theme-color" content="#0a0b10" />
+<meta name="theme-color" content="#0b0b0b" />
<link rel="stylesheet" href="/nav.css" />
<style>
:root {
- --bg: #0a0b10;
- --bg-2: #0f1119;
- --panel: #14161f;
- --panel-2: #1a1d29;
- --border: #232636;
- --border-strong: #2e3447;
+ --bg: #0b0b0b;
+ --bg-2: #111111;
+ --panel: #161616;
+ --panel-2: #1d1d1d;
+ --border: #272727;
+ --border-strong: #343434;
--text: #f0f2f8;
--muted: #8a90a8;
--muted-2: #6b7088;
@@ -203,7 +203,7 @@
}
.profile-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn {
- background: var(--accent-blue); color: #0a0b10;
+ background: var(--accent-blue); color: #0b0b0b;
border: none; padding: 9px 18px;
font-size: 13px; font-weight: 600;
border-radius: 8px; cursor: pointer;
diff --git a/public/pumpfun.html b/public/pumpfun.html
index 283463998..d1cdb92bc 100644
--- a/public/pumpfun.html
+++ b/public/pumpfun.html
@@ -13,7 +13,7 @@
<script type="module" src="https://ajax.googleapis.com/ajax/libs/model-viewer/4.0.0/model-viewer.min.js"></script>
<script defer src="/footer-newsletter.js"></script>
<style>
- :root { color-scheme: dark; --accent: #ffffff; --border: #1f1f29; --bg: #0a0a0f; --panel: #14141c; --muted: #888;
+ :root { color-scheme: dark; --accent: #ffffff; --border: #202020; --bg: #0a0a0a; --panel: #151515; --muted: #888;
--header-h: 48px; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: #eee;
@@ -41,7 +41,7 @@
background: linear-gradient(135deg, rgba(245,158,11,0.06), rgba(255,255,255,0.04));
transition: color 0.15s ease, border-color 0.15s ease; vertical-align: middle; margin-left: 8px;
letter-spacing: 0.02em; text-transform: uppercase; font-weight: 500; }
- .helius-pill:hover { color: #eee; border-color: #4a4a58; }
+ .helius-pill:hover { color: #eee; border-color: #4b4b4b; }
.helius-pill .helius-dot { width: 6px; height: 6px; border-radius: 50%;
background: linear-gradient(135deg, #f59e0b, #e8e8e8); box-shadow: 0 0 6px rgba(255,255,255,0.3); }
#feed-wrap h2 { display: inline-flex; align-items: center; flex-wrap: wrap; }
@@ -49,18 +49,18 @@
.pf-filterbar .ctl { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; row-gap: 6px; }
.pf-filterbar label { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.pf-filterbar input[type="text"], .pf-filterbar input[type="number"], .pf-filterbar select, .pf-filterbar button {
- background: #161620; color: #eee; border: 1px solid #2a2a36;
+ background: #171717; color: #eee; border: 1px solid #2b2b2b;
border-radius: 6px; padding: 5px 9px; font-size: 12px; }
.pf-filterbar input[type="number"].ctl-num { width: 86px; -moz-appearance: textfield; appearance: textfield; }
.pf-filterbar input[type="number"].ctl-num::-webkit-outer-spin-button,
.pf-filterbar input[type="number"].ctl-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
- .pf-filterbar .ctl-sep { width: 1px; height: 20px; background: #2a2a36; margin: 0 2px; }
+ .pf-filterbar .ctl-sep { width: 1px; height: 20px; background: #2b2b2b; margin: 0 2px; }
.pf-filterbar button { cursor: pointer; }
- .pf-filterbar button:hover { background: #20202c; }
+ .pf-filterbar button:hover { background: #212121; }
.pf-filterbar button.toggle[data-on="0"] { color: var(--muted); }
#ctl-avatar-wrap { display: inline-flex; align-items: center; gap: 6px; }
#ctl-avatar-btn { display: inline-flex; align-items: center; gap: 8px; max-width: 240px; }
- #ctl-avatar-btn .avatar-thumb { width: 22px; height: 22px; border-radius: 4px; background: #1a1a24 center/cover no-repeat; border: 1px solid #2a2a36; flex: 0 0 auto; }
+ #ctl-avatar-btn .avatar-thumb { width: 22px; height: 22px; border-radius: 4px; background: #1b1b1b center/cover no-repeat; border: 1px solid #2b2b2b; flex: 0 0 auto; }
#ctl-avatar-btn .avatar-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
#ctl-avatar-btn .avatar-caret { color: var(--muted); font-size: 10px; }
@@ -72,45 +72,45 @@
.pf-modal-head h2 { margin: 0; font-size: 14px; font-weight: 600; }
.pf-modal-head .spacer { flex: 1; }
.pf-modal-close { background: transparent; border: 0; color: var(--muted); cursor: pointer; font-size: 18px; line-height: 1; padding: 4px 8px; border-radius: 4px; }
- .pf-modal-close:hover { background: #1f1f29; color: #eee; }
- .pf-tabs { display: flex; gap: 2px; padding: 0 14px; border-bottom: 1px solid var(--border); background: #10101a; overflow-x: auto; }
+ .pf-modal-close:hover { background: #202020; color: #eee; }
+ .pf-tabs { display: flex; gap: 2px; padding: 0 14px; border-bottom: 1px solid var(--border); background: #111111; overflow-x: auto; }
.pf-tab { background: transparent; border: 0; color: var(--muted); cursor: pointer; padding: 10px 14px; font-size: 13px; font-weight: 500; border-bottom: 2px solid transparent; white-space: nowrap; }
.pf-tab:hover { color: #eee; }
.pf-tab[aria-selected="true"] { color: #eee; border-bottom-color: var(--accent); }
.pf-tab .badge { display: inline-block; margin-left: 6px; font-size: 10px; color: var(--muted); }
.pf-toolbar { display: flex; gap: 8px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--border); }
- .pf-toolbar input[type="search"] { flex: 1; background: #161620; color: #eee; border: 1px solid #2a2a36; border-radius: 6px; padding: 7px 10px; font-size: 13px; }
+ .pf-toolbar input[type="search"] { flex: 1; background: #171717; color: #eee; border: 1px solid #2b2b2b; border-radius: 6px; padding: 7px 10px; font-size: 13px; }
.pf-toolbar input[type="search"]:focus { outline: none; border-color: var(--accent); }
.pf-toolbar .custom-row { display: flex; gap: 6px; align-items: center; }
- .pf-toolbar .custom-row input { background: #161620; color: #eee; border: 1px solid #2a2a36; border-radius: 6px; padding: 7px 10px; font-size: 13px; width: 220px; }
+ .pf-toolbar .custom-row input { background: #171717; color: #eee; border: 1px solid #2b2b2b; border-radius: 6px; padding: 7px 10px; font-size: 13px; width: 220px; }
.pf-toolbar .custom-row button { background: var(--accent); border: 0; color: #fff; border-radius: 6px; padding: 7px 12px; font-size: 13px; cursor: pointer; }
.pf-toolbar .custom-row button:hover { filter: brightness(1.1); }
.pf-tags { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 18px 10px; border-bottom: 1px solid var(--border); }
.pf-tags:empty { display: none; }
- .pf-tag { background: #161620; border: 1px solid #2a2a36; color: #cbd5e1; border-radius: 999px; padding: 3px 10px; font-size: 11px; cursor: pointer; }
- .pf-tag:hover { background: #20202c; }
+ .pf-tag { background: #171717; border: 1px solid #2b2b2b; color: #cbd5e1; border-radius: 999px; padding: 3px 10px; font-size: 11px; cursor: pointer; }
+ .pf-tag:hover { background: #212121; }
.pf-tag[data-active="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.pf-content { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 280px; }
.pf-body { min-height: 0; overflow-y: auto; padding: 16px 18px; }
- .pf-preview { border-left: 1px solid var(--border); background: #0d0d15; display: flex; flex-direction: column; min-height: 0; }
- .pf-preview-stage { flex: 1; min-height: 0; position: relative; background: radial-gradient(ellipse at center, #1a1a26 0%, #0a0a12 70%); }
+ .pf-preview { border-left: 1px solid var(--border); background: #0e0e0e; display: flex; flex-direction: column; min-height: 0; }
+ .pf-preview-stage { flex: 1; min-height: 0; position: relative; background: radial-gradient(ellipse at center, #1b1b1b 0%, #0b0b0b 70%); }
.pf-preview-stage model-viewer { width: 100%; height: 100%; --poster-color: transparent; background: transparent; }
.pf-preview-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--stroke-strong, rgba(255,255,255,0.14)); font-size: 48px; pointer-events: none; }
.pf-preview-meta { padding: 12px 14px; border-top: 1px solid var(--border); }
.pf-preview-meta .name { font-size: 13px; font-weight: 600; }
.pf-preview-meta .sub { font-size: 11px; color: var(--muted); margin-top: 3px; }
.pf-preview-meta .actions { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
- .pf-preview-meta .actions a, .pf-preview-meta .actions button { font-size: 11px; padding: 5px 10px; border-radius: 5px; background: #161620; border: 1px solid #2a2a36; color: #cbd5e1; text-decoration: none; cursor: pointer; }
- .pf-preview-meta .actions a:hover, .pf-preview-meta .actions button:hover { background: #20202c; text-decoration: none; }
+ .pf-preview-meta .actions a, .pf-preview-meta .actions button { font-size: 11px; padding: 5px 10px; border-radius: 5px; background: #171717; border: 1px solid #2b2b2b; color: #cbd5e1; text-decoration: none; cursor: pointer; }
+ .pf-preview-meta .actions a:hover, .pf-preview-meta .actions button:hover { background: #212121; text-decoration: none; }
.pf-preview-meta .actions .primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.pf-preview-meta .actions .primary:hover { filter: brightness(1.1); background: var(--accent); }
.pf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
- .pf-card { position: relative; background: var(--surface-1, #161620); border: 1px solid var(--stroke, #232330); border-radius: var(--radius-card, 14px); overflow: hidden; cursor: pointer; transition: border-color 0.15s, transform 0.1s; display: flex; flex-direction: column; text-align: left; padding: 0; color: var(--ink, #eee); font: inherit; }
- .pf-card:hover, .pf-card:focus-visible { border-color: var(--stroke-strong, #3a3a4a); outline: none; }
+ .pf-card { position: relative; background: var(--surface-1, #171717); border: 1px solid var(--stroke, #242424); border-radius: var(--radius-card, 14px); overflow: hidden; cursor: pointer; transition: border-color 0.15s, transform 0.1s; display: flex; flex-direction: column; text-align: left; padding: 0; color: var(--ink, #eee); font: inherit; }
+ .pf-card:hover, .pf-card:focus-visible { border-color: var(--stroke-strong, #3b3b3b); outline: none; }
.pf-card:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.pf-card:active { transform: scale(0.98); }
.pf-card[data-selected="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
- .pf-card .thumb { aspect-ratio: 1/1; background: var(--skeleton-base, rgba(255,255,255,0.04)) center/cover no-repeat; border-bottom: 1px solid var(--stroke, #232330); position: relative; display: flex; align-items: center; justify-content: center; color: var(--stroke-strong, rgba(255,255,255,0.14)); font-size: 32px; }
+ .pf-card .thumb { aspect-ratio: 1/1; background: var(--skeleton-base, rgba(255,255,255,0.04)) center/cover no-repeat; border-bottom: 1px solid var(--stroke, #242424); position: relative; display: flex; align-items: center; justify-content: center; color: var(--stroke-strong, rgba(255,255,255,0.14)); font-size: 32px; }
.pf-card .meta { padding: 8px 10px; }
.pf-card .name { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-card .sub { font-size: 10px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@@ -121,15 +121,15 @@
.pf-card .fav { position: absolute; bottom: 6px; right: 6px; background: rgba(0,0,0,0.55); border: 0; color: #cbd5e1; width: 22px; height: 22px; border-radius: 50%; cursor: pointer; font-size: 12px; line-height: 1; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.15s; padding: 0; }
.pf-card:hover .fav, .pf-card:focus-within .fav, .pf-card .fav[data-on="true"] { opacity: 1; }
.pf-card .fav[data-on="true"] { color: #fbbf24; }
- .pf-skeleton { background: linear-gradient(90deg, #161620 0%, #1f1f2a 50%, #161620 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; border-radius: 8px; aspect-ratio: 1/1.25; }
+ .pf-skeleton { background: linear-gradient(90deg, #171717 0%, #202020 50%, #171717 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; border-radius: 8px; aspect-ratio: 1/1.25; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.pf-status { padding: 32px 16px; text-align: center; color: var(--muted); font-size: 13px; }
.pf-status .cta { display: inline-block; margin-top: 10px; padding: 8px 14px; background: var(--accent); color: #fff; border-radius: 6px; font-size: 13px; }
.pf-status .cta:hover { filter: brightness(1.1); text-decoration: none; }
- .pf-loadmore { display: block; margin: 16px auto 0; background: #161620; color: #eee; border: 1px solid #2a2a36; border-radius: 6px; padding: 8px 16px; font-size: 13px; cursor: pointer; }
- .pf-loadmore:hover { background: #20202c; }
+ .pf-loadmore { display: block; margin: 16px auto 0; background: #171717; color: #eee; border: 1px solid #2b2b2b; border-radius: 6px; padding: 8px 16px; font-size: 13px; cursor: pointer; }
+ .pf-loadmore:hover { background: #212121; }
.pf-loadmore[disabled] { opacity: 0.5; cursor: wait; }
- .pf-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 200; background: #161620; border: 1px solid #2a2a36; color: #eee; padding: 10px 16px; border-radius: 8px; font-size: 13px; box-shadow: 0 8px 24px rgba(0,0,0,0.4); animation: toast-in 0.2s ease; max-width: 90vw; }
+ .pf-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 200; background: #171717; border: 1px solid #2b2b2b; color: #eee; padding: 10px 16px; border-radius: 8px; font-size: 13px; box-shadow: 0 8px 24px rgba(0,0,0,0.4); animation: toast-in 0.2s ease; max-width: 90vw; }
.pf-toast.error { border-color: #4a1f23; background: #1f1418; color: #fbbf24; }
.pf-toast.success { border-color: #1f4232; background: #0e1f17; color: #4ade80; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
@@ -154,7 +154,7 @@
@media (max-width: 1100px) { main.pf-main { grid-template-columns: minmax(0, 1fr) 320px; } }
#stage { position: relative; display: flex; flex-direction: column; min-height: 0; }
#stage > model-viewer#agent { width: 100%; flex: 1; min-height: 0;
- background: radial-gradient(ellipse at 50% 60%, #1a1a26 0%, #0a0a12 70%);
+ background: radial-gradient(ellipse at 50% 60%, #1b1b1b 0%, #0b0b0b 70%);
--poster-color: transparent; display: block; }
#stage-overlay { position: absolute; inset: 0; display: flex; flex-direction: column;
justify-content: flex-end; align-items: center; padding: 0 24px 24px;
@@ -176,10 +176,10 @@
border-top: 1px solid var(--border); background: rgba(20,20,28,0.85);
backdrop-filter: blur(6px); max-height: 96px; overflow-y: auto; }
#anim-chips:empty::before { content: 'loading animations…'; color: var(--muted); font-size: 11px; }
- .anim-chip { background: #161620; color: #ddd; border: 1px solid #2a2a36;
+ .anim-chip { background: #171717; color: #ddd; border: 1px solid #2b2b2b;
border-radius: 999px; padding: 4px 10px; font-size: 12px; cursor: pointer;
transition: background 0.15s, border-color 0.15s, transform 0.1s; user-select: none; }
- .anim-chip:hover { background: #20202c; border-color: #3a3a4a; }
+ .anim-chip:hover { background: #212121; border-color: #3b3b3b; }
.anim-chip:active { transform: scale(0.96); }
.anim-chip[data-active="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.anim-chip[disabled] { opacity: 0.5; cursor: wait; }
@@ -230,7 +230,7 @@
border-radius: 4px;
}
.side-control-btn:hover {
- background: #2a2a36;
+ background: #2b2b2b;
color: #eee;
}
#side.minimized #side-content {
@@ -250,9 +250,9 @@
#feed { flex: 1; overflow-y: auto; padding: 0 12px 12px; }
.kv { display: flex; justify-content: space-between; padding: 3px 0; font-size: 13px; gap: 8px; }
.kv span:first-child { color: var(--muted); }
- .kv code { font-size: 11px; background: #1a1a24; padding: 1px 5px; border-radius: 3px; }
+ .kv code { font-size: 11px; background: #1b1b1b; padding: 1px 5px; border-radius: 3px; }
.signal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 0 16px 12px; }
- .signal { background: #1a1a24; border: 1px solid #232330; border-radius: 6px; padding: 8px; }
+ .signal { background: #1b1b1b; border: 1px solid #242424; border-radius: 6px; padding: 8px; }
.signal .v { font-size: 18px; font-weight: 600; }
.signal .l { font-size: 11px; color: var(--muted); margin-top: 2px; }
.signal.neg { border-color: #4a1f23; background: #1f1418; }
@@ -263,22 +263,22 @@
color: #fbbf24; font-size: 12px; margin: 12px 16px; }
/* Event cards */
- .evt { border: 1px solid #232330; background: #15151d; border-radius: 8px; padding: 10px 12px; margin: 6px 0;
+ .evt { border: 1px solid #242424; background: #161616; border-radius: 8px; padding: 10px 12px; margin: 6px 0;
animation: evt-in 0.35s ease; font-size: 12px; position: relative; }
.evt.first { border-color: #1f4232; background: #0e1f17; }
.evt.fake { border-color: #4a1f23; background: #1f1418; }
- .evt.grad { border-color: #2c1f4a; background: #18142a; }
+ .evt.grad { border-color: #252525; background: #161616; }
.evt.replay { opacity: 0.62; animation: none; }
.evt.replay::after { content: 'replay'; position: absolute; top: 8px; right: 10px; font-size: 9px; letter-spacing: 0.08em;
- text-transform: uppercase; color: #6a6a82; padding: 1px 6px; border: 1px solid #2a2a3c; border-radius: 999px; background: #0e0e16; }
+ text-transform: uppercase; color: #6a6a82; padding: 1px 6px; border: 1px solid #2b2b2b; border-radius: 999px; background: #0f0f0f; }
.evt-head { display: flex; gap: 10px; align-items: flex-start; }
- .evt-thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; border: 1px solid #2a2a3c;
- background: #0e0e16; flex: 0 0 44px; }
+ .evt-thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; border: 1px solid #2b2b2b;
+ background: #0f0f0f; flex: 0 0 44px; }
.evt-head-text { flex: 1; min-width: 0; }
.evt-socials { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
- .evt-socials a { font-size: 10px; padding: 2px 7px; border-radius: 4px; background: #1e1e2c;
- border: 1px solid #2a2a3c; color: #cbd5e1; }
- .evt-socials a:hover { background: #26263a; color: #fff; }
+ .evt-socials a { font-size: 10px; padding: 2px 7px; border-radius: 4px; background: #1f1f1f;
+ border: 1px solid #2b2b2b; color: #cbd5e1; }
+ .evt-socials a:hover { background: #272727; color: #fff; }
.evt-pool { font-size: 10px; color: #888888; margin-top: 4px; }
.evt-copy, .evt-focus { background: transparent; border: 0; color: #888; cursor: pointer; font-size: 11px; padding: 0 2px; }
.evt-copy:hover, .evt-focus:hover { color: #fff; }
@@ -294,21 +294,21 @@
.evt-take { font-size: 11px; color: var(--muted); margin-top: 4px; font-style: italic; }
.evt-time { font-size: 10px; color: #555; }
.evt-links { margin-top: 5px; display: flex; flex-wrap: wrap; gap: 4px; }
- .evt-links a { font-size: 10px; padding: 2px 6px; border-radius: 4px; background: #1e1e2c; border: 1px solid #2a2a3c; color: #888888; text-decoration: none; }
- .evt-links a:hover { background: #26263a; }
+ .evt-links a { font-size: 10px; padding: 2px 6px; border-radius: 4px; background: #1f1f1f; border: 1px solid #2b2b2b; color: #888888; text-decoration: none; }
+ .evt-links a:hover { background: #272727; }
.evt-meta { margin-top: 5px; font-size: 10px; color: #555; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.evt-meta a { color: #666; text-decoration: none; }
.evt-meta a:hover { color: #888888; }
.evt-mint { font-size: 9px; color: #444; word-break: break-all; margin-top: 4px; font-family: monospace; }
.evt-desc { font-size: 11px; color: #8a8a9a; margin: 2px 0; }
- .evt-section { margin-top: 6px; padding-top: 6px; border-top: 1px solid #1e1e2c; }
+ .evt-section { margin-top: 6px; padding-top: 6px; border-top: 1px solid #1f1f1f; }
.evt-row2 { display: flex; gap: 10px; flex-wrap: wrap; margin: 3px 0; font-size: 11px; color: #cbd5e1; }
.evt-stat { color: var(--muted); }
.evt-gh { font-size: 11px; margin: 2px 0; }
- .evt-repo { font-size: 11px; background: #1a1a24; border-radius: 4px; padding: 4px 7px; margin-top: 4px; }
+ .evt-repo { font-size: 11px; background: #1b1b1b; border-radius: 4px; padding: 4px 7px; margin-top: 4px; }
.evt-repo-name { font-weight: 600; color: #888888; }
.evt-topics { display: flex; gap: 3px; flex-wrap: wrap; margin-top: 3px; }
- .evt-topic { font-size: 9px; padding: 1px 5px; background: #1f1f30; border: 1px solid #2a2a3c; border-radius: 10px; color: #7a7aaa; }
+ .evt-topic { font-size: 9px; padding: 1px 5px; background: #202020; border: 1px solid #2b2b2b; border-radius: 10px; color: #7a7aaa; }
@keyframes evt-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
/* Helius pill live event counter */
@@ -327,9 +327,9 @@
#feed-wrap { position: relative; }
/* Share/copy-link button */
- .pf-icon-btn { background: #161620; color: #ddd; border: 1px solid #2a2a36; border-radius: 6px;
+ .pf-icon-btn { background: #171717; color: #ddd; border: 1px solid #2b2b2b; border-radius: 6px;
padding: 5px 9px; font-size: 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
- .pf-icon-btn:hover { background: #20202c; }
+ .pf-icon-btn:hover { background: #212121; }
.pf-icon-btn[data-flash="true"] { border-color: #4ade80; color: #4ade80; }
/* Mobile side-panel toggle */
@@ -347,11 +347,11 @@
.config-section { margin-bottom: 24px; }
.config-section h3 { font-size: 13px; font-weight: 600; margin: 0 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.config-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
- .config-item { background: #161620; border: 1px solid #232330; border-radius: 6px; padding: 10px 12px; }
+ .config-item { background: #171717; border: 1px solid #242424; border-radius: 6px; padding: 10px 12px; }
.config-item label { display: block; font-size: 12px; font-weight: 500; color: var(--muted); margin-bottom: 6px; }
- .config-item select, .config-item input { width: 100%; background: #101018; color: #eee; border: 1px solid #2a2a36; border-radius: 4px; padding: 6px 8px; font-size: 12px; }
+ .config-item select, .config-item input { width: 100%; background: #111111; color: #eee; border: 1px solid #2b2b2b; border-radius: 4px; padding: 6px 8px; font-size: 12px; }
.config-item input { margin-top: 6px; }
- .config-save-bar { padding: 12px 18px; border-top: 1px solid var(--border); text-align: right; background: #10101a; }
+ .config-save-bar { padding: 12px 18px; border-top: 1px solid var(--border); text-align: right; background: #111111; }
.config-save-btn { background: var(--accent); border: 0; color: #fff; border-radius: 6px; padding: 8px 16px; font-size: 13px; cursor: pointer; }
.config-save-btn:hover { filter: brightness(1.1); }
</style>
@@ -446,7 +446,7 @@
<div id="first-claims-section">
<h2>
<span>First-time fee claims</span>
- <select id="fc-window" title="Lookback window" style="margin-left:8px;background:#0f0f17;color:#e6e6f0;border:1px solid #20202c;border-radius:6px;padding:2px 6px;font-size:12px">
+ <select id="fc-window" title="Lookback window" style="margin-left:8px;background:#101010;color:#e6e6f0;border:1px solid #212121;border-radius:6px;padding:2px 6px;font-size:12px">
<option value="60">1h</option>
<option value="360">6h</option>
<option value="1440" selected>24h</option>
diff --git a/public/reputation/index.html b/public/reputation/index.html
index a9ea5ffe7..97d907629 100644
--- a/public/reputation/index.html
+++ b/public/reputation/index.html
@@ -6,7 +6,7 @@
<title>Agent Reputation — three.ws</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
<meta name="description" content="View and submit on-chain reviews for any AI agent or Ethereum address." />
- <meta name="theme-color" content="#09090f" />
+ <meta name="theme-color" content="#090909" />
<!-- Importmap must parse before any module script or modulepreload link.
Keep it as the first child of head so Vite's auto-injected
@@ -38,7 +38,7 @@
/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }
body {
- background: #09090f;
+ background: #090909;
color: #e8e9f0;
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
font-size: 15px;
@@ -113,7 +113,7 @@
.rep-skel-lg { height: 2rem; width: 50%; margin-bottom: 0.75rem; }
.rep-skel-sm { height: 0.85rem; width: 28%; }
.rep-skel-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; margin: 1.5rem 0; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.07); border-radius: 12px; overflow: hidden; }
- .rep-skel-stat { padding: 1.25rem 1.5rem; background: #0d0d15; }
+ .rep-skel-stat { padding: 1.25rem 1.5rem; background: #0e0e0e; }
.rep-skel-val { height: 1.75rem; width: 55%; border-radius: 5px; margin-bottom: 0.5rem; }
.rep-skel-lbl { height: 0.625rem; width: 75%; border-radius: 3px; }
.rep-skel-cards { display: flex; flex-direction: column; gap: 0.625rem; }
@@ -193,7 +193,7 @@
.rep-example-chip:hover { background: rgba(255,255,255,0.14); color: var(--ink-dim); }
.rep-info-cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; margin-top: 2.5rem; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.07); border-radius: 12px; overflow: hidden; }
- .rep-info-card { padding: 1.25rem 1.5rem; background: #0c0c14; display: flex; align-items: flex-start; gap: 0.875rem; }
+ .rep-info-card { padding: 1.25rem 1.5rem; background: #0d0d0d; display: flex; align-items: flex-start; gap: 0.875rem; }
.rep-info-card svg { flex-shrink: 0; margin-top: 2px; }
.rep-info-card strong { font-size: 0.9375rem; display: block; margin-bottom: 0.25rem; }
.rep-info-card p { font-size: 0.8125rem; color: rgba(232,233,240,0.5); margin: 0; line-height: 1.5; }
@@ -215,7 +215,7 @@
/* ── Stats grid ── */
.rep-stats-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.07); border-radius: 12px; overflow: hidden; }
- .rep-stat-card { padding: 1.375rem 1.5rem; background: #0c0c14; display: flex; flex-direction: column; gap: 0.375rem; }
+ .rep-stat-card { padding: 1.375rem 1.5rem; background: #0d0d0d; display: flex; flex-direction: column; gap: 0.375rem; }
.rep-stat-label { font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 1.1px; color: rgba(232,233,240,0.4); font-weight: 700; }
.rep-stat-value { font-size: 2.25rem; font-weight: 800; line-height: 1; font-family: 'Space Grotesk', sans-serif; letter-spacing: -0.04em; }
.rep-stat-denom { font-size: 1rem; font-weight: 400; opacity: 0.35; }
diff --git a/public/reset-password.html b/public/reset-password.html
index bb03cf550..a18f6c95d 100644
--- a/public/reset-password.html
+++ b/public/reset-password.html
@@ -22,7 +22,7 @@
Segoe UI,
Roboto,
sans-serif;
- background: radial-gradient(1200px 600px at 50% -100px, #1a1a2e 0, #080814 60%);
+ background: radial-gradient(1200px 600px at 50% -100px, #1b1b1b 0, #090909 60%);
color: #eee;
margin: 0;
min-height: 100vh;
@@ -34,8 +34,8 @@
color: #888888;
}
.card {
- background: #14141c;
- border: 1px solid #2a2a36;
+ background: #151515;
+ border: 1px solid #2b2b2b;
border-radius: 16px;
padding: 32px;
max-width: 400px;
@@ -61,8 +61,8 @@
input {
width: 100%;
padding: 11px 13px;
- background: #0f0f17;
- border: 1px solid #2a2a36;
+ background: #101010;
+ border: 1px solid #2b2b2b;
border-radius: 9px;
color: #eee;
font-size: 15px;
diff --git a/public/session-client.js b/public/session-client.js
index 300e7de45..21d0f5b04 100644
--- a/public/session-client.js
+++ b/public/session-client.js
@@ -33,8 +33,8 @@
position: 'fixed',
bottom: '20px',
right: '20px',
- background: '#1c1c28',
- border: '1px solid #2a2a36',
+ background: '#1d1d1d',
+ border: '1px solid #2b2b2b',
borderRadius: '10px',
padding: '12px 16px',
color: '#eee',
@@ -54,7 +54,7 @@
signOutBtn.textContent = 'Sign out';
Object.assign(signOutBtn.style, {
background: 'transparent',
- border: '1px solid #3a3a4a',
+ border: '1px solid #3b3b3b',
borderRadius: '6px',
color: '#888888',
cursor: 'pointer',
diff --git a/public/sitemap/index.html b/public/sitemap/index.html
index 8a5dcb3ec..608953227 100644
--- a/public/sitemap/index.html
+++ b/public/sitemap/index.html
@@ -12,7 +12,7 @@
<link rel="stylesheet" href="/footer.css" />
<style>
:root { color-scheme: dark; }
- body { margin: 0; background: #060611; color: #e7e7f5; font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
+ body { margin: 0; background: #070707; color: #e7e7f5; font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
.sm-wrap { max-width: 1080px; margin: 0 auto; padding: 96px 24px 64px; }
.sm-hero { margin-bottom: 48px; }
.sm-hero h1 { font-size: clamp(34px, 5vw, 56px); margin: 0 0 12px; letter-spacing: -0.02em; }
diff --git a/public/siwx-test.html b/public/siwx-test.html
index 7ae53a124..fe0d15411 100644
--- a/public/siwx-test.html
+++ b/public/siwx-test.html
@@ -6,7 +6,7 @@
<title>x402 SIWX — manual test page</title>
<meta name="robots" content="noindex" />
<style>
- html, body { margin: 0; padding: 0; background: #0c0e15; color: #e6e8f0; font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif; }
+ html, body { margin: 0; padding: 0; background: #0e0e0e; color: #e6e8f0; font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif; }
main { max-width: 760px; margin: 0 auto; padding: 32px 20px 64px; }
h1 { font-size: 22px; margin: 0 0 4px; letter-spacing: -0.01em; }
.sub { color: #8a90a8; font-size: 13px; margin: 0 0 24px; line-height: 1.5; }
@@ -14,12 +14,12 @@
.row button {
flex: 1 1 280px;
padding: 14px 18px;
- background: #1a1d29; border: 1px solid #2a2e3d; border-radius: 12px;
+ background: #1d1d1d; border: 1px solid #2e2e2e; border-radius: 12px;
color: #e6e8f0; font-size: 14px; font-weight: 600; cursor: pointer;
text-align: left; line-height: 1.4;
transition: border-color 0.12s, background 0.12s;
}
- .row button:hover { border-color: #0a84ff; background: #20243a; }
+ .row button:hover { border-color: #0a84ff; background: #252525; }
.row button small { display: block; font-weight: 400; color: #8a90a8; margin-top: 4px; font-size: 11px; font-family: ui-monospace, Menlo, monospace; }
.log-head {
display: flex; align-items: center; justify-content: space-between;
@@ -27,12 +27,12 @@
}
.log-head h2 { font-size: 13px; font-weight: 600; color: #b0b6cc; letter-spacing: 0.04em; text-transform: uppercase; margin: 0; }
.log-head button {
- background: transparent; border: 1px solid #2a2e3d; color: #8a90a8;
+ background: transparent; border: 1px solid #2e2e2e; color: #8a90a8;
padding: 4px 10px; border-radius: 6px; font-size: 11px; cursor: pointer;
}
.log-head button:hover { color: #e6e8f0; border-color: #5a6378; }
pre {
- background: #14161f; border: 1px solid #232636; border-radius: 10px;
+ background: #161616; border: 1px solid #272727; border-radius: 10px;
padding: 14px 16px; font-family: ui-monospace, Menlo, monospace; font-size: 12px;
line-height: 1.55; color: #b0b6cc; white-space: pre-wrap; word-break: break-word;
min-height: 200px; max-height: 60vh; overflow: auto; margin: 0;
@@ -42,7 +42,7 @@
pre .error { color: #fca5a5; }
pre .ts { color: #6b7088; }
.note {
- font-size: 12px; color: #8a90a8; background: #14161f; border: 1px solid #232636;
+ font-size: 12px; color: #8a90a8; background: #161616; border: 1px solid #272727;
border-radius: 8px; padding: 10px 12px; margin-top: 24px; line-height: 1.5;
}
.note code { font-family: ui-monospace, Menlo, monospace; color: #e6e8f0; }
diff --git a/public/skills/tip-jar/skill.css b/public/skills/tip-jar/skill.css
index ac3421520..1c96c3f81 100644
--- a/public/skills/tip-jar/skill.css
+++ b/public/skills/tip-jar/skill.css
@@ -9,7 +9,7 @@
}
.tip-jar-modal {
- background: #1a1a2e;
+ background: #1b1b1b;
border: 1px solid #334466;
border-radius: 12px;
padding: 24px;
@@ -40,7 +40,7 @@
padding: 8px 4px;
border: 1px solid #445566;
border-radius: 8px;
- background: #222244;
+ background: #242424;
color: #b0b8d8;
cursor: pointer;
font-size: 0.9rem;
@@ -66,7 +66,7 @@
padding: 8px 10px;
border: 1px solid #445566;
border-radius: 8px;
- background: #111122;
+ background: #121212;
color: #e0e0f0;
font-size: 0.9rem;
box-sizing: border-box;
@@ -115,5 +115,5 @@
}
.tip-jar-cancel:hover {
- background: #222233;
+ background: #232323;
}
diff --git a/public/strategy-lab.html b/public/strategy-lab.html
index 824650067..b177f89ba 100644
--- a/public/strategy-lab.html
+++ b/public/strategy-lab.html
@@ -60,7 +60,7 @@
td.num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--mono); }
td .pos { color: var(--ok-fg); } td .neg { color: var(--bad-fg); }
- .log { max-height: 360px; overflow-y: auto; font: 11px/1.55 var(--mono); background: #0e0f12; color: #d6e1ff; border-radius: 8px; padding: .65rem .8rem; }
+ .log { max-height: 360px; overflow-y: auto; font: 11px/1.55 var(--mono); background: #0f0f0f; color: #d6e1ff; border-radius: 8px; padding: .65rem .8rem; }
.log .row { padding: .1rem 0; }
.log .skip { color: #8c8c8c; } .log .enter { color: #58e891; } .log .exit { color: #ffd54f; }
.log .error { color: #ff7777; } .log .start { color: #80b8ff; } .log .done { color: #80b8ff; font-weight: 600; }
diff --git a/public/studio-deposit-harness.html b/public/studio-deposit-harness.html
index 425fd7108..1761ddf15 100644
--- a/public/studio-deposit-harness.html
+++ b/public/studio-deposit-harness.html
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0" /><title>deposit harness</title>
-<style>body{background:#0a0c0e;color:#fff;font-family:system-ui;padding:2rem}#root{max-width:380px}</style>
+<style>body{background:#0c0c0c;color:#fff;font-family:system-ui;padding:2rem}#root{max-width:380px}</style>
</head>
<body>
<div id="root"></div>
diff --git a/public/studio/index.html b/public/studio/index.html
index d056d3fef..6895825a6 100644
--- a/public/studio/index.html
+++ b/public/studio/index.html
@@ -20,7 +20,7 @@
studio.css is held by a stale SW cache. */
html, body { margin: 0; padding: 0; }
body.studio-body {
- background: #0a0a0f;
+ background: #0a0a0a;
color: #eee;
font-family: 'Inter', system-ui, -apple-system, sans-serif;
font-size: 14px;
@@ -64,8 +64,8 @@
.avatar-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.panel {
- background: #14141c;
- border: 1px solid #2a2a36;
+ background: #151515;
+ border: 1px solid #2b2b2b;
border-radius: 14px;
padding: 1.1rem 1.1rem 1.2rem;
}
diff --git a/public/studio/launch-panel.js b/public/studio/launch-panel.js
index 1fea53404..4a6536ad5 100644
--- a/public/studio/launch-panel.js
+++ b/public/studio/launch-panel.js
@@ -285,7 +285,7 @@ const LP_CSS = `
/* Deposit modal */
.lp-dep-bd{position:fixed;inset:0;background:rgba(0,0,0,.72);backdrop-filter:blur(6px);
display:flex;align-items:center;justify-content:center;z-index:9999;padding:1rem}
-.lp-dep{width:100%;max-width:380px;background:#15171a;border:1px solid rgba(255,255,255,.1);
+.lp-dep{width:100%;max-width:380px;background:#171717;border:1px solid rgba(255,255,255,.1);
border-radius:16px;padding:1.4rem;display:flex;flex-direction:column;gap:1rem;
box-shadow:0 24px 60px rgba(0,0,0,.5)}
.lp-dep-head{display:flex;align-items:flex-start;justify-content:space-between;gap:.5rem}
@@ -741,7 +741,7 @@ export function mountLaunchPanel(container, { getAvatar, getUser, getPreviewView
width: 220,
margin: 1,
errorCorrectionLevel: 'M',
- color: { dark: '#0a0c0e', light: '#ffffff' },
+ color: { dark: '#0c0c0c', light: '#ffffff' },
});
if (closed) return;
const slot = bd.querySelector('#lp-dep-qr');
@@ -860,7 +860,7 @@ export function mountLaunchPanel(container, { getAvatar, getUser, getPreviewView
const mod = await import('https://esm.sh/[email protected]');
const QRCode = mod.default ?? mod;
const canvas = document.createElement('canvas');
- await QRCode.toCanvas(canvas, addr, { width: 220, margin: 1, color: { dark: '#0a0c0e', light: '#ffffff' } });
+ await QRCode.toCanvas(canvas, addr, { width: 220, margin: 1, color: { dark: '#0c0c0c', light: '#ffffff' } });
const slot = bd.querySelector('#lp-dep-qr');
if (slot) { slot.innerHTML = ''; slot.appendChild(canvas); }
} catch {
diff --git a/public/studio/studio.css b/public/studio/studio.css
index b06ef4654..fc48ced8a 100644
--- a/public/studio/studio.css
+++ b/public/studio/studio.css
@@ -1230,7 +1230,7 @@ a:hover {
.toast[data-type='error']::before { background: var(--danger); }
.toast[data-type='loading'] {
- background: #141418;
+ background: #141414;
border-color: rgba(255, 255, 255, 0.15);
color: #ccc;
}
diff --git a/public/style.css b/public/style.css
index 90f230a4b..67593b2a4 100644
--- a/public/style.css
+++ b/public/style.css
@@ -31,9 +31,9 @@
bottom: 20px;
left: 50%;
transform: translateX(-50%);
- background: #14141c;
+ background: #151515;
color: #eee;
- border: 1px solid #2a2a36;
+ border: 1px solid #2b2b2b;
border-radius: var(--radius-md);
padding: 10px 16px;
font-size: 14px;
@@ -69,7 +69,7 @@
/* Primary — white fill, dark ink (use for the main CTA per surface) */
--btn-primary-bg: var(--accent);
- --btn-primary-fg: #0a0a0f;
+ --btn-primary-fg: #0a0a0a;
--btn-primary-border: transparent;
--btn-primary-bg-hover: rgba(255, 255, 255, 0.88);
--btn-primary-bg-active: rgba(255, 255, 255, 0.76);
@@ -114,7 +114,7 @@
/* --- Skeleton ----------------------------------------------------------
* Shared loading-shimmer treatment. Replaces hardcoded placeholder greys
- * (#2a2a3a / #3a3a4a) site-wide; monochrome so it reads on any dark surface.
+ * (#2b2b2b / #3b3b3b) site-wide; monochrome so it reads on any dark surface.
*/
--skeleton-base: rgba(255, 255, 255, 0.04);
--skeleton-sheen: rgba(255, 255, 255, 0.08);
@@ -691,7 +691,7 @@ header h1 .wordmark-logo {
right: 0;
top: calc(100% + 6px);
min-width: 160px;
- background: #0e0e16;
+ background: #0f0f0f;
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: var(--radius-md);
padding: 4px;
@@ -2164,7 +2164,7 @@ body.deploy-page {
.explore-card-thumb {
position: relative;
aspect-ratio: 1 / 1;
- background: linear-gradient(135deg, #131226 0%, #1a1a2e 100%);
+ background: linear-gradient(135deg, #141414 0%, #1b1b1b 100%);
display: flex;
align-items: center;
justify-content: center;
@@ -4117,7 +4117,7 @@ body.deploy-page {
cursor: pointer;
}
.showcase-sort-sel option {
- background: #14141c;
+ background: #151515;
color: #e6e6e6;
}
@@ -5913,7 +5913,7 @@ body[data-viewer-mode='explore'] #layout-switch {
max-height: calc(100% - var(--space-lg));
background: rgba(20, 20, 28, 0.96);
color: #e0e0e0;
- border: 1px solid #2a2a36;
+ border: 1px solid #2b2b2b;
border-radius: var(--radius-md);
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
display: flex;
@@ -5932,8 +5932,8 @@ body[data-viewer-mode='explore'] #layout-switch {
align-items: center;
justify-content: space-between;
padding: var(--space-sm) var(--space-md);
- border-bottom: 1px solid #2a2a36;
- background: #0f0f16;
+ border-bottom: 1px solid #2b2b2b;
+ background: #101010;
}
.scene-explorer__title {
font-weight: 600;
@@ -5953,14 +5953,14 @@ body[data-viewer-mode='explore'] #layout-switch {
border-radius: var(--radius-sm);
}
.scene-explorer__close:hover {
- background: #2a2a36;
+ background: #2b2b2b;
color: #fff;
}
.scene-explorer__search {
margin: var(--space-xs) var(--space-sm);
- background: #0b0b12;
- border: 1px solid #2a2a36;
+ background: #0c0c0c;
+ border: 1px solid #2b2b2b;
color: #ddd;
padding: 6px 10px;
border-radius: var(--radius-sm);
@@ -5983,13 +5983,13 @@ body[data-viewer-mode='explore'] #layout-switch {
overflow-y: auto;
padding: var(--space-2xs) var(--space-2xs);
max-height: 40vh;
- border-bottom: 1px solid #2a2a36;
+ border-bottom: 1px solid #2b2b2b;
}
.scene-explorer__inspector {
overflow-y: auto;
padding: var(--space-sm);
max-height: 40vh;
- background: #0c0c14;
+ background: #0d0d0d;
}
.scene-explorer__empty {
color: #666;
@@ -6011,7 +6011,7 @@ body[data-viewer-mode='explore'] #layout-switch {
user-select: none;
}
.scene-node__row:hover {
- background: #1a1a26;
+ background: #1b1b1b;
}
.scene-node__row.selected {
background: #2a1f5a;
@@ -6078,7 +6078,7 @@ body[data-viewer-mode='explore'] #layout-switch {
text-transform: uppercase;
letter-spacing: 0.08em;
color: #888;
- border-bottom: 1px solid #22222e;
+ border-bottom: 1px solid #232323;
padding-bottom: 2px;
}
.inspector__row {
@@ -6108,8 +6108,8 @@ body[data-viewer-mode='explore'] #layout-switch {
}
.vec3-row input {
width: 52px;
- background: #0b0b12;
- border: 1px solid #2a2a36;
+ background: #0c0c0c;
+ border: 1px solid #2b2b2b;
color: #ccc;
padding: 2px 4px;
border-radius: var(--radius-sm);
@@ -6128,8 +6128,8 @@ body[data-viewer-mode='explore'] #layout-switch {
flex-wrap: wrap;
}
.inspector__actions button {
- background: #22222e;
- border: 1px solid #33334a;
+ background: #232323;
+ border: 1px solid #353535;
color: #ccc;
padding: 4px 8px;
border-radius: var(--radius-sm);
@@ -6137,7 +6137,7 @@ body[data-viewer-mode='explore'] #layout-switch {
cursor: pointer;
}
.inspector__actions button:hover {
- background: #2e2e40;
+ background: #2f2f2f;
color: #fff;
}
@@ -6149,7 +6149,7 @@ body[data-viewer-mode='explore'] #layout-switch {
width: min(560px, calc(100vw - 40px));
max-height: calc(100vh - 100px);
background: rgba(20, 20, 28, 0.98);
- border: 1px solid #2a2a36;
+ border: 1px solid #2b2b2b;
border-radius: var(--radius-md);
box-shadow: 0 15px 60px rgba(0, 0, 0, 0.6);
display: flex;
@@ -6163,8 +6163,8 @@ body[data-viewer-mode='explore'] #layout-switch {
justify-content: space-between;
align-items: center;
padding: var(--space-sm) var(--space-md);
- border-bottom: 1px solid #2a2a36;
- background: #0f0f16;
+ border-bottom: 1px solid #2b2b2b;
+ background: #101010;
}
.texture-inspector__title {
font-weight: 600;
@@ -6183,7 +6183,7 @@ body[data-viewer-mode='explore'] #layout-switch {
border-radius: var(--radius-sm);
}
.texture-inspector__close:hover {
- background: #2a2a36;
+ background: #2b2b2b;
color: #fff;
}
@@ -6196,8 +6196,8 @@ body[data-viewer-mode='explore'] #layout-switch {
}
.texture-card {
- background: #0c0c14;
- border: 1px solid #22222e;
+ background: #0d0d0d;
+ border: 1px solid #232323;
border-radius: var(--radius-sm);
padding: var(--space-xs);
cursor: pointer;
@@ -6259,8 +6259,8 @@ body[data-viewer-mode='explore'] #layout-switch {
align-items: center;
justify-content: space-between;
padding: var(--space-sm) var(--space-md);
- background: #0b0b12;
- border-bottom: 1px solid #2a2a36;
+ background: #0c0c0c;
+ border-bottom: 1px solid #2b2b2b;
gap: var(--space-md);
flex-wrap: wrap;
}
@@ -6284,8 +6284,8 @@ body[data-viewer-mode='explore'] #layout-switch {
gap: 2px;
}
.texture-lightbox__channels button {
- background: #22222e;
- border: 1px solid #33334a;
+ background: #232323;
+ border: 1px solid #353535;
color: #aaa;
padding: 4px 10px;
border-radius: var(--radius-sm);
@@ -6295,7 +6295,7 @@ body[data-viewer-mode='explore'] #layout-switch {
min-width: 32px;
}
.texture-lightbox__channels button:hover {
- background: #2e2e40;
+ background: #2f2f2f;
color: #fff;
}
.texture-lightbox__channels button.active {
@@ -6313,7 +6313,7 @@ body[data-viewer-mode='explore'] #layout-switch {
border-radius: var(--radius-sm);
}
.texture-lightbox__close:hover {
- background: #2a2a36;
+ background: #2b2b2b;
color: #fff;
}
.texture-lightbox__stage {
@@ -6324,10 +6324,10 @@ body[data-viewer-mode='explore'] #layout-switch {
overflow: hidden;
padding: var(--space-md);
background:
- linear-gradient(45deg, #1a1a22 25%, transparent 25%),
- linear-gradient(-45deg, #1a1a22 25%, transparent 25%),
- linear-gradient(45deg, transparent 75%, #1a1a22 75%),
- linear-gradient(-45deg, transparent 75%, #1a1a22 75%);
+ linear-gradient(45deg, #1b1b1b 25%, transparent 25%),
+ linear-gradient(-45deg, #1b1b1b 25%, transparent 25%),
+ linear-gradient(45deg, transparent 75%, #1b1b1b 75%),
+ linear-gradient(-45deg, transparent 75%, #1b1b1b 75%);
background-size: 20px 20px;
background-position:
0 0,
@@ -6349,7 +6349,7 @@ body[data-viewer-mode='explore'] #layout-switch {
max-height: calc(100vh - 160px);
object-fit: contain;
image-rendering: pixelated;
- border: 1px solid #2a2a36;
+ border: 1px solid #2b2b2b;
background: #000;
transform-origin: center center;
transition: none;
@@ -6365,8 +6365,8 @@ body[data-viewer-mode='explore'] #layout-switch {
}
.texture-lightbox__footer {
padding: var(--space-xs) var(--space-md);
- background: #0b0b12;
- border-top: 1px solid #2a2a36;
+ background: #0c0c0c;
+ border-top: 1px solid #2b2b2b;
color: #888;
font-size: 11px;
font-family: monospace;
@@ -6697,14 +6697,14 @@ body[data-viewer-mode='main'][data-authed='false'] .auth-gate {
.auth-gate__btn--primary {
background: linear-gradient(180deg, #fff, #e8e8ef);
- color: #0a0a10;
+ color: #0a0a0a;
border-color: rgba(255, 255, 255, 0.9);
font-weight: 600;
}
.auth-gate__btn--primary:hover {
background: #fff;
- color: #0a0a10;
+ color: #0a0a0a;
border-color: #fff;
}
@@ -7571,7 +7571,7 @@ body[data-viewer-mode='main'][data-authed='false'] .auth-gate {
}
.erc8004-modal-card {
- background: #0d0d12;
+ background: #0d0d0d;
border: 1px solid rgba(255, 255, 255, 0.12);
border-radius: var(--radius-lg);
padding: var(--space-lg);
@@ -8027,7 +8027,7 @@ textarea.erc8004-code {
position: relative;
display: block;
aspect-ratio: 1 / 1;
- background: linear-gradient(135deg, #111 0%, #1a1a1f 100%);
+ background: linear-gradient(135deg, #111 0%, #1a1a1a 100%);
overflow: hidden;
text-decoration: none;
}
@@ -8323,7 +8323,7 @@ textarea.erc8004-code {
position: relative;
width: min(640px, 100%);
max-height: calc(100vh - 32px);
- background: #0f1115;
+ background: #111111;
color: #e5e5e5;
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: var(--radius-lg);
@@ -8418,7 +8418,7 @@ textarea.erc8004-code {
.embed-snippet {
display: block;
width: 100%;
- background: #05070a;
+ background: #070707;
color: #d4d4d4;
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: var(--radius-md);
@@ -8629,7 +8629,7 @@ textarea.erc8004-code {
.pumpfun-btn--primary {
background: linear-gradient(135deg, #b27dff, #6ce0c8);
border: none;
- color: #0e0a18;
+ color: #0c0c0c;
font-weight: 600;
}
.pumpfun-btn--primary:hover { filter: brightness(1.06); background: linear-gradient(135deg, #b27dff, #6ce0c8); }
@@ -9356,7 +9356,7 @@ body[data-layout='next'] .next-drawer__body .dg.main {
align-items: center;
justify-content: center;
background: rgba(255, 255, 255, 0.95);
- color: #0a0a0c;
+ color: #0a0a0a;
border: 0;
border-radius: 50%;
cursor: pointer;
@@ -10705,7 +10705,7 @@ a.pill--devnet:hover {
.tws-disc-cta:active { transform: translateY(1px); }
.tws-disc-cta:focus-visible { outline: 2px solid var(--accent, #fff); outline-offset: 2px; }
.tws-disc-cta--primary {
- color: #0b0c10;
+ color: #0c0c0c;
background: var(--accent, #fff);
border-color: var(--accent, #fff);
}
diff --git a/public/tutor.html b/public/tutor.html
index 4d143cb89..ef5734a09 100644
--- a/public/tutor.html
+++ b/public/tutor.html
@@ -9,16 +9,16 @@
<link rel="stylesheet" href="/nav.css" />
<style>
:root {
- --bg: #0b0d14;
- --surface: #11141f;
- --surface-2: #161a28;
- --border: #232838;
+ --bg: #0d0d0d;
+ --surface: #141414;
+ --surface-2: #1a1a1a;
+ --border: #282828;
--text: #e7e9f2;
--text-dim: #99a0b8;
--text-faint: #6a7088;
--accent: #7c5cff;
--accent-2: #38e0c8;
- --user: #1f2740;
+ --user: #272727;
--ok: #38d39f;
--radius: 14px;
--shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
@@ -96,7 +96,7 @@
border: 1px solid var(--border); white-space: pre-wrap; word-wrap: break-word;
}
.msg.user { align-items: flex-end; }
- .msg.user .bubble { background: var(--user); border-color: #2c3654; max-width: 86%; }
+ .msg.user .bubble { background: var(--user); border-color: #363636; max-width: 86%; }
.msg.tutor .bubble { background: var(--surface); }
.msg.error .bubble { background: #2a1620; border-color: #5a2a3a; color: #ffb4c4; }
@@ -106,7 +106,7 @@
.kp li { margin: 3px 0; }
.ex { margin-top: 12px; }
.ex pre {
- margin: 0; background: #0a0c13; border: 1px solid var(--border); border-radius: 10px;
+ margin: 0; background: #0c0c0c; border: 1px solid var(--border); border-radius: 10px;
padding: 13px 14px; overflow-x: auto; font-family: var(--mono); font-size: 13px; color: #cdd3e6;
}
.followup { margin-top: 10px; font-size: 13px; color: var(--text-faint); }
diff --git a/public/validation/index.html b/public/validation/index.html
index c9634232f..db1b326fc 100644
--- a/public/validation/index.html
+++ b/public/validation/index.html
@@ -14,10 +14,10 @@
color-scheme: dark;
--accent: #ffffff;
--accent2: #ffffff;
- --border: #22222e;
+ --border: #232323;
--bg: #000;
- --panel: #14141c;
- --panel2: #1a1a24;
+ --panel: #151515;
+ --panel2: #1b1b1b;
--muted: #888;
--text: #eee;
--text-soft: #bbb;
@@ -102,7 +102,7 @@
filter: none;
}
.btn.sec {
- background: #222230;
+ background: #232323;
color: #ddd;
}
.btn.ghost {
@@ -119,7 +119,7 @@
textarea,
select {
width: 100%;
- background: #0f0f17;
+ background: #101010;
border: 1px solid var(--border);
color: #eee;
padding: 9px 11px;
@@ -541,7 +541,7 @@
}
.records-toolbar input {
padding: 9px 11px;
- background: #0f0f17;
+ background: #101010;
border: 1px solid var(--border);
color: #eee;
border-radius: 8px;
@@ -639,7 +639,7 @@
}
.record-actions button:hover,
.record-actions a:hover {
- background: #22222e;
+ background: #232323;
}
.record-notes {
font-size: 13px;
@@ -702,7 +702,7 @@
pointer-events: auto;
}
.modal {
- background: #0e0e16;
+ background: #0f0f0f;
border: 1px solid var(--border);
border-radius: 14px;
padding: 22px;
@@ -753,7 +753,7 @@
.file-input-label {
display: block;
padding: 18px;
- background: #0f0f17;
+ background: #101010;
border: 2px dashed var(--border);
border-radius: 8px;
text-align: center;
@@ -765,7 +765,7 @@
color: var(--text-soft);
}
pre {
- background: #0f0f17;
+ background: #101010;
border: 1px solid var(--border);
border-radius: 8px;
padding: 10px 12px;
diff --git a/public/wallet-connect-demo.html b/public/wallet-connect-demo.html
index bc6a37107..377a5fb12 100644
--- a/public/wallet-connect-demo.html
+++ b/public/wallet-connect-demo.html
@@ -36,8 +36,8 @@
max-width: 800px;
}
.demo-card {
- background: #14141c;
- border: 1px solid #22222e;
+ background: #151515;
+ border: 1px solid #232323;
border-radius: 12px;
padding: 20px;
display: flex;
diff --git a/public/wallet-connect.css b/public/wallet-connect.css
index 6cb92ea45..4233d916e 100644
--- a/public/wallet-connect.css
+++ b/public/wallet-connect.css
@@ -11,8 +11,8 @@
font-size: 14px;
font-weight: 500;
border-radius: 8px;
- border: 1px solid #2a2a36;
- background: #1c1c28;
+ border: 1px solid #2b2b2b;
+ background: #1d1d1d;
color: #eee;
cursor: pointer;
transition:
@@ -25,7 +25,7 @@
}
.cwb-btn:hover:not(:disabled) {
- background: #22222e;
+ background: #232323;
border-color: #ffffff;
}
diff --git a/public/wallet/connect-button.js b/public/wallet/connect-button.js
index 247d9190b..a78249d18 100644
--- a/public/wallet/connect-button.js
+++ b/public/wallet/connect-button.js
@@ -307,8 +307,8 @@ function ensurePickerStyles() {
s.textContent = `
.cwb-picker {
position: fixed;
- background: #18181b;
- border: 1px solid #2d2d32;
+ background: #181818;
+ border: 1px solid #2d2d2d;
border-radius: 10px;
box-shadow: 0 8px 32px rgba(0,0,0,0.5);
overflow: hidden;
@@ -332,7 +332,7 @@ function ensurePickerStyles() {
white-space: nowrap;
}
.cwb-pick-item:hover { background: rgba(255,255,255,0.07); }
- .cwb-pick-item + .cwb-pick-item { border-top: 1px solid #2d2d32; }
+ .cwb-pick-item + .cwb-pick-item { border-top: 1px solid #2d2d2d; }
.cwb-pick-icon {
display: inline-flex;
align-items: center;
diff --git a/public/widgets-gallery/gallery.css b/public/widgets-gallery/gallery.css
index 418e07f05..2791ca193 100644
--- a/public/widgets-gallery/gallery.css
+++ b/public/widgets-gallery/gallery.css
@@ -914,7 +914,7 @@ body.gallery-body {
top: calc(100% + 4px);
right: 0;
min-width: 11rem;
- background: #0e0e14;
+ 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);
diff --git a/public/x402-stripe.html b/public/x402-stripe.html
index 452e4f1b6..8dc277793 100644
--- a/public/x402-stripe.html
+++ b/public/x402-stripe.html
@@ -5,18 +5,18 @@
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>x402 — payments, drop-in</title>
<meta name="description" content="The simplest way to accept x402 stablecoin payments. One <script> tag, a clean modal, on-chain settlement on Base and Solana." />
-<meta name="theme-color" content="#0a0b10" />
+<meta name="theme-color" content="#0b0b0b" />
<meta property="og:title" content="x402 — payments, drop-in" />
<meta property="og:description" content="One <script> tag. Clean modal. On-chain x402 settlement on Base and Solana." />
<meta property="og:type" content="website" />
<style>
:root {
- --bg: #0a0b10;
- --bg-2: #0f1119;
- --panel: #14161f;
- --panel-2: #1a1d29;
- --border: #232636;
- --border-strong: #2e3447;
+ --bg: #0b0b0b;
+ --bg-2: #111111;
+ --panel: #161616;
+ --panel-2: #1d1d1d;
+ --border: #272727;
+ --border-strong: #343434;
--text: #f0f2f8;
--muted: #8a90a8;
--muted-2: #6b7088;
@@ -73,14 +73,14 @@
.btn {
display: inline-flex; align-items: center; gap: 8px;
padding: 13px 22px;
- background: #ffffff; color: #0a0b10;
+ background: #ffffff; color: #0b0b0b;
border: none; border-radius: 11px;
font-size: 14px; font-weight: 600; font-family: inherit;
cursor: pointer; letter-spacing: -0.005em;
text-decoration: none;
transition: transform 0.06s, background 0.12s;
}
- .btn:hover { background: #e7e9ee; color: #0a0b10; }
+ .btn:hover { background: #e7e9ee; color: #0b0b0b; }
.btn:active { transform: translateY(1px); }
.btn.ghost {
background: transparent; color: var(--text);
@@ -121,7 +121,7 @@
/* Snippet */
.snippet {
- background: #0d0f15; border: 1px solid var(--border); border-radius: 14px;
+ background: #0f0f0f; border: 1px solid var(--border); border-radius: 14px;
padding: 18px 22px;
font-family: var(--mono); font-size: 13px; line-height: 1.65;
color: #c8ccd4; white-space: pre;
@@ -175,7 +175,7 @@
}
.sku-card .buy {
padding: 12px 16px;
- background: #ffffff; color: #0a0b10;
+ background: #ffffff; color: #0b0b0b;
border: none; border-radius: 10px;
font-size: 14px; font-weight: 600; font-family: inherit;
cursor: pointer; letter-spacing: -0.005em;
@@ -209,7 +209,7 @@
.step-card .num {
display: inline-flex; width: 28px; height: 28px;
align-items: center; justify-content: center;
- background: linear-gradient(135deg, #ffffff, #60a5fa); color: #0a0b10;
+ background: linear-gradient(135deg, #ffffff, #60a5fa); color: #0b0b0b;
border-radius: 8px; font-weight: 700; font-size: 13px;
margin-bottom: 14px;
}
diff --git a/public/x402.js b/public/x402.js
index 575857011..ed1b6319e 100644
--- a/public/x402.js
+++ b/public/x402.js
@@ -63,6 +63,19 @@ const EVM_NETWORKS = {
'eip155:10': { chainId: 10, name: 'Optimism', explorer: 'https://optimistic.etherscan.io/tx/' },
};
+// Normalize a single 402 `accept` entry to the shape the modal speaks
+// internally. The x402 spec's canonical atomic-price field is
+// `maxAmountRequired`; some merchants (and our own server) emit `amount`. We
+// read `amount` everywhere downstream (price display, cap check, prepare/encode
+// POST body, EIP-3009 signing), so coerce here once at ingestion. Without this,
+// a spec-compliant merchant yields `accept.amount === undefined` → "NaN USDC"
+// in the modal and an `accept.amount: Required` 400 from /api/x402-checkout.
+function normalizeAccept(accept) {
+ if (!accept || typeof accept !== 'object') return accept;
+ const amount = accept.amount ?? accept.maxAmountRequired;
+ return amount != null && accept.amount == null ? { ...accept, amount: String(amount) } : accept;
+}
+
function isSolanaNetwork(net) {
return typeof net === 'string' && (net === 'solana' || net.startsWith('solana:'));
}
@@ -358,7 +371,7 @@ const STYLES = `
opacity: 0; transition: opacity 0.16s ease-out;
font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
-webkit-font-smoothing: antialiased;
- color: #0d0f15;
+ color: #0f0f0f;
}
.x402-overlay.x402-open { opacity: 1; }
.x402-overlay * { box-sizing: border-box; }
@@ -387,7 +400,7 @@ const STYLES = `
margin-bottom: 2px;
}
.x402-merchant .x402-action {
- font-size: 17px; font-weight: 700; color: #0d0f15;
+ font-size: 17px; font-weight: 700; color: #0f0f0f;
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
letter-spacing: -0.01em;
}
@@ -398,7 +411,7 @@ const STYLES = `
display: flex; align-items: center; justify-content: center;
transition: background 0.12s;
}
-.x402-close:hover { background: #e7e9ee; color: #0d0f15; }
+.x402-close:hover { background: #e7e9ee; color: #0f0f0f; }
.x402-price-row {
padding: 18px 20px;
@@ -407,7 +420,7 @@ const STYLES = `
border-bottom: 1px solid #eef0f4;
}
.x402-price {
- font-size: 32px; font-weight: 700; letter-spacing: -0.02em; color: #0d0f15;
+ font-size: 32px; font-weight: 700; letter-spacing: -0.02em; color: #0f0f0f;
font-variant-numeric: tabular-nums;
}
.x402-price .x402-currency { font-size: 14px; color: #5a6378; font-weight: 600; margin-left: 6px; letter-spacing: 0; }
@@ -453,7 +466,7 @@ const STYLES = `
to { box-shadow: 0 0 0 8px rgba(10, 132, 255, 0); }
}
.x402-step-body { flex: 1; min-width: 0; }
-.x402-step-label { font-size: 14px; font-weight: 600; color: #0d0f15; line-height: 1.35; }
+.x402-step-label { font-size: 14px; font-weight: 600; color: #0f0f0f; line-height: 1.35; }
.x402-step-meta { font-size: 12px; color: #5a6378; margin-top: 2px; font-feature-settings: 'tnum' 1; }
.x402-step.x402-error .x402-step-meta { color: #ef4444; }
@@ -464,7 +477,7 @@ const STYLES = `
.x402-wallet-btn {
width: 100%; padding: 13px 14px;
background: #ffffff; border: 1.5px solid #e2e5ec; border-radius: 11px;
- font-size: 14px; font-weight: 600; color: #0d0f15;
+ font-size: 14px; font-weight: 600; color: #0f0f0f;
cursor: pointer; font-family: inherit;
display: flex; align-items: center; gap: 12px;
transition: border-color 0.12s, background 0.12s, transform 0.05s;
@@ -486,7 +499,7 @@ const STYLES = `
.x402-pay-btn {
width: 100%; padding: 14px 16px;
- background: #0d0f15; color: #fff; border: none;
+ background: #0f0f0f; color: #fff; border: none;
border-radius: 12px;
font-size: 15px; font-weight: 700; font-family: inherit;
cursor: pointer; letter-spacing: -0.005em;
@@ -494,13 +507,13 @@ const STYLES = `
margin-top: 4px;
display: flex; align-items: center; justify-content: center; gap: 8px;
}
-.x402-pay-btn:hover:not(:disabled) { background: #1a1d28; }
+.x402-pay-btn:hover:not(:disabled) { background: #1d1d1d; }
.x402-pay-btn:active:not(:disabled) { transform: translateY(1px); }
.x402-pay-btn:disabled { background: #c8ccd4; cursor: not-allowed; }
.x402-pay-secondary {
width: 100%; padding: 12px 14px;
- background: #ffffff; color: #0d0f15;
+ background: #ffffff; color: #0f0f0f;
border: 1.5px solid #e2e5ec; border-radius: 11px;
font-size: 14px; font-weight: 600; font-family: inherit;
cursor: pointer; letter-spacing: -0.005em;
@@ -548,7 +561,7 @@ const STYLES = `
font-family: ui-monospace, "JetBrains Mono", Menlo, monospace;
}
.x402-receipt-row .x402-k { color: #5a6378; }
-.x402-receipt-row .x402-v { color: #0d0f15; text-align: right; word-break: break-all; }
+.x402-receipt-row .x402-v { color: #0f0f0f; text-align: right; word-break: break-all; }
.x402-receipt-row a { color: #0a84ff; text-decoration: none; }
.x402-receipt-row a:hover { text-decoration: underline; }
@@ -557,7 +570,7 @@ const STYLES = `
background: #fafbfc; border: 1px solid #e2e5ec;
max-height: 240px; overflow: auto;
font-family: ui-monospace, "JetBrains Mono", Menlo, monospace;
- font-size: 12px; line-height: 1.5; color: #0d0f15;
+ font-size: 12px; line-height: 1.5; color: #0f0f0f;
white-space: pre-wrap; word-break: break-word;
}
@@ -568,7 +581,7 @@ const STYLES = `
font-size: 11px; color: #8a90a8;
}
.x402-foot a { color: #5a6378; text-decoration: none; font-weight: 600; }
-.x402-foot a:hover { color: #0d0f15; }
+.x402-foot a:hover { color: #0f0f0f; }
.x402-foot .x402-secure { display: flex; align-items: center; gap: 5px; }
.x402-foot .x402-secure::before { content: '🔒'; font-size: 10px; }
@@ -579,30 +592,30 @@ const STYLES = `
@media (prefers-color-scheme: dark) {
.x402-overlay { color: #e6e8f0; }
- .x402-modal { background: #14161f; box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6); }
- .x402-head, .x402-price-row, .x402-foot { border-color: #232636; }
- .x402-step + .x402-step { border-top-color: #232636; }
+ .x402-modal { background: #161616; box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6); }
+ .x402-head, .x402-price-row, .x402-foot { border-color: #272727; }
+ .x402-step + .x402-step { border-top-color: #272727; }
.x402-merchant .x402-name { color: #8a90a8; }
.x402-merchant .x402-action, .x402-price, .x402-step-label { color: #e6e8f0; }
.x402-step-meta { color: #8a90a8; }
- .x402-close { background: #1f2230; color: #8a90a8; }
- .x402-close:hover { background: #2a2e3d; color: #e6e8f0; }
- .x402-price-row { background: linear-gradient(180deg, #1a1d29 0%, #14161f 100%); }
- .x402-network { background: #1f2230; color: #b0b6cc; }
- .x402-wallet-btn { background: #1a1d29; border-color: #2a2e3d; color: #e6e8f0; }
- .x402-wallet-btn:hover:not(:disabled) { background: #20243a; border-color: #0a84ff; }
- .x402-wallet-icon { background: #2a2e3d; }
+ .x402-close { background: #222222; color: #8a90a8; }
+ .x402-close:hover { background: #2e2e2e; color: #e6e8f0; }
+ .x402-price-row { background: linear-gradient(180deg, #1d1d1d 0%, #161616 100%); }
+ .x402-network { background: #222222; color: #b0b6cc; }
+ .x402-wallet-btn { background: #1d1d1d; border-color: #2e2e2e; color: #e6e8f0; }
+ .x402-wallet-btn:hover:not(:disabled) { background: #252525; border-color: #0a84ff; }
+ .x402-wallet-icon { background: #2e2e2e; }
.x402-wallet-meta { color: #6b7088; }
- .x402-pay-btn { background: #ffffff; color: #0d0f15; }
+ .x402-pay-btn { background: #ffffff; color: #0f0f0f; }
.x402-pay-btn:hover:not(:disabled) { background: #e7e9ee; }
- .x402-pay-btn:disabled { background: #2a2e3d; color: #5a6378; }
- .x402-pay-secondary { background: #1a1d29; border-color: #2a2e3d; color: #e6e8f0; }
- .x402-pay-secondary:hover:not(:disabled) { background: #20243a; border-color: #0a84ff; }
+ .x402-pay-btn:disabled { background: #2e2e2e; color: #5a6378; }
+ .x402-pay-secondary { background: #1d1d1d; border-color: #2e2e2e; color: #e6e8f0; }
+ .x402-pay-secondary:hover:not(:disabled) { background: #252525; border-color: #0a84ff; }
.x402-siwx-hint { color: #8a90a8; }
.x402-siwx-fallback { background: #2a1d10; border-color: #78350f; color: #fcd34d; }
- .x402-step-num { background: #14161f; border-color: #2a2e3d; color: #8a90a8; }
- .x402-result { background: #1a1d29; border-color: #2a2e3d; color: #e6e8f0; }
- .x402-receipt { background: linear-gradient(180deg, #0b1f17 0%, #14161f 100%); border-color: #14532d; }
+ .x402-step-num { background: #161616; border-color: #2e2e2e; color: #8a90a8; }
+ .x402-result { background: #1d1d1d; border-color: #2e2e2e; color: #e6e8f0; }
+ .x402-receipt { background: linear-gradient(180deg, #0b1f17 0%, #161616 100%); border-color: #14532d; }
.x402-receipt-title { color: #4ade80; }
.x402-receipt-row .x402-k { color: #8a90a8; }
.x402-receipt-row .x402-v { color: #e6e8f0; }
diff --git a/scripts/neutralize-blue-ui.mjs b/scripts/neutralize-blue-ui.mjs
new file mode 100644
index 000000000..581216ce3
--- /dev/null
+++ b/scripts/neutralize-blue-ui.mjs
@@ -0,0 +1,86 @@
+#!/usr/bin/env node
+// Neutralize blue-tinted dark UI surfaces/borders to luminance-matched grayscale.
+//
+// The site had a creeping "blueish-black" cast (e.g. /bazaar's #0a0b10 background)
+// instead of the homepage's neutral black. This rewrites the dark chrome tones —
+// page backgrounds, surfaces, panels, dividers/borders — to neutral gray of the
+// SAME perceived lightness, so contrast and elevation are preserved while the
+// blue tint is removed. Vivid accents (links, brand colors) and light text tints
+// are left untouched: we only touch strictly blue-dominant tones that are dark
+// (max channel <= 0x58), which is exactly the surface/border band.
+//
+// Usage: node scripts/neutralize-blue-ui.mjs [--apply]
+// (default is a dry run that only reports what would change)
+
+import { readFileSync, writeFileSync } from 'node:fs';
+import { execSync } from 'node:child_process';
+
+const APPLY = process.argv.includes('--apply');
+const MAX_CHANNEL = 0x58; // 88 — surfaces & borders only, never text/accents
+
+// Files in scope: document chrome (HTML/CSS) + the shared payment widget JS.
+// src/*.js is intentionally excluded — it holds 3D scene/material colors where a
+// blue cast can be a deliberate atmospheric choice, not page chrome.
+// Note: git's `**` pathspec does not match top-level files, so list whole trees
+// and filter by extension here instead.
+const tracked = execSync('git ls-files public pages src', { encoding: 'utf8' })
+ .split('\n').filter(Boolean);
+
+const files = tracked.filter((f) => {
+ if (f.startsWith('public/') || f.startsWith('pages/')) {
+ return /\.(html|css|js)$/.test(f);
+ }
+ // src/*.js holds 3D scene/material colors — chrome lives in stylesheets only.
+ if (f.startsWith('src/')) return f.endsWith('.css');
+ return false;
+});
+
+const luma = (r, g, b) => Math.round(0.2126 * r + 0.7152 * g + 0.0722 * b);
+const hx = (n) => n.toString(16).padStart(2, '0');
+
+// Decide replacement for a 6-digit hex, or null to leave it alone.
+function neutralize(r, g, b) {
+ const max = Math.max(r, g, b);
+ const isBlueDominant = b > r && b > g && b - r >= 2;
+ if (!isBlueDominant || max > MAX_CHANNEL) return null;
+ const l = hx(luma(r, g, b));
+ return `${l}${l}${l}`;
+}
+
+const colorRe = /#([0-9a-fA-F]{8}|[0-9a-fA-F]{6})\b/g;
+
+let filesChanged = 0;
+let totalSubs = 0;
+const distinct = new Map(); // old -> { to, count }
+
+for (const file of files) {
+ const src = readFileSync(file, 'utf8');
+ let subs = 0;
+ const out = src.replace(colorRe, (match, hex) => {
+ const r = parseInt(hex.slice(0, 2), 16);
+ const g = parseInt(hex.slice(2, 4), 16);
+ const b = parseInt(hex.slice(4, 6), 16);
+ const alpha = hex.length === 8 ? hex.slice(6, 8) : '';
+ const gray = neutralize(r, g, b);
+ if (!gray) return match;
+ subs++;
+ const key = '#' + hex.toLowerCase();
+ const rec = distinct.get(key) || { to: '#' + gray, count: 0 };
+ rec.count++;
+ distinct.set(key, rec);
+ return '#' + gray + alpha;
+ });
+ if (subs > 0) {
+ filesChanged++;
+ totalSubs += subs;
+ if (APPLY) writeFileSync(file, out);
+ }
+}
+
+console.log(`${APPLY ? 'APPLIED' : 'DRY RUN'}: ${totalSubs} substitutions across ${filesChanged} files`);
+console.log(`${distinct.size} distinct colors neutralized:\n`);
+const rows = [...distinct.entries()].sort((a, b) => b[1].count - a[1].count);
+for (const [from, { to, count }] of rows) {
+ console.log(` ${from} -> ${to} (${count})`);
+}
+if (!APPLY) console.log('\nRe-run with --apply to write changes.');
diff --git a/src/agent-detail.css b/src/agent-detail.css
index a1f5e2615..3d7a9b3d4 100644
--- a/src/agent-detail.css
+++ b/src/agent-detail.css
@@ -1,7 +1,7 @@
:root {
- --ad-bg: #0b0d10;
- --ad-bg-2: #111418;
- --ad-card: #14181d;
+ --ad-bg: #0d0d0d;
+ --ad-bg-2: #141414;
+ --ad-card: #181818;
--ad-line: rgba(255, 255, 255, 0.07);
--ad-line-2: rgba(255, 255, 255, 0.12);
--ad-text: #e7e9ee;
@@ -50,7 +50,7 @@ a { color: inherit; text-decoration: none; }
.ad-main { padding: 0; max-width: 920px; margin: 0 auto; width: 100%; }
.ad-banner {
- background: linear-gradient(90deg, #1a1545, #2a1a55);
+ background: linear-gradient(90deg, #1a1a1a, #222222);
color: var(--ad-text);
font-size: 12px;
text-align: center;
diff --git a/src/character.css b/src/character.css
index 94641fc2d..969f9a401 100644
--- a/src/character.css
+++ b/src/character.css
@@ -6,7 +6,7 @@ body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
min-height: 100vh;
background: linear-gradient(160deg, #c8dff7 0%, #e8f4ff 40%, #f0f8ff 100%);
- color: #1a1a2e;
+ color: #1b1b1b;
}
/* ── Hero ─────────────────────────────────────────────── */
@@ -107,7 +107,7 @@ body {
font-size: 18px;
font-weight: 700;
line-height: 1;
- color: #1a1a2e;
+ color: #1b1b1b;
}
.ch-stat-label {
@@ -119,7 +119,7 @@ body {
.ch-desc {
font-size: 14px;
line-height: 1.6;
- color: #374151;
+ color: #404040;
max-width: 480px;
}
@@ -174,7 +174,7 @@ body {
.ch-token-name {
font-size: 16px;
font-weight: 700;
- color: #1a1a2e;
+ color: #1b1b1b;
}
.ch-token-dot {
@@ -195,7 +195,7 @@ body {
.ch-price-main {
font-size: 28px;
font-weight: 700;
- color: #1a1a2e;
+ color: #1b1b1b;
}
.ch-price-change {
@@ -217,7 +217,7 @@ body {
.ch-trade-btn {
flex: 1;
- background: #0f172a;
+ background: #171717;
color: #fff;
border: none;
border-radius: 32px;
@@ -233,7 +233,7 @@ body {
transition: background 0.15s;
}
-.ch-trade-btn:hover { background: #1e293b; }
+.ch-trade-btn:hover { background: #282828; }
.ch-chart-btn {
width: 44px;
@@ -247,7 +247,7 @@ body {
cursor: pointer;
flex-shrink: 0;
text-decoration: none;
- color: #374151;
+ color: #404040;
}
.ch-token-meta {
@@ -275,7 +275,7 @@ body {
.ch-token-meta-val {
font-size: 13px;
font-weight: 600;
- color: #1a1a2e;
+ color: #1b1b1b;
}
/* no token state */
@@ -291,7 +291,7 @@ body {
font-size: 20px;
font-weight: 700;
margin-bottom: 14px;
- color: #1a1a2e;
+ color: #1b1b1b;
}
.ch-gallery-grid {
diff --git a/src/characters.css b/src/characters.css
index 3fd3bbd00..a885f18f6 100644
--- a/src/characters.css
+++ b/src/characters.css
@@ -6,7 +6,7 @@ body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
min-height: 100vh;
background: linear-gradient(160deg, #c8dff7 0%, #e8f4ff 40%, #f0f8ff 100%);
- color: #1a1a2e;
+ color: #1b1b1b;
}
/* ── Header ───────────────────────────────────────────── */
@@ -38,7 +38,7 @@ body {
border-radius: 32px;
padding: 10px 18px;
font-size: 14px;
- color: #1a1a2e;
+ color: #1b1b1b;
outline: none;
}
@@ -69,7 +69,7 @@ body {
.chs-sort-btn.active {
background: #fff;
- color: #1a1a2e;
+ color: #1b1b1b;
font-weight: 600;
box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
@@ -164,7 +164,7 @@ body {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
- color: #1a1a2e;
+ color: #1b1b1b;
}
.chs-card-creator {
@@ -205,13 +205,13 @@ body {
.chs-card-token-symbol {
font-size: 11px;
font-weight: 700;
- color: #1a1a2e;
+ color: #1b1b1b;
}
.chs-card-token-price {
font-size: 13px;
font-weight: 700;
- color: #1a1a2e;
+ color: #1b1b1b;
}
.chs-card-token-change {
@@ -238,7 +238,7 @@ body {
.chs-card-stat-num {
font-weight: 600;
- color: #374151;
+ color: #404040;
}
/* ── Load more ────────────────────────────────────────── */
@@ -255,7 +255,7 @@ body {
padding: 12px 32px;
font-size: 14px;
font-weight: 600;
- color: #1a1a2e;
+ color: #1b1b1b;
cursor: pointer;
}
diff --git a/src/create.js b/src/create.js
index 1c0595fb8..c46ef3ed3 100644
--- a/src/create.js
+++ b/src/create.js
@@ -1,6 +1,7 @@
import { apiFetch } from './account.js';
import { AvatarCreator } from './avatar-creator.js';
import { stage as stageGuestAvatar } from './guest-avatar.js';
+import { createFromTemplate } from './shared/template-picker.js';
import { log } from './shared/log.js';
// GLB magic bytes: ASCII "glTF"
@@ -132,6 +133,10 @@ async function boot() {
});
wireCard('card-default-editor', async () => {
+ if (window.__authed && (await isAtAvatarLimit())) return;
+ createFromTemplate();
+ });
+ wireCard('card-customize', async () => {
if (window.__authed && (await isAtAvatarLimit())) return;
creator.openDefaultEditor();
});
diff --git a/src/first-meet.css b/src/first-meet.css
index 006a8d323..862182b81 100644
--- a/src/first-meet.css
+++ b/src/first-meet.css
@@ -242,7 +242,7 @@
.fm-tour-primary {
background: #ffffff;
- color: #0a0a0f;
+ color: #0a0a0a;
border: none;
border-radius: 8px;
padding: 6px 14px;
diff --git a/src/friends-panel.css b/src/friends-panel.css
index b45f0b934..ea0ee3356 100644
--- a/src/friends-panel.css
+++ b/src/friends-panel.css
@@ -4,7 +4,7 @@
the panel looks consistent everywhere without polluting the host page. */
.wf-friends {
- --kg-bg: #0d1420;
+ --kg-bg: #131313;
--kg-panel: rgba(16, 22, 34, 0.96);
--kg-line: rgba(255, 255, 255, 0.12);
--kg-text: #e8edf6;
diff --git a/src/game/coincommunities.css b/src/game/coincommunities.css
index 84228ab33..641fe6cbe 100644
--- a/src/game/coincommunities.css
+++ b/src/game/coincommunities.css
@@ -8,10 +8,10 @@
:root {
--cc-bg: #060607;
- --cc-bg2: #101012;
- --cc-bg3: #18181b;
+ --cc-bg2: #101010;
+ --cc-bg3: #181818;
--cc-panel: rgba(12, 12, 14, 0.78);
- --cc-panel-solid: #0c0c0e;
+ --cc-panel-solid: #0c0c0c;
--cc-edge: rgba(255, 255, 255, 0.12);
--cc-edge-soft: rgba(255, 255, 255, 0.07);
--cc-edge-hi: rgba(255, 255, 255, 0.55);
@@ -46,7 +46,7 @@ html, body {
/* ---------------- loading ---------------- */
#kx-loading, #cc-loading {
position: fixed; inset: 0; display: grid; place-items: center; z-index: 80;
- background: radial-gradient(circle at 50% 38%, #161618, #050505 72%);
+ background: radial-gradient(circle at 50% 38%, #161616, #050505 72%);
transition: opacity 0.5s ease;
}
#kx-loading.kx-hidden, #cc-loading.cc-hidden { opacity: 0; pointer-events: none; }
@@ -1200,7 +1200,7 @@ html, body {
}
.cc-build-toggle.cc-on {
background: #f4f5f7;
- color: #0c0e14;
+ color: #0e0e0e;
border-color: #f4f5f7;
}
.cc-build-toggle:disabled {
@@ -1416,7 +1416,7 @@ html, body {
.pg-root.pg-leaving { animation: pg-fade 0.3s ease reverse forwards; pointer-events: none; }
.pg-backdrop {
position: absolute; inset: 0;
- background: radial-gradient(circle at 50% 36%, #161618, #050505 74%);
+ background: radial-gradient(circle at 50% 36%, #161616, #050505 74%);
backdrop-filter: saturate(130%) blur(6px);
}
.pg-card {
diff --git a/src/game/coincommunities.js b/src/game/coincommunities.js
index 5cf465d39..1b434f32c 100644
--- a/src/game/coincommunities.js
+++ b/src/game/coincommunities.js
@@ -42,6 +42,7 @@ import { ensurePlayAccess } from './play-gate.js';
import { clearStoredPass, fetchPlayConfig, signInToPlay, loadStoredPass, storePass } from './play-auth.js';
import { PlaySystems } from './play-systems.js';
import { PlayOnboard } from './play-onboard.js';
+import { WorldHudSystem } from './hud/index.js';
import { log } from '../shared/log.js';
const WORLD_RADIUS = 58; // a touch inside the server's 60m clamp
@@ -1015,6 +1016,12 @@ export class CoinCommunities {
// Invalidate any in-flight enter() so a connect/avatar continuation that
// resolves after this teardown bails instead of rebuilding the world.
this._enterEpoch = (this._enterEpoch || 0) + 1;
+ // Stand the W10 HUD down: close any open menu, hide the chrome, and forget the
+ // per-world vitals so the next world doesn't pop a phantom money/damage cue.
+ this.worldHud.closeMenus();
+ this.hud.hide();
+ this.camRig.reset();
+ this._prevGold = null; this._prevHp = null;
// Tear voice down before the socket so our final "left voice" flag still
// sends, and peers' connections close cleanly.
clearTimeout(this._passRefreshTimer);
diff --git a/src/game/community-net.js b/src/game/community-net.js
index 56988256b..d7e17dafb 100644
--- a/src/game/community-net.js
+++ b/src/game/community-net.js
@@ -96,6 +96,10 @@ export class CommunityNet {
// refuses with a play_pass_* error. Sent for all tiers, not just holders.
this.playPass = opts.playPass || '';
this.account = opts.account || '';
+ // Pre-join cosmetic loadout (W03): the compact wire string the creator built.
+ // The server re-validates ownership before applying it, so an unowned premium
+ // id here is simply dropped — never trusted.
+ this.cosmetics = opts.cosmetics || '';
// Stable economy persistence key (wallet when signed in, else a guest id).
this.pid = persistedPid(this.account);
this.url = opts.url || defaultServerUrl();
@@ -106,6 +110,7 @@ export class CommunityNet {
this.error = null;
this.sessionId = null;
this.persistent = false; // set true once the server says this world is Redis-backed
+ this.worldTime = 0; // authoritative day fraction [0,1) for the day/night cycle
this._handlers = {
status: new Set(),
@@ -123,13 +128,22 @@ export class CommunityNet {
blockRemove: new Set(), // (key) — a voxel was broken
editReject: new Set(), // ({reason}) — the server refused one of our edits
persistent: new Set(), // (bool) — whether this world's build is durably saved
+ worldtime: new Set(), // (frac) — authoritative day fraction [0,1) for day/night
// Off-schema economy (private to this player; delivered as targeted messages).
profile: new Set(), // (snapshot) — full purse/pack/skills on join + on demand
inv: new Set(), // ({inv, hotbar, activeSlot, gold, hp, maxHp}) — economy delta
xpgain: new Set(), // ({skill, amount, xp, level, levelXp, nextXp})
levelup: new Set(), // ({skill, level})
- notice: new Set(), // ({kind, text, ...}) — activity result toast (fish/eat/tool/full)
+ notice: new Set(), // ({kind, text, ...}) — activity result toast (fish/eat/tool/full/quest)
+ quests: new Set(), // ({offers, active, day}) — jobs board + active runs (W05)
+ questComplete: new Set(), // ({id, title, reward, kind, coop}) — a mission/heist finished
combat: new Set(), // ({node, kind, mobHp, mobMaxHp, playerHp, playerMaxHp, dealt, dead, ...}) — combat-lite exchange
+ // Vehicles (synced world entities). add/change/remove mirror the player
+ // callbacks; `vehicle` carries the server's targeted enter/exit/deny ack.
+ vehicleAdd: new Set(), // (vehicle, id) — a vehicle entered our view (spawn/restore)
+ vehicleChange: new Set(), // (vehicle, id) — its transform/driver changed
+ vehicleRemove: new Set(), // (id) — a vehicle left the world
+ vehicle: new Set(), // ({event, id, ...}) — enter/exit/deny ack for our request
};
this.ping = null; // smoothed RTT in ms, null until the first echo
this._pingSentAt = 0; // perf-clock stamp of the last move awaiting an echo
@@ -211,6 +225,9 @@ export class CommunityNet {
// when it is. The verified wallet rides inside the signed pass; the server
// binds it as the account id, so we never trust a raw `account` option.
playPass: this.playPass,
+ // Pre-join cosmetic loadout (W03). Server-validated against ownership
+ // before it dresses the player, so peers can trust the broadcast look.
+ cosmetics: this.cosmetics,
// Stable persistence key for the off-schema economy (used only when the
// server hasn't verified a wallet account of its own — i.e. un-gated/dev).
pid: this.pid,
@@ -242,7 +259,13 @@ export class CommunityNet {
this.room.onMessage('xpgain', (msg) => this._emit('xpgain', msg || {}));
this.room.onMessage('levelup', (msg) => this._emit('levelup', msg || {}));
this.room.onMessage('notice', (msg) => this._emit('notice', msg || {}));
+ // Quests, jobs & heists (W05): the board + active runs and completion events.
+ this.room.onMessage('quests', (msg) => this._emit('quests', msg || {}));
+ this.room.onMessage('questComplete', (msg) => this._emit('questComplete', msg || {}));
this.room.onMessage('combat', (msg) => this._emit('combat', msg || {}));
+ // Vehicles: the server's targeted reply to our enter/exit request (grant,
+ // drop point, or denial). World transforms arrive via the state callbacks.
+ this.room.onMessage('vehicle', (msg) => this._emit('vehicle', msg || {}));
const $ = getStateCallbacks(this.room);
const $state = $(this.room.state);
@@ -286,12 +309,30 @@ export class CommunityNet {
$blocks.onRemove((_b, key) => this._emit('blockRemove', key));
}
+ // Vehicles: synced world entities. The full parked fleet arrives via onAdd
+ // at join; onChange streams each driver's transform; onRemove drops one.
+ // Optional field (servers pre-dating vehicles omit it) — guarded like blocks.
+ const $vehicles = $state?.vehicles;
+ if ($vehicles) {
+ $vehicles.onAdd((vehicle, id) => {
+ this._emit('vehicleAdd', vehicle, id);
+ $(vehicle).onChange(() => this._emit('vehicleChange', vehicle, id));
+ });
+ $vehicles.onRemove((_v, id) => this._emit('vehicleRemove', id));
+ }
+
// Durability flag for this world's build (Redis-backed vs memory-only).
// Set once at room creation; listen so the HUD reflects it as soon as the
// first state patch lands and if it ever degrades mid-session.
this.persistent = !!this.room.state.persistent;
$state?.listen?.('persistent', (v) => { this.persistent = !!v; this._emit('persistent', !!v); });
+ // Authoritative time of day for the day/night cycle. The server advances it
+ // ~1Hz; the scene reads net.worldTime and interpolates between updates, so a
+ // coarse broadcast still renders a smooth sky every client agrees on.
+ this.worldTime = Number(this.room.state.worldTime) || 0;
+ $state?.listen?.('worldTime', (v) => { this.worldTime = Number(v) || 0; this._emit('worldtime', this.worldTime); });
+
this.room.onLeave((code) => {
this._setStatus('offline');
// 4002: the server evicted us because our play pass expired without a
@@ -379,6 +420,10 @@ export class CommunityNet {
setVoiceActive(on) { this.room?.send('voice-state', { on: !!on }); }
rename(name) { this.name = name; this.room?.send('rename', { name }); }
setAvatar(avatar, agent) { this.avatar = avatar; this.room?.send('avatar', { avatar, agent }); }
+ // Equip a cosmetic into its slot (W03). Server-authoritative: it validates
+ // ownership, updates the player's schema `cosmetics` field (so peers re-render)
+ // and replies with a fresh profile. An unowned id is rejected with a 'notice'.
+ equipCosmetic(id) { this.room?.send('equip-cosmetic', { id }); }
// Activities & economy. Server-authoritative: these only request the action; the
// result arrives via the profile/inv/xpgain/levelup/notice events above.
fish() { this.room?.send('fish'); }
@@ -389,6 +434,27 @@ export class CommunityNet {
equip(slot) { this.room?.send('equip', { slot }); }
consume(ref) { this.room?.send('consume', { slot: ref }); }
requestProfile() { this.room?.send('profileReq'); }
+ // Quests, jobs & heists (W05). Server-authoritative: accept/abandon a mission and
+ // interact at a quest object; the board + progress arrive via the 'quests' event
+ // and completions via 'questComplete'. questInteract acts on the zone the server
+ // finds the player standing in (pickup/dropoff/terminal/crack).
+ requestQuests() { this.room?.send('questReq'); }
+ questAccept(id) { this.room?.send('questAccept', { id }); }
+ questAbandon(id) { this.room?.send('questAbandon', { id }); }
+ questInteract() { this.room?.send('questInteract'); }
+ // Vehicles. enter/exit take + release the wheel (server-gated by proximity +
+ // occupancy, answered on the 'vehicle' event); vsync streams the driver's
+ // authoritative Rapier transform, which the server validates and relays. vsync
+ // is throttled to the move send rate; the driving loop calls it every frame.
+ sendVEnter(id) { this.room?.send('venter', { id }); }
+ sendVExit(state) { this.room?.send('vexit', state || {}); }
+ sendVSync(state) {
+ if (!this.room) return;
+ const now = performance.now();
+ if (now - (this._lastVSyncAt || 0) < SEND_INTERVAL_MS) return;
+ this._lastVSyncAt = now;
+ this.room.send('vsync', state);
+ }
// Adopt a refreshed play pass. Store it so the next reconnect (after a drop)
// uses the fresh credential, AND push it to the live session so the server can
// extend this connection's bound expiry — otherwise the server's per-minute
diff --git a/src/game/cosmetics-loadout.js b/src/game/cosmetics-loadout.js
new file mode 100644
index 000000000..adaae8395
--- /dev/null
+++ b/src/game/cosmetics-loadout.js
@@ -0,0 +1,40 @@
+// Cosmetic loadout — applies a player's equipped wardrobe to their avatar rig.
+//
+// A loadout is the set of cosmetics a player wears, at most one per slot (dye /
+// headwear / eyewear / aura — see cosmetics-catalog.js). Each cosmetic carries a
+// `visual` spec that cosmetics-visual.js turns into Three.js objects; this module
+// is the thin layer that maps an equipped loadout to those visuals and aggregates
+// them into one handle the rig owner drives.
+//
+// It's the single client-side entry point for cosmetics, used identically for the
+// local player (coincommunities), every remote peer (RemotePlayer), and the
+// character-creator preview — so one wardrobe renders the same everywhere.
+//
+// Usage mirrors the rig lifecycle: applyLoadout() right after the avatar GLB
+// loads, tick(dt) each frame, and re-apply (dispose the old handle, build a new
+// one) whenever the avatar reloads or the loadout changes — loading a model
+// clears the rig, taking the cosmetic layers with it.
+
+import { applyCosmetic } from './cosmetics-visual.js';
+import { parseLoadout, serializeLoadout, SLOTS } from '../../multiplayer/src/cosmetics-catalog.js';
+
+// Apply an equipped loadout (either the wire string peers broadcast, or an
+// {slot:id} map the creator/owner holds) to `rig` at the avatar's head-anchor
+// `height`. Returns { tick(dt), dispose() }: one applyCosmetic handle per worn
+// cosmetic, fanned out so a dye, a hat, glasses and an aura all coexist (each
+// applyCosmetic call owns one visual primitive). Empty/none loadout → a no-op
+// handle, so callers never branch on "is anything equipped".
+export function applyLoadout(rig, height, loadout) {
+ const wire = typeof loadout === 'string' ? loadout : serializeLoadout(loadout);
+ const cosmetics = parseLoadout(wire);
+ const handles = cosmetics.map((c) => applyCosmetic(rig, height, c.visual));
+ return {
+ tick: (dt) => { for (const h of handles) h.tick(dt); },
+ dispose: () => { for (const h of handles) { try { h.dispose(); } catch {} } },
+ // The normalized wire form actually applied — lets a caller cheaply detect a
+ // no-op change ("did the loadout really differ?") before re-applying.
+ wire,
+ };
+}
+
+export { SLOTS };
diff --git a/src/game/hud/index.js b/src/game/hud/index.js
index 09aab3f8f..93d9eeee9 100644
--- a/src/game/hud/index.js
+++ b/src/game/hud/index.js
@@ -49,6 +49,17 @@ export class WorldHudSystem {
const orig = menu._setFocus.bind(menu);
menu._setFocus = (i) => { if (i !== menu.focus && i >= 0) this.feel.sfx('tick'); orig(i); };
}
+
+ // On-screen entry to the radial menu — the touch path to everything inside it
+ // (emotes, camera, sound, leave), and a discoverability hint on desktop.
+ this.menuBtn = document.createElement('button');
+ this.menuBtn.type = 'button';
+ this.menuBtn.className = 'wh-menu-btn';
+ this.menuBtn.title = 'Interaction menu (M)';
+ this.menuBtn.setAttribute('aria-label', 'Open interaction menu');
+ this.menuBtn.textContent = '☰';
+ this.menuBtn.addEventListener('click', () => this.toggleInteraction());
+ this.hud.root.appendChild(this.menuBtn);
}
// --------------------------------------------------------------- menu state
diff --git a/src/game/hud/radial-menu.js b/src/game/hud/radial-menu.js
index fe8adeca4..e24e7e94d 100644
--- a/src/game/hud/radial-menu.js
+++ b/src/game/hud/radial-menu.js
@@ -101,16 +101,23 @@ export class RadialMenu {
if (dist < dead) { this._setFocus(-1); return; }
this._setFocus(this._indexForAngle(Math.atan2(dy, dx)));
});
- // Click a wedge (or the hub to cancel).
+ // Tap/click a wedge to commit (works in both modes so touch can drive the
+ // hold-style wheels); a tap on the hub/centre cancels.
this.root.addEventListener('pointerup', (e) => {
- if (!this.isOpen || this.mode !== 'toggle') return;
+ if (!this.isOpen || !this._pointerEngaged) return;
+ this._pointerEngaged = false;
if (this.focus >= 0) this._commit();
else this.close();
e.stopPropagation();
});
- // Background click closes without selecting.
+ // A press inside the ring arms a tap-commit; a press on the backdrop closes.
this.root.addEventListener('pointerdown', (e) => {
- if (e.target === this.root) this.close();
+ if (e.target === this.root) { this.close(); return; }
+ this._pointerEngaged = true;
+ // Touch has no hover — seed focus from the press angle.
+ const rect = this.stage.getBoundingClientRect();
+ const dx = e.clientX - (rect.left + rect.width / 2), dy = e.clientY - (rect.top + rect.height / 2);
+ if (Math.hypot(dx, dy) >= rect.width * (this._ri / this._size) * 0.62) this._setFocus(this._indexForAngle(Math.atan2(dy, dx)));
});
}
diff --git a/src/game/hud/world-hud.css b/src/game/hud/world-hud.css
index bd067cf69..8eed1c2c3 100644
--- a/src/game/hud/world-hud.css
+++ b/src/game/hud/world-hud.css
@@ -202,6 +202,33 @@
color: var(--cc-dim, #9a9aa2);
}
+/* On-screen interaction-menu button (touch entry + desktop discoverability). */
+.wh-menu-btn {
+ position: absolute;
+ right: var(--wh-pad);
+ top: 50%;
+ transform: translateY(-50%);
+ width: 44px;
+ height: 44px;
+ border-radius: 50%;
+ display: grid;
+ place-items: center;
+ font-size: 20px;
+ line-height: 1;
+ color: var(--cc-text, #f5f5f6);
+ pointer-events: auto;
+ cursor: pointer;
+ background: var(--cc-panel, rgba(12, 12, 14, 0.78));
+ border: 1px solid var(--cc-edge, rgba(255, 255, 255, 0.12));
+ -webkit-backdrop-filter: blur(8px);
+ backdrop-filter: blur(8px);
+ box-shadow: var(--cc-shadow, 0 16px 50px rgba(0, 0, 0, 0.7));
+ transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
+}
+.wh-menu-btn:hover { background: rgba(34, 34, 40, 0.9); border-color: var(--cc-edge-hi, rgba(255, 255, 255, 0.5)); }
+.wh-menu-btn:active { transform: translateY(-50%) scale(0.92); }
+.wh-menu-btn:focus-visible { outline: 2px solid var(--cc-edge-hi, #fff); outline-offset: 2px; }
+
/* ----------------------------------------------------------- responsive ---- */
@media (max-width: 640px) {
.wh-hud { --wh-pad: 10px; }
diff --git a/src/game/play-handoff.js b/src/game/play-handoff.js
index a25e35dbc..a1dfa04f3 100644
--- a/src/game/play-handoff.js
+++ b/src/game/play-handoff.js
@@ -18,9 +18,14 @@
import { stage, load, peek } from '../guest-avatar.js';
import { log } from '../shared/log.js';
+import { serializeLoadout } from '../../multiplayer/src/cosmetics-catalog.js';
export const CC_AVATAR_KEY = 'cc-avatar';
export const CC_NAME_KEY = 'cc-name';
+// Equipped cosmetic loadout (W03) chosen in the character creator, carried into
+// the world the same way the avatar is. Stored as the compact comma-joined wire
+// string the server validates and peers render (cosmetics-catalog.serializeLoadout).
+export const CC_COSMETICS_KEY = 'cc-cosmetics';
export const GUEST_SENTINEL = 'guest:pending';
// One object URL per staged blob, cached so repeated resolves (local rig + boot
@@ -46,6 +51,23 @@ export function setPlayName(name) {
return v;
}
+// The pre-join cosmetic loadout the world sends as a join option. A wire string
+// ('' = nothing equipped); the server re-validates ownership before anyone wears
+// it, so this is only a convenience hand-off, never trusted.
+export function getPlayCosmetics() {
+ try { return localStorage.getItem(CC_COSMETICS_KEY) || ''; } catch { return ''; }
+}
+
+// Persist the equipped loadout the creator built. Accepts either the wire string
+// or an {slot:id} map; stores the normalized wire form.
+export function setPlayCosmetics(loadout) {
+ const wire = typeof loadout === 'string'
+ ? loadout
+ : serializeLoadout(loadout || {});
+ try { localStorage.setItem(CC_COSMETICS_KEY, wire); } catch { /* storage disabled */ }
+ return wire;
+}
+
/**
* Adopt an avatar and (optionally) jump into a world. The single entry point for
* every "Play as this" / "Use in /play" button across the creation surfaces.
diff --git a/src/physics/physics-world.js b/src/physics/physics-world.js
index 25914b329..5474f0ffe 100644
--- a/src/physics/physics-world.js
+++ b/src/physics/physics-world.js
@@ -409,6 +409,27 @@ export class PhysicsWorld {
return vehicle;
}
+ /**
+ * A kinematic cuboid the caller repositions each frame — used to give the
+ * locally-simulated vehicle something solid to bump for OTHER players' cars,
+ * which are otherwise pure interpolated ghosts not in this physics world.
+ */
+ addKinematicBox({ halfExtents, position = { x: 0, y: 0, z: 0 } }) {
+ const R = this.RAPIER;
+ const body = this.world.createRigidBody(
+ R.RigidBodyDesc.kinematicPositionBased().setTranslation(position.x, position.y, position.z),
+ );
+ this.world.createCollider(R.ColliderDesc.cuboid(halfExtents.x, halfExtents.y, halfExtents.z), body);
+ return {
+ body,
+ setTransform(p, q) {
+ body.setNextKinematicTranslation({ x: p.x, y: p.y, z: p.z });
+ if (q) body.setNextKinematicRotation({ x: q.qx, y: q.qy, z: q.qz, w: q.qw });
+ },
+ remove: () => { try { this.world.removeRigidBody(body); } catch { /* gone */ } },
+ };
+ }
+
/** Remove a vehicle created with createVehicle(). */
removeVehicle(vehicle) {
const i = this._vehicles.indexOf(vehicle);
diff --git a/src/pump/launch-token-modal.css b/src/pump/launch-token-modal.css
index c97d1a07a..fda6b7997 100644
--- a/src/pump/launch-token-modal.css
+++ b/src/pump/launch-token-modal.css
@@ -14,7 +14,7 @@
.ltm-overlay.ltm-open { opacity: 1; }
.ltm-modal {
- background: #0d0d18;
+ background: #0e0e0e;
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 14px;
width: min(480px, calc(100vw - 2rem));
diff --git a/src/share-panel.css b/src/share-panel.css
index 600450a55..1a40a36cc 100644
--- a/src/share-panel.css
+++ b/src/share-panel.css
@@ -200,7 +200,7 @@
}
.share-panel-segment--active {
- background: #2e3a55;
+ background: #393939;
border-color: #4d6aa3;
color: #e8eeff;
}
@@ -237,7 +237,7 @@
}
.share-panel-preview-frame[data-bg='dark'] {
- background: #0b0d10;
+ background: #0d0d0d;
}
.share-panel-preview-frame[data-bg='light'] {
diff --git a/src/shared/skill-purchase.js b/src/shared/skill-purchase.js
new file mode 100644
index 000000000..787d01a89
--- /dev/null
+++ b/src/shared/skill-purchase.js
@@ -0,0 +1,806 @@
+/**
+ * Shared skill / asset purchase engine (Solana Pay).
+ *
+ * Extracted so any agent surface — the marketplace SPA and the standalone
+ * /agents/:id detail page — drives the exact same on-chain purchase flow
+ * instead of forking a second, divergent payment path.
+ *
+ * One-shot Solana Pay purchase: the server mints a unique reference Pubkey, the
+ * buyer's connected wallet (Phantom / Solflare / Backpack) sends USDC + the
+ * reference in a single tx, the server verifies on-chain via
+ * findReference / validateTransfer, and the (user, agent, skill) tuple lands in
+ * skill_purchases as 'confirmed'. A mobile QR path (Solana Pay URL) is offered
+ * when no browser wallet is present.
+ *
+ * Usage:
+ * import { configureSkillPurchase, openPurchaseFlow } from './shared/skill-purchase.js';
+ * configureSkillPurchase({ getAgent: () => currentAgent, onPurchased: (id) => reload(id) });
+ * openPurchaseFlow(agentId, skillName);
+ *
+ * The payment modal DOM is injected lazily into <body> on first use, so host
+ * pages do not need to ship the markup. If a page already contains an element
+ * with id="payment-modal-overlay" (e.g. the marketplace), that one is reused.
+ */
+
+import { log } from './log.js';
+
+export const USDC_MAINNET_MINT = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v';
+
+const $ = (id) => document.getElementById(id);
+
+function escapeHtml(s) {
+ return String(s ?? '').replace(
+ /[&<>"']/g,
+ (ch) => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#39;' })[ch],
+ );
+}
+
+// ── Host configuration ──────────────────────────────────────────────────────
+
+let cfg = {
+ getAgent: () => null,
+ // Called with the agentId after a successful skill purchase / trial so the
+ // host can refresh the user's owned-skills state and re-render badges.
+ onPurchased: async () => {},
+};
+
+export function configureSkillPurchase(next = {}) {
+ cfg = { ...cfg, ...next };
+ ensureModal();
+}
+
+// ── Modal injection ─────────────────────────────────────────────────────────
+
+const MODAL_HTML = `
+<div class="market-modal-overlay" id="payment-modal-overlay" hidden aria-modal="true" role="dialog" aria-labelledby="payment-modal-title">
+ <div class="market-modal">
+ <div class="market-modal-head">
+ <h2 id="payment-modal-title">Unlock skill</h2>
+ <button class="market-modal-close" id="payment-modal-close" aria-label="Close">×</button>
+ </div>
+ <div class="payment-modal-body" id="payment-modal-body">
+ <div class="payment-modal-badge" id="payment-modal-badge" hidden></div>
+ <p id="payment-modal-lede">You are purchasing access to the following skill:</p>
+ <div class="payment-item">
+ <strong id="payment-skill-name"></strong>
+ <span id="payment-item-from">from agent</span>
+ <em id="payment-agent-name"></em>
+ </div>
+ <div class="payment-price">
+ <span>Total</span>
+ <strong id="payment-price-display"></strong>
+ </div>
+ <div class="payment-wallet-area" id="payment-wallet-area"></div>
+ <button class="btn-primary payment-confirm-btn" id="payment-confirm-btn" disabled>Confirm purchase</button>
+ <div class="payment-qr" id="payment-qr" aria-live="polite"></div>
+ <div class="payment-status" id="payment-status" role="status" aria-live="polite"></div>
+ </div>
+ <div class="payment-modal-success" id="payment-modal-success" hidden role="status" aria-live="polite"></div>
+ </div>
+</div>`;
+
+let modalReady = false;
+
+function ensureModal() {
+ if (modalReady) return;
+ if (!$('payment-modal-overlay')) {
+ const wrap = document.createElement('div');
+ wrap.innerHTML = MODAL_HTML.trim();
+ document.body.appendChild(wrap.firstChild);
+ }
+ $('payment-modal-close')?.addEventListener('click', closePaymentModal);
+ $('payment-confirm-btn')?.addEventListener('click', handlePurchase);
+ $('payment-modal-overlay')?.addEventListener('click', (e) => {
+ if (e.target.id === 'payment-modal-overlay') closePaymentModal();
+ });
+ document.addEventListener('keydown', (e) => {
+ if (e.key === 'Escape' && !$('payment-modal-overlay')?.hidden) closePaymentModal();
+ });
+ modalReady = true;
+}
+
+// ── Price formatting ────────────────────────────────────────────────────────
+
+export function formatAssetPrice(price) {
+ if (!price || price.amount == null) return null;
+ const decimals = Number(price.mint_decimals ?? 6);
+ const amount = Number(price.amount);
+ if (!Number.isFinite(amount) || amount <= 0) return null;
+ const value = amount / Math.pow(10, decimals);
+ const symbol =
+ price.currency_mint === USDC_MAINNET_MINT ? 'USDC' : (price.currency_mint || '').slice(0, 4) + '…';
+ const formatted = value >= 100 ? value.toFixed(0) : value >= 1 ? value.toFixed(2) : value.toFixed(3);
+ return `${formatted.replace(/\.?0+$/, '')} ${symbol}`;
+}
+
+export function shortMintLabel(mint) {
+ if (mint === USDC_MAINNET_MINT) return 'USDC';
+ if (mint === 'Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB') return 'USDT';
+ return (mint || '').slice(0, 4) + '…';
+}
+
+// ── Modal chrome helpers ────────────────────────────────────────────────────
+
+function setStatus(text, kind) {
+ const el = $('payment-status');
+ if (!el) return;
+ el.textContent = text;
+ el.className = 'payment-status' + (kind ? ' ' + kind : '');
+}
+function setPaymentTitle(text) { const el = $('payment-modal-title'); if (el) el.textContent = text; }
+function setPaymentLede(text) { const el = $('payment-modal-lede'); if (el) el.textContent = text; }
+function setPaymentFromLabel(text) { const el = $('payment-item-from'); if (el) el.textContent = text; }
+function setPaymentBadge(html, kind) {
+ const el = $('payment-modal-badge');
+ if (!el) return;
+ if (!html) { el.hidden = true; el.innerHTML = ''; el.className = 'payment-modal-badge'; return; }
+ el.hidden = false;
+ el.className = 'payment-modal-badge' + (kind ? ' ' + kind : '');
+ el.innerHTML = html;
+}
+
+function renderPaymentSuccess({ title, message, primaryHref, primaryLabel, secondaryLabel = 'Done' }) {
+ const body = $('payment-modal-body');
+ const success = $('payment-modal-success');
+ if (!body || !success) return;
+ body.hidden = true;
+ const primary = primaryHref
+ ? `<a class="btn-primary" href="${escapeHtml(primaryHref)}" data-success-primary>${escapeHtml(primaryLabel || 'View')}</a>`
+ : '';
+ success.innerHTML = `
+ <div class="ps-check" aria-hidden="true">✓</div>
+ <h3 class="ps-title">${escapeHtml(title)}</h3>
+ ${message ? `<p class="ps-sub">${escapeHtml(message)}</p>` : ''}
+ <div class="ps-actions">
+ ${primary}
+ <button type="button" class="btn-secondary" data-success-close>${escapeHtml(secondaryLabel)}</button>
+ </div>`;
+ success.hidden = false;
+ success.querySelector('[data-success-close]')?.addEventListener('click', closePaymentModal);
+}
+
+function renderPaymentVerifyAgain({ txid, message, retryFn }) {
+ const status = $('payment-status');
+ const confirmBtn = $('payment-confirm-btn');
+ if (confirmBtn) confirmBtn.hidden = true;
+ if (!status) return;
+ const explorer = txid ? `https://solscan.io/tx/${encodeURIComponent(txid)}` : '';
+ status.className = 'payment-status';
+ status.innerHTML = `
+ <div class="payment-modal-retry">
+ <p>${escapeHtml(message || "We couldn't confirm with the server in time. Your payment is safe — re-verify below.")}</p>
+ ${explorer ? `<div class="retry-tx">Tx: <a href="${escapeHtml(explorer)}" target="_blank" rel="noopener">${escapeHtml(txid.slice(0, 12))}…</a></div>` : ''}
+ <div class="retry-actions">
+ <button type="button" class="retry-primary" data-retry-verify>Verify again</button>
+ <button type="button" class="retry-secondary" data-retry-close>Close</button>
+ </div>
+ </div>`;
+ const retryBtn = status.querySelector('[data-retry-verify]');
+ retryBtn?.addEventListener('click', async () => {
+ retryBtn.disabled = true;
+ retryBtn.textContent = 'Verifying…';
+ try {
+ await retryFn();
+ } catch (err) {
+ retryBtn.disabled = false;
+ retryBtn.textContent = 'Verify again';
+ setStatus(err.message || 'Verification failed', 'err');
+ }
+ });
+ status.querySelector('[data-retry-close]')?.addEventListener('click', closePaymentModal);
+}
+
+function closePaymentModal() {
+ const overlay = $('payment-modal-overlay');
+ if (overlay) overlay.hidden = true;
+ const qr = $('payment-qr'); if (qr) qr.innerHTML = '';
+ const confirmBtn = $('payment-confirm-btn');
+ if (confirmBtn) {
+ delete confirmBtn.dataset.durationHours;
+ delete confirmBtn.dataset.mode;
+ confirmBtn.hidden = false;
+ confirmBtn.disabled = true;
+ }
+ const body = $('payment-modal-body');
+ const success = $('payment-modal-success');
+ if (body) body.hidden = false;
+ if (success) { success.hidden = true; success.innerHTML = ''; }
+ setPaymentBadge('');
+ setStatus('');
+ pendingAssetPurchase = null;
+}
+
+// ── Wallet plumbing ─────────────────────────────────────────────────────────
+
+let solanaConnection;
+let solanaWeb3Mod;
+let splTokenMod;
+let connectedWallet = null; // { provider, name, publicKey }
+
+const WALLET_PROVIDERS = [
+ { key: 'phantom', name: 'Phantom', detect: () => window.phantom?.solana || (window.solana?.isPhantom && window.solana) },
+ { key: 'solflare', name: 'Solflare', detect: () => window.solflare },
+ { key: 'backpack', name: 'Backpack', detect: () => window.backpack?.solana || (window.solana?.isBackpack && window.solana) },
+];
+
+async function loadSolanaModules() {
+ if (!solanaWeb3Mod) solanaWeb3Mod = await import('@solana/web3.js');
+ if (!splTokenMod) splTokenMod = await import('@solana/spl-token');
+ return { web3: solanaWeb3Mod, spl: splTokenMod };
+}
+
+async function getSolanaConnection() {
+ if (solanaConnection) return solanaConnection;
+ const { web3 } = await loadSolanaModules();
+ const rpcOrigin = window.location?.origin || 'https://three.ws';
+ solanaConnection = new web3.Connection(`${rpcOrigin}/api/solana-rpc`, 'confirmed');
+ return solanaConnection;
+}
+
+function listAvailableWallets() {
+ return WALLET_PROVIDERS.map((p) => ({ ...p, provider: p.detect() })).filter((p) => p.provider);
+}
+
+async function connectWalletProvider(providerKey) {
+ const entry = WALLET_PROVIDERS.find((p) => p.key === providerKey);
+ if (!entry) throw new Error('unknown wallet');
+ const provider = entry.detect();
+ if (!provider) throw new Error(`${entry.name} not installed`);
+ const { web3 } = await loadSolanaModules();
+ const resp = await provider.connect();
+ const pubKey = resp?.publicKey ?? provider.publicKey;
+ if (!pubKey) throw new Error('wallet did not return a public key');
+ connectedWallet = {
+ provider,
+ name: entry.name,
+ publicKey: typeof pubKey === 'string' ? new web3.PublicKey(pubKey) : pubKey,
+ };
+ updateWalletUI();
+}
+
+function disconnectWallet() {
+ try { connectedWallet?.provider?.disconnect?.(); } catch {}
+ connectedWallet = null;
+ updateWalletUI();
+}
+
+function updateWalletUI() {
+ const walletArea = $('payment-wallet-area');
+ const confirmBtn = $('payment-confirm-btn');
+ if (!walletArea) return;
+
+ if (connectedWallet) {
+ const pk = connectedWallet.publicKey.toBase58();
+ walletArea.innerHTML = `
+ <p>Connected via <strong>${escapeHtml(connectedWallet.name)}</strong>: ${pk.slice(0, 4)}…${pk.slice(-4)}</p>
+ <button class="btn-secondary" id="payment-disconnect-btn">Disconnect</button>`;
+ $('payment-disconnect-btn').addEventListener('click', disconnectWallet);
+ if (confirmBtn) confirmBtn.disabled = false;
+ return;
+ }
+
+ const available = listAvailableWallets();
+ if (!available.length) {
+ walletArea.innerHTML = `
+ <p class="muted">No browser wallet detected.</p>
+ <button class="btn-primary" id="payment-show-qr">Use a mobile wallet (QR)</button>
+ <p class="muted small">Install <a href="https://phantom.app" target="_blank" rel="noopener">Phantom</a>,
+ <a href="https://solflare.com" target="_blank" rel="noopener">Solflare</a>, or
+ <a href="https://backpack.app" target="_blank" rel="noopener">Backpack</a>.</p>`;
+ } else {
+ const btns = available
+ .map((w) => `<button class="btn-primary wallet-pick" data-wallet="${w.key}">Connect ${escapeHtml(w.name)}</button>`)
+ .join('');
+ walletArea.innerHTML = `${btns}<button class="btn-secondary" id="payment-show-qr">Use a mobile wallet (QR)</button>`;
+ walletArea.querySelectorAll('.wallet-pick').forEach((btn) => {
+ btn.addEventListener('click', async () => {
+ const key = btn.dataset.wallet;
+ btn.textContent = 'Connecting…';
+ btn.disabled = true;
+ try {
+ await connectWalletProvider(key);
+ } catch (e) {
+ const name = WALLET_PROVIDERS.find((p) => p.key === key)?.name ?? key;
+ btn.textContent = `Connect ${name}`;
+ btn.disabled = false;
+ setStatus(e.message, 'err');
+ }
+ });
+ });
+ }
+ $('payment-show-qr')?.addEventListener('click', startQrPurchase);
+ if (confirmBtn) confirmBtn.disabled = true;
+}
+
+// ── CSRF ────────────────────────────────────────────────────────────────────
+
+let _csrf = null;
+async function getCsrfToken() {
+ if (_csrf && _csrf.expiresAt > Date.now() + 5_000) return _csrf.token;
+ const r = await fetch('/api/csrf-token', { credentials: 'include' });
+ if (!r.ok) throw new Error('Could not obtain CSRF token; sign in again.');
+ const j = await r.json();
+ _csrf = { token: j.data.token, expiresAt: Date.now() + (j.data.expires_in - 30) * 1000 };
+ return _csrf.token;
+}
+export async function apiPostWithCsrf(url, body) {
+ const token = await getCsrfToken();
+ _csrf = null;
+ return fetch(url, {
+ method: 'POST',
+ headers: { 'Content-Type': 'application/json', 'X-CSRF-Token': token },
+ credentials: 'include',
+ body: body == null ? undefined : JSON.stringify(body),
+ });
+}
+
+async function buildSplTransferWithReference({ payer, recipient, mint, amount, reference }) {
+ const { web3, spl } = await loadSolanaModules();
+ const { PublicKey, Transaction } = web3;
+ const { getAssociatedTokenAddress, createTransferInstruction } = spl;
+
+ const recipientKey = new PublicKey(recipient);
+ const mintKey = new PublicKey(mint);
+ const referenceKey = new PublicKey(reference);
+
+ const fromAta = await getAssociatedTokenAddress(mintKey, payer);
+ const toAta = await getAssociatedTokenAddress(mintKey, recipientKey);
+
+ const ix = createTransferInstruction(fromAta, toAta, payer, amount);
+ ix.keys.push({ pubkey: referenceKey, isSigner: false, isWritable: false });
+
+ const { blockhash } = await (await getSolanaConnection()).getLatestBlockhash('confirmed');
+ const tx = new Transaction({ feePayer: payer, recentBlockhash: blockhash }).add(ix);
+ return tx;
+}
+
+// ── Server purchase records ─────────────────────────────────────────────────
+
+async function createPendingPurchase(agentId, skill, durationHours = null) {
+ const body = { agent_id: agentId, skill };
+ if (durationHours) body.duration_hours = durationHours;
+ const r = await apiPostWithCsrf('/api/marketplace/purchase', body);
+ const j = await r.json();
+ if (!r.ok) throw new Error(j.error_description || j.error || 'Failed to create purchase');
+ return j.data;
+}
+
+async function pollConfirm(reference, windowMs = 60_000) {
+ const deadline = Date.now() + windowMs;
+ while (Date.now() < deadline) {
+ const r = await apiPostWithCsrf(`/api/marketplace/purchase/${reference}/confirm`, null);
+ const j = await r.json().catch(() => ({}));
+ if (r.ok && j.data?.status === 'confirmed') return true;
+ if (j.status === 'tipped') {
+ throw new Error('Payment received but amount/mint did not match — seller has been notified.');
+ }
+ if (r.status === 410) throw new Error('Pending purchase expired. Please try again.');
+ if (r.status === 409 && !j.status) throw new Error(j.error_description || 'Transfer did not match.');
+ await new Promise((res) => setTimeout(res, 2500));
+ }
+ return false;
+}
+
+// ── Skill purchase flows ────────────────────────────────────────────────────
+
+export async function openPurchaseFlow(agentId, skill) {
+ ensureModal();
+ const agent = cfg.getAgent();
+ if (!agent || agent.id !== agentId) { alert('Agent not loaded; refresh and try again.'); return; }
+ const price = agent.skill_prices?.[skill];
+ if (!price) { alert('No price set for this skill.'); return; }
+
+ const decimals = Number(price.mint_decimals ?? 6);
+ const human = (Number(price.amount) / Math.pow(10, decimals)).toFixed(decimals === 6 ? 2 : 4);
+
+ setPaymentTitle('Unlock skill');
+ setPaymentLede('You are purchasing permanent access to this skill:');
+ setPaymentFromLabel('on agent');
+ setPaymentBadge('');
+ $('payment-skill-name').textContent = skill;
+ $('payment-agent-name').textContent = agent.name;
+ $('payment-price-display').textContent = `${human} ${shortMintLabel(price.currency_mint)}`;
+ const confirmBtn = $('payment-confirm-btn');
+ if (confirmBtn) confirmBtn.textContent = 'Confirm purchase';
+ const qr = $('payment-qr'); if (qr) qr.innerHTML = '';
+ setStatus('');
+ $('payment-modal-overlay').hidden = false;
+ updateWalletUI();
+}
+
+export async function openTimePassFlow(agentId, skill, durationHours, btn) {
+ ensureModal();
+ const agent = cfg.getAgent();
+ if (!agent || agent.id !== agentId) { alert('Agent not loaded; refresh and try again.'); return; }
+ const price = agent.skill_prices?.[skill];
+ if (!price) { alert('No price set for this skill.'); return; }
+
+ if (btn) { btn.disabled = true; btn.textContent = 'Preparing…'; }
+
+ setPaymentTitle(`Get ${durationHours}h access`);
+ setPaymentLede('You are renting temporary access to this skill:');
+ setPaymentFromLabel('on agent');
+ setPaymentBadge(
+ `<span class="payment-modal-badge-icon" aria-hidden="true">⏱</span><span>Access expires ${durationHours} hour${durationHours === 1 ? '' : 's'} after purchase. Not a permanent unlock.</span>`,
+ 'warn',
+ );
+ $('payment-skill-name').textContent = skill;
+ $('payment-agent-name').textContent = agent.name;
+ const tpAmount = price.time_pass_amount || price.amount;
+ const decimals = Number(price.mint_decimals ?? 6);
+ const human = (Number(tpAmount) / Math.pow(10, decimals)).toFixed(decimals === 6 ? 2 : 4);
+ $('payment-price-display').textContent = `${human} ${shortMintLabel(price.currency_mint)}`;
+ const qr = $('payment-qr'); if (qr) qr.innerHTML = '';
+ setStatus('');
+ $('payment-modal-overlay').hidden = false;
+ updateWalletUI();
+
+ const confirmBtn = $('payment-confirm-btn');
+ confirmBtn.dataset.durationHours = String(durationHours);
+ confirmBtn.textContent = `Pay & unlock ${durationHours}h access`;
+
+ if (btn) { btn.disabled = false; btn.textContent = `Get ${durationHours}h access`; }
+}
+
+export async function openTrialFlow(agentId, skill, btn) {
+ const agent = cfg.getAgent();
+ if (!agent || agent.id !== agentId) { alert('Agent not loaded; refresh and try again.'); return; }
+ if (btn) { btn.disabled = true; btn.textContent = 'Starting trial…'; }
+ try {
+ const r = await apiPostWithCsrf('/api/marketplace/start-trial', { agent_id: agentId, skill });
+ const j = await r.json().catch(() => ({}));
+ if (!r.ok) {
+ if (j.error === 'already_owned') alert('You already own this skill.');
+ else if (j.error === 'trial_used') alert('You have already used the trial for this skill.');
+ else if (r.status === 401) { location.href = `/login?next=${encodeURIComponent(location.pathname)}`; return; }
+ else alert(j.error_description || j.error || 'Failed to start trial');
+ return;
+ }
+ await cfg.onPurchased(agentId);
+ } catch (err) {
+ alert(err.message || 'Failed to start trial');
+ } finally {
+ if (btn) { btn.disabled = false; btn.textContent = 'Try free'; }
+ }
+}
+
+// ── Asset purchase (agent / avatar / plugin) ────────────────────────────────
+
+let pendingAssetPurchase = null;
+
+export function openAssetPurchaseFlow(asset) {
+ ensureModal();
+ const confirmBtn = $('payment-confirm-btn');
+ const skillName = $('payment-skill-name');
+ const agentName = $('payment-agent-name');
+ const priceDisplay = $('payment-price-display');
+ if (!confirmBtn || !skillName || !priceDisplay) { alert('Payment UI not available on this page.'); return; }
+
+ pendingAssetPurchase = asset;
+ confirmBtn.dataset.mode = 'asset';
+ confirmBtn.disabled = false;
+ confirmBtn.hidden = false;
+ delete confirmBtn.dataset.durationHours;
+
+ const typeLabel = asset.item_type ? asset.item_type.charAt(0).toUpperCase() + asset.item_type.slice(1) : 'Asset';
+ setPaymentTitle(`Buy ${typeLabel}`);
+ setPaymentLede(`You are buying this ${asset.item_type || 'asset'}:`);
+ setPaymentFromLabel(typeLabel);
+ setPaymentBadge('');
+ confirmBtn.textContent = 'Confirm purchase';
+
+ skillName.textContent = asset.label || 'Asset';
+ if (agentName) agentName.textContent = '';
+
+ const decimals = Number(asset.price?.mint_decimals ?? 6);
+ const human = (Number(asset.price?.amount || 0) / Math.pow(10, decimals)).toFixed(decimals === 6 ? 2 : 4);
+ priceDisplay.textContent = `${human} ${shortMintLabel(asset.price?.currency_mint || '')}`;
+
+ const qr = $('payment-qr'); if (qr) qr.innerHTML = '';
+ setStatus('');
+ $('payment-modal-overlay').hidden = false;
+ updateWalletUI();
+}
+
+async function createPendingAssetPurchase(itemType, itemId) {
+ const r = await apiPostWithCsrf('/api/marketplace/buy-asset', { item_type: itemType, item_id: itemId });
+ const j = await r.json();
+ if (!r.ok) throw new Error(j.error_description || j.error || 'Failed to create purchase');
+ return j.data;
+}
+
+async function pollAssetConfirm(reference, windowMs = 60_000) {
+ const deadline = Date.now() + windowMs;
+ while (Date.now() < deadline) {
+ const r = await apiPostWithCsrf(`/api/marketplace/buy-asset/${reference}/confirm`, null);
+ const j = await r.json().catch(() => ({}));
+ if (r.ok && j.data?.status === 'confirmed') return true;
+ if (r.status === 410) throw new Error('Pending purchase expired. Please try again.');
+ if (r.status === 409) throw new Error(j.error_description || 'Transfer did not match expected amount.');
+ await new Promise((res) => setTimeout(res, 2500));
+ }
+ return false;
+}
+
+function assetViewTarget(asset) {
+ const type = asset?.item_type;
+ if (type === 'avatar') return { href: '/dashboard/avatars', label: 'View avatar' };
+ if (type === 'agent') return { href: '/dashboard/agents', label: 'View agent' };
+ if (type === 'plugin') return { href: '/dashboard', label: 'View plugin' };
+ return { href: '/dashboard', label: 'View in dashboard' };
+}
+
+// ── Confirm handlers ────────────────────────────────────────────────────────
+
+async function handlePurchase() {
+ const confirmBtn = $('payment-confirm-btn');
+ if (confirmBtn?.dataset.mode === 'asset') return handleAssetPurchase();
+ if (!connectedWallet) { setStatus('Connect a wallet first.', 'err'); return; }
+ const agent = cfg.getAgent();
+ if (!agent) return;
+
+ confirmBtn.disabled = true;
+ setStatus('Creating purchase…');
+
+ const agentId = agent.id;
+ const skill = $('payment-skill-name').textContent;
+ const durationHours = confirmBtn.dataset.durationHours ? Number(confirmBtn.dataset.durationHours) : null;
+
+ const onUnlocked = async () => {
+ await cfg.onPurchased(agentId);
+ renderPaymentSuccess({
+ title: durationHours ? `${durationHours}h access unlocked` : 'Skill unlocked',
+ message: durationHours
+ ? `${skill} is now usable. Access ends ${durationHours} hour${durationHours === 1 ? '' : 's'} from now.`
+ : `${skill} is now part of your library on ${agent.name}.`,
+ primaryHref: null,
+ secondaryLabel: 'Done',
+ });
+ };
+
+ let purchase;
+ try {
+ purchase = await createPendingPurchase(agentId, skill, durationHours);
+ if (purchase.already_owned) {
+ await cfg.onPurchased(agentId);
+ renderPaymentSuccess({
+ title: 'Already unlocked',
+ message: `You already have access to ${skill}.`,
+ primaryHref: null,
+ secondaryLabel: 'Continue',
+ });
+ return;
+ }
+ } catch (e) {
+ setStatus(e.message, 'err');
+ confirmBtn.disabled = false;
+ return;
+ }
+
+ let txid;
+ try {
+ setStatus('Building transfer…');
+ const tx = await buildSplTransferWithReference({
+ payer: connectedWallet.publicKey,
+ recipient: purchase.recipient,
+ mint: purchase.currency_mint,
+ amount: BigInt(purchase.amount),
+ reference: purchase.reference,
+ });
+
+ setStatus('Approve in wallet…');
+ if (typeof connectedWallet.provider.signAndSendTransaction === 'function') {
+ const result = await connectedWallet.provider.signAndSendTransaction(tx);
+ txid = result?.signature ?? result;
+ } else {
+ txid = await connectedWallet.provider.sendTransaction(tx, await getSolanaConnection());
+ }
+
+ setStatus('Waiting for on-chain confirmation…');
+ await (await getSolanaConnection()).confirmTransaction(txid, 'confirmed');
+
+ setStatus('Verifying with server…');
+ const ok = await pollConfirm(purchase.reference, 60_000);
+ if (!ok) {
+ renderPaymentVerifyAgain({
+ txid,
+ message: "Payment is on-chain but the server hasn't seen it yet. Re-verify below.",
+ retryFn: async () => {
+ const ok2 = await pollConfirm(purchase.reference, 60_000);
+ if (!ok2) throw new Error('Still not confirmed — wait a few seconds and try again.');
+ await onUnlocked();
+ },
+ });
+ return;
+ }
+ await onUnlocked();
+ } catch (e) {
+ log.error('[skill-purchase] purchase failed', e);
+ if (txid) {
+ renderPaymentVerifyAgain({
+ txid,
+ message: e.message || 'Payment sent but verification failed — re-verify below.',
+ retryFn: async () => {
+ const ok2 = await pollConfirm(purchase.reference, 60_000);
+ if (!ok2) throw new Error('Still not confirmed — wait a few seconds and try again.');
+ await onUnlocked();
+ },
+ });
+ return;
+ }
+ setStatus(e.message || 'Purchase failed', 'err');
+ confirmBtn.disabled = false;
+ }
+}
+
+async function handleAssetPurchase() {
+ const confirmBtn = $('payment-confirm-btn');
+ const asset = pendingAssetPurchase;
+ if (!asset) { setStatus('No asset selected.', 'err'); return; }
+ if (!connectedWallet) { setStatus('Connect a wallet first.', 'err'); return; }
+
+ confirmBtn.disabled = true;
+ setStatus('Creating purchase…');
+
+ let purchase;
+ try {
+ purchase = await createPendingAssetPurchase(asset.item_type, asset.item_id);
+ if (purchase.already_owned) {
+ const target = assetViewTarget(asset);
+ renderPaymentSuccess({
+ title: 'Already owned',
+ message: `You already purchased ${asset.label}.`,
+ primaryHref: target.href,
+ primaryLabel: target.label,
+ });
+ return;
+ }
+ } catch (e) {
+ setStatus(e.message, 'err');
+ confirmBtn.disabled = false;
+ return;
+ }
+
+ let txid;
+ try {
+ setStatus('Building transfer…');
+ const tx = await buildSplTransferWithReference({
+ payer: connectedWallet.publicKey,
+ recipient: purchase.recipient,
+ mint: purchase.currency_mint,
+ amount: BigInt(purchase.amount),
+ reference: purchase.reference,
+ });
+
+ setStatus('Approve in wallet…');
+ if (typeof connectedWallet.provider.signAndSendTransaction === 'function') {
+ const result = await connectedWallet.provider.signAndSendTransaction(tx);
+ txid = result?.signature ?? result;
+ } else {
+ txid = await connectedWallet.provider.sendTransaction(tx, await getSolanaConnection());
+ }
+
+ setStatus('Waiting for on-chain confirmation…');
+ await (await getSolanaConnection()).confirmTransaction(txid, 'confirmed');
+
+ setStatus('Verifying with server…');
+ const ok = await pollAssetConfirm(purchase.reference, 60_000);
+ const succeed = () => {
+ const target = assetViewTarget(asset);
+ renderPaymentSuccess({
+ title: `${asset.label} purchased`,
+ message: `${asset.item_type === 'avatar' ? 'Your new avatar' : asset.item_type === 'agent' ? 'Your new agent' : 'Your purchase'} is in your dashboard.`,
+ primaryHref: target.href,
+ primaryLabel: target.label,
+ });
+ cfg.onPurchased(asset.item_id).catch(() => {});
+ };
+ if (!ok) {
+ renderPaymentVerifyAgain({
+ txid,
+ message: "We couldn't verify the transfer with the server in 60s. The on-chain transaction is safe — re-verify below.",
+ retryFn: async () => {
+ const ok2 = await pollAssetConfirm(purchase.reference, 60_000);
+ if (!ok2) throw new Error('Still not confirmed — wait a few seconds and try again.');
+ succeed();
+ },
+ });
+ return;
+ }
+ succeed();
+ } catch (e) {
+ log.error('[skill-purchase] asset purchase failed', e);
+ if (txid) {
+ renderPaymentVerifyAgain({
+ txid,
+ message: e.message || 'Payment sent but verification failed — re-verify below.',
+ retryFn: async () => {
+ const ok2 = await pollAssetConfirm(purchase.reference, 60_000);
+ if (!ok2) throw new Error('Still not confirmed — wait a few seconds and try again.');
+ const target = assetViewTarget(asset);
+ renderPaymentSuccess({
+ title: `${asset.label} purchased`,
+ message: `${asset.item_type === 'avatar' ? 'Your new avatar' : 'Your purchase'} is in your dashboard.`,
+ primaryHref: target.href,
+ primaryLabel: target.label,
+ });
+ },
+ });
+ return;
+ }
+ setStatus(e.message || 'Purchase failed', 'err');
+ confirmBtn.disabled = false;
+ }
+}
+
+// Mobile-wallet path: render a Solana Pay QR. Buyer scans + signs on phone.
+async function startQrPurchase() {
+ const agent = cfg.getAgent();
+ if (!agent) return;
+ const agentId = agent.id;
+ const skill = $('payment-skill-name').textContent;
+
+ setStatus('Creating purchase…');
+ let purchase;
+ try {
+ purchase = await createPendingPurchase(agentId, skill);
+ if (purchase.already_owned) {
+ await cfg.onPurchased(agentId);
+ renderPaymentSuccess({
+ title: 'Already unlocked',
+ message: `You already have access to ${skill}.`,
+ primaryHref: null,
+ secondaryLabel: 'Continue',
+ });
+ return;
+ }
+ } catch (e) {
+ setStatus(e.message, 'err');
+ return;
+ }
+
+ const decimals = Number(purchase.mint_decimals ?? 6);
+ const human = (Number(purchase.amount) / Math.pow(10, decimals)).toString();
+ const url = new URL(`solana:${purchase.recipient}`);
+ url.searchParams.set('amount', human);
+ url.searchParams.set('spl-token', purchase.currency_mint);
+ url.searchParams.set('reference', purchase.reference);
+ url.searchParams.set('label', purchase.label || `Skill: ${skill}`);
+ url.searchParams.set('message', purchase.message || `Unlock '${skill}'`);
+
+ const qrEl = $('payment-qr');
+ if (qrEl) {
+ qrEl.innerHTML = `<canvas id="payment-qr-canvas" width="240" height="240"></canvas>
+ <p class="muted small">Scan with a Solana Pay wallet (Phantom mobile, Solflare mobile, etc.)</p>`;
+ const QRCode = await import('qrcode');
+ await (QRCode.default ?? QRCode).toCanvas(document.getElementById('payment-qr-canvas'), url.toString(), { width: 240 });
+ }
+
+ setStatus('Waiting for payment on your phone…');
+ const ok = await pollConfirm(purchase.reference, 300_000);
+ if (ok) {
+ await cfg.onPurchased(agentId);
+ renderPaymentSuccess({
+ title: 'Skill unlocked',
+ message: `${skill} is now part of your library on ${agent.name}.`,
+ primaryHref: null,
+ secondaryLabel: 'Done',
+ });
+ } else {
+ renderPaymentVerifyAgain({
+ txid: null,
+ message: 'No confirmation in 5 minutes. If you paid, re-verify below; otherwise the pending purchase will expire automatically.',
+ retryFn: async () => {
+ const ok2 = await pollConfirm(purchase.reference, 60_000);
+ if (!ok2) throw new Error('Still no confirmation — give it another minute.');
+ await cfg.onPurchased(agentId);
+ renderPaymentSuccess({
+ title: 'Skill unlocked',
+ message: `${skill} is now part of your library on ${agent.name}.`,
+ primaryHref: null,
+ secondaryLabel: 'Done',
+ });
+ },
+ });
+ }
+}
diff --git a/src/shared/template-picker.css b/src/shared/template-picker.css
new file mode 100644
index 000000000..69b029164
--- /dev/null
+++ b/src/shared/template-picker.css
@@ -0,0 +1,327 @@
+/* Create-from-template picker — monochrome, token-driven, self-contained.
+ Token fallbacks let it render correctly on pages that don't define the
+ site's :root vars. */
+
+.twtpl-overlay {
+ position: fixed;
+ inset: 0;
+ z-index: 1000;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ padding: 24px;
+ background: rgba(0, 0, 0, 0.78);
+ -webkit-backdrop-filter: blur(18px);
+ backdrop-filter: blur(18px);
+ opacity: 0;
+ transition: opacity 0.18s ease;
+}
+.twtpl-overlay.twtpl-open {
+ opacity: 1;
+}
+
+.twtpl-shell {
+ width: min(960px, 100%);
+ max-height: min(88vh, 760px);
+ display: flex;
+ flex-direction: column;
+ position: relative;
+ background: var(--panel, #0a0a0a);
+ border: 1px solid var(--border, #1a1a1a);
+ border-radius: 18px;
+ box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
+ overflow: hidden;
+ transform: translateY(8px) scale(0.99);
+ transition: transform 0.2s ease;
+ font:
+ 15px/1.5 -apple-system, system-ui, 'Segoe UI', Roboto, sans-serif;
+ color: var(--text, #e8e8e8);
+}
+.twtpl-overlay.twtpl-open .twtpl-shell {
+ transform: translateY(0) scale(1);
+}
+
+.twtpl-header {
+ display: flex;
+ align-items: flex-start;
+ justify-content: space-between;
+ gap: 16px;
+ padding: 22px 24px 16px;
+ border-bottom: 1px solid var(--border, #1a1a1a);
+ flex: 0 0 auto;
+}
+.twtpl-title {
+ margin: 0 0 4px;
+ font-size: 19px;
+ font-weight: 600;
+ letter-spacing: -0.02em;
+ color: var(--text, #fff);
+}
+.twtpl-sub {
+ margin: 0;
+ font-size: 13px;
+ color: var(--muted, #888);
+ line-height: 1.5;
+ max-width: 56ch;
+}
+.twtpl-close {
+ flex: 0 0 auto;
+ background: none;
+ border: none;
+ color: var(--muted, #888);
+ font-size: 30px;
+ line-height: 1;
+ cursor: pointer;
+ padding: 0 4px;
+ transition: color 0.15s ease;
+}
+.twtpl-close:hover,
+.twtpl-close:focus-visible {
+ color: var(--text, #fff);
+ outline: none;
+}
+
+.twtpl-grid {
+ display: grid;
+ grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
+ gap: 14px;
+ padding: 20px 24px;
+ overflow-y: auto;
+ flex: 1 1 auto;
+}
+
+.twtpl-card {
+ display: flex;
+ flex-direction: column;
+ text-align: left;
+ padding: 0;
+ border: 1.5px solid var(--border, #1a1a1a);
+ border-radius: 14px;
+ background: rgba(255, 255, 255, 0.015);
+ color: inherit;
+ font: inherit;
+ cursor: pointer;
+ overflow: hidden;
+ transition:
+ border-color 0.16s ease,
+ transform 0.16s ease,
+ box-shadow 0.16s ease;
+}
+.twtpl-card:hover,
+.twtpl-card:focus-visible {
+ transform: translateY(-3px);
+ border-color: rgba(255, 255, 255, 0.32);
+ box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45);
+ outline: none;
+}
+
+.twtpl-card-stage {
+ display: block;
+ width: 100%;
+ height: 168px;
+ background:
+ radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.06) 0, transparent 62%),
+ rgba(255, 255, 255, 0.02);
+ border-bottom: 1px solid var(--border, #1a1a1a);
+}
+.twtpl-card-stage model-viewer {
+ width: 100%;
+ height: 100%;
+ --poster-color: transparent;
+}
+
+.twtpl-card-body {
+ display: block;
+ padding: 13px 14px 4px;
+}
+.twtpl-card-name {
+ display: block;
+ font-size: 14.5px;
+ font-weight: 600;
+ letter-spacing: -0.01em;
+ color: var(--text, #fff);
+}
+.twtpl-card-tagline {
+ display: block;
+ margin-top: 4px;
+ font-size: 12px;
+ line-height: 1.45;
+ color: var(--muted, #888);
+}
+.twtpl-card-chips {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 5px;
+ margin-top: 10px;
+}
+.twtpl-chip {
+ font-size: 10px;
+ font-weight: 500;
+ letter-spacing: 0.02em;
+ padding: 2px 7px;
+ border-radius: 5px;
+ color: var(--muted, #888);
+ background: rgba(255, 255, 255, 0.04);
+ border: 1px solid var(--border, #1a1a1a);
+}
+.twtpl-card-cta {
+ display: block;
+ margin: 12px 14px 14px;
+ padding-top: 10px;
+ border-top: 1px solid var(--border, #1a1a1a);
+ font-size: 12.5px;
+ font-weight: 600;
+ color: var(--muted, #888);
+ transition: color 0.16s ease;
+}
+.twtpl-card:hover .twtpl-card-cta,
+.twtpl-card:focus-visible .twtpl-card-cta {
+ color: var(--accent, #fff);
+}
+
+.twtpl-footer {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ gap: 8px;
+ padding: 14px 24px 18px;
+ border-top: 1px solid var(--border, #1a1a1a);
+ flex: 0 0 auto;
+}
+.twtpl-footer-hint {
+ font-size: 13px;
+ color: var(--muted, #888);
+}
+.twtpl-browse {
+ background: none;
+ border: none;
+ font: inherit;
+ font-size: 13px;
+ font-weight: 600;
+ color: var(--text, #fff);
+ cursor: pointer;
+ padding: 6px 8px;
+ border-radius: 8px;
+ transition: background 0.15s ease;
+}
+.twtpl-browse:hover,
+.twtpl-browse:focus-visible {
+ background: rgba(255, 255, 255, 0.06);
+ outline: none;
+}
+
+/* Busy state inside the modal (reserved; staging uses the full overlay) */
+.twtpl-busy {
+ position: absolute;
+ inset: 0;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ gap: 12px;
+ background: rgba(0, 0, 0, 0.7);
+ color: var(--text, #fff);
+ font-size: 14px;
+}
+
+/* Staging overlay shown after a pick while the GLB downloads */
+.twtpl-stage-overlay {
+ position: fixed;
+ inset: 0;
+ z-index: 1100;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ gap: 16px;
+ background: rgba(0, 0, 0, 0.9);
+ -webkit-backdrop-filter: blur(8px);
+ backdrop-filter: blur(8px);
+ color: var(--text, #e8e8e8);
+ font:
+ 15px/1.5 -apple-system, system-ui, 'Segoe UI', Roboto, sans-serif;
+ opacity: 0;
+ transition: opacity 0.18s ease;
+}
+.twtpl-stage-overlay.twtpl-open {
+ opacity: 1;
+}
+.twtpl-stage-label {
+ font-size: 14px;
+ color: rgba(255, 255, 255, 0.82);
+}
+
+.twtpl-spinner {
+ width: 22px;
+ height: 22px;
+ border: 2.5px solid rgba(255, 255, 255, 0.14);
+ border-top-color: rgba(255, 255, 255, 0.7);
+ border-radius: 50%;
+ animation: twtpl-spin 0.75s linear infinite;
+}
+.twtpl-spinner--lg {
+ width: 34px;
+ height: 34px;
+ border-width: 3px;
+}
+@keyframes twtpl-spin {
+ to {
+ transform: rotate(360deg);
+ }
+}
+
+.twtpl-toast {
+ position: fixed;
+ bottom: 28px;
+ left: 50%;
+ transform: translate(-50%, 12px);
+ z-index: 1200;
+ padding: 11px 18px;
+ border-radius: 12px;
+ background: #140a0a;
+ border: 1px solid rgba(255, 92, 92, 0.4);
+ color: #ffb3b3;
+ font:
+ 13px/1.4 -apple-system, system-ui, 'Segoe UI', Roboto, sans-serif;
+ box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
+ opacity: 0;
+ transition:
+ opacity 0.22s ease,
+ transform 0.22s ease;
+ max-width: min(440px, calc(100vw - 32px));
+}
+.twtpl-toast--show {
+ opacity: 1;
+ transform: translate(-50%, 0);
+}
+
+@media (max-width: 560px) {
+ .twtpl-overlay {
+ padding: 0;
+ }
+ .twtpl-shell {
+ width: 100%;
+ max-height: 100vh;
+ height: 100vh;
+ border-radius: 0;
+ border: none;
+ }
+ .twtpl-grid {
+ grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
+ }
+ .twtpl-card-stage {
+ height: 140px;
+ }
+}
+
+@media (prefers-reduced-motion: reduce) {
+ .twtpl-overlay,
+ .twtpl-shell,
+ .twtpl-stage-overlay,
+ .twtpl-toast,
+ .twtpl-card {
+ transition: none;
+ }
+ .twtpl-spinner {
+ animation: none;
+ }
+}
diff --git a/src/shared/template-picker.js b/src/shared/template-picker.js
new file mode 100644
index 000000000..d8ffbb994
--- /dev/null
+++ b/src/shared/template-picker.js
@@ -0,0 +1,291 @@
+/**
+ * Create-from-template picker — a reusable modal that lets a user start a new
+ * avatar from a curated, ready-made template (or any avatar in the public
+ * gallery) on every creation surface.
+ *
+ * The whole flow is page-agnostic:
+ * 1. openTemplatePicker() shows curated templates with live 3D previews and a
+ * "browse the full gallery" escape hatch.
+ * 2. createFromTemplate() takes the chosen GLB, stages it locally (no sign-in
+ * required), and forwards to /create-review — the same review → save step
+ * the rest of the create flow uses.
+ *
+ * Wiring a page up is one line of markup: add `data-create-from-template` to any
+ * button/link and import this module. wireTemplateButtons() (auto-run on import)
+ * finds them and attaches the handler.
+ *
+ * Usage:
+ * import '/src/shared/template-picker.js'; // auto-wires [data-create-from-template]
+ * // or drive it directly:
+ * import { createFromTemplate, openTemplatePicker } from '/src/shared/template-picker.js';
+ * await createFromTemplate();
+ */
+
+import './template-picker.css';
+import { AVATAR_TEMPLATES } from './avatar-templates.js';
+import { stage as stageGuestAvatar } from '../guest-avatar.js';
+import { openAvatarPicker } from '../avatar-gallery-picker.js';
+import { log } from './log.js';
+
+const REVIEW_URL = '/create-review';
+
+let _mvLoaded = false;
+function ensureModelViewer() {
+ if (_mvLoaded || customElements.get('model-viewer')) return;
+ _mvLoaded = true;
+ const s = document.createElement('script');
+ s.type = 'module';
+ s.src = 'https://ajax.googleapis.com/ajax/libs/model-viewer/4.0.0/model-viewer.min.js';
+ document.head.appendChild(s);
+}
+
+function esc(s) {
+ return String(s ?? '')
+ .replace(/&/g, '&amp;')
+ .replace(/</g, '&lt;')
+ .replace(/>/g, '&gt;')
+ .replace(/"/g, '&quot;');
+}
+
+/**
+ * Opens the curated template picker as a modal.
+ * @returns {Promise<{name:string, url:string, source:string, source_meta:object}|null>}
+ * The chosen template (or gallery avatar normalized to the same shape), or
+ * null if the user dismissed the picker.
+ */
+export function openTemplatePicker() {
+ return new Promise((resolve) => {
+ ensureModelViewer();
+
+ let settled = false;
+ const finish = (value) => {
+ if (settled) return;
+ settled = true;
+ close();
+ resolve(value);
+ };
+
+ const overlay = document.createElement('div');
+ overlay.className = 'twtpl-overlay';
+ overlay.setAttribute('role', 'dialog');
+ overlay.setAttribute('aria-modal', 'true');
+ overlay.setAttribute('aria-label', 'Create from a template');
+
+ const cards = AVATAR_TEMPLATES.map(
+ (t) => `
+ <button type="button" class="twtpl-card" data-template="${esc(t.id)}" aria-label="Start from ${esc(t.name)}">
+ <span class="twtpl-card-stage">
+ <model-viewer
+ src="${esc(t.url)}"
+ alt="${esc(t.name)} avatar preview"
+ auto-rotate
+ auto-rotate-delay="0"
+ rotation-per-second="20deg"
+ interaction-prompt="none"
+ disable-zoom
+ disable-pan
+ disable-tap
+ camera-orbit="15deg 80deg auto"
+ shadow-intensity="0.5"
+ shadow-softness="0.9"
+ exposure="1"
+ environment-image="neutral"
+ loading="lazy"
+ reveal="auto"
+ ></model-viewer>
+ </span>
+ <span class="twtpl-card-body">
+ <span class="twtpl-card-name">${esc(t.name)}</span>
+ <span class="twtpl-card-tagline">${esc(t.tagline)}</span>
+ <span class="twtpl-card-chips">${(t.tags || [])
+ .map((tag) => `<span class="twtpl-chip">${esc(tag)}</span>`)
+ .join('')}</span>
+ </span>
+ <span class="twtpl-card-cta">Use this avatar →</span>
+ </button>`,
+ ).join('');
+
+ overlay.innerHTML = `
+ <div class="twtpl-shell">
+ <div class="twtpl-header">
+ <div>
+ <h2 class="twtpl-title">Start from a template</h2>
+ <p class="twtpl-sub">Pick a ready-made avatar and make it yours — no download, no sign-in to start.</p>
+ </div>
+ <button type="button" class="twtpl-close" aria-label="Close">&times;</button>
+ </div>
+ <div class="twtpl-grid">${cards}</div>
+ <div class="twtpl-footer">
+ <span class="twtpl-footer-hint">Want more options?</span>
+ <button type="button" class="twtpl-browse" data-role="browse-gallery">Browse the full gallery →</button>
+ </div>
+ <div class="twtpl-busy" hidden aria-live="polite">
+ <span class="twtpl-spinner" aria-hidden="true"></span>
+ <span class="twtpl-busy-label">Preparing your avatar…</span>
+ </div>
+ </div>
+ `;
+
+ const shell = overlay.querySelector('.twtpl-shell');
+ const onKey = (e) => {
+ if (e.key === 'Escape') finish(null);
+ };
+
+ function close() {
+ document.removeEventListener('keydown', onKey);
+ overlay.classList.remove('twtpl-open');
+ setTimeout(() => overlay.remove(), 180);
+ document.documentElement.style.overflow = '';
+ }
+
+ overlay.addEventListener('click', (e) => {
+ if (e.target === overlay) finish(null);
+ });
+ overlay.querySelector('.twtpl-close').addEventListener('click', () => finish(null));
+
+ overlay.querySelectorAll('.twtpl-card').forEach((card) => {
+ card.addEventListener('click', () => {
+ const t = AVATAR_TEMPLATES.find((x) => x.id === card.dataset.template);
+ if (!t) return;
+ finish({
+ name: t.name,
+ url: t.url,
+ source: 'import',
+ source_meta: { provider: 'template', template_id: t.id, source_url: t.url },
+ });
+ });
+ });
+
+ overlay.querySelector('[data-role="browse-gallery"]').addEventListener('click', async () => {
+ // Hand off to the full public gallery picker, then normalize its
+ // selection back into the template shape so the caller has one contract.
+ const avatar = await openAvatarPicker({
+ source: 'public',
+ title: 'Pick an avatar to start from',
+ ctaLabel: 'Use this avatar',
+ showModes: false,
+ });
+ if (!avatar) return; // user backed out of the gallery; keep template picker open
+ const url = avatar.model_url || avatar.url;
+ if (!url) return;
+ finish({
+ name: avatar.name || 'Remixed avatar',
+ url,
+ source: 'import',
+ source_meta: { provider: 'remix', fork_of: avatar.id, source_url: url },
+ });
+ });
+
+ document.documentElement.style.overflow = 'hidden';
+ document.body.appendChild(overlay);
+ document.addEventListener('keydown', onKey);
+ requestAnimationFrame(() => {
+ overlay.classList.add('twtpl-open');
+ shell.querySelector('.twtpl-card')?.focus();
+ });
+ });
+}
+
+/**
+ * Full create-from-template flow: open the picker, stage the chosen GLB locally,
+ * and forward to the review step. Safe to call from any creation page.
+ * @returns {Promise<boolean>} true if an avatar was staged and navigation began.
+ */
+export async function createFromTemplate() {
+ const choice = await openTemplatePicker();
+ if (!choice) return false;
+ return stageAndReview(choice);
+}
+
+async function stageAndReview(choice) {
+ const overlay = showStagingOverlay('Preparing your avatar…');
+ try {
+ const res = await fetch(choice.url, { mode: 'cors' });
+ if (!res.ok) throw new Error(`Could not load the model (HTTP ${res.status}).`);
+ updateStagingOverlay(overlay, 'Saving locally…');
+ const blob = await res.blob();
+ await stageGuestAvatar(blob, {
+ source: choice.source || 'import',
+ name: choice.name,
+ source_meta: choice.source_meta || {},
+ });
+ updateStagingOverlay(overlay, 'Opening preview…');
+ window.location.href = REVIEW_URL;
+ return true;
+ } catch (err) {
+ log.error('[template-picker] stage failed:', err);
+ hideStagingOverlay(overlay);
+ showToast(err.message || 'Could not start from this template. Try another.');
+ return false;
+ }
+}
+
+// ── Tiny self-contained overlay/toast (works on any page) ───────────────────
+
+function showStagingOverlay(label) {
+ const el = document.createElement('div');
+ el.className = 'twtpl-stage-overlay';
+ el.setAttribute('role', 'status');
+ el.setAttribute('aria-live', 'polite');
+ el.innerHTML = `<span class="twtpl-spinner twtpl-spinner--lg" aria-hidden="true"></span><span class="twtpl-stage-label"></span>`;
+ el.querySelector('.twtpl-stage-label').textContent = label;
+ document.documentElement.style.overflow = 'hidden';
+ document.body.appendChild(el);
+ requestAnimationFrame(() => el.classList.add('twtpl-open'));
+ return el;
+}
+
+function updateStagingOverlay(el, label) {
+ const l = el?.querySelector('.twtpl-stage-label');
+ if (l) l.textContent = label;
+}
+
+function hideStagingOverlay(el) {
+ if (!el) return;
+ el.remove();
+ document.documentElement.style.overflow = '';
+}
+
+let _toastTimer = null;
+function showToast(msg) {
+ let el = document.querySelector('.twtpl-toast');
+ if (!el) {
+ el = document.createElement('div');
+ el.className = 'twtpl-toast';
+ el.setAttribute('role', 'alert');
+ document.body.appendChild(el);
+ }
+ el.textContent = msg;
+ requestAnimationFrame(() => el.classList.add('twtpl-toast--show'));
+ clearTimeout(_toastTimer);
+ _toastTimer = setTimeout(() => {
+ el.classList.remove('twtpl-toast--show');
+ setTimeout(() => el.remove(), 250);
+ }, 4500);
+}
+
+// ── Auto-wiring ─────────────────────────────────────────────────────────────
+
+/**
+ * Wire every `[data-create-from-template]` element under `root` to the flow.
+ * Idempotent — already-wired elements are skipped, so it's safe to call again
+ * after injecting markup dynamically (e.g. after nav/gallery cards render).
+ */
+export function wireTemplateButtons(root = document) {
+ root.querySelectorAll('[data-create-from-template]').forEach((el) => {
+ if (el.dataset.twtplWired === '1') return;
+ el.dataset.twtplWired = '1';
+ el.addEventListener('click', (e) => {
+ e.preventDefault();
+ createFromTemplate();
+ });
+ });
+}
+
+if (typeof document !== 'undefined') {
+ if (document.readyState === 'loading') {
+ document.addEventListener('DOMContentLoaded', () => wireTemplateButtons());
+ } else {
+ wireTemplateButtons();
+ }
+}