Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
/* Coin Communities, 3D metaverse client UI: lobby + in-world HUD.
Overlays the WebGL canvas. Self-contained tokens so /play stands alone.
Design language: MONOCHROME · SLEEK · SHARP.
Pure greyscale, near-black canvas, thin white hairlines, sharp corners,
inverted white-on-black calls to action, tight letter-spaced type. Colour is
expressed only as light, white glow for "live", motion for state. */
:root {
--cc-bg: #060607;
--cc-bg2: #101010;
--cc-bg3: #181818;
/* Panel fill doubles as the contrast scrim. Every HUD panel floats over a
live 3D scene whose brightness we do not control (noon sky, snow biome, a
white plaza), so panel opacity is what decides whether the text on it is
readable. At the old 0.78 a bright scene composited the fill up to ~rgb(59)
and dropped the secondary label colour to 3.3:1, below AA. 0.92 pins the
worst case (pure-white scene) at rgb(31), where --cc-dim measures 4.9:1 and
--cc-faint 5.1:1. Do not lower it without re-running those numbers. */
--cc-panel: rgba(12, 12, 14, 0.92);
--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);
--cc-text: #f5f5f6;
--cc-dim: #8c8c92;
/* Was #5a5a60 at 2.8:1 even against the darkest panel, so timestamps, hint
copy and empty-state text failed AA everywhere they appeared. */
--cc-faint: #8f8f96;
--cc-accent: #ffffff; /* light is the only "colour" */
/* /play loads this sheet alone, never public/tokens.css, so the shared
focus-ring token the HUD buttons outline with has to exist here too. When
it did not, `outline: 2px solid var(--focus-ring-color)` was an invalid
declaration, the browser dropped the whole outline, and six HUD buttons
had no visible keyboard focus at all. */
--focus-ring-color: var(--cc-accent);
--cc-ink: #060607; /* text on white surfaces */
--cc-live: #ffffff; /* presence / live signal */
--cc-warn: #b9b9bf; /* connecting / transitional */
--cc-shadow: 0 16px 50px rgba(0, 0, 0, 0.7);
--cc-glow: 0 0 14px rgba(255, 255, 255, 0.35);
--cc-radius: 4px;
--cc-radius-sm: 2px;
/* Home-indicator / notch insets. The page is viewport-fit=cover (see
pages/play.html), so the canvas correctly fills the display cutout, but
that also means every fixed HUD control anchored with a raw `bottom:` px
lands INSIDE the home-indicator strip on a modern iPhone. There iOS both
draws its indicator over the control and swallows the first touch as a
system edge gesture, so the movement stick and the chat input read as
half-dead. Anchor bottom-docked controls with these instead of bare px.
They resolve to 0px on hardware without insets, so desktop is unchanged. */
--cc-safe-b: env(safe-area-inset-bottom, 0px);
/* Height of the strip the on-screen keyboard is covering, published by
CoinCommunities._trackSoftKeyboard from visualViewport. 0px whenever no
keyboard is up, so bottom-docked controls sit where they always did. */
--cc-kb: 0px;
--cc-safe-l: env(safe-area-inset-left, 0px);
--cc-safe-r: env(safe-area-inset-right, 0px);
}
* { box-sizing: border-box; }
html, body {
margin: 0; height: 100%; overflow: hidden;
background: var(--cc-bg); color: var(--cc-text);
font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
-webkit-font-smoothing: antialiased; overscroll-behavior: none;
}
/* Transparent embed: `?bg=transparent` (set on <html> by the play.html boot script)
drops every opaque page-level fill so the world composites onto the host page,
e.g. the IBM x402 showcase, instead of sitting in its own black box. The WebGL
canvas + sky are cleared engine-side (see coincommunities.js); these clear the
HTML/CSS layers above it. Lobby content panels keep their own fills. */
html[data-bg="transparent"], html[data-bg="transparent"] body { background: transparent; }
html[data-bg="transparent"] #kx-loading, html[data-bg="transparent"] #cc-loading { background: transparent; }
html[data-bg="transparent"] #cc-lobby {
background:
radial-gradient(1000px 560px at 82% -12%, rgba(255, 255, 255, 0.06), transparent 60%),
radial-gradient(820px 520px at 6% 112%, rgba(255, 255, 255, 0.045), transparent 60%);
}
#kx-canvas, #cc-canvas {
position: fixed; inset: 0; width: 100%; height: 100%; display: block;
touch-action: none; cursor: grab;
}
#cc-canvas:active, #kx-canvas:active { cursor: grabbing; }
[hidden] { display: none !important; }
::selection { background: rgba(255, 255, 255, 0.85); color: var(--cc-ink); }
/* ---------------- loading ---------------- */
#kx-loading, #cc-loading {
position: fixed; inset: 0; display: grid; place-items: center; z-index: 80;
background: radial-gradient(circle at 50% 38%, #161616, #050505 72%);
transition: opacity var(--duration-slow) var(--ease-standard);
}
#kx-loading.kx-hidden, #cc-loading.cc-hidden { opacity: 0; pointer-events: none; }
.kx-loading-card {
text-align: center; display: flex; flex-direction: column; align-items: center;
/* The card is taller than a laptop viewport once browser chrome is subtracted,
and it used to overflow silently: the progress hairline fell off the bottom
edge. Bound it to the viewport and let the avatar stage take the squeeze. */
max-height: 100dvh; padding: 16px 20px; box-sizing: border-box;
}
.kx-loading-logo {
width: 38px; height: 38px; opacity: 0; margin-bottom: 18px;
filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.28));
animation: kx-rise 0.7s ease 0.05s forwards;
}
.kx-loading-mark {
font-family: "Inter", system-ui, sans-serif; font-weight: 800;
font-size: clamp(26px, 5.4vw, 52px); letter-spacing: 0.28em; text-indent: 0.28em;
color: #fff; text-transform: uppercase;
opacity: 0; animation: kx-rise 0.7s ease 0.14s forwards;
}
/* Deep-link identity (filled inline by pages/play.html from ?name/?symbol/?image).
When a shared link names a community, that community is the headline and the
product wordmark steps back to an eyebrow. */
.kx-has-coin .kx-loading-logo { width: 30px; height: 30px; margin-bottom: 12px; }
.kx-has-coin .kx-loading-mark {
font-size: 11px; letter-spacing: 0.34em; text-indent: 0.34em;
color: var(--cc-faint); font-weight: 700;
}
.kx-boot-coin {
display: flex; align-items: center; gap: 12px; margin-top: 14px;
max-width: min(420px, calc(100vw - 48px));
opacity: 0; animation: kx-rise 0.7s ease 0.2s forwards;
}
.kx-boot-coin-art {
position: relative; flex: none; width: 44px; height: 44px; border-radius: 50%;
display: grid; place-items: center; overflow: hidden;
background: var(--cc-bg2); border: 1px solid var(--cc-edge);
box-shadow: 0 0 22px rgba(255, 255, 255, 0.14);
}
.kx-boot-coin-art img {
position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
opacity: 0; transition: opacity var(--duration-slow) var(--ease-standard);
}
.kx-boot-coin-ok .kx-boot-coin-art img { opacity: 1; }
/* Monogram stand-in under the art: covers the decode window and stays put for
good if the gateway fetch fails, so this is never a broken-image glyph. */
.kx-boot-coin-mono {
font-weight: 800; font-size: 18px; color: var(--cc-text); letter-spacing: 0.02em;
}
.kx-boot-coin-text {
display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
min-width: 0; text-align: left;
}
.kx-boot-coin-name {
font-size: clamp(20px, 3.4vw, 28px); font-weight: 800; line-height: 1.15;
color: var(--cc-text); letter-spacing: -0.01em;
max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.kx-boot-coin-sym {
font-family: var(--font-mono, ui-monospace, "SF Mono", Menlo, monospace);
font-size: 12px; letter-spacing: 0.08em; color: var(--cc-dim);
}
.kx-boot-coin-sym:empty { display: none; }
/* The 3D avatar turntable, the loader's hero. Falls back to a soft glyph mark
if WebGL or the avatar asset is unavailable (.kx-boot-noavatar). */
.kx-boot-stage {
position: relative; width: clamp(200px, 38vw, 264px);
/* Height yields to a short viewport (see .kx-loading-card) rather than pushing
the sub-label and progress bar off screen. */
height: min(clamp(248px, 46vw, 320px), 38dvh); min-height: 150px;
margin: 22px 0 14px; opacity: 0; animation: kx-rise 0.8s ease 0.24s forwards;
}
.kx-boot-stage::after {
content: ""; position: absolute; left: 50%; bottom: 12%; transform: translateX(-50%);
width: 56%; height: 26px; border-radius: 50%;
background: radial-gradient(ellipse, rgba(0, 0, 0, 0.55), transparent 70%);
filter: blur(2px); pointer-events: none;
}
/* Lit pedestal. The avatar GLB lands a beat after the card does, and the stage
was a plain void until it did. This disc is on screen from the first frame, so
the space reads as a stage waiting for its character; it breathes while the
model is still downloading and settles the moment it arrives. */
.kx-boot-stage::before {
content: ""; position: absolute; left: 50%; bottom: 9%; transform: translateX(-50%);
width: 62%; height: 30px; border-radius: 50%; pointer-events: none;
background: radial-gradient(ellipse, rgba(255, 255, 255, 0.16), transparent 72%);
animation: kx-pedestal 2.4s ease-in-out infinite;
}
.kx-boot-stage.kx-boot-ready::before, .kx-boot-stage.kx-boot-noavatar::before {
animation: none; opacity: 0.55;
}
@keyframes kx-pedestal { 50% { opacity: 0.45; transform: translateX(-50%) scale(0.92); } }
#kx-boot-avatar {
display: block; width: 100%; height: 100%; position: relative; z-index: 1;
opacity: 0; transition: opacity var(--duration-slow) var(--ease-standard);
}
.kx-boot-stage.kx-boot-ready #kx-boot-avatar { opacity: 1; }
/* Fallback mark, hidden unless WebGL/asset load fails. */
.kx-boot-fallback {
position: absolute; inset: 0; display: none; place-items: center;
font-size: 76px; line-height: 1; color: rgba(255, 255, 255, 0.9);
}
.kx-boot-fallback::before { content: "🪙"; filter: drop-shadow(0 0 18px rgba(255, 255, 255, 0.25)); }
.kx-boot-stage.kx-boot-noavatar #kx-boot-avatar { display: none; }
.kx-boot-stage.kx-boot-noavatar .kx-boot-fallback { display: grid; animation: cc-float 3.4s ease-in-out infinite; }
.kx-loading-sub {
color: var(--cc-dim); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
opacity: 0; animation: kx-rise 0.7s ease 0.34s forwards;
}
/* Indeterminate progress sweep, a thin hairline that reads as "alive" without
faking a percentage. */
.kx-boot-bar {
position: relative; width: 132px; height: 2px; margin: 20px auto 0;
background: rgba(255, 255, 255, 0.12); overflow: hidden; border-radius: 2px;
opacity: 0; animation: kx-rise 0.7s ease 0.42s forwards;
}
.kx-boot-bar span {
position: absolute; inset: 0 auto 0 0; width: 42%;
background: linear-gradient(90deg, transparent, #fff, transparent);
animation: kx-sweep 1.25s ease-in-out infinite;
}
@keyframes kx-sweep { 0% { transform: translateX(-110%); } 100% { transform: translateX(360%); } }
@keyframes kx-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes cc-float { 50% { transform: translateY(-8px); } }
/* Legacy spinner kept for any other view that still references it. */
.kx-spinner, .cc-spinner {
margin: 26px auto 0; width: 26px; height: 26px;
border: 2px solid rgba(255, 255, 255, 0.16); border-top-color: #fff;
border-radius: 50%; animation: cc-spin 0.8s linear infinite;
}
@keyframes cc-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
.kx-loading-logo, .kx-loading-mark, .kx-boot-stage, .kx-boot-coin, .kx-loading-sub, .kx-boot-bar { animation: none; opacity: 1; }
.kx-boot-coin-art img { transition: none; }
.kx-boot-bar span { animation: none; width: 100%; transform: none; opacity: 0.5; }
.kx-boot-stage.kx-boot-noavatar .kx-boot-fallback { animation: none; }
.kx-boot-stage::before { animation: none; opacity: 0.55; }
}
/* Boot failure (most often no WebGL): the spinner is swapped for this card so a
player never gets stranded on a loader that can't resolve. */
.kx-boot-error { max-width: 360px; gap: 14px; padding: 0 24px; }
.kx-boot-error .kx-loading-mark { color: var(--cc-text); animation: none; opacity: 1; }
.kx-boot-error-msg {
margin: 0; color: var(--cc-dim); font-size: 13px; line-height: 1.55;
letter-spacing: 0.01em; text-wrap: balance;
}
.kx-boot-error-actions { display: flex; align-items: center; gap: 16px; margin-top: 6px; }
.kx-boot-error-btn {
appearance: none; cursor: pointer; font: inherit;
background: var(--cc-accent); color: var(--cc-ink);
border: 0; border-radius: var(--cc-radius);
/* Thumb-sized: this is the recovery button on a screen that has already
failed once, often on the phone the failure happened on. */
min-height: 44px; padding: 9px 20px; font-size: 13px; font-weight: 700; letter-spacing: 0.02em;
transition: transform var(--duration-fast) var(--ease-standard), box-shadow var(--duration-fast) var(--ease-standard), opacity var(--duration-fast) var(--ease-standard);
}
.kx-boot-error-btn:hover { box-shadow: var(--cc-glow); transform: translateY(-1px); }
.kx-boot-error-btn:active { transform: translateY(0); opacity: 0.9; }
.kx-boot-error-btn:focus-visible { outline: 2px solid var(--cc-edge-hi); outline-offset: 2px; }
.kx-boot-error-link {
display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px;
color: var(--cc-dim); font-size: 13px; text-decoration: none;
box-shadow: inset 0 -1px 0 var(--cc-edge-soft);
transition: color var(--duration-fast) var(--ease-standard), box-shadow var(--duration-fast) var(--ease-standard);
}
.kx-boot-error-link:hover { color: var(--cc-text); box-shadow: inset 0 -1px 0 var(--cc-edge-hi); }
.kx-boot-error-link:focus-visible { outline: 2px solid var(--cc-edge-hi); outline-offset: 2px; border-radius: 1px; }
/* ---------------- lobby ---------------- */
#cc-lobby {
position: fixed; inset: 0; z-index: 60; overflow-y: auto;
background:
radial-gradient(1000px 560px at 82% -12%, rgba(255, 255, 255, 0.06), transparent 60%),
radial-gradient(820px 520px at 6% 112%, rgba(255, 255, 255, 0.045), transparent 60%),
var(--cc-bg);
animation: cc-fade 0.4s ease;
}
/* fine hairline grid for that technical, sharp feel */
#cc-lobby::before {
content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
background-image:
linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
background-size: 56px 56px;
mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 75%);
}
@keyframes cc-fade { from { opacity: 0; } }
/* ---------------- site nav ---------------- */
.cc-nav {
position: sticky; top: 0; z-index: 30;
background: rgba(6, 6, 7, 0.78); backdrop-filter: saturate(140%) blur(14px);
border-bottom: 1px solid var(--cc-edge-soft);
}
.cc-nav-inner {
display: flex; align-items: center; gap: 6px;
max-width: 1180px; margin: 0 auto; padding: 10px 22px;
}
.cc-nav-brand {
display: inline-flex; align-items: center; gap: 9px;
font-weight: 700; letter-spacing: 0.01em; color: var(--cc-text);
font-size: 15px; padding-right: 8px;
}
.cc-nav-brand svg { width: 20px; height: 20px; display: block; }
.cc-nav-brand:hover { color: #fff; }
.cc-nav-main { display: flex; align-items: center; gap: 2px; flex: 1; margin-left: 8px; }
.cc-nav-flat, .cc-nav-trigger {
display: inline-flex; align-items: center; gap: 5px;
background: none; border: 0; cursor: pointer; font: inherit;
color: var(--cc-dim); font-size: 13.5px; font-weight: 500;
padding: 7px 11px; border-radius: var(--cc-radius-sm);
transition: color var(--duration-fast) var(--ease-standard), background var(--duration-fast) var(--ease-standard);
}
.cc-nav-flat:hover, .cc-nav-trigger:hover,
.cc-nav-grp.cc-open .cc-nav-trigger { color: var(--cc-text); }
.cc-nav-grp.cc-open .cc-nav-trigger { background: rgba(255, 255, 255, 0.05); }
.cc-nav-caret { font-size: 9px; opacity: 0.55; transition: transform var(--duration-base) var(--ease-standard); }
.cc-nav-grp.cc-open .cc-nav-caret { transform: rotate(180deg); }
.cc-nav-grp { position: relative; display: flex; }
.cc-nav-pop {
position: absolute; top: calc(100% + 8px); left: 0; z-index: 40;
display: grid; gap: 2px; min-width: 290px; padding: 7px;
background: var(--cc-panel-solid); border: 1px solid var(--cc-edge);
border-radius: var(--cc-radius); box-shadow: var(--cc-shadow);
opacity: 0; transform: translateY(-6px); pointer-events: none;
transition: opacity var(--duration-fast) var(--ease-standard), transform var(--duration-fast) var(--ease-standard);
}
.cc-nav-pop.cc-nav-wide { grid-template-columns: 1fr 1fr; min-width: 540px; }
.cc-nav-grp.cc-open .cc-nav-pop { opacity: 1; transform: translateY(0); pointer-events: auto; }
.cc-nav-mi {
display: block; padding: 8px 10px; border-radius: var(--cc-radius-sm);
transition: background var(--duration-fast) var(--ease-standard);
}
.cc-nav-mi:hover { background: rgba(255, 255, 255, 0.05); }
.cc-nav-mi-t { display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; color: var(--cc-text); }
.cc-nav-mi-d { display: block; font-size: 12px; color: var(--cc-dim); margin-top: 2px; }
.cc-nav-pill {
font-size: 9px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
color: var(--cc-ink); background: #fff; border-radius: 999px; padding: 1px 6px;
}
.cc-nav-end { display: flex; align-items: center; gap: 4px; }
.cc-nav-signin {
color: var(--cc-dim); font-size: 13.5px; font-weight: 500; padding: 7px 12px;
border-radius: var(--cc-radius-sm); transition: color var(--duration-fast) var(--ease-standard);
}
.cc-nav-signin:hover { color: var(--cc-text); }
.cc-nav-console {
color: var(--cc-ink); background: #fff; font-size: 13.5px; font-weight: 600;
padding: 7px 14px; border-radius: var(--cc-radius-sm);
box-shadow: var(--cc-glow); transition: transform var(--duration-fast) var(--ease-standard), opacity var(--duration-fast) var(--ease-standard);
}
.cc-nav-console:hover { transform: translateY(-1px); opacity: 0.92; }
.cc-nav-toggle {
display: none; align-items: center; justify-content: center;
width: 38px; height: 34px; margin-left: auto;
background: none; border: 1px solid var(--cc-edge); border-radius: var(--cc-radius-sm);
color: var(--cc-text); cursor: pointer;
}
.cc-nav-toggle:hover { border-color: var(--cc-edge-hi); background: rgba(255, 255, 255, 0.04); }
.cc-nav-toggle svg { width: 16px; height: 16px; display: block; }
.cc-nav-x { display: none; }
.cc-nav-toggle[aria-expanded="true"] .cc-nav-burger { display: none; }
.cc-nav-toggle[aria-expanded="true"] .cc-nav-x { display: block; }
.cc-nav-drawer {
display: none; flex-direction: column; gap: 1px;
padding: 14px 18px 22px; border-top: 1px solid var(--cc-edge-soft);
background: var(--cc-panel-solid);
}
.cc-nav-drawer.cc-open { display: flex; }
.cc-dr-h {
font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
color: var(--cc-faint); padding: 14px 0 6px;
}
.cc-dr-h:first-child { padding-top: 2px; }
.cc-nav-drawer a {
color: var(--cc-dim); font-size: 14px; padding: 9px 10px; border-radius: var(--cc-radius-sm);
}
.cc-nav-drawer a:hover { background: rgba(255, 255, 255, 0.05); color: var(--cc-text); }
.cc-dr-sep { height: 1px; background: var(--cc-edge-soft); margin: 12px 0; }
.cc-dr-console { color: var(--cc-ink) !important; background: #fff; font-weight: 600; text-align: center; margin-top: 6px; }
@media (max-width: 880px) {
.cc-nav-main, .cc-nav-end { display: none; }
.cc-nav-toggle { display: inline-flex; }
}
/* ---------------- site footer ---------------- */
.cc-foot { position: relative; border-top: 1px solid var(--cc-edge-soft); margin-top: 24px; }
.cc-foot-inner {
display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
max-width: 1180px; margin: 0 auto; padding: 28px 22px 40px;
}
.cc-foot-copy { color: var(--cc-faint); font-size: 12.5px; }
.cc-foot-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
/* Padded to a thumb-sized target rather than the 16px a bare 13px link gives.
These sit in a row of their own, so the WCAG 2.5.8 inline-link exemption
does not apply to them. */
.cc-foot-links a {
display: inline-flex; align-items: center; min-height: 44px;
/* The row already cleared 44px of height; a four-letter label ("Docs", "API")
was still only 31px wide, so the padding buys the other axis too. */
padding: 0 6px; margin: 0 -6px; min-width: 40px; justify-content: center;
color: var(--cc-dim); font-size: 13px; transition: color var(--duration-fast) var(--ease-standard);
}
.cc-foot-links a:hover { color: var(--cc-text); }
.cc-foot-links a:focus-visible { outline: 2px solid var(--cc-edge-hi); outline-offset: 2px; border-radius: var(--cc-radius-sm); }
.cc-lobby-inner { position: relative; max-width: 1180px; margin: 0 auto; padding: 26px 22px 56px; }
/* ---------------- hero ----------------
The page opens with one claim and three measured numbers. Two columns on a
desktop (claim left, counters right), stacked below 860px. */
.cc-hero {
display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 34px; align-items: end;
padding: 26px 0 30px; margin-bottom: 22px;
border-bottom: 1px solid var(--cc-edge-soft);
}
.cc-hero-copy { min-width: 0; }
.cc-brand { display: flex; align-items: center; gap: 13px; }
.cc-brand-logo {
width: 44px; height: 44px; border-radius: var(--cc-radius);
background: #fff; color: var(--cc-ink);
display: grid; place-items: center; flex: none;
box-shadow: var(--cc-glow);
transition: transform var(--duration-fast) var(--ease-standard), box-shadow var(--duration-fast) var(--ease-standard);
}
.cc-brand-logo svg { width: 26px; height: 26px; display: block; }
.cc-brand-logo:hover { transform: translateY(-1px); }
.cc-brand-logo:focus-visible { outline: 2px solid var(--focus-ring-color); outline-offset: 2px; }
.cc-brand-title { font-size: 13px; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; }
.cc-brand-sub { color: var(--cc-dim); font-size: 12px; margin-top: 3px; letter-spacing: 0.02em; }
.cc-hero-title {
margin: 22px 0 0; font-size: clamp(32px, 4.6vw, 54px); line-height: 1.02;
font-weight: 800; letter-spacing: -0.03em; color: var(--cc-text);
}
/* The one "colour" this design language allows is light. */
.cc-hero-title em { font-style: normal; color: #fff; text-shadow: 0 0 30px rgba(255, 255, 255, 0.35); }
.cc-hero-sub {
margin: 14px 0 0; max-width: 62ch; color: var(--cc-dim);
font-size: 14.5px; line-height: 1.6;
}
.cc-hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
/* Live counters. Tabular figures so a count ticking 9 → 10 never shifts the
layout, and hairline rules instead of boxes to keep the hero calm. */
.cc-stats {
display: flex; gap: 0; margin: 0; padding: 0;
border: 1px solid var(--cc-edge-soft); border-radius: var(--cc-radius);
background: var(--cc-panel);
}
.cc-stat { padding: 14px 20px; min-width: 132px; }
.cc-stat + .cc-stat { border-left: 1px solid var(--cc-edge-soft); }
.cc-stat-v {
margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -0.02em;
font-variant-numeric: tabular-nums; color: var(--cc-text); line-height: 1.1;
}
.cc-stat-k {
margin-top: 5px; font-size: 10.5px; font-weight: 600; letter-spacing: 0.14em;
text-transform: uppercase; color: var(--cc-faint);
}
@media (max-width: 860px) {
.cc-hero { grid-template-columns: 1fr; gap: 22px; align-items: start; }
.cc-stats { align-self: stretch; }
.cc-stat { flex: 1; min-width: 0; padding: 12px 14px; }
.cc-stat-v { font-size: 21px; }
}
/* ---------------- command bar ---------------- */
.cc-cmd { margin-bottom: 22px; }
.cc-search {
display: flex; align-items: center; gap: 12px;
background: var(--cc-panel); border: 1px solid var(--cc-edge);
border-radius: var(--cc-radius); padding: 0 14px;
transition: border-color var(--duration-fast) var(--ease-standard), box-shadow var(--duration-base) var(--ease-standard);
}
.cc-search:hover { border-color: rgba(255, 255, 255, 0.22); }
.cc-search:focus-within { border-color: var(--cc-edge-hi); box-shadow: 0 0 0 1px var(--cc-edge-hi), 0 0 34px rgba(255, 255, 255, 0.07); }
.cc-search-ico { display: block; width: 18px; height: 18px; flex: none; color: var(--cc-faint); }
.cc-search-ico svg { display: block; width: 100%; height: 100%; }
.cc-search:focus-within .cc-search-ico { color: var(--cc-text); }
/* The field carries the row's vertical padding rather than the wrapper, so the
input's own hit box fills the search bar. With the padding on the wrapper the
tappable target was only as tall as one line of text (20px), and a thumb
landing anywhere else in the bar did nothing. */
.cc-search input {
flex: 1; min-width: 0; align-self: stretch; min-height: 52px; padding: 11px 0;
background: none; border: none; color: var(--cc-text); font-size: 15px; outline: none;
}
.cc-search input::placeholder { color: var(--cc-dim); }
.cc-search input::-webkit-search-cancel-button { display: none; }
.cc-search-clear {
display: grid; place-items: center; flex: none; width: 30px; height: 30px; padding: 0;
background: rgba(255, 255, 255, 0.06); border: 1px solid var(--cc-edge-soft);
border-radius: 50%; color: var(--cc-dim); cursor: pointer;
transition: color var(--duration-fast) var(--ease-standard), background var(--duration-fast) var(--ease-standard);
}
.cc-search-clear svg { width: 12px; height: 12px; display: block; }
.cc-search-clear:hover { color: var(--cc-text); background: rgba(255, 255, 255, 0.12); }
.cc-search-clear:focus-visible { outline: 2px solid var(--cc-edge-hi); outline-offset: 2px; }
.cc-search-kbd {
flex: none; font: inherit; font-size: 11px; font-weight: 700; line-height: 1;
color: var(--cc-faint); background: rgba(255, 255, 255, 0.05);
border: 1px solid var(--cc-edge-soft); border-radius: var(--cc-radius-sm);
padding: 5px 8px;
}
.cc-search:focus-within .cc-search-kbd { opacity: 0; }
@media (hover: none) { .cc-search-kbd { display: none; } }
.cc-cmd-hint { margin: 9px 2px 0; color: var(--cc-faint); font-size: 12px; }
/* avatar picker, in its collapsed "who you are" form and its open picker form */
.cc-avatar-bar {
background: var(--cc-panel); border: 1px solid var(--cc-edge);
border-radius: var(--cc-radius); padding: 14px 16px; margin-bottom: 26px;
box-shadow: var(--cc-shadow);
}
.cc-id-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.cc-id-portrait {
flex: none; width: 58px; height: 58px; border-radius: var(--cc-radius);
border: 1px solid var(--cc-edge); background: var(--cc-bg2);
display: grid; place-items: center; overflow: hidden;
}
.cc-id-portrait img { width: 100%; height: 100%; object-fit: contain; object-position: center top; }
.cc-id-portrait-glyph { font-size: 26px; line-height: 1; filter: grayscale(1); opacity: 0.85; }
.cc-id-fields { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; flex: 1; min-width: 220px; }
.cc-id-summary {
color: var(--cc-faint); font-size: 12px; letter-spacing: 0.02em;
overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 30ch;
}
.cc-id-toggle {
display: inline-flex; align-items: center; gap: 8px; flex: none; cursor: pointer;
min-height: 40px; padding: 0 14px; font: inherit; font-size: 13px; font-weight: 600;
color: var(--cc-text); background: var(--cc-bg2);
border: 1px solid var(--cc-edge); border-radius: var(--cc-radius-sm);
transition: border-color var(--duration-fast) var(--ease-standard), background var(--duration-fast) var(--ease-standard);
}
.cc-id-toggle:hover { border-color: var(--cc-edge-hi); background: var(--cc-bg3); }
.cc-id-toggle:focus-visible { outline: 2px solid var(--cc-edge-hi); outline-offset: 2px; }
.cc-id-toggle-caret { font-size: 10px; opacity: 0.6; transition: transform var(--duration-base) var(--ease-standard); }
.cc-avatar-bar.cc-id-open .cc-id-toggle-caret { transform: rotate(180deg); }
.cc-id-body {
display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--cc-edge-soft);
animation: cc-id-reveal 0.24s cubic-bezier(0.2, 0.7, 0.2, 1);
}
@keyframes cc-id-reveal { from { opacity: 0; transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .cc-id-body { animation: none; } }
.cc-avatar-label { width: 100%; font-weight: 700; font-size: 13px; letter-spacing: 0.02em; text-transform: uppercase; }
/* On a phone the portrait, the name field and the disclosure cannot share one
line: the name row overflowed the viewport by 26px. Let the fields drop under
the portrait and give the field and the toggle the full width each. */
/* Between a phone and a laptop the preset chips and the paste/gallery/upload
row are 1px too wide to share a line, which pushed the upload button past the
viewport edge. Give the second row its own line before that happens. */
@media (max-width: 900px) {
.cc-id-body .cc-avatar-custom { flex: 1 1 100%; }
}
@media (max-width: 620px) {
.cc-id-fields { flex: 1 1 100%; min-width: 0; gap: 8px; }
.cc-name-row { flex-wrap: wrap; width: 100%; gap: 6px; }
.cc-name-label { flex: 1 1 100%; }
.cc-name-input { flex: 1 1 100%; max-width: none; }
.cc-id-summary { max-width: 100%; }
.cc-id-toggle { flex: 1 1 100%; justify-content: center; }
}
.cc-avatar-label small { display: block; color: var(--cc-dim); font-weight: 400; font-size: 12px; margin-top: 3px; text-transform: none; letter-spacing: 0; }
/* The presets arrive from the avatar API a beat after first paint. Reserving one
chip-row of height keeps the fields and the community grid below from being
shoved down when they land (it was the lobby's largest layout shift). */
.cc-avatar-presets { display: flex; gap: 8px; flex-wrap: wrap; min-height: 50px; }
.cc-avatar-chip {
width: 50px; height: 50px; border-radius: var(--cc-radius); overflow: hidden;
border: 1px solid var(--cc-edge); background: var(--cc-bg2);
cursor: pointer; padding: 0; display: grid; place-items: center; font-size: 22px;
transition: border-color var(--duration-fast) var(--ease-standard), transform var(--duration-instant) var(--ease-standard);
}
.cc-avatar-chip img { width: 100%; height: 100%; object-fit: cover; }
/* Rendered avatar portraits frame head-to-chest, so contain + anchor to top and
sit on the panel surface rather than being cropped like a photo thumbnail. */
.cc-avatar-chip img.cc-avatar-render { object-fit: contain; object-position: center top; background: var(--cc-bg2); }
.cc-avatar-glyph { font-size: 22px; line-height: 1; }
.cc-avatar-chip:hover { transform: translateY(-2px); border-color: var(--cc-edge-hi); }
.cc-avatar-chip.cc-on { border-color: #fff; box-shadow: 0 0 0 1px #fff, var(--cc-glow); }
/* Loading shimmer while the model renders to a portrait. */
.cc-avatar-chip.cc-avatar-loading { position: relative; }
.cc-avatar-chip.cc-avatar-loading::after {
content: ''; position: absolute; inset: 0;
background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.10) 50%, transparent 70%);
background-size: 220% 100%; animation: cc-avatar-shimmer 1.1s ease-in-out infinite;
}
@keyframes cc-avatar-shimmer { from { background-position: 180% 0; } to { background-position: -80% 0; } }
@media (prefers-reduced-motion: reduce) { .cc-avatar-chip.cc-avatar-loading::after { animation: none; } }
.cc-avatar-custom { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 240px; }
.cc-avatar-custom input {
flex: 1; min-width: 0; background: var(--cc-bg2); border: 1px solid var(--cc-edge);
border-radius: var(--cc-radius-sm); padding: 10px 12px; color: var(--cc-text); font-size: 13px; outline: none;
transition: border-color var(--duration-fast) var(--ease-standard);
}
.cc-avatar-custom input:focus { border-color: var(--cc-edge-hi); }
/* On a phone the paste field plus two nowrap buttons is wider than the screen,
which pushed "Upload model" clean off the right edge and out of reach. Stack
the field over the two actions and let them share the row instead. */
@media (max-width: 560px) {
.cc-avatar-custom { flex-wrap: wrap; min-width: 0; }
.cc-avatar-custom input { flex: 1 1 100%; }
.cc-gallery-btn, .cc-upload-btn { flex: 1 1 0; justify-content: center; padding: 11px 10px; }
}
/* bring-your-own .glb: upload button, drop target, status */
.cc-avatar-bar { position: relative; transition: border-color var(--duration-fast) var(--ease-standard), box-shadow var(--duration-fast) var(--ease-standard); }
.cc-avatar-bar.cc-drag { border-color: var(--cc-edge-hi); box-shadow: 0 0 0 1px var(--cc-edge-hi), var(--cc-glow); }
.cc-avatar-dropmsg {
position: absolute; inset: 0; display: none; align-items: center; justify-content: center;
border-radius: var(--cc-radius); background: rgba(6, 6, 7, 0.82); backdrop-filter: blur(2px);
color: var(--cc-text); font-size: 14px; font-weight: 600; letter-spacing: 0.02em;
border: 1px dashed var(--cc-edge-hi); pointer-events: none; z-index: 2;
}
.cc-avatar-bar.cc-drag .cc-avatar-dropmsg { display: flex; }
.cc-upload-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.cc-upload-btn {
display: inline-flex; align-items: center; gap: 7px; flex: none; cursor: pointer; user-select: none;
background: var(--cc-bg2); border: 1px solid var(--cc-edge); border-radius: var(--cc-radius-sm);
padding: 9px 14px; color: var(--cc-text); font-size: 13px; font-weight: 600; white-space: nowrap;
transition: border-color var(--duration-fast) var(--ease-standard), background var(--duration-fast) var(--ease-standard), transform var(--duration-instant) var(--ease-standard);
}
.cc-upload-btn:hover { border-color: var(--cc-edge-hi); background: var(--cc-bg3); }
.cc-upload-btn:active { transform: translateY(1px); }
.cc-upload-btn:focus-within { border-color: var(--cc-edge-hi); box-shadow: 0 0 0 1px var(--cc-edge-hi); }
.cc-upload-ico { font-size: 13px; line-height: 1; }
.cc-upload-btn.cc-busy { pointer-events: none; opacity: 0.65; }
.cc-upload-btn.cc-busy .cc-upload-ico { animation: cc-upload-pulse 0.9s ease-in-out infinite; }
@keyframes cc-upload-pulse { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .cc-upload-btn.cc-busy .cc-upload-ico { animation: none; } }
.cc-upload-status {
width: 100%; margin-top: 2px; font-size: 12px; line-height: 1.4;
display: flex; align-items: center; gap: 7px; color: var(--cc-dim);
}
.cc-upload-status::before {
content: ''; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--cc-dim);
}
.cc-upload-status[data-state="working"] { color: var(--cc-text); }
.cc-upload-status[data-state="working"]::before { background: var(--cc-warn); animation: cc-status-blink 1s ease-in-out infinite; }
.cc-upload-status[data-state="done"] { color: var(--cc-text); }
.cc-upload-status[data-state="done"]::before { background: var(--cc-live); box-shadow: var(--cc-glow); }
.cc-upload-status[data-state="error"] { color: var(--cc-text); }
.cc-upload-status[data-state="error"]::before { background: #ff6b6b; }
@keyframes cc-status-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
@media (prefers-reduced-motion: reduce) { .cc-upload-status[data-state="working"]::before { animation: none; } }
.cc-avatar-chip.cc-avatar-upload.cc-on,
.cc-avatar-chip.cc-avatar-gallery.cc-on { border-color: #fff; }
/* browse-gallery button, mirrors the upload button so the avatar bar reads as
one set of equal-weight actions */
.cc-gallery-btn {
display: inline-flex; align-items: center; gap: 7px; flex: none; cursor: pointer; user-select: none;
background: var(--cc-bg2); border: 1px solid var(--cc-edge); border-radius: var(--cc-radius-sm);
padding: 9px 14px; color: var(--cc-text); font-size: 13px; font-weight: 600; white-space: nowrap;
transition: border-color var(--duration-fast) var(--ease-standard), background var(--duration-fast) var(--ease-standard), transform var(--duration-instant) var(--ease-standard);
}
.cc-gallery-btn:hover { border-color: var(--cc-edge-hi); background: var(--cc-bg3); }
.cc-gallery-btn:active { transform: translateY(1px); }
.cc-gallery-btn:focus-visible { border-color: var(--cc-edge-hi); box-shadow: 0 0 0 1px var(--cc-edge-hi); outline: none; }
.cc-gallery-ico { font-size: 13px; line-height: 1; }
.cc-gallery-btn.cc-busy { pointer-events: none; opacity: 0.65; }
/* create-avatar, the headline action in the bar. Filled white so it reads as
the primary path; spans the bar so it never competes with the equal-weight
secondary actions (gallery / upload / paste) below it. */
.cc-create-btn {
display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; cursor: pointer;
background: #fff; color: var(--cc-ink); border: 1px solid #fff; border-radius: var(--cc-radius);
padding: 13px 16px; margin: 2px 0 4px; font: inherit;
box-shadow: var(--cc-glow);
transition: transform var(--duration-instant) var(--ease-standard), box-shadow var(--duration-fast) var(--ease-standard), filter var(--duration-fast) var(--ease-standard);
}
.cc-create-btn:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px #fff, 0 0 22px rgba(255, 255, 255, 0.5); }
.cc-create-btn:active { transform: translateY(0); }
.cc-create-btn:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--cc-bg), 0 0 0 4px #fff; }
.cc-create-ico {
flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
background: var(--cc-ink); color: #fff; font-size: 15px; line-height: 1;
}
.cc-create-copy { flex: 1; min-width: 0; font-weight: 700; font-size: 14px; letter-spacing: 0.01em; }
.cc-create-copy small { display: block; color: rgba(6, 6, 7, 0.62); font-weight: 500; font-size: 12px; margin-top: 2px; letter-spacing: 0; }
.cc-create-arrow { flex: none; font-size: 16px; opacity: 0.55; transition: transform var(--duration-fast) var(--ease-standard), opacity var(--duration-fast) var(--ease-standard); }
.cc-create-btn:hover .cc-create-arrow { transform: translateX(3px); opacity: 1; }
.cc-create-btn.cc-busy { pointer-events: none; opacity: 0.7; }
.cc-create-btn.cc-busy .cc-create-ico { animation: cc-upload-pulse 0.9s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
.cc-create-btn:hover { transform: none; }
.cc-create-btn.cc-busy .cc-create-ico { animation: none; }
}
/* freshly-created avatar chip, selected ring matches the other adopted chips */
.cc-avatar-chip.cc-avatar-created.cc-on { border-color: #fff; }
/* create-avatar method chooser, a focused modal over the lobby */
.cc-create-overlay {
position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px;
background: rgba(4, 4, 5, 0.78); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
opacity: 0; transition: opacity var(--duration-base) var(--ease-standard);
}
.cc-create-overlay.cc-on { opacity: 1; }
.cc-create-modal {
width: min(560px, 100%); max-height: calc(100dvh - 40px); overflow-y: auto;
background: var(--cc-panel-solid); border: 1px solid var(--cc-edge); border-radius: var(--cc-radius);
box-shadow: var(--cc-shadow); padding: 22px;
transform: translateY(10px) scale(0.99); transition: transform var(--duration-base) var(--ease-standard);
}
.cc-create-overlay.cc-on .cc-create-modal { transform: none; }
.cc-create-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.cc-create-title { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: 0.01em; }
.cc-create-sub { margin: 5px 0 0; color: var(--cc-dim); font-size: 13px; line-height: 1.45; max-width: 42ch; }
.cc-create-close {
flex: none; width: 32px; height: 32px; border-radius: var(--cc-radius-sm); cursor: pointer;
background: var(--cc-bg2); border: 1px solid var(--cc-edge); color: var(--cc-dim);
font-size: 20px; line-height: 1; transition: border-color var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard), background var(--duration-fast) var(--ease-standard);
}
.cc-create-close:hover { color: var(--cc-text); border-color: var(--cc-edge-hi); background: var(--cc-bg3); }
.cc-create-close:focus-visible { outline: none; border-color: var(--cc-edge-hi); box-shadow: 0 0 0 1px var(--cc-edge-hi); }
.cc-create-methods { display: flex; flex-direction: column; gap: 10px; }
.cc-create-card {
display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; cursor: pointer; font: inherit;
background: var(--cc-bg2); border: 1px solid var(--cc-edge); border-radius: var(--cc-radius);
padding: 14px 16px; color: var(--cc-text);
transition: border-color var(--duration-fast) var(--ease-standard), background var(--duration-fast) var(--ease-standard), transform var(--duration-instant) var(--ease-standard);
}
.cc-create-card:hover { border-color: var(--cc-edge-hi); background: var(--cc-bg3); transform: translateY(-1px); }
.cc-create-card:active { transform: translateY(0); }
.cc-create-card:focus-visible { outline: none; border-color: #fff; box-shadow: 0 0 0 1px #fff; }
.cc-create-card-ico {
flex: none; width: 40px; height: 40px; border-radius: var(--cc-radius-sm); display: grid; place-items: center;
background: var(--cc-bg3); border: 1px solid var(--cc-edge); font-size: 19px; line-height: 1;
}
.cc-create-card:hover .cc-create-card-ico { border-color: var(--cc-edge-hi); }
.cc-create-card-body { flex: 1; min-width: 0; }
.cc-create-card-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.cc-create-card-badge {
font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
color: var(--cc-ink); background: #fff; border-radius: 999px; padding: 2px 8px;
}
.cc-create-card-desc { display: block; margin-top: 3px; color: var(--cc-dim); font-size: 12.5px; line-height: 1.45; font-weight: 400; }
.cc-create-card-arrow { flex: none; font-size: 16px; color: var(--cc-faint); transition: transform var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard); }
.cc-create-card:hover .cc-create-card-arrow { transform: translateX(3px); color: var(--cc-text); }
@media (prefers-reduced-motion: reduce) {
.cc-create-overlay, .cc-create-modal { transition: none; }
.cc-create-card:hover, .cc-create-btn:hover { transform: none; }
}
@media (max-width: 560px) {
.cc-create-modal { padding: 18px; }
.cc-create-card { padding: 12px 13px; gap: 11px; }
.cc-create-card-ico { width: 36px; height: 36px; font-size: 17px; }
}
/* Holders world entry, a persistent badge on each coin card, top-right opposite
the LIVE/OFFICIAL badge. Always visible so the gated room is discoverable on
touch (where the hover CTA never appears). */
.cc-card-holders {
position: absolute; top: 9px; right: 9px; z-index: 2; cursor: pointer; font: inherit;
display: inline-flex; align-items: center; gap: 5px;
background: rgba(0, 0, 0, 0.6); border: 1px solid var(--cc-edge); border-radius: var(--cc-radius-sm);
padding: 3px 9px; color: var(--cc-text);
font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
transition: border-color var(--duration-fast) var(--ease-standard), background var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard);
}
.cc-card-holders:hover { border-color: var(--cc-edge-hi); background: #fff; color: var(--cc-ink); }
.cc-card-holders:focus-visible { outline: none; border-color: #fff; box-shadow: 0 0 0 1px #fff; }
.cc-card-holders-ico { font-size: 10px; line-height: 1; }
.cc-card-featured .cc-card-holders { top: 12px; right: 12px; }
/* In-world tier badge in the coin banner, present only in the Holders world. */
.cc-tier-badge {
display: inline-flex; align-items: center; gap: 5px;
background: #fff; color: var(--cc-ink); border-radius: var(--cc-radius-sm);
padding: 2px 8px; font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
white-space: nowrap; box-shadow: var(--cc-glow);
}
/* Holder gate overlay, mirrors the create modal's chrome + motion. The scene
drives its states (checking / working / granted / short / auth / wallet / error)
via setHolderGate(); buttons report back through onHolderAction(). */
.cc-gate-overlay {
position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 20px;
background: rgba(4, 4, 5, 0.8); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
opacity: 0; transition: opacity var(--duration-base) var(--ease-standard);
}
.cc-gate-overlay.cc-on { opacity: 1; }
.cc-gate-modal {
width: min(420px, 100%); background: var(--cc-panel-solid);
border: 1px solid var(--cc-edge); border-radius: var(--cc-radius); box-shadow: var(--cc-shadow);
padding: 18px 22px 22px;
transform: translateY(10px) scale(0.99); transition: transform var(--duration-base) var(--ease-standard);
}
.cc-gate-overlay.cc-on .cc-gate-modal { transform: none; }
.cc-gate-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.cc-gate-tag { font-size: 10px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cc-dim); }
.cc-gate-x {
flex: none; width: 30px; height: 30px; border-radius: var(--cc-radius-sm); cursor: pointer;
background: var(--cc-bg2); border: 1px solid var(--cc-edge); color: var(--cc-dim); font-size: 19px; line-height: 1;
transition: border-color var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard), background var(--duration-fast) var(--ease-standard);
}
.cc-gate-x:hover { color: var(--cc-text); border-color: var(--cc-edge-hi); background: var(--cc-bg3); }
.cc-gate-x:focus-visible { outline: none; border-color: var(--cc-edge-hi); box-shadow: 0 0 0 1px var(--cc-edge-hi); }
.cc-gate-body { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 10px 0 2px; }
.cc-gate-spin { padding: 12px 0 6px; }
.cc-gate-check, .cc-gate-lock {
width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
font-size: 22px; line-height: 1; border: 1px solid var(--cc-edge); background: var(--cc-bg2);
}
.cc-gate-check { background: #fff; color: var(--cc-ink); border-color: #fff; box-shadow: var(--cc-glow); }
.cc-gate-title { margin: 4px 0 0; font-size: 18px; font-weight: 700; letter-spacing: 0.01em; }
.cc-gate-msg { margin: 0; color: var(--cc-dim); font-size: 13px; line-height: 1.5; max-width: 34ch; }
.cc-gate-err { margin: 2px 0 0; color: var(--cc-text); font-size: 12px; line-height: 1.45; max-width: 34ch; opacity: 0.85; }
.cc-gate-actions { display: flex; flex-direction: column; gap: 8px; width: 100%; margin-top: 16px; }
.cc-gate-btn {
width: 100%; padding: 11px 14px; border-radius: var(--cc-radius-sm); cursor: pointer; font: inherit;
font-weight: 700; font-size: 13px; letter-spacing: 0.03em;
background: var(--cc-bg2); border: 1px solid var(--cc-edge); color: var(--cc-text);
transition: border-color var(--duration-fast) var(--ease-standard), background var(--duration-fast) var(--ease-standard), filter var(--duration-fast) var(--ease-standard), transform var(--duration-instant) var(--ease-standard);
}
.cc-gate-btn:hover { border-color: var(--cc-edge-hi); background: var(--cc-bg3); }
.cc-gate-btn:active { transform: translateY(1px); }
.cc-gate-btn:focus-visible { outline: none; border-color: #fff; box-shadow: 0 0 0 1px #fff; }
.cc-gate-primary { background: #fff; color: var(--cc-ink); border-color: #fff; }
.cc-gate-primary:hover { background: #fff; filter: brightness(0.92); }
.cc-gate-ghost { background: none; border-color: transparent; color: var(--cc-dim); font-weight: 600; }
.cc-gate-ghost:hover { background: var(--cc-bg2); color: var(--cc-text); border-color: var(--cc-edge); }
@media (prefers-reduced-motion: reduce) {
.cc-gate-overlay, .cc-gate-modal { transition: none; }
}
/* In-app avatar creator iframe modal (AvatarCreator). Self-contained here so the
builder/photo editor renders correctly on /play without the main-site stylesheet. */
.avatar-creator-overlay {
position: fixed; inset: 0; z-index: 95; display: flex; align-items: center; justify-content: center;
background: rgba(4, 4, 5, 0.92); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
animation: cc-create-fadein 0.22s ease;
}
@keyframes cc-create-fadein { from { opacity: 0; } to { opacity: 1; } }
.avatar-creator-modal {
width: 95vw; height: 90vh; max-width: 1200px; display: flex; flex-direction: column;
background: var(--cc-panel-solid); border: 1px solid var(--cc-edge); border-radius: var(--cc-radius);
overflow: hidden; box-shadow: var(--cc-shadow);
}
.avatar-creator-header {
display: flex; align-items: center; justify-content: space-between; flex: none;
padding: 12px 18px; border-bottom: 1px solid var(--cc-edge-soft);
}
.avatar-creator-title { font-size: 15px; font-weight: 600; letter-spacing: 0.02em; color: var(--cc-text); }
.avatar-creator-close {
background: none; border: none; color: var(--cc-dim); font-size: 26px; line-height: 1; cursor: pointer;
padding: 0 4px; transition: color var(--duration-fast) var(--ease-standard);
}
.avatar-creator-close:hover { color: var(--cc-text); }
.avatar-creator-body { flex: 1; position: relative; min-height: 0; }
.avatar-creator-container { position: absolute; inset: 0; width: 100%; height: 100%; }
.avatar-creator-iframe { width: 100%; height: 100%; border: none; }
.avatar-creator-loading {
position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
gap: 14px; color: var(--cc-dim); font-size: 13px; pointer-events: none;
}
.avatar-creator-loading .spinner {
width: 30px; height: 30px; border-radius: 50%;
border: 2px solid var(--cc-edge); border-top-color: #fff; animation: cc-spin 0.8s linear infinite;
}
@keyframes cc-spin { to { transform: rotate(360deg); } }
.avatar-creator-error { color: #ff6b6b; font-size: 13px; }
@media (max-width: 700px) {
.avatar-creator-modal { width: 100vw; height: 100dvh; max-width: none; border-radius: 0; border: none; }
}
@media (prefers-reduced-motion: reduce) {
.avatar-creator-overlay { animation: none; }
.avatar-creator-loading .spinner { animation: none; }
}
/* coin grid */
.cc-feed-head {
display: flex; align-items: center; justify-content: space-between; gap: 16px;
flex-wrap: wrap; margin: 4px 2px 14px;
}
.cc-feed-title { display: flex; align-items: baseline; gap: 10px; }
.cc-section-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.18em; color: var(--cc-faint); margin: 0; }
.cc-feed-count { color: var(--cc-dim); font-size: 12px; font-variant-numeric: tabular-nums; }
.cc-sorts { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cc-sort {
cursor: pointer; font: inherit; font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
min-height: 34px; padding: 0 13px; color: var(--cc-dim);
background: transparent; border: 1px solid var(--cc-edge-soft); border-radius: 999px;
transition: color var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard), background var(--duration-fast) var(--ease-standard);
}
.cc-sort:hover:not(:disabled) { color: var(--cc-text); border-color: var(--cc-edge); }
.cc-sort:disabled { opacity: 0.4; cursor: not-allowed; }
.cc-sort:focus-visible { outline: 2px solid var(--cc-edge-hi); outline-offset: 2px; }
.cc-sort.cc-on { color: var(--cc-ink); background: #fff; border-color: #fff; box-shadow: var(--cc-glow); }
.cc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 16px; }
.cc-card {
background: var(--cc-panel); border: 1px solid var(--cc-edge); border-radius: var(--cc-radius);
overflow: hidden; cursor: pointer; position: relative;
transition: transform var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard), box-shadow var(--duration-fast) var(--ease-standard);
display: flex; flex-direction: column;
animation: cc-card-in 0.34s cubic-bezier(0.2, 0.7, 0.2, 1) both;
animation-delay: var(--cc-in-delay, 0ms);
}
@keyframes cc-card-in { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) { .cc-card { animation: none; } }
.cc-card:hover { transform: translateY(-4px); border-color: var(--cc-edge-hi); box-shadow: var(--cc-shadow), 0 0 28px rgba(255, 255, 255, 0.06); }
.cc-card:focus-visible { outline: none; transform: translateY(-4px); border-color: #fff; box-shadow: 0 0 0 1px #fff, var(--cc-shadow); }
.cc-card-img {
aspect-ratio: 16/10; background: var(--cc-bg2) center/cover no-repeat; position: relative;
filter: saturate(0.96) contrast(1.03); overflow: hidden;
transition: filter var(--duration-base) var(--ease-standard), transform var(--duration-slow) var(--ease-standard);
}
.cc-card:hover .cc-card-img { filter: saturate(1.12) contrast(1.05); transform: scale(1.03); }
@media (prefers-reduced-motion: reduce) { .cc-card:hover .cc-card-img { transform: none; } }
.cc-card-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(6, 6, 7, 0.92)); }
/* Identity mark under the artwork: visible only where the art is missing or the
gateway failed, so a card is never a blank grey rectangle. */
.cc-card-mono {
position: absolute; inset: 0; display: grid; place-items: center;
font-size: 40px; font-weight: 800; letter-spacing: 0.02em;
color: rgba(255, 255, 255, 0.16); background: var(--cc-bg2);
}
.cc-card-art { position: absolute; inset: 0; background: center/cover no-repeat; }
/* Live headcount over the artwork. Hidden at zero (see _coinCard): an empty
world is normal and "0 inside" is noise, not information. */
.cc-card-pop {
position: absolute; left: 9px; bottom: 9px; z-index: 1;
display: inline-flex; align-items: baseline; gap: 6px;
padding: 4px 10px; border-radius: 999px;
background: rgba(6, 6, 7, 0.72); border: 1px solid var(--cc-edge);
backdrop-filter: blur(6px);
font-size: 11px; font-weight: 600; color: var(--cc-text); letter-spacing: 0.01em;
}
.cc-card-pop-dot {
align-self: center; width: 6px; height: 6px; border-radius: 50%;
background: var(--cc-live); box-shadow: var(--cc-glow); animation: cc-blink 1.8s infinite;
}
.cc-card-pop-n { font-variant-numeric: tabular-nums; font-weight: 800; }
.cc-card-pop-l { color: var(--cc-dim); font-weight: 500; }
.cc-card-live {
position: absolute; top: 9px; left: 9px; z-index: 1;
display: inline-flex; align-items: center; gap: 6px;
background: rgba(0, 0, 0, 0.6); border: 1px solid var(--cc-edge); border-radius: var(--cc-radius-sm);
padding: 3px 9px; font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
}
.cc-card-live .cc-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cc-live); box-shadow: var(--cc-glow); animation: cc-blink 1.8s infinite; }
@keyframes cc-blink { 50% { opacity: 0.3; } }
/* The body takes the leftover height and the call to action is pinned to the
bottom of it, so every card in a row lines its button up with its neighbours
whatever mix of badges the coins carry. */
.cc-card-body { flex: 1; padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 3px; }
.cc-card-name { font-weight: 700; font-size: 15px; letter-spacing: 0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* The bottom margin here (and on the tags row) is what keeps a gap above the
pinned call to action, which `margin-top: auto` alone would collapse. */
.cc-card-meta { display: flex; align-items: center; gap: 8px; color: var(--cc-dim); font-size: 12px; font-variant-numeric: tabular-nums; flex-wrap: wrap; margin-bottom: 8px; }
.cc-card-sym { color: var(--cc-text); font-weight: 700; }
.cc-card-age { color: var(--cc-faint); }
/* Coin signals: shown only when true of that coin (NEW under a day old, a
completed bonding curve, a board with replies on it). */
.cc-card-tags { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.cc-tag {
font-size: 9.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
padding: 3px 7px; border-radius: var(--cc-radius-sm);
color: var(--cc-text); background: rgba(255, 255, 255, 0.07); border: 1px solid var(--cc-edge-soft);
}
.cc-tag-new { color: var(--cc-ink); background: #fff; border-color: #fff; }
.cc-tag-quiet { color: var(--cc-faint); background: none; }
/* Always on screen, in one of two weights. Hiding it until hover reserved its
full height anyway, so every card carried a card-wide band of dead space
under the meta row and the grid read as a wall of unfinished tiles. It also
left touch visitors (no hover) with no affordance at all, and the reveal was
the only thing that told a mouse user the tile was clickable. Resting state
is a quiet ghost button that fills the space and names the action; hover,
keyboard focus, and any hover-less pointer promote it to solid white. */
.cc-card-cta {
margin-top: auto; padding: 8px 0; text-align: center; border-radius: var(--cc-radius-sm);
background: rgba(255, 255, 255, 0.05); color: var(--cc-dim);
border: 1px solid var(--cc-edge-soft);
font-weight: 700; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
transition: background var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard), filter var(--duration-fast) var(--ease-standard);
}
.cc-card:hover .cc-card-cta,
/* Keyboard parity: tabbing to a card must promote its call to action, not just
hovering it. Without this the card's primary affordance was mouse-only. */
.cc-card:focus-visible .cc-card-cta,
.cc-card:focus-within .cc-card-cta {
background: #fff; border-color: #fff; color: var(--cc-ink);
}
.cc-card-cta:hover { filter: brightness(0.92); }
/* Touch devices never hover, so there is no second state to promote into: give
them the solid button outright. */
@media (hover: none) {
.cc-card-cta { background: #fff; border-color: #fff; color: var(--cc-ink); }
}
/* Featured / official town, the pinned flagship. Spans the full first row as a
hero: art on the left, identity on the right, with a bright persistent frame
so it reads as the front door rather than just another card. */
.cc-card-featured {
grid-column: 1 / -1;
flex-direction: row;
border-color: var(--cc-edge-hi);
box-shadow: 0 0 0 1px var(--cc-edge-hi), var(--cc-shadow), 0 0 30px rgba(255, 255, 255, 0.06);
}
.cc-card-featured::before {
content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2;
border-radius: inherit;
background: linear-gradient(115deg, rgba(255, 255, 255, 0.06), transparent 38%);
}
.cc-card-featured .cc-card-img { aspect-ratio: auto; flex: 0 0 38%; min-height: 168px; }
/* Ends fully opaque at the panel's composited color: a translucent last stop
left a hard vertical seam where the artwork stopped and the body began. */
.cc-card-featured .cc-card-img::after { background: linear-gradient(90deg, transparent 45%, rgba(11, 11, 12, 0.72) 80%, #0b0b0c 100%); }
.cc-card-featured .cc-card-body { flex: 1; justify-content: center; padding: 20px 22px; gap: 6px; }
.cc-card-featured .cc-card-name { font-size: 22px; white-space: normal; }
.cc-card-featured .cc-card-meta { font-size: 13px; }
.cc-card-featured .cc-card-cta { background: #fff; border-color: #fff; color: var(--cc-ink); align-self: flex-start; padding: 10px 22px; margin-top: 16px; }
.cc-card-official {
position: absolute; top: 9px; left: 9px; z-index: 1;
display: inline-flex; align-items: center; gap: 6px;
background: #fff; color: var(--cc-ink); border-radius: var(--cc-radius-sm);
padding: 3px 9px; font-size: 10px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
box-shadow: var(--cc-glow);
}
.cc-card-official-ico { font-size: 11px; line-height: 1; }
@media (max-width: 560px) {
.cc-card-featured { flex-direction: column; }
.cc-card-featured .cc-card-img { flex-basis: auto; aspect-ratio: 16/10; width: 100%; }
.cc-card-featured .cc-card-img::after { background: linear-gradient(180deg, transparent 45%, rgba(11, 11, 12, 0.72) 82%, #0b0b0c 100%); }
.cc-card-featured .cc-card-name { font-size: 19px; }
}
.cc-skeleton { pointer-events: none; }
.cc-skeleton .cc-card-img, .cc-skeleton .cc-card-name, .cc-skeleton .cc-card-meta {
background: linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
background-size: 200% 100%; animation: cc-shimmer 1.3s infinite; color: transparent; border-radius: var(--cc-radius-sm);
}
.cc-skeleton .cc-card-name { height: 16px; width: 70%; margin: 2px 0; }
.cc-skeleton .cc-card-meta { height: 12px; width: 45%; }
@keyframes cc-shimmer { to { background-position: -200% 0; } }
.cc-state {
grid-column: 1 / -1; text-align: center; color: var(--cc-dim);
padding: 54px 20px; font-size: 14px;
}
.cc-state .cc-state-ico { font-size: 34px; display: block; margin-bottom: 12px; opacity: 0.6; filter: grayscale(1); }
.cc-state button {
margin-top: 16px; background: #fff; border: none; color: var(--cc-ink);
font-weight: 700; padding: 9px 20px; border-radius: var(--cc-radius-sm); cursor: pointer;
font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; transition: filter var(--duration-fast) var(--ease-standard);
}
.cc-state button:hover { filter: brightness(0.92); }
.cc-state .cc-spinner-lg { margin: 0 auto 14px; width: 28px; height: 28px; }
/* Trailing "searching all of pump.fun" row shown under the live grid while a
remote search resolves, the trending hits are already interactive. */
.cc-search-more {
grid-column: 1 / -1; display: flex; align-items: center; justify-content: center;
gap: 10px; padding: 18px 12px; color: var(--cc-dim);
font-size: 12px; letter-spacing: 0.04em;
}
.cc-search-more .cc-spinner { margin: 0; width: 15px; height: 15px; border-width: 2px; }
/* ---------------- in-world HUD ---------------- */
#cc-hud { position: fixed; inset: 0; z-index: 20; pointer-events: none; }
#cc-hud > * { pointer-events: auto; }
.cc-coin-banner {
position: fixed; top: 14px; left: 14px;
display: flex; align-items: center; gap: 12px;
background: var(--cc-panel); border: 1px solid var(--cc-edge);
border-radius: var(--cc-radius); padding: 10px 16px 10px 11px; box-shadow: var(--cc-shadow);
backdrop-filter: blur(10px); max-width: 70vw;
}
.cc-coin-img { width: 40px; height: 40px; border-radius: var(--cc-radius-sm); object-fit: cover; background: var(--cc-bg2); flex: none; filter: saturate(1.04) contrast(1.03); }
/* Stand-in for coin art that failed to load (or was never supplied) so the
banner keeps its 40px identity mark instead of a hole. See coinMono in
coincommunities-ui.js. */
.cc-coin-mono {
width: 40px; height: 40px; border-radius: var(--cc-radius-sm); flex: none;
display: grid; place-items: center;
background: var(--cc-bg2); border: 1px solid var(--cc-edge);
font-weight: 800; font-size: 17px; color: var(--cc-text); letter-spacing: 0.01em;
}
.cc-coin-info { min-width: 0; }
.cc-coin-name { font-weight: 800; font-size: 15px; letter-spacing: 0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-coin-sub { display: flex; align-items: center; gap: 9px; color: var(--cc-dim); font-size: 12px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.cc-coin-sym { color: var(--cc-text); font-weight: 700; }
.cc-online { display: inline-flex; align-items: center; gap: 5px; letter-spacing: 0.02em; }
.cc-online .cc-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cc-live); box-shadow: var(--cc-glow); }
.cc-leave {
position: fixed; top: 14px; right: 14px;
display: inline-flex; align-items: center; gap: 8px;
background: var(--cc-panel); border: 1px solid var(--cc-edge); border-radius: var(--cc-radius);
padding: 9px 15px; color: var(--cc-text); font-weight: 600; font-size: 12px;
letter-spacing: 0.04em; text-transform: uppercase; cursor: pointer;
box-shadow: var(--cc-shadow); backdrop-filter: blur(10px);
transition: border-color var(--duration-fast) var(--ease-standard), background var(--duration-fast) var(--ease-standard);
}
.cc-leave:hover { border-color: var(--cc-edge-hi); background: rgba(255, 255, 255, 0.05); }
#cc-status {
position: fixed; top: 58px; right: 14px;
display: inline-flex; align-items: center; gap: 8px;
padding: 6px 12px; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
border-radius: var(--cc-radius); color: var(--cc-dim);
background: var(--cc-panel); border: 1px solid var(--cc-edge); backdrop-filter: blur(10px);
}
#cc-status .cc-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cc-faint); }
#cc-status[data-state="online"] .cc-dot { background: var(--cc-live); box-shadow: var(--cc-glow); }
#cc-status[data-state="connecting"] .cc-dot { background: var(--cc-warn); animation: cc-pulse 1s infinite; }
#cc-status[data-state="offline"] .cc-dot, #cc-status[data-state="failed"] .cc-dot { background: transparent; box-shadow: inset 0 0 0 1.5px var(--cc-dim); }
#cc-status[data-state="offline"], #cc-status[data-state="failed"] { cursor: pointer; }
/* No server configured for this env, passive solo readout, not retryable. */
#cc-status[data-state="unavailable"] .cc-dot { background: var(--cc-faint); }
#cc-status[data-state="unavailable"] { cursor: default; }
@keyframes cc-pulse { 50% { opacity: 0.3; } }
/* spatial voice toggle, top-right, tucked under the status pill */
.cc-voice {
position: fixed; top: 96px; right: 14px; z-index: 22;
display: inline-flex; align-items: center; gap: 8px;
background: var(--cc-panel); border: 1px solid var(--cc-edge); border-radius: var(--cc-radius);
padding: 8px 13px 8px 11px; color: var(--cc-dim); cursor: pointer;
font-weight: 600; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
box-shadow: var(--cc-shadow); backdrop-filter: blur(10px);
transition: border-color var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard), background var(--duration-fast) var(--ease-standard), box-shadow var(--duration-fast) var(--ease-standard);
}
.cc-voice:hover { border-color: var(--cc-edge-hi); color: var(--cc-text); background: rgba(255, 255, 255, 0.05); }
/* The glow below rides `.cc-voice`'s own transition, so a keyboard user tabbing
here would otherwise get no visible change for a whole 120ms (masked further
for anyone with reduced-motion, whose transitions collapse to ~0). Every other
bespoke focus ring in this file uses `outline`, which is not transitioned and
so lands the instant focus moves; this one relied on `outline: none` plus an
animated border/shadow and was the one control in the HUD with no immediate
focus signal. Keep the glow, but pair it with an instant outline like its
siblings (.cc-emote, .cc-reaction) so the ring is never mid-transition-only. */
.cc-voice:focus-visible { outline: 1px solid var(--cc-edge-hi); outline-offset: 2px; border-color: var(--cc-edge-hi); box-shadow: 0 0 0 1px var(--cc-edge-hi); }
.cc-voice:disabled { opacity: 0.45; cursor: not-allowed; }
.cc-voice-ico { display: inline-flex; }
.cc-voice-ico svg { width: 16px; height: 16px; display: block; }
.cc-voice-cap { fill: transparent; transition: fill var(--duration-fast) var(--ease-standard); }
.cc-voice-slash { display: none; opacity: 0.85; }
.cc-voice-label { line-height: 1; }
/* live (unmuted): white icon + brighter frame */
.cc-voice[data-state="on"] { color: #fff; border-color: var(--cc-edge-hi); }
.cc-voice[data-state="on"] .cc-voice-cap { fill: rgba(255, 255, 255, 0.16); }
/* connecting: pulse the icon while we ask for the mic */
.cc-voice[data-state="connecting"] .cc-voice-ico { animation: cc-pulse 1s infinite; }
/* muted: dim with the mute slash */
.cc-voice[data-state="muted"] { color: var(--cc-dim); }
.cc-voice[data-state="muted"] .cc-voice-slash { display: block; }
/* blocked / error: faint, slashed */
.cc-voice[data-state="denied"], .cc-voice[data-state="error"] { color: var(--cc-faint); }
.cc-voice[data-state="denied"] .cc-voice-slash { display: block; }
/* speaking: animated halo while the local player talks */
.cc-voice.cc-voice-speaking { border-color: #fff; box-shadow: 0 0 0 1px #fff, 0 0 18px rgba(255, 255, 255, 0.4); }
.cc-voice.cc-voice-speaking .cc-voice-ico { animation: cc-voice-pulse 0.7s ease-in-out infinite; }
@keyframes cc-voice-pulse { 50% { transform: scale(1.16); } }
@media (prefers-reduced-motion: reduce) {
.cc-voice.cc-voice-speaking .cc-voice-ico,
.cc-voice[data-state="connecting"] .cc-voice-ico,
.cc-label.cc-speaking::before { animation: none; }
}
/* power saver, under the voice toggle, same visual family */
.cc-power-btn {
position: fixed; top: 140px; right: 14px; z-index: 22;
display: inline-flex; align-items: center; gap: 8px;
background: var(--cc-panel); border: 1px solid var(--cc-edge); border-radius: var(--cc-radius);
padding: 8px 13px 8px 11px; color: var(--cc-dim); cursor: pointer;
font-weight: 600; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
box-shadow: var(--cc-shadow); backdrop-filter: blur(10px);
transition: border-color var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard), background var(--duration-fast) var(--ease-standard);
}
.cc-power-btn:hover { border-color: var(--cc-edge-hi); color: var(--cc-text); background: rgba(255, 255, 255, 0.05); }
.cc-power-btn:focus-visible { outline: none; border-color: var(--cc-edge-hi); box-shadow: 0 0 0 1px var(--cc-edge-hi); }
.cc-power-btn[aria-pressed="true"] { color: #b8ffce; border-color: rgba(140, 255, 180, 0.55); }
.cc-power-ico { line-height: 1; }
.cc-power-label { line-height: 1; }
/* photo mode, bottom of the top-right stack (voice · eco · zen · photo).
The preview sheet it opens is styled in src/game/photo-mode.css, which ships
with the lazily-imported module; only the trigger lives here. */
.cc-photo-hud-btn {
position: fixed; top: 228px; right: 14px; z-index: 22;
display: inline-flex; align-items: center; gap: 8px;
background: var(--cc-panel); border: 1px solid var(--cc-edge); border-radius: var(--cc-radius);
padding: 8px 13px 8px 11px; color: var(--cc-dim); cursor: pointer;
font-weight: 600; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
box-shadow: var(--cc-shadow); backdrop-filter: blur(10px);
transition: border-color var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard), background var(--duration-fast) var(--ease-standard), opacity var(--duration-base) var(--ease-standard), top var(--duration-base) var(--ease-standard);
}
.cc-photo-hud-btn:hover { border-color: var(--cc-edge-hi); color: var(--cc-text); background: rgba(255, 255, 255, 0.05); }
.cc-photo-hud-btn:active { background: rgba(255, 255, 255, 0.12); }
.cc-photo-hud-btn:focus-visible { outline: none; border-color: var(--cc-edge-hi); box-shadow: 0 0 0 1px var(--cc-edge-hi); }
.cc-photo-hud-btn[aria-pressed="true"] { color: var(--cc-text); border-color: var(--cc-edge-hi); }
/* Working: the extra render, the pixel readback and the PNG encode are quick on
a GPU and can run for seconds on a software rasterizer or a tired phone. The
button breathes for exactly as long as the capture takes, so a slow press is
visibly acknowledged instead of reading as a dead control. */
.cc-photo-hud-btn[aria-busy="true"] {
color: var(--cc-text); border-color: var(--cc-edge-hi); cursor: progress;
animation: cc-photo-working 1.1s ease-in-out infinite;
}
.cc-photo-hud-btn[aria-busy="true"] .cc-photo-hud-ico svg { opacity: 0.55; }
@keyframes cc-photo-working {
0%, 100% { background: var(--cc-panel); }
50% { background: rgba(255, 255, 255, 0.12); }
}
@media (prefers-reduced-motion: reduce) {
.cc-photo-hud-btn[aria-busy="true"] { animation: none; background: rgba(255, 255, 255, 0.12); }
}
.cc-photo-hud-ico { display: inline-flex; }
.cc-photo-hud-ico svg { width: 16px; height: 16px; display: block; }
.cc-photo-hud-label { line-height: 1; }
/* Zen keeps the camera: a world with no chrome on it is exactly the shot people
want, and the capture is an offscreen render, so this button is never in it.
It slides up under the "Show UI" pill once the rest of the stack is gone. */
body.is-zen #cc-photo-btn { top: calc(env(safe-area-inset-top, 0px) + 58px); opacity: 0; }
body.is-zen.zen-revealed #cc-photo-btn { opacity: 0.85; }
body.is-zen #cc-photo-btn:hover, body.is-zen #cc-photo-btn:focus-visible { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
.cc-photo-hud-btn { transition: border-color var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard), background var(--duration-fast) var(--ease-standard); }
}
/* chat sidebar, dockable, minimizable, persistent log */
#cc-chat {
position: fixed; right: calc(14px + var(--cc-safe-r)); bottom: calc(14px + var(--cc-safe-b) + var(--cc-kb));
width: min(340px, 82vw);
max-height: min(60vh, 520px); z-index: 23;
display: flex; flex-direction: column; overflow: hidden;
background: var(--cc-panel); border: 1px solid var(--cc-edge);
border-radius: var(--cc-radius); box-shadow: var(--cc-shadow);
backdrop-filter: blur(12px); transition: max-height var(--duration-base) var(--ease-standard);
}
.cc-chat-head {
display: flex; align-items: center; gap: 8px; flex: none;
padding: 10px 13px; cursor: pointer; user-select: none;
border-bottom: 1px solid var(--cc-edge-soft);
}
.cc-chat-head:hover { background: rgba(255, 255, 255, 0.04); }
.cc-chat-head:focus-visible { outline: 1px solid var(--cc-edge-hi); outline-offset: -2px; }
.cc-chat-title { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cc-text); }
.cc-chat-ico { font-size: 13px; filter: grayscale(1); }
.cc-chat-unread {
margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px;
display: inline-flex; align-items: center; justify-content: center;
background: #fff; color: var(--cc-ink); font-size: 11px; font-weight: 700;
border-radius: var(--cc-radius-sm); box-shadow: var(--cc-glow);
}
.cc-chat-unread[hidden] { display: none; }
.cc-chat-chevron { margin-left: auto; color: var(--cc-dim); font-size: 11px; transition: color var(--duration-fast) var(--ease-standard); }
.cc-chat-unread:not([hidden]) + .cc-chat-chevron { margin-left: 8px; }
.cc-chat-head:hover .cc-chat-chevron { color: var(--cc-text); }
.cc-chat-body { display: flex; flex-direction: column; min-height: 0; padding: 11px; gap: 9px; }
#cc-chat.cc-min { max-height: 41px; }
#cc-chat.cc-min .cc-chat-head { border-bottom: none; }
#cc-chat.cc-min .cc-chat-body { display: none; }
.cc-chat-log {
display: flex; flex-direction: column; gap: 6px; overflow-y: auto;
flex: 1; min-height: 0; padding-right: 2px;
}
.cc-chat-log::-webkit-scrollbar { width: 5px; }
.cc-chat-log::-webkit-scrollbar-thumb { background: var(--cc-edge); border-radius: 0; }
.cc-chat-log:empty::before {
content: "No messages yet, say hi"; color: var(--cc-faint); font-size: 12px; letter-spacing: 0.02em;
margin: auto; padding: 18px 0; text-align: center;
}
.cc-chat-msg {
background: rgba(255, 255, 255, 0.035); border: 1px solid var(--cc-edge-soft); border-radius: var(--cc-radius-sm);
padding: 6px 10px; font-size: 13px; align-self: flex-start; max-width: 100%;
animation: cc-msg-in 0.18s ease; word-break: break-word; line-height: 1.4;
}
.cc-chat-meta { display: flex; align-items: baseline; gap: 7px; margin-bottom: 2px; }
.cc-chat-meta b { color: var(--cc-text); font-size: 11px; font-weight: 700; letter-spacing: 0.02em; }
.cc-chat-meta time { color: var(--cc-faint); font-size: 10px; font-variant-numeric: tabular-nums; }
.cc-chat-msg.cc-mine { align-self: flex-end; background: rgba(255, 255, 255, 0.1); border-color: var(--cc-edge); }
.cc-chat-msg.cc-mine .cc-chat-meta b { color: #fff; }
.cc-chat-text { display: block; color: var(--cc-text); }
@keyframes cc-msg-in { from { opacity: 0; transform: translateY(6px); } }
.cc-chat-input {
display: flex; gap: 8px; flex: none; background: rgba(0, 0, 0, 0.35);
border: 1px solid var(--cc-edge); border-radius: var(--cc-radius-sm); padding: 7px 9px;
transition: border-color var(--duration-fast) var(--ease-standard);
}
.cc-chat-input:focus-within { border-color: var(--cc-edge-hi); }
.cc-chat-input input { flex: 1; min-width: 0; background: none; border: none; color: var(--cc-text); font-size: 13px; outline: none; }
.cc-chat-input input::placeholder { color: var(--cc-dim); }
.cc-chat-send {
background: #fff; border: none; color: var(--cc-ink); font-weight: 700;
border-radius: var(--cc-radius-sm); padding: 0 13px; cursor: pointer;
font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; transition: filter var(--duration-fast) var(--ease-standard);
}
.cc-chat-send:hover { filter: brightness(0.9); }
/* emote tray */
#cc-emotes {
position: fixed; left: 50%; bottom: calc(16px + var(--cc-safe-b)); transform: translateX(-50%); z-index: 22;
display: flex; gap: 6px; background: var(--cc-panel); border: 1px solid var(--cc-edge);
border-radius: var(--cc-radius); padding: 7px; box-shadow: var(--cc-shadow); backdrop-filter: blur(10px);
}
/* The tray is built empty and filled once the emote manifest lands. An empty
bordered pill sitting there and then jumping to full width was the biggest
layout shift in the world HUD; hide it until it has something to show. */
#cc-emotes:empty { display: none; }
.cc-emote {
width: 44px; height: 44px; border-radius: var(--cc-radius-sm); border: 1px solid transparent;
background: rgba(255, 255, 255, 0.04); cursor: pointer; font-size: 21px; filter: grayscale(1);
transition: transform var(--duration-instant) var(--ease-standard), background var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard), filter var(--duration-fast) var(--ease-standard);
}
.cc-emote:hover { background: rgba(255, 255, 255, 0.12); border-color: var(--cc-edge); transform: translateY(-3px); filter: grayscale(0); }
.cc-emote:active { transform: translateY(-1px) scale(0.9); }
.cc-emote:focus-visible { outline: 1px solid var(--cc-accent); outline-offset: 2px; }
/* reaction bar (R04), sits just above the emote tray */
#cc-reactions {
position: fixed; left: 50%; bottom: calc(82px + var(--cc-safe-b)); transform: translateX(-50%); z-index: 22;
display: flex; gap: 4px; background: var(--cc-panel); border: 1px solid var(--cc-edge);
border-radius: var(--cc-radius); padding: 5px 6px; box-shadow: var(--cc-shadow); backdrop-filter: blur(10px);
}
#cc-reactions:empty { display: none; }
.cc-reaction {
width: 36px; height: 36px; border-radius: var(--cc-radius-sm); border: 1px solid transparent;
background: rgba(255, 255, 255, 0.04); cursor: pointer; font-size: 18px; filter: grayscale(0.4);
transition: transform var(--duration-instant) var(--ease-standard), background var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard),
filter var(--duration-fast) var(--ease-standard), opacity var(--duration-fast) var(--ease-standard);
}
.cc-reaction:hover { background: rgba(255, 255, 255, 0.12); border-color: var(--cc-edge); transform: scale(1.18); filter: grayscale(0); }
.cc-reaction:active { transform: scale(0.88); }
.cc-reaction:focus-visible { outline: 1px solid var(--cc-accent); outline-offset: 2px; }
/* cooldown: briefly dims the tapped button so a rapid second tap reads as "not yet" */
.cc-reaction.cc-cooldown { opacity: 0.3; cursor: default; transform: none !important; pointer-events: none; }
/* floating reaction sprite, rises above the sender's avatar head and fades out */
.cc-reaction-sprite {
position: fixed; pointer-events: none; z-index: 25;
font-size: 28px; line-height: 1; transform: translate(-50%, -100%);
animation: cc-reaction-rise 1.2s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
will-change: transform, opacity;
}
@keyframes cc-reaction-rise {
0% { opacity: 1; transform: translate(-50%, -100%) translateY(0) scale(1); }
15% { transform: translate(-50%, -100%) translateY(-4px) scale(1.35); }
100% { opacity: 0; transform: translate(-50%, -100%) translateY(-64px) scale(0.85); }
}
/* confetti particles for 🎉 burst */
.cc-confetti {
position: fixed; pointer-events: none; z-index: 25;
width: 7px; height: 7px; border-radius: 2px;
transform: translate(-50%, -50%);
animation: cc-confetti-fly var(--dur, 1s) cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
will-change: transform, opacity;
}
@keyframes cc-confetti-fly {
0% { opacity: 1; transform: translate(-50%, -50%) translate(0, 0) rotate(0deg) scale(1); }
80% { opacity: 0.8; }
100% { opacity: 0; transform: translate(-50%, -50%) translate(var(--tx, 0px), var(--ty, -50px)) rotate(540deg) scale(0.3); }
}
/* chat bubbles over avatars + name labels */
/* Parked off-screen until _updateLabels projects it. Anchored at left:0 with a
-50% shift, a nameplate otherwise sits half over the left edge of the screen
for the frames between being created and being placed. The placement code
writes `transform` inline, so this only applies before that first write. */
.cc-label, .cc-bubble {
position: fixed; left: 0; top: 0; z-index: 15; pointer-events: none;
transform: translate(-50%, -100%) translate(-9999px, -9999px); white-space: nowrap;
}
.cc-label {
font-size: 11px; font-weight: 700; letter-spacing: 0.04em; color: #fff;
text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9); padding: 1px 6px; text-transform: uppercase;
/* A peer's name is rendered verbatim; cap and ellipsize it so a long name
can't stretch a single line clear across the screen. */
display: inline-block; max-width: 180px; overflow: hidden; text-overflow: ellipsis;
}
/* in-voice peers wear a small mic dot on their nameplate; it lights up and
pulses while they're actually speaking, so you can spot the talker in a crowd. */
.cc-label.cc-invoice { display: inline-flex; align-items: center; gap: 5px; }
.cc-label.cc-invoice::before {
content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%;
background: rgba(255, 255, 255, 0.6); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5);
}
.cc-label.cc-speaking { color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9), 0 0 10px rgba(255, 255, 255, 0.5); }
.cc-label.cc-speaking::before { background: #fff; box-shadow: 0 0 10px rgba(255, 255, 255, 0.9); animation: cc-voice-pulse 0.7s ease-in-out infinite; }
/* Wanted peers (W07): star count trails the name, matching WorldHud's own
star row so the wanted vocabulary reads the same on the HUD and in-world. */
.cc-label.cc-wanted::after {
content: attr(data-wanted); margin-left: 5px; color: #ff5a4d;
text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), 0 0 8px rgba(255, 90, 77, 0.6);
}
/* Verified three.ws account (W10): the @handle beside the display name marks a
signed-in platform profile, click opens the real profile card. */
.cc-label .cc-label-handle {
margin-left: 5px; color: #9db8ff; font-weight: 600; font-size: 0.9em;
text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), 0 0 8px rgba(90, 130, 255, 0.45);
}
.cc-label.cc-verified:hover .cc-label-handle { color: #c6d6ff; }
.cc-bubble {
background: #fff; color: var(--cc-ink); font-size: 13px; font-weight: 600; text-align: center;
padding: 7px 12px; border-radius: var(--cc-radius); max-width: 220px; white-space: normal;
box-shadow: 0 6px 22px rgba(0, 0, 0, 0.55), var(--cc-glow); animation: cc-bubble-in 0.2s ease;
}
/* thought-bubble tail: two shrinking puffs trailing down toward the avatar */
.cc-bubble::before, .cc-bubble::after {
content: ""; position: absolute; left: 50%; background: #fff; border-radius: 50%;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}
.cc-bubble::before { width: 12px; height: 12px; bottom: -8px; transform: translateX(-135%); }
.cc-bubble::after { width: 7px; height: 7px; bottom: -18px; transform: translateX(-45%); }
@keyframes cc-bubble-in { from { opacity: 0; } }
/* control hint, tucked under the coin banner (top-left), clear of every corner */
#cc-hint {
position: fixed; left: 14px; top: 82px; z-index: 19;
color: var(--cc-dim); font-size: 11px; line-height: 1.7; letter-spacing: 0.02em;
background: var(--cc-panel); border: 1px solid var(--cc-edge); border-radius: var(--cc-radius); padding: 8px 12px;
backdrop-filter: blur(10px); max-width: min(420px, 60vw);
}
#cc-hint kbd {
background: rgba(255, 255, 255, 0.06); border: 1px solid var(--cc-edge); border-radius: var(--cc-radius-sm);
padding: 1px 5px; font-size: 10px; font-family: ui-monospace, "SF Mono", Menlo, monospace; color: var(--cc-text);
}
/* movement stick, bottom-left, always on (touch + mouse). Subtle on desktop,
full strength on touch. Sits opposite the chat (bottom-right) so they never overlap. */
#cc-joystick {
position: fixed; left: calc(22px + var(--cc-safe-l)); bottom: calc(90px + var(--cc-safe-b));
width: 120px; height: 120px; z-index: 30; touch-action: none;
opacity: 0.5; transition: opacity var(--duration-base) var(--ease-standard);
}
#cc-joystick:hover { opacity: 1; }
@media (pointer: coarse) { #cc-joystick { opacity: 1; } }
#cc-joystick.cc-joy-active { opacity: 1; }
.cc-joy-base {
position: absolute; inset: 0; border-radius: 50%;
background: rgba(255, 255, 255, 0.06);
border: 1.5px solid rgba(255, 255, 255, 0.35);
box-shadow: inset 0 0 24px rgba(255, 255, 255, 0.05);
display: grid; place-items: center;
}
.cc-joy-thumb {
width: 46px; height: 46px; border-radius: 50%;
background: rgba(255, 255, 255, 0.85);
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
transition: transform var(--duration-instant) var(--ease-standard);
will-change: transform; pointer-events: none;
}
#cc-joystick.cc-joy-active .cc-joy-thumb { transition: none; }
/* Phone HUD. Keyed on width OR a short touch viewport, not width alone: a
phone rotated to landscape is ~844x390, which sails past a max-width:640px
query and silently fell back to the DESKTOP HUD mid-session: the exact
"rotate and the HUD doesn't reflow" failure. Matching short coarse-pointer
viewports keeps the three-zone touch layout in both orientations. */
@media (max-width: 640px), (pointer: coarse) and (max-height: 520px) {
#cc-hint { display: none; }
.cc-coin-banner { max-width: 60vw; }
/* Phone HUD reflow into three non-overlapping zones so movement, chat, and
emotes are all usable. On a narrow screen the old layout (centered emote
tray + 72vw chat) overlapped the bottom-left joystick and stacked the emote
tray on top of the chat input, making both the stick and typing dead. */
/* Movement stick: bottom-left, on top of everything, in a clear zone. */
#cc-joystick {
left: calc(16px + var(--cc-safe-l)); bottom: calc(20px + var(--cc-safe-b));
width: 104px; height: 104px; z-index: 30; opacity: 1;
}
/* Chat: docked bottom-right, narrower so its left edge clears the joystick.
Above the emote tray so the input always receives taps. */
#cc-chat {
left: auto; right: calc(10px + var(--cc-safe-r)); bottom: calc(10px + var(--cc-safe-b) + var(--cc-kb));
width: min(58vw, 280px); max-height: 42vh; z-index: 24;
}
/* Emotes: compact, horizontally scrollable, pinned bottom-right just above the
collapsed chat pill and clear of the joystick. The expanded chat (higher z)
covers it, collapse chat to emote, which is the natural one-or-the-other. */
#cc-emotes {
left: auto; right: calc(10px + var(--cc-safe-r)); bottom: calc(58px + var(--cc-safe-b) + var(--cc-kb));
transform: none; z-index: 23;
max-width: calc(100vw - 150px); overflow-x: auto; -webkit-overflow-scrolling: touch;
padding: 6px; scrollbar-width: none;
}
#cc-emotes::-webkit-scrollbar { display: none; }
#cc-emotes .cc-emote { flex: 0 0 auto; width: 40px; height: 40px; font-size: 19px; }
/* Reactions: row above emotes on mobile, same right-dock zone */
#cc-reactions {
left: auto; right: calc(10px + var(--cc-safe-r)); bottom: calc(104px + var(--cc-safe-b) + var(--cc-kb));
transform: none; z-index: 22;
max-width: calc(100vw - 150px); overflow-x: auto; -webkit-overflow-scrolling: touch;
padding: 4px 5px; scrollbar-width: none;
}
#cc-reactions::-webkit-scrollbar { display: none; }
#cc-reactions .cc-reaction { flex: 0 0 auto; width: 34px; height: 34px; font-size: 17px; }
}
/* Adventure-mode link, entry from the social lobby into the isometric MMO (/game). */
.cc-adventure {
display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
padding: 8px 14px; border-radius: var(--cc-radius); color: var(--cc-text);
background: var(--cc-panel); border: 1px solid var(--cc-edge);
transition: background var(--duration-fast), border-color var(--duration-fast), transform var(--duration-instant);
white-space: nowrap;
/* Rendered as a <button> now: neutralize the UA button font/cursor. */
font: inherit; cursor: pointer; text-align: left;
}
.cc-adventure:hover { background: rgba(255, 255, 255, 0.06); border-color: var(--cc-edge-hi); transform: translateY(-1px); }
.cc-adventure:active { transform: translateY(1px); }
.cc-adventure:focus-visible { outline: 2px solid var(--focus-ring-color); outline-offset: 2px; }
.cc-adventure span { display: flex; flex-direction: column; font-weight: 700; font-size: 13px; line-height: 1.2; letter-spacing: 0.02em; }
/* Inline SVG mark: the grayscaled ⚔️ emoji collapsed into a bare ✕ glyph on
most platforms, which read as a close button instead of "adventure". Selector
outranks the `.cc-adventure span` label rule above, which would otherwise
turn the icon box into a 13px column flex and squash the mark. */
.cc-adventure .cc-adventure-ico { display: block; width: 18px; height: 18px; flex: none; color: var(--cc-text); }
.cc-adventure .cc-adventure-ico svg { display: block; width: 100%; height: 100%; }
.cc-adventure small { font-weight: 500; font-size: 11px; color: var(--cc-dim); }
@media (max-width: 640px) { .cc-adventure small { display: none; } }
/* ── Buy this coin ──────────────────────────────────────────────────────────
The native on-chain buy. In a pump.fun world the loudest action is "ape it",
so the CTA is the only solid-white element on screen. */
.cc-buy-btn {
flex: none; display: inline-flex; align-items: center; gap: 7px;
margin-left: 4px; padding: 9px 15px;
background: var(--cc-accent); color: var(--cc-ink);
border: 1px solid var(--cc-accent); border-radius: var(--cc-radius);
font-weight: 800; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase;
cursor: pointer; box-shadow: var(--cc-glow);
transition: transform var(--duration-fast) var(--ease-standard), box-shadow var(--duration-fast) var(--ease-standard), background var(--duration-fast) var(--ease-standard);
}
.cc-buy-btn:hover { transform: translateY(-1px); box-shadow: 0 0 22px rgba(255, 255, 255, 0.55); }
.cc-buy-btn:active { transform: translateY(1px); }
.cc-buy-btn:focus-visible { outline: 2px solid var(--focus-ring-color); outline-offset: 2px; }
.cc-buy-btn-ico { font-size: 13px; line-height: 1; }
.cc-buy-btn-text { white-space: nowrap; max-width: 42vw; overflow: hidden; text-overflow: ellipsis; }
/* Live latency readout in the status pill. */
.cc-ping {
font-variant-numeric: tabular-nums; padding-left: 8px; margin-left: 2px;
border-left: 1px solid var(--cc-edge); color: var(--cc-dim);
}
.cc-ping[data-grade="good"] { color: var(--cc-text); }
.cc-ping[data-grade="ok"] { color: #d8c08a; }
.cc-ping[data-grade="bad"] { color: #d88a8a; }
/* Name field in the lobby avatar bar. Sits inline in the identity row now, so
the bottom margin that used to separate it from the picker below is gone. */
.cc-name-row { display: flex; align-items: center; gap: 12px; }
.cc-name-label {
color: var(--cc-dim); font-size: 12px; letter-spacing: 0.18em;
text-transform: uppercase; flex: none;
}
.cc-name-input {
flex: 1; min-width: 0; max-width: 280px;
background: var(--cc-bg2); border: 1px solid var(--cc-edge);
border-radius: var(--cc-radius); padding: 10px 13px;
color: var(--cc-text); font-size: 14px; font-weight: 600; outline: none;
transition: border-color var(--duration-fast) var(--ease-standard);
}
.cc-name-input::placeholder { color: var(--cc-dim); font-weight: 400; }
.cc-name-input:focus { border-color: var(--cc-edge-hi); }
/* Signed-in identity chip (W10): the @handle peers will see beside your name. */
.cc-identity-chip {
flex: 0 0 auto; font-size: 12px; font-weight: 650; padding: 4px 10px; border-radius: 999px;
color: #9db8ff; text-decoration: none; border: 1px solid rgba(120, 150, 255, 0.35);
background: rgba(90, 130, 255, 0.1); transition: background var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard);
}
.cc-identity-chip:hover, .cc-identity-chip:focus-visible { background: rgba(90, 130, 255, 0.22); color: #c6d6ff; }
/* Transient toast (avatar fell back, buy panel unavailable, …). */
#cc-toast {
position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 12px);
max-width: min(440px, 86vw); padding: 11px 16px;
background: var(--cc-panel-solid); border: 1px solid var(--cc-edge);
border-radius: var(--cc-radius); box-shadow: var(--cc-shadow); backdrop-filter: blur(10px);
color: var(--cc-text); font-size: 13px; line-height: 1.4; text-align: center;
opacity: 0; pointer-events: none; z-index: 60;
transition: opacity var(--duration-fast) var(--ease-standard), transform var(--duration-fast) var(--ease-standard);
}
#cc-toast.cc-on { opacity: 1; transform: translate(-50%, 0); }
#cc-toast[data-kind="warn"] { border-color: rgba(216, 192, 138, 0.5); }
#cc-toast[data-kind="success"] { border-color: rgba(138, 216, 168, 0.5); }
/* The native buy/sell modal (.cc-buy-overlay and descendants) ships its own
styles via src/game/coin-buy.css, imported by coin-buy.js when the modal is
opened, so it carries itself to any surface (the /play world, the pump.fun
visualizer, …), not only pages that load this stylesheet. */
@media (max-width: 640px) {
.cc-buy-btn-text { display: none; }
.cc-buy-btn { padding: 9px 12px; }
.cc-name-input { max-width: none; }
}
/* ───────────────────────── Build mode (voxel) ───────────────────────── */
/* The collaborative building HUD is its own <body> child (outside #cc-hud),
so it carries its own layering. A top-centre cluster: a toggle pill, and a
panel (mode switch + palette hotbar + hint) that drops in when build is on.
Top-centre keeps it clear of the joystick (bottom-left), emotes/hint
(bottom-centre), chat (right), and the banner/status (top corners). */
#cc-build {
position: fixed;
top: 14px;
left: 50%;
transform: translateX(-50%);
z-index: 6;
display: flex;
flex-direction: column;
align-items: center;
gap: 8px;
pointer-events: none;
font: 13px/1.3 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
color: #fff;
}
#cc-build button {
pointer-events: auto;
}
.cc-build-toggle {
display: inline-flex;
align-items: center;
gap: 7px;
padding: 8px 14px;
border-radius: 999px;
border: 1px solid rgba(255, 255, 255, 0.14);
background: rgba(12, 14, 20, 0.72);
-webkit-backdrop-filter: blur(10px);
backdrop-filter: blur(10px);
color: #e9eaee;
font-weight: 600;
letter-spacing: 0.01em;
cursor: pointer;
transition:
background var(--duration-fast),
border-color var(--duration-fast),
color var(--duration-fast),
transform var(--duration-instant),
opacity var(--duration-fast);
}
.cc-build-toggle:hover {
background: rgba(22, 25, 33, 0.85);
border-color: rgba(255, 255, 255, 0.26);
}
.cc-build-toggle:active {
transform: translateY(1px);
}
.cc-build-toggle:focus-visible {
outline: 2px solid #66ff8c;
outline-offset: 2px;
}
.cc-build-toggle.cc-on {
background: #f4f5f7;
color: #0e0e0e;
border-color: #f4f5f7;
}
.cc-build-toggle:disabled {
opacity: 0.4;
cursor: not-allowed;
}
.cc-build-toggle-ico {
font-size: 15px;
line-height: 1;
}
.cc-build-panel {
display: flex;
flex-direction: column;
align-items: center;
gap: 8px;
padding: 10px;
border-radius: 14px;
border: 1px solid rgba(255, 255, 255, 0.12);
background: rgba(10, 12, 18, 0.74);
-webkit-backdrop-filter: blur(14px);
backdrop-filter: blur(14px);
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
animation: cc-build-in 0.16s ease;
}
.cc-build-panel[hidden] {
display: none;
}
@keyframes cc-build-in {
from {
opacity: 0;
transform: translateY(-6px);
}
to {
opacity: 1;
transform: none;
}
}
.cc-build-hotbar {
display: flex;
gap: 6px;
}
.cc-build-slot {
position: relative;
width: 44px;
height: 44px;
padding: 0;
border-radius: 10px;
border: 1px solid rgba(255, 255, 255, 0.14);
background: rgba(255, 255, 255, 0.04);
cursor: pointer;
overflow: hidden;
transition:
border-color var(--duration-fast),
transform var(--duration-instant),
box-shadow var(--duration-fast);
}
.cc-build-slot:hover {
border-color: rgba(255, 255, 255, 0.4);
transform: translateY(-1px);
}
.cc-build-slot:focus-visible {
outline: 2px solid #66ff8c;
outline-offset: 2px;
}
.cc-build-slot.cc-on {
border-color: #ffffff;
box-shadow:
0 0 0 2px rgba(255, 255, 255, 0.5),
0 4px 14px rgba(0, 0, 0, 0.35);
transform: translateY(-2px);
}
.cc-build-swatch {
position: absolute;
inset: 5px;
border-radius: 6px;
box-shadow:
inset 0 0 0 1px rgba(0, 0, 0, 0.25),
inset 0 6px 10px rgba(255, 255, 255, 0.18);
}
.cc-build-key {
position: absolute;
right: 3px;
bottom: 2px;
font-size: 10px;
font-weight: 700;
color: #fff;
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
pointer-events: none;
}
.cc-build-mode {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 6px 12px;
border-radius: 999px;
border: 1px solid rgba(255, 255, 255, 0.16);
background: rgba(102, 255, 140, 0.14);
color: #c9ffd8;
font-weight: 600;
cursor: pointer;
transition:
background var(--duration-fast),
color var(--duration-fast),
border-color var(--duration-fast);
}
.cc-build-mode:hover {
border-color: rgba(255, 255, 255, 0.3);
}
.cc-build-mode:focus-visible {
outline: 2px solid #66ff8c;
outline-offset: 2px;
}
.cc-build-mode.cc-removing {
background: rgba(255, 90, 90, 0.16);
color: #ffd2d2;
}
.cc-build-mode-ico {
font-size: 13px;
}
.cc-build-hint {
font-size: 11px;
color: rgba(255, 255, 255, 0.55);
text-align: center;
letter-spacing: 0.01em;
}
/* Block-budget meter, a thin fill bar plus an "N / 6000" readout. */
.cc-build-budget {
display: flex;
align-items: center;
gap: 8px;
font-size: 11px;
color: rgba(255, 255, 255, 0.62);
font-variant-numeric: tabular-nums;
}
.cc-build-budget-bar {
position: relative;
flex: 1;
height: 4px;
border-radius: 999px;
background: rgba(255, 255, 255, 0.12);
overflow: hidden;
}
.cc-build-budget-fill {
position: absolute;
inset: 0;
transform-origin: left center;
transform: scaleX(0);
border-radius: 999px;
background: #66ff8c;
transition:
transform var(--duration-base) var(--ease-standard),
background var(--duration-base) var(--ease-standard);
}
.cc-build-budget-text {
white-space: nowrap;
}
.cc-build-budget.cc-warn .cc-build-budget-fill {
background: #ffb648;
}
.cc-build-budget.cc-full .cc-build-budget-fill {
background: #ff5a5a;
}
.cc-build-budget.cc-full .cc-build-budget-text {
color: #ffb3b3;
font-weight: 600;
}
/* Durability badge, "Saved for everyone" vs "This session only". */
.cc-build-durability {
font-size: 10.5px;
letter-spacing: 0.02em;
text-align: center;
color: #ffd28a;
}
.cc-build-durability.cc-durable {
color: #8fe9a8;
}
/* Per-player allowance meter (R19), "You: N / cap", mirrors the world budget
bar but tracks only this player's own blocks against their personal cap. */
.cc-build-mine {
display: flex;
align-items: center;
gap: 8px;
font-size: 11px;
color: rgba(255, 255, 255, 0.55);
font-variant-numeric: tabular-nums;
}
.cc-build-mine[hidden] {
display: none;
}
.cc-build-mine-bar {
position: relative;
flex: 1;
height: 3px;
border-radius: 999px;
background: rgba(255, 255, 255, 0.1);
overflow: hidden;
}
.cc-build-mine-fill {
position: absolute;
inset: 0;
transform-origin: left center;
transform: scaleX(0);
border-radius: 999px;
background: rgba(255, 255, 255, 0.45);
transition: transform var(--duration-base) var(--ease-standard), background var(--duration-base) var(--ease-standard);
}
.cc-build-mine-text {
white-space: nowrap;
}
.cc-build-mine.cc-warn .cc-build-mine-fill {
background: #ffb648;
}
.cc-build-mine.cc-full .cc-build-mine-fill {
background: #ff5a5a;
}
.cc-build-mine.cc-full .cc-build-mine-text {
color: #ffb3b3;
}
/* Creator moderation row (R19), only revealed to the coin creator. */
.cc-build-mod {
display: flex;
align-items: center;
gap: 6px;
flex-wrap: wrap;
padding-top: 6px;
border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.cc-build-mod[hidden] {
display: none;
}
.cc-build-mod-tag {
font-size: 10.5px;
font-weight: 700;
letter-spacing: 0.04em;
color: #ffce5c;
text-transform: uppercase;
}
.cc-build-mod-btn {
padding: 4px 10px;
border-radius: 999px;
border: 1px solid rgba(255, 255, 255, 0.18);
background: rgba(255, 255, 255, 0.06);
color: #e8e8ea;
font-size: 11px;
font-weight: 600;
cursor: pointer;
transition: background var(--duration-fast), border-color var(--duration-fast), color var(--duration-fast);
}
.cc-build-mod-btn:hover {
background: rgba(255, 255, 255, 0.12);
border-color: rgba(255, 255, 255, 0.34);
}
.cc-build-mod-btn:focus-visible {
outline: 2px solid #66ff8c;
outline-offset: 2px;
}
.cc-build-mod-btn.cc-danger {
color: #ffd2d2;
border-color: rgba(255, 90, 90, 0.4);
background: rgba(255, 90, 90, 0.12);
}
.cc-build-mod-btn.cc-danger:hover {
background: rgba(255, 90, 90, 0.22);
border-color: rgba(255, 90, 90, 0.6);
}
@media (pointer: coarse) {
.cc-build-hint {
display: none;
}
.cc-build-slot {
width: 40px;
height: 40px;
}
}
@media (max-width: 560px) {
#cc-build {
top: 8px;
}
.cc-build-hotbar {
flex-wrap: wrap;
max-width: 264px;
justify-content: center;
}
}
/* ---------------- build structures toolbar (R20) ----------------
Composite-piece palette + rotate + share + featured. Docks bottom-centre
above the emote tray; shows only while build mode is on. Monochrome, same
glass + light-accent language as the build HUD. */
#cc-structures {
position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%);
z-index: 22; display: flex; flex-direction: column; align-items: center; gap: 8px;
pointer-events: none;
font: 13px/1.3 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
animation: cc-build-in 0.16s ease;
}
#cc-structures[hidden] { display: none; }
#cc-structures button, #cc-structures a { pointer-events: auto; }
.cc-st-pieces, .cc-st-tools {
display: flex; align-items: center; gap: 6px; padding: 7px;
background: var(--cc-panel); border: 1px solid var(--cc-edge);
border-radius: var(--cc-radius); box-shadow: var(--cc-shadow);
-webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.cc-st-piece {
display: inline-flex; flex-direction: column; align-items: center; gap: 3px;
min-width: 52px; padding: 6px 8px; border-radius: var(--cc-radius-sm);
border: 1px solid transparent; background: rgba(255, 255, 255, 0.04);
color: var(--cc-dim); cursor: pointer; font-weight: 600;
transition: background var(--duration-fast), border-color var(--duration-fast), color var(--duration-fast), transform var(--duration-instant);
}
.cc-st-piece:hover { background: rgba(255, 255, 255, 0.1); color: var(--cc-text); transform: translateY(-2px); }
.cc-st-piece:focus-visible { outline: 2px solid #66ff8c; outline-offset: 2px; }
.cc-st-piece.cc-on { background: #f4f5f7; color: var(--cc-ink); border-color: #f4f5f7; }
.cc-st-piece-ico { font-size: 18px; line-height: 1; }
.cc-st-piece-name { font-size: 10.5px; letter-spacing: 0.02em; }
.cc-st-rotate, .cc-st-action {
display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px;
border-radius: var(--cc-radius-sm); border: 1px solid var(--cc-edge);
background: rgba(255, 255, 255, 0.04); color: var(--cc-text);
font-weight: 600; cursor: pointer;
transition: background var(--duration-fast), border-color var(--duration-fast), color var(--duration-fast), opacity var(--duration-fast), transform var(--duration-instant);
}
.cc-st-rotate:hover, .cc-st-action:hover { background: rgba(255, 255, 255, 0.12); border-color: var(--cc-edge-hi); }
.cc-st-rotate:active, .cc-st-action:active { transform: translateY(1px); }
.cc-st-rotate:focus-visible, .cc-st-action:focus-visible { outline: 2px solid #66ff8c; outline-offset: 2px; }
.cc-st-rotate:disabled { opacity: 0.4; cursor: not-allowed; }
.cc-st-rotate-ico { font-size: 15px; line-height: 1; }
.cc-st-rotate-deg { font-variant-numeric: tabular-nums; min-width: 34px; text-align: left; }
.cc-st-sep { width: 1px; align-self: stretch; background: var(--cc-edge-soft); margin: 0 2px; }
@media (pointer: coarse) { #cc-structures { bottom: 78px; } }
@media (max-width: 560px) {
#cc-structures { bottom: 84px; width: 100%; padding: 0 8px; }
.cc-st-pieces { flex-wrap: wrap; justify-content: center; max-width: 96vw; }
.cc-st-piece { min-width: 46px; }
}
/* ---------------- build props palette (R18) ---------------- */
/* Rides just above the structures toolbar while build mode is on: a horizontal
scroll-row of placeable props. Arming a prop switches build clicks to the R01
object channel; break mode + a tap removes one you placed. */
#cc-props {
position: fixed; left: 50%; bottom: 156px; transform: translateX(-50%);
z-index: 22; display: flex; flex-direction: column; gap: 6px;
width: min(560px, 94vw); pointer-events: none;
font: 13px/1.3 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
animation: cc-build-in 0.16s ease;
}
#cc-props[hidden] { display: none; }
#cc-props button { pointer-events: auto; }
.cc-prop-head {
display: flex; align-items: center; justify-content: space-between; gap: 8px;
padding: 0 2px;
}
.cc-prop-title {
color: var(--cc-dim); font-size: 10.5px; font-weight: 700;
letter-spacing: 0.18em; text-transform: uppercase;
}
.cc-prop-rotate {
display: inline-flex; align-items: center; justify-content: center;
width: 30px; height: 30px; border-radius: var(--cc-radius-sm);
border: 1px solid var(--cc-edge); background: var(--cc-panel); color: var(--cc-text);
font-size: 15px; cursor: pointer;
-webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
transition: background var(--duration-fast), border-color var(--duration-fast), opacity var(--duration-fast), transform var(--duration-instant);
}
.cc-prop-rotate:hover { background: rgba(255, 255, 255, 0.12); border-color: var(--cc-edge-hi); }
.cc-prop-rotate:active { transform: translateY(1px) rotate(90deg); }
.cc-prop-rotate:focus-visible { outline: 2px solid #66ff8c; outline-offset: 2px; }
.cc-prop-rotate:disabled { opacity: 0.4; cursor: not-allowed; }
/* Bring-your-own prop (P3.3): a <label> wrapping a hidden file input, styled to
sit beside the rotate control as a peer of it. */
.cc-prop-upload {
display: inline-flex; align-items: center; gap: 5px;
height: 30px; padding: 0 10px; border-radius: var(--cc-radius-sm);
border: 1px solid var(--cc-edge); background: var(--cc-panel); color: var(--cc-text);
font-size: 11.5px; font-weight: 600; white-space: nowrap; cursor: pointer;
-webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
transition: background var(--duration-fast), border-color var(--duration-fast), transform var(--duration-instant);
}
.cc-prop-upload:hover { background: rgba(255, 255, 255, 0.12); border-color: var(--cc-edge-hi); }
.cc-prop-upload:active { transform: translateY(1px); }
.cc-prop-upload:focus-within { outline: 2px solid #66ff8c; outline-offset: 2px; }
.cc-prop-upload input[type="file"] {
position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
@media (max-width: 520px) { .cc-prop-upload-text { display: none; } }
.cc-prop-upload-item { border-color: rgba(102, 255, 140, 0.45); }
.cc-prop-row {
display: flex; align-items: stretch; gap: 6px; padding: 7px;
background: var(--cc-panel); border: 1px solid var(--cc-edge);
border-radius: var(--cc-radius); box-shadow: var(--cc-shadow);
-webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
overflow-x: auto; scrollbar-width: thin; scroll-snap-type: x proximity;
}
.cc-prop-row::-webkit-scrollbar { height: 6px; }
.cc-prop-row::-webkit-scrollbar-thumb { background: var(--cc-edge); border-radius: 3px; }
.cc-prop {
flex: 0 0 auto; scroll-snap-align: start;
display: inline-flex; flex-direction: column; align-items: center; gap: 3px;
min-width: 54px; padding: 6px 8px; border-radius: var(--cc-radius-sm);
border: 1px solid transparent; background: rgba(255, 255, 255, 0.04);
color: var(--cc-dim); cursor: pointer; font-weight: 600;
transition: background var(--duration-fast), border-color var(--duration-fast), color var(--duration-fast), transform var(--duration-instant);
}
.cc-prop:hover { background: rgba(255, 255, 255, 0.1); color: var(--cc-text); transform: translateY(-2px); }
.cc-prop:focus-visible { outline: 2px solid #66ff8c; outline-offset: 2px; }
.cc-prop.cc-on { background: #f4f5f7; color: var(--cc-ink); border-color: #f4f5f7; }
.cc-prop-ico { font-size: 19px; line-height: 1; }
.cc-prop-name { font-size: 10px; letter-spacing: 0.02em; white-space: nowrap; max-width: 64px; overflow: hidden; text-overflow: ellipsis; }
/* community gallery models streamed into the props row */
.cc-prop-thumb {
width: 30px; height: 30px; border-radius: 7px; object-fit: cover; display: block;
background: rgba(255, 255, 255, 0.06);
}
.cc-prop.cc-on .cc-prop-thumb { box-shadow: 0 0 0 1px var(--cc-ink); }
.cc-prop-divider {
flex: 0 0 auto; align-self: stretch; width: 1px; margin: 2px 1px;
background: var(--cc-edge); border-radius: 1px;
}
.cc-prop-divider[hidden] { display: none; }
.cc-prop-more { border-style: dashed; border-color: var(--cc-edge); color: var(--cc-dim); }
.cc-prop-more:hover { border-color: var(--cc-edge-hi); color: var(--cc-text); }
.cc-prop-more[hidden] { display: none; }
.cc-prop-search {
flex: 1 1 auto; min-width: 0; max-width: 220px; height: 27px; margin: 0 8px;
padding: 0 10px; border-radius: var(--cc-radius-sm);
border: 1px solid var(--cc-edge); background: rgba(255, 255, 255, 0.04);
color: var(--cc-text); font: inherit; font-size: 12px;
-webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
transition: background var(--duration-fast), border-color var(--duration-fast);
}
.cc-prop-search::placeholder { color: var(--cc-dim); }
.cc-prop-search:focus { outline: none; border-color: var(--cc-edge-hi); background: rgba(255, 255, 255, 0.08); }
.cc-prop-gstatus {
align-self: center; padding: 2px 6px; color: var(--cc-dim);
font-size: 11px; letter-spacing: 0.02em; pointer-events: auto;
}
.cc-prop-gstatus[hidden] { display: none; }
.cc-prop-gstatus.cc-err { color: #ff8a8a; cursor: pointer; }
.cc-prop-gstatus.cc-err:focus-visible { outline: 2px solid #66ff8c; outline-offset: 2px; }
/* Forge-in-world: the toggle sits with the palette head controls; the form row
slides in between the head and the prop row. */
.cc-prop-forge-btn {
display: inline-flex; align-items: center; gap: 5px;
height: 30px; padding: 0 10px; border-radius: var(--cc-radius-sm);
border: 1px solid rgba(102, 255, 140, 0.45); background: var(--cc-panel); color: var(--cc-text);
font-size: 11.5px; font-weight: 600; white-space: nowrap; cursor: pointer;
-webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
transition: background var(--duration-fast), border-color var(--duration-fast), transform var(--duration-instant);
}
.cc-prop-forge-btn:hover { background: rgba(102, 255, 140, 0.12); border-color: #66ff8c; }
.cc-prop-forge-btn:active { transform: translateY(1px); }
.cc-prop-forge-btn:focus-visible { outline: 2px solid #66ff8c; outline-offset: 2px; }
.cc-prop-forge-btn.cc-on { background: rgba(102, 255, 140, 0.16); border-color: #66ff8c; }
.cc-forge-row {
display: flex; align-items: center; gap: 6px; padding: 7px;
background: var(--cc-panel); border: 1px solid var(--cc-edge);
border-radius: var(--cc-radius); box-shadow: var(--cc-shadow);
-webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
animation: cc-build-in 0.16s ease;
}
.cc-forge-row[hidden] { display: none; }
.cc-forge-prompt {
flex: 1 1 auto; min-width: 0; height: 30px; padding: 0 10px;
border-radius: var(--cc-radius-sm); border: 1px solid var(--cc-edge);
background: rgba(255, 255, 255, 0.04); color: var(--cc-text);
font: inherit; font-size: 12px;
transition: background var(--duration-fast), border-color var(--duration-fast);
}
.cc-forge-prompt::placeholder { color: var(--cc-dim); }
.cc-forge-prompt:focus { outline: none; border-color: var(--cc-edge-hi); background: rgba(255, 255, 255, 0.08); }
.cc-forge-prompt:disabled { opacity: 0.55; }
.cc-forge-attach {
display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto;
height: 30px; padding: 0 9px; border-radius: var(--cc-radius-sm);
border: 1px solid var(--cc-edge); background: rgba(255, 255, 255, 0.04); color: var(--cc-dim);
font-size: 11px; font-weight: 600; white-space: nowrap; cursor: pointer;
transition: background var(--duration-fast), border-color var(--duration-fast), color var(--duration-fast);
}
.cc-forge-attach:hover { background: rgba(255, 255, 255, 0.1); color: var(--cc-text); border-color: var(--cc-edge-hi); }
.cc-forge-attach:focus-within { outline: 2px solid #66ff8c; outline-offset: 2px; }
.cc-forge-attach.cc-on { color: var(--cc-text); border-color: rgba(102, 255, 140, 0.45); }
.cc-forge-attach-text { max-width: 96px; overflow: hidden; text-overflow: ellipsis; }
.cc-forge-attach-clear {
display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
width: 24px; height: 30px; border-radius: var(--cc-radius-sm);
border: 1px solid var(--cc-edge); background: transparent; color: var(--cc-dim);
font-size: 11px; cursor: pointer;
transition: background var(--duration-fast), color var(--duration-fast), border-color var(--duration-fast);
}
.cc-forge-attach-clear:hover { background: rgba(255, 138, 138, 0.12); color: #ff8a8a; border-color: #ff8a8a; }
.cc-forge-attach-clear:focus-visible { outline: 2px solid #66ff8c; outline-offset: 2px; }
.cc-forge-attach-clear[hidden] { display: none; }
.cc-forge-go {
flex: 0 0 auto; height: 30px; padding: 0 14px; border-radius: var(--cc-radius-sm);
border: 1px solid #66ff8c; background: rgba(102, 255, 140, 0.14); color: var(--cc-text);
font: inherit; font-size: 12px; font-weight: 700; cursor: pointer;
transition: background var(--duration-fast), transform var(--duration-instant), opacity var(--duration-fast);
}
.cc-forge-go:hover { background: rgba(102, 255, 140, 0.24); }
.cc-forge-go:active { transform: translateY(1px); }
.cc-forge-go:focus-visible { outline: 2px solid #66ff8c; outline-offset: 2px; }
.cc-forge-go:disabled { opacity: 0.55; cursor: progress; }
@media (pointer: coarse) { #cc-props { bottom: 150px; } }
@media (max-width: 560px) {
#cc-props { bottom: 156px; width: 96vw; }
.cc-prop { min-width: 48px; }
.cc-prop-search { max-width: none; }
.cc-prop-forge-text { display: none; }
.cc-forge-attach-text { display: none; }
}
/* ---------------- share-a-build sheet (R20) ---------------- */
#cc-share, #cc-featured {
position: fixed; inset: 0; z-index: 120; display: grid; place-items: center;
padding: 20px; background: rgba(4, 4, 5, 0.62);
-webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
opacity: 0; transition: opacity var(--duration-base) var(--ease-standard);
}
#cc-share.cc-on, #cc-featured.cc-on { opacity: 1; }
.cc-share-card, .cc-fb-card {
position: relative; width: min(440px, 94vw); max-height: 88vh; overflow: auto;
background: var(--cc-panel-solid); border: 1px solid var(--cc-edge);
border-radius: var(--cc-radius); box-shadow: var(--cc-shadow);
padding: 20px; color: var(--cc-text);
transform: translateY(8px) scale(0.99); transition: transform var(--duration-base) var(--ease-standard);
}
#cc-share.cc-on .cc-share-card, #cc-featured.cc-on .cc-fb-card { transform: none; }
.cc-fb-card { width: min(720px, 94vw); }
.cc-share-close, .cc-fb-close {
position: absolute; top: 12px; right: 12px; width: 30px; height: 30px;
display: grid; place-items: center; border-radius: var(--cc-radius-sm);
border: 1px solid var(--cc-edge); background: rgba(255, 255, 255, 0.04);
color: var(--cc-dim); cursor: pointer; font-size: 14px; line-height: 1;
transition: color var(--duration-fast), background var(--duration-fast), border-color var(--duration-fast);
}
.cc-share-close:hover, .cc-fb-close:hover { color: var(--cc-text); border-color: var(--cc-edge-hi); background: rgba(255, 255, 255, 0.1); }
.cc-share-close:focus-visible, .cc-fb-close:focus-visible { outline: 2px solid #66ff8c; outline-offset: 2px; }
.cc-share-h, .cc-fb-h { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: 0.01em; }
.cc-share-sub, .cc-fb-sub { margin: 3px 0 0; font-size: 12.5px; color: var(--cc-dim); }
.cc-share-shot {
margin: 14px 0; border-radius: var(--cc-radius-sm); overflow: hidden;
border: 1px solid var(--cc-edge-soft); background: var(--cc-bg2); aspect-ratio: 16 / 9;
}
.cc-share-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cc-share-title {
width: 100%; box-sizing: border-box; padding: 9px 11px; margin-bottom: 12px;
background: var(--cc-bg2); border: 1px solid var(--cc-edge); border-radius: var(--cc-radius-sm);
color: var(--cc-text); font-size: 13.5px;
}
.cc-share-title:focus { outline: none; border-color: var(--cc-edge-hi); }
.cc-share-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cc-share-btn {
display: inline-flex; align-items: center; gap: 6px; padding: 9px 13px;
border-radius: var(--cc-radius-sm); border: 1px solid var(--cc-edge);
background: rgba(255, 255, 255, 0.04); color: var(--cc-text); cursor: pointer;
font-weight: 600; font-size: 13px; text-decoration: none;
transition: background var(--duration-fast), border-color var(--duration-fast), opacity var(--duration-fast), transform var(--duration-instant);
}
.cc-share-btn:hover { background: rgba(255, 255, 255, 0.12); border-color: var(--cc-edge-hi); }
.cc-share-btn:active { transform: translateY(1px); }
.cc-share-btn:focus-visible { outline: 2px solid #66ff8c; outline-offset: 2px; }
.cc-share-btn.cc-primary { background: #f4f5f7; color: var(--cc-ink); border-color: #f4f5f7; margin-left: auto; }
.cc-share-btn.cc-primary:hover { background: #fff; }
.cc-share-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.cc-share-status { margin-top: 12px; font-size: 12.5px; color: var(--cc-dim); }
.cc-share-status[data-kind="ok"] { color: #cfe9d4; }
.cc-share-status[data-kind="warn"] { color: #e7cccc; }
/* ---------------- featured builds surface (R20) ---------------- */
.cc-fb-body { margin-top: 16px; }
.cc-fb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.cc-fb-item {
display: flex; flex-direction: column; text-decoration: none; color: var(--cc-text);
border: 1px solid var(--cc-edge); border-radius: var(--cc-radius); overflow: hidden;
background: var(--cc-bg2); transition: border-color var(--duration-fast), transform var(--duration-instant), box-shadow var(--duration-fast);
}
.cc-fb-item:hover { border-color: var(--cc-edge-hi); transform: translateY(-3px); box-shadow: var(--cc-shadow); }
.cc-fb-item:focus-visible { outline: 2px solid #66ff8c; outline-offset: 2px; }
.cc-fb-thumb { aspect-ratio: 16 / 9; background: var(--cc-bg3); overflow: hidden; }
.cc-fb-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cc-fb-thumb-empty { width: 100%; height: 100%; display: grid; place-items: center; font-size: 28px; opacity: 0.4; }
.cc-fb-meta { padding: 10px 12px; }
.cc-fb-title { font-size: 13.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-fb-byline { margin-top: 3px; font-size: 11.5px; color: var(--cc-dim); }
.cc-fb-enter {
padding: 0 12px 11px; font-size: 12px; font-weight: 600; color: var(--cc-dim);
transition: color var(--duration-fast);
}
.cc-fb-item:hover .cc-fb-enter { color: var(--cc-text); }
.cc-fb-skel {
aspect-ratio: 4 / 3; border-radius: var(--cc-radius); background: var(--cc-bg2);
border: 1px solid var(--cc-edge-soft); position: relative; overflow: hidden;
}
.cc-fb-skel::after {
content: ''; position: absolute; inset: 0;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
transform: translateX(-100%); animation: cc-fb-shimmer 1.2s infinite;
}
@keyframes cc-fb-shimmer { to { transform: translateX(100%); } }
.cc-fb-state { padding: 40px 16px; text-align: center; color: var(--cc-dim); }
.cc-fb-state-ico { font-size: 30px; }
.cc-fb-state-msg { margin: 12px 0 4px; font-size: 14px; font-weight: 600; color: var(--cc-text); }
.cc-fb-state-hint { margin: 0; font-size: 12.5px; }
.cc-fb-retry {
margin-top: 14px; padding: 8px 16px; border-radius: var(--cc-radius-sm);
border: 1px solid var(--cc-edge); background: rgba(255, 255, 255, 0.04);
color: var(--cc-text); cursor: pointer; font-weight: 600;
transition: background var(--duration-fast), border-color var(--duration-fast);
}
.cc-fb-retry:hover { background: rgba(255, 255, 255, 0.12); border-color: var(--cc-edge-hi); }
.cc-fb-retry:focus-visible { outline: 2px solid #66ff8c; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
#cc-structures, #cc-props, #cc-share, #cc-featured, .cc-share-card, .cc-fb-card, .cc-fb-skel::after { animation: none; transition: none; }
}
/* ---------------- play gate (wallet sign-in) ----------------
Stands in front of /play when the platform token gate is on. Monochrome,
sharp, white-on-black CTAs, same language as the lobby. Sits above the boot
loader (z 80) and every HUD layer. */
.pg-root {
position: fixed; inset: 0; z-index: 200;
display: grid; place-items: center; padding: 24px;
animation: pg-fade 0.22s ease both;
}
.pg-root.pg-leaving { animation: pg-fade 0.25s ease reverse forwards; pointer-events: none; }
.pg-backdrop {
position: absolute; inset: 0;
background: radial-gradient(circle at 50% 36%, #141414, #040404 72%);
backdrop-filter: saturate(140%) blur(8px);
}
.pg-card {
position: relative; z-index: 1;
width: min(400px, 100%); padding: 32px 28px 26px;
display: flex; flex-direction: column; align-items: center; text-align: center;
background: var(--bg-0);
border: 1px solid var(--cc-edge);
border-top-color: rgba(255, 255, 255, 0.26);
border-radius: var(--cc-radius);
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(0, 0, 0, 0.5) inset;
animation: pg-rise 0.36s cubic-bezier(0.16, 0.84, 0.34, 1) both;
}
.pg-brand {
display: flex; align-items: center; gap: 9px; margin-bottom: 20px;
color: var(--cc-dim);
}
.pg-brand img { filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2)); }
.pg-brand span { font-weight: 800; font-size: 10.5px; letter-spacing: 0.28em; }
.pg-icon {
width: 52px; height: 52px; margin-bottom: 14px;
display: grid; place-items: center;
border: 1px solid var(--cc-edge); border-radius: 50%;
color: var(--cc-text);
transition: border-color var(--duration-base) var(--ease-standard), box-shadow var(--duration-base) var(--ease-standard);
}
.pg-icon svg { width: 22px; height: 22px; }
/* Breathing pulse on connect state to draw eye to the CTA */
.pg-card[data-state="connect"] .pg-icon {
animation: pg-icon-breathe 2.6s ease-in-out infinite;
}
.pg-title { margin: 0 0 7px; font-size: 20px; font-weight: 700; letter-spacing: -0.015em; color: var(--cc-text); }
.pg-sub { margin: 0 0 20px; font-size: 13px; line-height: 1.58; color: var(--cc-dim); max-width: 32ch; }
.pg-sub strong { color: var(--cc-text); font-weight: 600; }
.pg-error {
margin: -6px 0 16px; padding: 8px 12px; width: 100%;
font-size: 12px; line-height: 1.45; color: var(--cc-text);
background: rgba(255, 255, 255, 0.04);
border: 1px solid rgba(255, 255, 255, 0.14); border-radius: var(--cc-radius-sm);
}
.pg-fine { margin: 10px 0 0; font-size: 10.5px; letter-spacing: 0.04em; color: var(--cc-faint); }
/* buttons */
.pg-btn {
-webkit-appearance: none; appearance: none; cursor: pointer;
width: 100%; margin-top: 9px; padding: 12px 18px;
font-family: inherit; font-size: 12.5px; font-weight: 600; letter-spacing: 0.04em;
border-radius: var(--cc-radius-sm); border: 1px solid var(--cc-edge);
background: transparent; color: var(--cc-text);
text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
transition: transform var(--duration-instant) var(--ease-standard), background var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard), box-shadow var(--duration-fast) var(--ease-standard);
}
.pg-btn:hover { border-color: var(--cc-edge-hi); background: rgba(255, 255, 255, 0.04); }
.pg-btn:active { transform: translateY(1px); }
.pg-btn:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--cc-bg), 0 0 0 4px var(--cc-edge-hi); }
.pg-btn-primary {
position: relative; overflow: hidden;
background: var(--cc-accent); color: var(--cc-ink); border-color: var(--cc-accent);
}
.pg-btn-primary::after {
content: ''; position: absolute; inset: 0; border-radius: inherit;
background: linear-gradient(105deg, transparent 30%, rgba(0,0,0,0.07) 50%, transparent 70%);
background-size: 250% 100%; background-position: 200% 0;
animation: pg-shimmer 2.8s ease-in-out infinite;
}
.pg-btn-primary:hover { background: #fff; box-shadow: var(--cc-glow); }
.pg-btn-primary:hover::after { animation: none; }
.pg-btn-ghost { color: var(--cc-dim); }
.pg-btn-ghost:hover { color: var(--cc-text); }
/* quiet text action, "try a different wallet" */
.pg-link {
-webkit-appearance: none; appearance: none; cursor: pointer;
margin: 10px 0 0; padding: 4px 6px;
font-family: inherit; font-size: 11.5px; font-weight: 500; letter-spacing: 0.02em;
background: none; border: none; border-radius: var(--cc-radius-sm);
color: var(--cc-faint); text-decoration: underline; text-underline-offset: 3px;
transition: color var(--duration-fast) var(--ease-standard);
}
.pg-link:hover { color: var(--cc-dim); }
.pg-link:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--cc-bg), 0 0 0 4px var(--cc-edge-hi); }
/* step dots, 3-step progress indicator in working state */
.pg-steps {
display: flex; gap: 7px; margin-bottom: 18px;
}
.pg-dot {
width: 5px; height: 5px; border-radius: 50%;
background: var(--cc-edge);
transition: background var(--duration-base) var(--ease-standard), transform var(--duration-base) var(--ease-standard);
}
.pg-dot-done { background: rgba(255, 255, 255, 0.4); }
.pg-dot-active {
background: var(--cc-accent);
animation: pg-dot-pulse 1.1s ease-in-out infinite;
}
/* balance comparison (too-low state) */
.pg-balance {
display: flex; align-items: center; justify-content: center; gap: 12px;
width: 100%; margin: 0 0 16px; padding: 13px;
border: 1px solid var(--cc-edge-soft); border-radius: var(--cc-radius-sm);
background: rgba(255, 255, 255, 0.015);
}
.pg-balance > div { display: flex; flex-direction: column; gap: 3px; }
.pg-balance-k { font-size: 9.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--cc-faint); }
.pg-balance-v { font-size: 17px; font-weight: 700; color: var(--cc-dim); font-variant-numeric: tabular-nums; }
.pg-balance-low { color: var(--cc-faint); }
.pg-balance-need { color: var(--cc-text); }
.pg-balance-sep { color: var(--cc-edge); font-size: 14px; }
/* spinner + success check */
.pg-spinner {
width: 34px; height: 34px; margin-bottom: 16px; border-radius: 50%;
border: 1.5px solid rgba(255, 255, 255, 0.1); border-top-color: var(--cc-text);
animation: pg-spin 0.65s linear infinite;
}
.pg-check {
width: 56px; height: 56px; margin-bottom: 14px; border-radius: 50%;
display: grid; place-items: center; font-size: 24px; font-weight: 700;
color: var(--cc-ink); background: var(--cc-accent);
box-shadow: var(--cc-glow), 0 0 0 8px rgba(255, 255, 255, 0.06);
animation: pg-pop 0.38s cubic-bezier(0.16, 0.84, 0.34, 1) both;
}
@keyframes pg-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pg-rise { from { opacity: 0; transform: translateY(8px) scale(0.992); } to { opacity: 1; transform: none; } }
@keyframes pg-spin { to { transform: rotate(360deg); } }
@keyframes pg-pop { 0% { transform: scale(0.5); opacity: 0; } 70% { transform: scale(1.06); } 100% { transform: scale(1); opacity: 1; } }
@keyframes pg-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes pg-icon-breathe { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); } 50% { box-shadow: 0 0 0 7px rgba(255,255,255,0.05); } }
@keyframes pg-dot-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.5); opacity: 0.7; } }
@media (prefers-reduced-motion: reduce) {
.pg-root, .pg-card, .pg-check { animation: none; }
.pg-spinner { animation-duration: 1.2s; }
.pg-btn-primary::after, .pg-card[data-state="connect"] .pg-icon, .pg-dot-active { animation: none; }
}
@media (max-width: 480px) {
.pg-card { padding: 26px 18px 22px; }
.pg-title { font-size: 18px; }
.pg-sub { font-size: 12.5px; }
}
/* ───────────────────────── Cosmetics shop (R21) ─────────────────────────
In-world panel: browse the cosmetics catalog, filter by rarity, preview a
cosmetic live on your own avatar before buying. Monochrome system, rarity
reads through border intensity + glow, not hue (light is the only colour). */
/* The HUD shop-open button, seated in the coin banner next to Buy. */
.cc-shop-btn {
flex: none; pointer-events: auto;
display: inline-flex; align-items: center; gap: 7px;
margin-left: 4px; padding: 9px 13px;
background: rgba(255, 255, 255, 0.04); color: var(--cc-text);
border: 1px solid var(--cc-edge); border-radius: var(--cc-radius);
font-weight: 700; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase;
cursor: pointer; white-space: nowrap;
transition: transform var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard), background var(--duration-fast) var(--ease-standard);
}
.cc-shop-btn:hover { border-color: var(--cc-edge-hi); background: rgba(255, 255, 255, 0.08); transform: translateY(-1px); }
.cc-shop-btn:active { transform: translateY(1px); }
.cc-shop-btn:focus-visible { outline: 2px solid var(--focus-ring-color); outline-offset: 2px; }
.cc-shop-btn-ico { font-size: 14px; line-height: 1; }
/* "My Fits" wardrobe button (R23), mirrors the shop button. */
.cc-wardrobe-btn {
flex: none; pointer-events: auto;
display: inline-flex; align-items: center; gap: 7px;
margin-left: 4px; padding: 9px 13px;
background: rgba(255, 255, 255, 0.04); color: var(--cc-text);
border: 1px solid var(--cc-edge); border-radius: var(--cc-radius);
font-weight: 700; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase;
cursor: pointer; white-space: nowrap; appearance: none; -webkit-appearance: none; font-family: inherit;
transition: transform var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard), background var(--duration-fast) var(--ease-standard);
}
.cc-wardrobe-btn:hover { border-color: var(--cc-edge-hi); background: rgba(255, 255, 255, 0.08); transform: translateY(-1px); }
.cc-wardrobe-btn:active { transform: translateY(1px); }
.cc-wardrobe-btn:focus-visible { outline: 2px solid var(--focus-ring-color); outline-offset: 2px; }
.cc-wardrobe-btn-ico { font-size: 14px; line-height: 1; }
@media (max-width: 480px) { .cc-wardrobe-btn-text { display: none; } }
/* "Avatar" switcher button, mirrors the shop/wardrobe buttons; is-active marks
the drawer open (aria-expanded is set alongside by setAvatarPanelOpen). */
.cc-avatarbtn {
flex: none; pointer-events: auto;
display: inline-flex; align-items: center; gap: 7px;
margin-left: 4px; padding: 9px 13px;
background: rgba(255, 255, 255, 0.04); color: var(--cc-text);
border: 1px solid var(--cc-edge); border-radius: var(--cc-radius);
font-weight: 700; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase;
cursor: pointer; white-space: nowrap; appearance: none; -webkit-appearance: none; font-family: inherit;
transition: transform var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard), background var(--duration-fast) var(--ease-standard);
}
.cc-avatarbtn:hover { border-color: var(--cc-edge-hi); background: rgba(255, 255, 255, 0.08); transform: translateY(-1px); }
.cc-avatarbtn:active { transform: translateY(1px); }
.cc-avatarbtn:focus-visible { outline: 2px solid var(--focus-ring-color); outline-offset: 2px; }
.cc-avatarbtn.is-active { border-color: var(--cc-edge-hi); background: rgba(255, 255, 255, 0.1); }
.cc-avatarbtn-ico { font-size: 14px; line-height: 1; }
@media (max-width: 480px) { .cc-avatarbtn-text { display: none; } }
/* "Jobs" board button (W08), mirrors the shop/wardrobe buttons. */
.cc-jobs-btn {
flex: none; pointer-events: auto;
display: inline-flex; align-items: center; gap: 7px;
margin-left: 4px; padding: 9px 13px;
background: rgba(255, 255, 255, 0.04); color: var(--cc-text);
border: 1px solid var(--cc-edge); border-radius: var(--cc-radius);
font-weight: 700; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase;
cursor: pointer; transition: border-color var(--duration-fast) var(--ease-standard), background var(--duration-fast) var(--ease-standard), transform var(--duration-instant) var(--ease-standard);
}
.cc-jobs-btn:hover { border-color: var(--cc-edge-hi); background: rgba(255, 255, 255, 0.08); transform: translateY(-1px); }
.cc-jobs-btn:active { transform: translateY(1px); }
.cc-jobs-btn:focus-visible { outline: 2px solid var(--focus-ring-color); outline-offset: 2px; }
.cc-jobs-btn-ico { font-size: 14px; line-height: 1; }
@media (max-width: 480px) { .cc-jobs-btn-text { display: none; } }
/* "Friends" button (W09), mirrors the jobs/shop/wardrobe buttons, plus an
unread-DM badge and an active state while the panel is open. */
.cc-friends-btn {
position: relative;
flex: none; pointer-events: auto;
display: inline-flex; align-items: center; gap: 7px;
margin-left: 4px; padding: 9px 13px;
background: rgba(255, 255, 255, 0.04); color: var(--cc-text);
border: 1px solid var(--cc-edge); border-radius: var(--cc-radius);
font-weight: 700; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase;
cursor: pointer; white-space: nowrap; appearance: none; -webkit-appearance: none; font-family: inherit;
transition: border-color var(--duration-fast) var(--ease-standard), background var(--duration-fast) var(--ease-standard), transform var(--duration-instant) var(--ease-standard);
}
.cc-friends-btn:hover { border-color: var(--cc-edge-hi); background: rgba(255, 255, 255, 0.08); transform: translateY(-1px); }
.cc-friends-btn:active { transform: translateY(1px); }
.cc-friends-btn:focus-visible { outline: 2px solid var(--focus-ring-color); outline-offset: 2px; }
.cc-friends-btn.is-active { border-color: var(--cc-edge-hi); background: rgba(255, 255, 255, 0.12); }
.cc-friends-btn-ico { font-size: 14px; line-height: 1; }
@media (max-width: 480px) { .cc-friends-btn-text { display: none; } }
/* Unread badge, absolutely positioned so it never reflows the button (and so it
survives the 480px breakpoint that hides the label). */
.cc-friends-badge {
position: absolute; top: -5px; right: -5px;
min-width: 17px; height: 17px; padding: 0 4px; box-sizing: border-box;
display: inline-flex; align-items: center; justify-content: center;
background: #ff4d4d; color: #fff;
border-radius: 999px;
font-size: 10px; font-weight: 800; line-height: 1; letter-spacing: 0;
box-shadow: 0 0 0 2px var(--cc-bg, #10131a);
}
/* Friends panel shell (W09). A right-docked drawer over the world; the panel's own
styling ships with friends-panel.css, so this only owns the frame + motion. */
.cc-friends-panel {
position: fixed; top: 0; right: 0; z-index: 40;
width: min(380px, 100vw);
height: 100dvh;
display: flex; flex-direction: column;
background: var(--cc-bg, #10131a);
border-left: 1px solid var(--cc-edge);
box-shadow: -18px 0 48px rgba(0, 0, 0, 0.45);
pointer-events: auto;
transform: translateX(100%);
transition: transform var(--duration-base) var(--ease-standard);
will-change: transform;
}
.cc-friends-panel.is-open { transform: translateX(0); }
@media (prefers-reduced-motion: reduce) { .cc-friends-panel { transition: none; } }
.cc-friends-panel-head {
flex: none;
display: flex; align-items: center; justify-content: space-between; gap: 10px;
padding: 14px 14px 10px;
border-bottom: 1px solid var(--cc-edge);
}
.cc-friends-panel-title {
font-weight: 800; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase;
color: var(--cc-text);
}
/* Crew HQ link. `margin-left: auto` pushes it and the close button to the right
edge as a pair, so the head keeps its title-left / actions-right rhythm. */
.cc-friends-panel-crew {
flex: none; margin-left: auto;
padding: 5px 10px; border-radius: 999px;
font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
color: var(--cc-text); text-decoration: none;
border: 1px solid var(--cc-edge);
transition: border-color var(--duration-fast) var(--ease-standard), background var(--duration-fast) var(--ease-standard);
}
.cc-friends-panel-crew:hover { border-color: var(--cc-edge-hi); background: rgba(255, 255, 255, 0.08); }
.cc-friends-panel-crew:focus-visible { outline: 2px solid var(--focus-ring-color); outline-offset: 2px; }
.cc-friends-panel-close {
flex: none; width: 30px; height: 30px;
display: inline-flex; align-items: center; justify-content: center;
background: transparent; color: var(--cc-text);
border: 1px solid var(--cc-edge); border-radius: 8px;
font-size: 15px; line-height: 1; cursor: pointer;
transition: border-color var(--duration-fast) var(--ease-standard), background var(--duration-fast) var(--ease-standard);
}
.cc-friends-panel-close:hover { border-color: var(--cc-edge-hi); background: rgba(255, 255, 255, 0.08); }
.cc-friends-panel-close:focus-visible { outline: 2px solid var(--focus-ring-color); outline-offset: 2px; }
/* The FriendsPanel renders its own scrolling list into this body. */
.cc-friends-panel-body { flex: 1 1 auto; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
/* Drawer states owned by the frame, not by FriendsPanel: the window between the
tap and the view chunk landing, and the chunk never landing at all. Shaped and
shimmered like the economy panels so the whole surface loads the same way. */
.cc-friends-skel { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; }
.cc-friends-skel-row {
display: flex; align-items: center; gap: 10px; padding: 9px 10px;
background: rgba(255, 255, 255, 0.03); border: 1px solid var(--cc-edge-soft); border-radius: var(--cc-radius-sm);
}
.cc-friends-skel-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.cc-friends-skel-dot, .cc-friends-skel-line {
background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.12) 37%, rgba(255, 255, 255, 0.05) 63%);
background-size: 400% 100%;
animation: cc-friends-skel-shimmer 1.4s ease infinite;
border-radius: 3px;
}
.cc-friends-skel-dot { width: 26px; height: 26px; flex: none; border-radius: 50%; }
.cc-friends-skel-line { height: 9px; width: 58%; }
.cc-friends-skel-line-sm { height: 8px; width: 32%; }
@keyframes cc-friends-skel-shimmer {
0% { background-position: 100% 50%; }
100% { background-position: 0 50%; }
}
@media (prefers-reduced-motion: reduce) {
.cc-friends-skel-dot, .cc-friends-skel-line { animation: none; }
}
.cc-friends-loaderr {
display: flex; flex-direction: column; align-items: center; gap: 8px;
padding: 30px 22px; text-align: center;
}
.cc-friends-loaderr-glyph { font-size: 26px; line-height: 1; opacity: 0.75; }
.cc-friends-loaderr-title { margin: 0; font-size: 13px; font-weight: 700; color: var(--cc-text); }
.cc-friends-loaderr-sub { margin: 0; font-size: 12px; line-height: 1.5; color: var(--cc-dim); max-width: 34ch; }
.cc-friends-loaderr-retry {
margin-top: 4px; min-height: 40px; padding: 0 16px;
background: transparent; color: var(--cc-text); font: inherit; font-size: 12px; font-weight: 700;
border: 1px solid var(--cc-edge); border-radius: var(--cc-radius-sm); cursor: pointer;
transition: border-color var(--duration-fast) var(--ease-standard), background var(--duration-fast) var(--ease-standard);
}
.cc-friends-loaderr-retry:hover { border-color: var(--cc-edge-hi); background: rgba(255, 255, 255, 0.08); }
.cc-friends-loaderr-retry:active { background: rgba(255, 255, 255, 0.14); }
.cc-friends-loaderr-retry:focus-visible { outline: 2px solid var(--focus-ring-color); outline-offset: 2px; }
.cc-friends-panel-hint {
flex: none; padding: 8px 14px 12px;
color: var(--cc-dim, #8b93a3); font-size: 11px; letter-spacing: 0.02em;
border-top: 1px solid var(--cc-edge);
}
/* In-world avatar switcher panel. Reuses the friends-panel drawer frame
(.cc-avatar-panel rides the same .cc-friends-panel classes); everything
below styles the panel's own content (avatar-switcher.js). */
.cc-avsw-body { overflow-y: auto; }
.cc-avsw { display: flex; flex-direction: column; gap: 16px; padding: 12px 14px 16px; }
.cc-avsw.is-busy { cursor: progress; }
.cc-avsw-status {
flex: none; padding: 8px 10px; border-radius: var(--cc-radius);
font-size: 12px; line-height: 1.4;
border: 1px solid var(--cc-edge); background: rgba(255, 255, 255, 0.04);
color: var(--cc-text);
}
.cc-avsw-status[data-state="working"]::before {
content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 7px;
border: 2px solid var(--cc-dim); border-top-color: transparent; border-radius: 50%;
animation: cc-avsw-spin 0.8s linear infinite; vertical-align: -1px;
}
@keyframes cc-avsw-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .cc-avsw-status[data-state="working"]::before { animation: none; } }
.cc-avsw-status[data-state="done"] { border-color: rgba(126, 231, 135, 0.4); }
.cc-avsw-status[data-state="error"] { border-color: rgba(255, 107, 107, 0.5); color: #ffb3b3; }
.cc-avsw-section { display: flex; flex-direction: column; gap: 8px; }
.cc-avsw-title {
font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
color: var(--cc-dim);
}
.cc-avsw-grid {
display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.cc-avsw-chip {
appearance: none; -webkit-appearance: none; font-family: inherit;
display: flex; flex-direction: column; align-items: center; gap: 6px;
padding: 8px 6px; border-radius: var(--cc-radius);
background: rgba(255, 255, 255, 0.03); color: var(--cc-text);
border: 1px solid var(--cc-edge); cursor: pointer;
transition: transform var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard), background var(--duration-fast) var(--ease-standard);
}
.cc-avsw-chip:hover { border-color: var(--cc-edge-hi); background: rgba(255, 255, 255, 0.07); transform: translateY(-1px); }
.cc-avsw-chip:active { transform: translateY(1px); }
.cc-avsw-chip:focus-visible { outline: 2px solid var(--focus-ring-color); outline-offset: 2px; }
.cc-avsw-chip.is-active { border-color: var(--cc-accent, #7ee787); background: rgba(255, 255, 255, 0.08); }
.cc-avsw-chip.is-busy { opacity: 0.6; cursor: progress; }
.cc-avsw-thumb {
width: 100%; aspect-ratio: 1; max-width: 84px; object-fit: cover;
border-radius: calc(var(--cc-radius) - 3px); background: rgba(255, 255, 255, 0.05);
}
.cc-avsw-glyph {
width: 100%; aspect-ratio: 1; max-width: 84px;
display: grid; place-items: center; font-size: 26px;
border-radius: calc(var(--cc-radius) - 3px); background: rgba(255, 255, 255, 0.05);
}
.cc-avsw-chip-name {
max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
font-size: 11px; font-weight: 600; letter-spacing: 0.01em;
}
.cc-avsw-skel {
pointer-events: none; min-height: 108px;
background: linear-gradient(100deg, rgba(255, 255, 255, 0.03) 40%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.03) 60%);
background-size: 200% 100%;
animation: cc-avsw-shimmer 1.2s linear infinite;
}
@keyframes cc-avsw-shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .cc-avsw-skel { animation: none; } }
.cc-avsw-note { grid-column: 1 / -1; font-size: 12px; line-height: 1.5; color: var(--cc-dim); }
.cc-avsw-link {
appearance: none; -webkit-appearance: none; font-family: inherit; font-size: inherit;
background: none; border: none; padding: 0; cursor: pointer;
color: var(--cc-text); text-decoration: underline;
}
.cc-avsw-link:hover { color: #fff; }
.cc-avsw-link:focus-visible { outline: 2px solid var(--focus-ring-color); outline-offset: 2px; }
.cc-avsw-row { display: flex; gap: 8px; }
.cc-avsw-paste-input {
flex: 1 1 auto; min-width: 0; padding: 9px 11px;
background: var(--cc-bg2, rgba(255, 255, 255, 0.04)); color: var(--cc-text);
border: 1px solid var(--cc-edge); border-radius: var(--cc-radius);
font-size: 13px; font-family: inherit;
}
.cc-avsw-paste-input:focus-visible { outline: 2px solid var(--focus-ring-color); outline-offset: 1px; }
.cc-avsw-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cc-avsw-btn {
appearance: none; -webkit-appearance: none; font-family: inherit;
flex: none; display: inline-flex; align-items: center; gap: 6px;
padding: 9px 12px; border-radius: var(--cc-radius);
background: rgba(255, 255, 255, 0.04); color: var(--cc-text);
border: 1px solid var(--cc-edge);
font-weight: 700; font-size: 12px; letter-spacing: 0.03em;
cursor: pointer; white-space: nowrap;
transition: transform var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard), background var(--duration-fast) var(--ease-standard);
}
.cc-avsw-btn:hover { border-color: var(--cc-edge-hi); background: rgba(255, 255, 255, 0.08); transform: translateY(-1px); }
.cc-avsw-btn:active { transform: translateY(1px); }
.cc-avsw-btn:focus-visible { outline: 2px solid var(--focus-ring-color); outline-offset: 2px; }
.cc-avsw-btn.is-busy { opacity: 0.6; cursor: progress; }
.cc-avsw-upload { position: relative; }
.cc-avsw-file { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.cc-avsw-upload:focus-within { outline: 2px solid var(--focus-ring-color); outline-offset: 2px; }
/* Creator-only holders-gate button (R24), mirrors the shop button, accented. */
.cc-gate-cfg-btn {
flex: none; pointer-events: auto;
display: inline-flex; align-items: center; gap: 7px;
margin-left: 4px; padding: 9px 13px;
background: rgba(255, 255, 255, 0.04); color: var(--cc-text);
border: 1px solid var(--cc-edge); border-radius: var(--cc-radius);
font-weight: 700; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase;
cursor: pointer; white-space: nowrap;
transition: transform var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard), background var(--duration-fast) var(--ease-standard);
}
.cc-gate-cfg-btn:hover { border-color: var(--cc-edge-hi); background: rgba(255, 255, 255, 0.08); transform: translateY(-1px); }
.cc-gate-cfg-btn:active { transform: translateY(1px); }
.cc-gate-cfg-btn:focus-visible { outline: 2px solid var(--focus-ring-color); outline-offset: 2px; }
.cc-gate-cfg-ico { font-size: 14px; line-height: 1; }
/* Gate-config modal fields (reuses .cc-gate-overlay/.cc-gate-modal/.cc-gate-btn). */
.cc-gatecfg-row { display: flex; flex-direction: column; gap: 6px; width: 100%; margin-top: 6px; text-align: left; }
.cc-gatecfg-label { font-size: 12px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: var(--cc-dim); }
.cc-gatecfg-input {
width: 100%; box-sizing: border-box; padding: 10px 12px;
background: var(--cc-bg2); color: var(--cc-text);
border: 1px solid var(--cc-edge); border-radius: var(--cc-radius);
font-size: 15px; font-variant-numeric: tabular-nums;
}
.cc-gatecfg-input:focus-visible { outline: 2px solid var(--focus-ring-color); outline-offset: 1px; border-color: var(--cc-edge-hi); }
.cc-gatecfg-hint { margin: 8px 0 0; font-size: 12px; line-height: 1.5; color: var(--cc-dim); text-align: left; }
.cc-gatecfg-err { margin: 8px 0 0; font-size: 12.5px; line-height: 1.45; color: #e7cccc; text-align: left; }
.cc-shop {
position: fixed; inset: 0; z-index: 92;
display: grid; place-items: center; padding: 20px;
background: rgba(4, 4, 6, 0.62); backdrop-filter: blur(6px);
opacity: 0; transition: opacity var(--duration-fast) var(--ease-standard);
font: 14px/1.4 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
.cc-shop.cc-shop-in { opacity: 1; }
.cc-shop-panel {
width: min(760px, 100%); max-height: min(86vh, 720px);
display: flex; flex-direction: column;
background: var(--cc-panel-solid); color: var(--cc-text);
border: 1px solid var(--cc-edge); border-radius: var(--cc-radius);
box-shadow: var(--cc-shadow);
transform: translateY(10px) scale(0.99); opacity: 0;
transition: transform var(--duration-base) var(--ease-standard), opacity var(--duration-base) var(--ease-standard);
}
.cc-shop-in .cc-shop-panel { transform: none; opacity: 1; }
.cc-shop-head {
display: flex; align-items: center; justify-content: space-between;
gap: 10px; padding: 16px 18px 14px; border-bottom: 1px solid var(--cc-edge-soft);
}
.cc-shop-title { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.cc-shop-title-main { font-size: 17px; font-weight: 800; letter-spacing: 0.01em; }
.cc-shop-title-sub { font-size: 12px; color: var(--cc-dim); }
/* "Rarest Fits" button, opens the R25 flex board as a lazy chunk. Sits in
the shop header between the title and close. On mobile the text is hidden,
leaving a compact glyph-only button that still has a full aria-label. */
.cc-shop-flex {
flex: none; appearance: none; -webkit-appearance: none;
display: inline-flex; align-items: center; gap: 5px;
padding: 6px 11px;
background: rgba(255, 255, 255, 0.04); color: var(--cc-dim);
border: 1px solid var(--cc-edge); border-radius: 999px;
font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
cursor: pointer; white-space: nowrap;
transition: color var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard), background var(--duration-fast) var(--ease-standard);
}
.cc-shop-flex:hover { color: var(--cc-text); border-color: var(--cc-edge-hi); background: rgba(255, 255, 255, 0.07); }
.cc-shop-flex:active { background: rgba(255, 255, 255, 0.02); }
.cc-shop-flex:focus-visible { outline: 2px solid var(--focus-ring-color); outline-offset: 2px; }
.cc-shop-close {
flex: none; width: 32px; height: 32px; display: grid; place-items: center;
background: none; border: 1px solid var(--cc-edge); border-radius: var(--cc-radius-sm);
color: var(--cc-dim); font-size: 14px; cursor: pointer;
transition: color var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard), background var(--duration-fast) var(--ease-standard);
}
.cc-shop-close:hover { color: var(--cc-text); border-color: var(--cc-edge-hi); background: rgba(255, 255, 255, 0.05); }
.cc-shop-close:focus-visible { outline: 2px solid var(--focus-ring-color); outline-offset: 2px; }
.cc-shop-filters {
display: flex; flex-wrap: wrap; gap: 7px; padding: 13px 18px;
border-bottom: 1px solid var(--cc-edge-soft);
}
.cc-shop-chip {
padding: 6px 13px; background: rgba(255, 255, 255, 0.03);
border: 1px solid var(--cc-edge); border-radius: 999px;
color: var(--cc-dim); font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
cursor: pointer; transition: color var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard), background var(--duration-fast) var(--ease-standard);
}
.cc-shop-chip:hover { color: var(--cc-text); border-color: var(--cc-edge-hi); }
.cc-shop-chip:focus-visible { outline: 2px solid var(--focus-ring-color); outline-offset: 2px; }
.cc-shop-chip.cc-active {
color: var(--cc-ink); background: var(--cc-accent); border-color: var(--cc-accent);
box-shadow: var(--cc-glow);
}
.cc-shop-body { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 18px 18px; }
.cc-shop-status {
padding: 12px 2px 8px; font-size: 11.5px; color: var(--cc-faint);
letter-spacing: 0.12em; text-transform: uppercase;
}
/* Purchase feedback (R22), overrides the neutral count line while a buy resolves. */
.cc-shop-status[data-kind="pending"] { color: var(--cc-text); }
.cc-shop-status[data-kind="ok"] { color: #cfe9d4; }
.cc-shop-status[data-kind="error"] { color: #e7b3b3; }
.cc-shop-grid {
display: grid; gap: 12px; padding-top: 6px;
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.cc-shop-grid.cc-shop-empty-grid { display: block; }
/* A card stacks a click-to-toggle preview button (the thumb) over its meta +
buy action. The card itself is a container; the thumb and Buy are the two
independent interactive controls. */
.cc-shop-card {
display: flex; flex-direction: column; text-align: left;
padding: 0; background: var(--cc-bg2);
border: 1px solid var(--cc-edge-soft); border-radius: var(--cc-radius);
color: var(--cc-text); overflow: hidden;
transition: transform var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard), box-shadow var(--duration-fast) var(--ease-standard);
}
.cc-shop-card:hover { transform: translateY(-2px); border-color: var(--cc-edge-hi); }
.cc-shop-card.cc-active {
border-color: var(--cc-accent); box-shadow: var(--cc-glow);
}
/* The thumb is a real button (preview toggle), reset the UA chrome so it reads
as the image tile it replaces. */
.cc-shop-thumb-btn {
appearance: none; -webkit-appearance: none;
border: 0; border-bottom: 1px solid var(--cc-edge-soft);
margin: 0; font: inherit; color: inherit; cursor: pointer;
width: 100%; display: block;
}
.cc-shop-thumb-btn:focus-visible { outline: 2px solid var(--focus-ring-color); outline-offset: -2px; }
.cc-shop-thumb {
position: relative; aspect-ratio: 1 / 1; width: 100%;
display: grid; place-items: center; overflow: hidden;
background:
radial-gradient(120% 120% at 50% 20%, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0) 60%),
var(--cc-bg3);
border-bottom: 1px solid var(--cc-edge-soft);
}
.cc-shop-thumb-img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.cc-shop-glyph { font-size: 42px; line-height: 1; opacity: 0.82; filter: grayscale(1) brightness(1.4); }
.cc-shop-rarity {
position: absolute; top: 7px; left: 7px;
padding: 2px 7px; border-radius: 999px;
font-size: 9.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
color: var(--cc-text); background: rgba(0, 0, 0, 0.55);
border: 1px solid var(--cc-edge);
}
.cc-shop-rarity[data-rarity="rare"] { border-color: rgba(255, 255, 255, 0.32); }
.cc-shop-rarity[data-rarity="epic"] { border-color: rgba(255, 255, 255, 0.55); color: #fff; }
.cc-shop-rarity[data-rarity="legendary"] { border-color: #fff; color: var(--cc-ink); background: rgba(255, 255, 255, 0.92); }
.cc-shop-preview-tag {
position: absolute; bottom: 7px; right: 7px;
padding: 2px 8px; border-radius: 999px;
font-size: 10px; font-weight: 700; letter-spacing: 0.04em;
color: var(--cc-ink); background: rgba(255, 255, 255, 0.9);
opacity: 0; transform: translateY(3px); transition: opacity var(--duration-fast) var(--ease-standard), transform var(--duration-fast) var(--ease-standard);
}
.cc-shop-card:hover .cc-shop-preview-tag { opacity: 1; transform: none; }
.cc-shop-card.cc-active .cc-shop-preview-tag { opacity: 1; transform: none; background: var(--cc-accent); }
.cc-shop-meta { display: flex; flex-direction: column; gap: 6px; padding: 10px 11px 11px; }
.cc-shop-name { font-size: 13px; font-weight: 700; letter-spacing: 0.01em; }
/* The item's value, quoted in $THREE, the only coin. */
.cc-shop-value { font-size: 11px; font-weight: 700; color: var(--cc-dim); letter-spacing: 0.02em; }
/* Buy / Owned action (R22). The action is its own focusable control, distinct
from the preview toggle on the thumb. */
.cc-shop-action { margin-top: 2px; align-self: stretch; }
.cc-shop-buy {
appearance: none; -webkit-appearance: none;
width: 100%; padding: 8px 10px; border-radius: var(--cc-radius);
border: 1px solid var(--cc-edge-hi); background: rgba(255, 255, 255, 0.92);
color: var(--cc-ink); font-size: 12px; font-weight: 800; letter-spacing: 0.02em;
cursor: pointer; transition: transform var(--duration-fast) var(--ease-standard), background var(--duration-fast) var(--ease-standard), opacity var(--duration-fast) var(--ease-standard);
}
.cc-shop-buy:hover { transform: translateY(-1px); background: #fff; }
.cc-shop-buy:active { transform: translateY(1px); }
.cc-shop-buy:focus-visible { outline: 2px solid var(--focus-ring-color); outline-offset: 2px; }
.cc-shop-buy:disabled { opacity: 0.55; cursor: progress; transform: none; }
span.cc-shop-action.cc-owned { align-self: flex-start; }
.cc-shop-badge {
display: inline-flex; align-items: center; gap: 5px; align-self: flex-start;
font-size: 11px; font-weight: 700; letter-spacing: 0.02em;
}
.cc-shop-badge.cc-owned { color: var(--cc-text); }
.cc-shop-badge.cc-owned::before {
content: "✓"; font-size: 10px; color: var(--cc-ink);
width: 15px; height: 15px; border-radius: 50%; display: grid; place-items: center;
background: var(--cc-accent);
}
.cc-shop-badge.cc-locked { color: var(--cc-dim); }
.cc-lock-ico { font-size: 10px; filter: grayscale(1); }
.cc-shop-card.cc-is-locked .cc-shop-thumb-img,
.cc-shop-card.cc-is-locked .cc-shop-glyph { opacity: 0.78; }
/* Skeleton loading cards. */
.cc-shop-skel { pointer-events: none; }
.cc-skel-box { width: 100%; aspect-ratio: 1 / 1; }
.cc-skel-line { height: 11px; border-radius: 3px; }
.cc-skel-short { width: 55%; }
.cc-skel-box, .cc-skel-line {
background: linear-gradient(100deg, rgba(255, 255, 255, 0.04) 30%, rgba(255, 255, 255, 0.12) 50%, rgba(255, 255, 255, 0.04) 70%);
background-size: 200% 100%; animation: cc-shimmer 1.3s ease-in-out infinite;
}
@keyframes cc-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
/* Empty + error states. */
.cc-shop-empty {
display: flex; flex-direction: column; align-items: center; text-align: center;
gap: 8px; padding: 48px 24px;
}
.cc-shop-empty-ico { font-size: 30px; opacity: 0.7; }
.cc-shop-empty-title { font-size: 15px; font-weight: 700; }
.cc-shop-empty-sub { font-size: 13px; color: var(--cc-dim); max-width: 320px; }
.cc-shop-retry {
margin-top: 8px; padding: 8px 18px;
background: var(--cc-accent); color: var(--cc-ink);
border: 1px solid var(--cc-accent); border-radius: var(--cc-radius-sm);
font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
cursor: pointer; box-shadow: var(--cc-glow);
transition: transform var(--duration-fast) var(--ease-standard), opacity var(--duration-fast) var(--ease-standard);
}
.cc-shop-retry:hover { transform: translateY(-1px); }
.cc-shop-retry:active { transform: translateY(1px); }
.cc-shop-retry:focus-visible { outline: 2px solid var(--focus-ring-color); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
.cc-shop, .cc-shop-panel, .cc-shop-card, .cc-shop-preview-tag { transition: none; }
.cc-skel-box, .cc-skel-line { animation: none; }
}
@media (max-width: 640px) {
.cc-shop-btn-text { display: none; }
.cc-shop-btn { padding: 9px 11px; margin-left: 2px; }
.cc-shop-flex-text { display: none; }
.cc-shop-flex { padding: 7px 9px; }
.cc-shop { padding: 0; place-items: stretch; }
.cc-shop-panel { width: 100%; max-height: 100%; height: 100%; border: none; border-radius: 0; }
.cc-shop-grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
}
/* ───────────────────────────────────────────────────────────────────────────
NPC service counter (npc-services.js). Each townsperson fronts one real
x402 endpoint; this is the storefront panel the player fills in to pay.
Sits above the world (z 120) but below the x402 checkout overlay, which
mounts on top to run the wallet payment.
─────────────────────────────────────────────────────────────────────────── */
.npc-svc-overlay {
position: fixed; inset: 0; z-index: 120; display: grid; place-items: center;
padding: 20px; background: rgba(4, 4, 5, 0.66);
backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
opacity: 0; transition: opacity var(--duration-fast) var(--ease-standard);
}
.npc-svc-overlay.is-in { opacity: 1; }
.npc-svc-card {
width: min(440px, 100%); max-height: min(86vh, 720px); overflow-y: auto;
background: var(--cc-panel-solid); color: var(--cc-text);
border: 1px solid var(--cc-edge); border-radius: var(--cc-radius);
box-shadow: var(--cc-shadow); padding: 18px 18px 16px;
transform: translateY(8px) scale(0.985); transition: transform var(--duration-fast) var(--ease-standard);
}
.npc-svc-overlay.is-in .npc-svc-card { transform: translateY(0) scale(1); }
.npc-svc-card::-webkit-scrollbar { width: 8px; }
.npc-svc-card::-webkit-scrollbar-thumb { background: var(--cc-edge); border-radius: 4px; }
.npc-svc-head { display: flex; align-items: flex-start; gap: 10px; }
.npc-svc-head > div:first-child { flex: 1; min-width: 0; }
.npc-svc-who { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cc-dim); margin-bottom: 3px; }
.npc-svc-title { font-size: 19px; line-height: 1.15; margin: 0; font-weight: 650; }
.npc-svc-price-wrap { flex-shrink: 0; }
.npc-svc-close {
flex-shrink: 0; width: 28px; height: 28px; line-height: 1; cursor: pointer;
background: transparent; border: 1px solid var(--cc-edge-soft); border-radius: var(--cc-radius-sm);
color: var(--cc-dim); font: inherit; font-size: 13px; transition: all var(--duration-fast) var(--ease-standard);
}
.npc-svc-close:hover { color: var(--cc-text); border-color: var(--cc-edge-hi); }
.npc-svc-close:focus-visible { outline: 2px solid var(--cc-edge-hi); outline-offset: 1px; }
.npc-svc-intro { margin: 11px 0 16px; font-size: 13.5px; line-height: 1.5; color: var(--cc-dim); }
.npc-svc-form { display: flex; flex-direction: column; gap: 13px; }
.npc-svc-field { display: flex; flex-direction: column; gap: 5px; }
.npc-svc-field-label { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cc-dim); }
.npc-svc-field-help { font-size: 11.5px; color: var(--cc-faint); }
.npc-svc-input {
width: 100%; background: var(--cc-bg2); color: var(--cc-text);
border: 1px solid var(--cc-edge); border-radius: var(--cc-radius-sm);
padding: 9px 11px; font: inherit; font-size: 14px; transition: border-color var(--duration-fast) var(--ease-standard), box-shadow var(--duration-fast) var(--ease-standard);
}
textarea.npc-svc-input { resize: vertical; min-height: 64px; line-height: 1.45; }
select.npc-svc-input { cursor: pointer; appearance: none; -webkit-appearance: none;
background-image: linear-gradient(45deg, transparent 50%, var(--cc-dim) 50%), linear-gradient(135deg, var(--cc-dim) 50%, transparent 50%);
background-position: calc(100% - 16px) 52%, calc(100% - 11px) 52%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
padding-right: 30px;
}
.npc-svc-input::placeholder { color: var(--cc-faint); }
.npc-svc-input:focus { outline: none; border-color: var(--cc-edge-hi); box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08); }
.npc-svc-input:disabled { opacity: 0.55; cursor: not-allowed; }
.npc-svc-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 5px; }
.npc-svc-pay, .npc-svc-cancel, .npc-svc-btn {
font: inherit; font-size: 13.5px; cursor: pointer; border-radius: var(--cc-radius-sm);
padding: 9px 16px; transition: filter var(--duration-fast) var(--ease-standard), background var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard), transform var(--duration-instant) var(--ease-standard);
}
.npc-svc-pay {
background: var(--cc-accent); color: var(--cc-ink); border: 1px solid var(--cc-accent); font-weight: 600;
}
.npc-svc-pay:hover:not(:disabled) { filter: brightness(0.9); }
.npc-svc-pay:active:not(:disabled) { transform: translateY(1px); }
.npc-svc-pay:disabled { opacity: 0.6; cursor: progress; }
.npc-svc-pay.is-busy .npc-svc-pay-label::before {
content: ''; display: inline-block; width: 11px; height: 11px; margin-right: 7px; vertical-align: -1px;
border: 2px solid rgba(6, 6, 7, 0.35); border-top-color: var(--cc-ink); border-radius: 50%;
animation: npc-svc-spin 0.7s linear infinite;
}
@keyframes npc-svc-spin { to { transform: rotate(360deg); } }
.npc-svc-cancel { background: transparent; color: var(--cc-dim); border: 1px solid var(--cc-edge); }
.npc-svc-cancel:hover { color: var(--cc-text); border-color: var(--cc-edge-hi); }
.npc-svc-pay:focus-visible, .npc-svc-cancel:focus-visible, .npc-svc-btn:focus-visible, .npc-svc-copy:focus-visible {
outline: 2px solid var(--cc-edge-hi); outline-offset: 1px;
}
.npc-svc-error {
margin-top: 4px; padding: 9px 11px; font-size: 13px; line-height: 1.4;
background: rgba(255, 255, 255, 0.05); border: 1px solid var(--cc-edge); border-left: 2px solid var(--cc-edge-hi);
border-radius: var(--cc-radius-sm); color: var(--cc-text);
}
/* settled result */
.npc-svc-result { margin-top: 4px; }
.npc-svc-settled {
font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cc-faint);
margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--cc-edge-soft);
}
.npc-svc-payload { display: flex; flex-direction: column; gap: 12px; }
.npc-svc-headline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.npc-svc-topic { font-size: 15px; font-weight: 600; letter-spacing: 0.02em; }
.npc-svc-lede { margin: 0; font-size: 14px; line-height: 1.55; color: var(--cc-text); }
.npc-svc-note { margin: 0; font-size: 13px; line-height: 1.5; color: var(--cc-dim); }
.npc-svc-sublabel { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cc-dim); margin-bottom: -4px; }
.npc-svc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 9px; }
.npc-svc-kv { display: flex; flex-direction: column; gap: 2px; padding: 9px 10px; background: var(--cc-bg2); border: 1px solid var(--cc-edge-soft); border-radius: var(--cc-radius-sm); }
.npc-svc-kv-k { font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--cc-faint); }
.npc-svc-kv-v { font-size: 15px; font-weight: 600; }
.npc-svc-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 5px; font-size: 13px; line-height: 1.45; color: var(--cc-text); }
.npc-svc-list a { color: var(--cc-text); text-decoration: underline; text-underline-offset: 2px; }
.npc-svc-list a:hover { color: var(--cc-dim); }
.npc-svc-code { margin: 0; padding: 11px; background: var(--cc-bg); border: 1px solid var(--cc-edge-soft); border-radius: var(--cc-radius-sm); font-size: 12px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; max-height: 220px; overflow: auto; }
.npc-svc-mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; word-break: break-all; color: var(--cc-dim); margin: 0; }
.npc-svc-address, .npc-svc-secret { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px; background: var(--cc-bg2); border: 1px solid var(--cc-edge-soft); border-radius: var(--cc-radius-sm); }
.npc-svc-secret { flex-direction: column; align-items: stretch; }
.npc-svc-address code, .npc-svc-secret code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px; word-break: break-all; flex: 1; min-width: 0; }
.npc-svc-copy { flex-shrink: 0; font: inherit; font-size: 12px; cursor: pointer; padding: 5px 10px; background: transparent; color: var(--cc-dim); border: 1px solid var(--cc-edge); border-radius: var(--cc-radius-sm); transition: all var(--duration-fast) var(--ease-standard); }
.npc-svc-copy:hover { color: var(--cc-text); border-color: var(--cc-edge-hi); }
.npc-svc-btn { display: inline-block; text-align: center; text-decoration: none; background: transparent; color: var(--cc-text); border: 1px solid var(--cc-edge-hi); align-self: flex-start; }
.npc-svc-btn:hover { background: rgba(255, 255, 255, 0.06); }
/* pills */
.npc-svc-pill {
display: inline-flex; align-items: center; font-size: 11px; font-weight: 650; letter-spacing: 0.06em;
padding: 4px 9px; border-radius: 999px; border: 1px solid var(--cc-edge); color: var(--cc-text); white-space: nowrap;
}
.npc-svc-pill.is-price { background: rgba(255, 255, 255, 0.05); color: var(--cc-text); letter-spacing: 0.02em; }
.npc-svc-pill.is-up { background: rgba(255, 255, 255, 0.92); color: var(--cc-ink); border-color: transparent; }
.npc-svc-pill.is-down { background: transparent; color: var(--cc-text); border-color: var(--cc-edge-hi); }
.npc-svc-pill.is-flat { background: rgba(255, 255, 255, 0.06); color: var(--cc-dim); }
@media (max-width: 520px) {
.npc-svc-overlay { padding: 0; place-items: end stretch; }
.npc-svc-card { width: 100%; max-height: 92vh; border-radius: var(--cc-radius) var(--cc-radius) 0 0; border-bottom: none; }
.npc-svc-overlay.is-in .npc-svc-card { transform: translateY(0); }
.npc-svc-card { transform: translateY(14px); }
}
@media (prefers-reduced-motion: reduce) {
.npc-svc-overlay, .npc-svc-card { transition: none; }
.npc-svc-pay.is-busy .npc-svc-pay-label::before { animation: none; }
}
/* ───────────────────────────────────────────────────────────────────────────
NPC conversation (npc-chat.js). Press E and the townsperson answers in
character, streamed live from the same models the chats use. Vendors surface
their paid counter as a chip; tapping it opens the npc-svc panel on top.
Same z-layer as the service counter; only one is ever open at a time.
─────────────────────────────────────────────────────────────────────────── */
.npc-chat-overlay {
position: fixed; inset: 0; z-index: 120; display: grid; place-items: end center;
padding: 20px; background: rgba(4, 4, 5, 0.5);
backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
opacity: 0; transition: opacity var(--duration-fast) var(--ease-standard);
}
.npc-chat-overlay.is-in { opacity: 1; }
.npc-chat-card {
width: min(440px, 100%); height: min(72vh, 600px); display: flex; flex-direction: column;
background: var(--cc-panel-solid); color: var(--cc-text);
border: 1px solid var(--cc-edge); border-radius: var(--cc-radius);
box-shadow: var(--cc-shadow);
transform: translateY(12px) scale(0.99); transition: transform var(--duration-fast) var(--ease-standard);
}
.npc-chat-overlay.is-in .npc-chat-card { transform: translateY(0) scale(1); }
.npc-chat-head {
display: flex; align-items: flex-start; gap: 10px;
padding: 14px 14px 12px; border-bottom: 1px solid var(--cc-edge-soft);
}
.npc-chat-id { flex: 1; min-width: 0; }
.npc-chat-who { font-size: 16px; font-weight: 650; line-height: 1.15; }
.npc-chat-sub { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--cc-dim); margin-top: 3px; }
.npc-chat-tools { display: flex; align-items: center; gap: 7px; flex-shrink: 0; }
.npc-chat-model {
max-width: 130px; font: inherit; font-size: 12px; cursor: pointer;
background: var(--cc-bg2); color: var(--cc-dim);
border: 1px solid var(--cc-edge); border-radius: var(--cc-radius-sm);
padding: 5px 8px; appearance: none; -webkit-appearance: none;
transition: border-color var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard);
}
.npc-chat-model:hover { color: var(--cc-text); border-color: var(--cc-edge-hi); }
.npc-chat-model:focus-visible { outline: 2px solid var(--cc-edge-hi); outline-offset: 1px; }
.npc-chat-close {
flex-shrink: 0; width: 28px; height: 28px; line-height: 1; cursor: pointer;
background: transparent; border: 1px solid var(--cc-edge-soft); border-radius: var(--cc-radius-sm);
color: var(--cc-dim); font: inherit; font-size: 13px; transition: all var(--duration-fast) var(--ease-standard);
}
.npc-chat-close:hover { color: var(--cc-text); border-color: var(--cc-edge-hi); }
.npc-chat-close:focus-visible { outline: 2px solid var(--cc-edge-hi); outline-offset: 1px; }
.npc-chat-offer { padding: 10px 14px 0; }
.npc-chat-offer-btn {
display: flex; align-items: center; gap: 8px; width: 100%; cursor: pointer;
font: inherit; font-size: 13px; text-align: left;
background: rgba(255, 255, 255, 0.04); color: var(--cc-text);
border: 1px solid var(--cc-edge); border-radius: var(--cc-radius-sm);
padding: 9px 12px; transition: border-color var(--duration-fast) var(--ease-standard), background var(--duration-fast) var(--ease-standard);
}
.npc-chat-offer-btn:hover { background: rgba(255, 255, 255, 0.07); border-color: var(--cc-edge-hi); }
.npc-chat-offer-btn:focus-visible { outline: 2px solid var(--cc-edge-hi); outline-offset: 1px; }
.npc-chat-offer-btn::before { content: '🛒'; font-size: 13px; }
.npc-chat-offer-label { flex: 1; font-weight: 600; }
.npc-chat-offer-price {
flex-shrink: 0; font-size: 11px; font-weight: 650; letter-spacing: 0.02em;
padding: 3px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); color: var(--cc-text);
}
.npc-chat-log {
flex: 1; min-height: 0; overflow-y: auto;
padding: 14px; display: flex; flex-direction: column; gap: 9px;
}
.npc-chat-log::-webkit-scrollbar { width: 8px; }
.npc-chat-log::-webkit-scrollbar-thumb { background: var(--cc-edge); border-radius: 4px; }
.npc-chat-msg { max-width: 84%; display: flex; }
.npc-chat-msg.is-me { align-self: flex-end; }
.npc-chat-msg.is-npc { align-self: flex-start; }
.npc-chat-text {
font-size: 14px; line-height: 1.5; padding: 9px 12px;
border-radius: 12px; white-space: pre-wrap; word-break: break-word;
}
.npc-chat-msg.is-me .npc-chat-text {
background: var(--cc-accent); color: var(--cc-ink); border-bottom-right-radius: 4px;
}
.npc-chat-msg.is-npc .npc-chat-text {
background: var(--cc-bg2); color: var(--cc-text);
border: 1px solid var(--cc-edge-soft); border-bottom-left-radius: 4px;
}
.npc-chat-msg.is-error .npc-chat-text { border-left: 2px solid var(--cc-edge-hi); color: var(--cc-dim); }
.npc-chat-msg.is-typing .npc-chat-text { min-width: 38px; }
.npc-chat-msg.is-typing .npc-chat-text::after {
content: '●●●'; letter-spacing: 2px; color: var(--cc-faint);
animation: npc-chat-pulse 1.1s ease-in-out infinite;
}
@keyframes npc-chat-pulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 0.85; } }
.npc-chat-composer {
display: flex; align-items: flex-end; gap: 8px;
padding: 12px 14px; border-top: 1px solid var(--cc-edge-soft);
}
.npc-chat-input {
flex: 1; resize: none; max-height: 120px; font: inherit; font-size: 14px; line-height: 1.45;
background: var(--cc-bg2); color: var(--cc-text);
border: 1px solid var(--cc-edge); border-radius: var(--cc-radius-sm);
padding: 9px 11px; transition: border-color var(--duration-fast) var(--ease-standard), box-shadow var(--duration-fast) var(--ease-standard);
}
.npc-chat-input::placeholder { color: var(--cc-faint); }
.npc-chat-input:focus { outline: none; border-color: var(--cc-edge-hi); box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08); }
.npc-chat-input:disabled { opacity: 0.55; cursor: not-allowed; }
.npc-chat-send {
flex-shrink: 0; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer;
background: var(--cc-accent); color: var(--cc-ink); border: 1px solid var(--cc-accent);
border-radius: var(--cc-radius-sm); padding: 9px 16px;
transition: filter var(--duration-fast) var(--ease-standard), transform var(--duration-instant) var(--ease-standard);
}
.npc-chat-send:hover:not(:disabled) { filter: brightness(0.9); }
.npc-chat-send:active:not(:disabled) { transform: translateY(1px); }
.npc-chat-send:disabled { opacity: 0.6; cursor: progress; }
.npc-chat-send:focus-visible { outline: 2px solid var(--cc-edge-hi); outline-offset: 1px; }
@media (max-width: 520px) {
.npc-chat-overlay { padding: 0; }
.npc-chat-card { width: 100%; height: 88vh; border-radius: var(--cc-radius) var(--cc-radius) 0 0; border-bottom: none; }
}
@media (prefers-reduced-motion: reduce) {
.npc-chat-overlay, .npc-chat-card { transition: none; }
.npc-chat-msg.is-typing .npc-chat-text::after { animation: none; }
}
/* ── Dance floor button (R06) ──────────────────────────────────────────── */
/* Appears in the HUD only when the player is standing on the disco pad. */
#cc-hud .cc-dance-btn {
display: inline-flex; align-items: center; gap: 7px;
padding: 7px 16px 7px 12px;
background: rgba(170, 85, 255, 0.12);
border: 1px solid rgba(170, 85, 255, 0.32);
border-radius: var(--cc-radius);
color: var(--cc-text); font-size: 13px; font-weight: 600;
cursor: pointer; white-space: nowrap;
transition: background var(--duration-fast), border-color var(--duration-fast), box-shadow var(--duration-base), transform var(--duration-instant);
order: 5; /* sits after the voice button in the flex HUD */
}
#cc-hud .cc-dance-btn:hover {
background: rgba(170, 85, 255, 0.22);
border-color: rgba(170, 85, 255, 0.55);
}
#cc-hud .cc-dance-btn:active { transform: scale(0.96); }
#cc-hud .cc-dance-btn:focus-visible {
outline: 2px solid rgba(170, 85, 255, 0.8);
outline-offset: 2px;
}
/* Armed state: button glows with disco-purple when "Ready ✓" */
#cc-hud .cc-dance-btn.cc-on {
background: rgba(170, 85, 255, 0.30);
border-color: rgba(200, 120, 255, 0.75);
box-shadow: 0 0 14px rgba(180, 80, 255, 0.45);
}
.cc-dance-ico {
font-size: 16px; line-height: 1; flex-shrink: 0;
}
.cc-dance-label {
letter-spacing: 0.02em;
}
/* ── Emote wheel (R09) ──────────────────────────────────────────────────────
Hold Q (or tap ⋯) to open a full radial wheel that groups all manifest
clips into 5 category arcs. Design: monochrome + white glow, matching the
rest of the HUD. */
/* "More" launcher button in the quick tray */
.cc-emote-wheel-btn {
background: rgba(255, 255, 255, 0.08); border-color: var(--cc-edge);
font-size: 18px; font-weight: 700; letter-spacing: 0.06em; filter: none;
color: var(--cc-dim);
}
.cc-emote-wheel-btn:hover {
background: #fff; color: var(--cc-ink); border-color: #fff;
filter: none; transform: translateY(-3px); box-shadow: var(--cc-glow);
}
.cc-emote-wheel-btn:focus-visible { outline: 1px solid var(--cc-accent); outline-offset: 2px; }
/* Overlay, full screen, captures pointer events while wheel is open */
#cc-emote-wheel {
position: fixed; inset: 0; z-index: 50;
display: grid; place-items: center;
opacity: 0; transition: opacity var(--duration-base) var(--ease-standard); pointer-events: none;
}
#cc-emote-wheel.cc-on { opacity: 1; pointer-events: auto; }
/* Backdrop, semi-transparent blur, click closes without playing */
.cc-ew-bg {
position: absolute; inset: 0;
background: rgba(4, 4, 5, 0.72);
backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
/* Wheel container, all child elements position relative to this center */
.cc-ew-ring {
position: relative; z-index: 1;
width: 360px; height: 360px;
transform: scale(0.88); transition: transform var(--duration-base) var(--ease-standard);
}
#cc-emote-wheel.cc-on .cc-ew-ring { transform: scale(1); }
@media (prefers-reduced-motion: reduce) {
#cc-emote-wheel, .cc-ew-ring { transition: none; }
}
/* SVG background arcs */
.cc-ew-sectors {
position: absolute; inset: 0; width: 100%; height: 100%;
overflow: visible;
}
.cc-ew-sector {
fill: rgba(255, 255, 255, 0.05); stroke: rgba(255, 255, 255, 0.12);
stroke-width: 1; transition: fill var(--duration-fast) var(--ease-standard), stroke var(--duration-fast) var(--ease-standard);
}
.cc-ew-sector-active {
fill: rgba(255, 255, 255, 0.14); stroke: rgba(255, 255, 255, 0.55);
}
/* Category buttons, positioned via CSS custom properties set inline */
.cc-ew-cat-btn {
position: absolute; top: 50%; left: 50%;
transform: translate(calc(-50% + var(--ew-x)), calc(-50% + var(--ew-y)));
display: flex; flex-direction: column; align-items: center; gap: 4px;
background: rgba(255, 255, 255, 0.06); border: 1px solid var(--cc-edge);
border-radius: var(--cc-radius); padding: 8px 12px; cursor: pointer; font: inherit;
color: var(--cc-dim); transition: background var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard), transform var(--duration-fast) var(--ease-standard);
min-width: 60px;
/* Keep the button above the SVG arcs */
z-index: 2;
}
.cc-ew-cat-btn:hover, .cc-ew-cat-btn:focus-visible, .cc-ew-cat-btn.cc-on {
background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.5); color: #fff;
}
.cc-ew-cat-btn.cc-on {
background: rgba(255, 255, 255, 0.18); border-color: #fff;
box-shadow: 0 0 0 1px rgba(255,255,255,0.3), var(--cc-glow);
transform: translate(calc(-50% + var(--ew-x)), calc(-50% + var(--ew-y))) scale(1.06);
}
.cc-ew-cat-btn:focus-visible { outline: none; border-color: #fff; box-shadow: 0 0 0 1px #fff; }
.cc-ew-cat-ico { font-size: 20px; line-height: 1; }
.cc-ew-cat-lbl {
font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap;
}
/* Center label, shows selected category / emote name */
.cc-ew-center {
position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
display: flex; flex-direction: column; align-items: center; gap: 6px;
width: 96px; text-align: center; pointer-events: none; z-index: 2;
}
.cc-ew-center-ico { font-size: 26px; line-height: 1; min-height: 32px; display: block; }
.cc-ew-center-txt {
font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
color: var(--cc-dim); line-height: 1.3;
}
/* Per-category clip panels, shown as a scrollable grid below the ring */
.cc-ew-clips {
position: absolute; bottom: -12px; left: 50%;
transform: translateX(-50%);
width: min(480px, 92vw);
background: var(--cc-panel); border: 1px solid var(--cc-edge);
border-radius: var(--cc-radius); padding: 10px 10px 12px;
box-shadow: var(--cc-shadow); backdrop-filter: blur(12px);
display: flex; flex-wrap: wrap; gap: 5px; justify-content: center;
z-index: 3; max-height: 200px; overflow-y: auto;
animation: cc-ew-clips-in 0.16s ease;
}
.cc-ew-clips:not([hidden]) { display: flex; }
.cc-ew-clips[hidden] { display: none !important; }
@keyframes cc-ew-clips-in {
from { opacity: 0; transform: translateX(-50%) translateY(6px); }
to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@media (prefers-reduced-motion: reduce) { .cc-ew-clips { animation: none; } }
/* Individual clip buttons inside the panel */
.cc-ew-seg {
display: flex; flex-direction: column; align-items: center; gap: 3px;
width: 62px; padding: 7px 4px 6px; cursor: pointer; font: inherit;
background: rgba(255, 255, 255, 0.04); border: 1px solid transparent;
border-radius: var(--cc-radius-sm); color: var(--cc-dim);
transition: background var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard), transform var(--duration-instant) var(--ease-standard);
text-align: center;
}
.cc-ew-seg:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--cc-edge); color: var(--cc-text); transform: translateY(-2px); }
.cc-ew-seg.cc-on { background: rgba(255, 255, 255, 0.18); border-color: #fff; color: #fff; box-shadow: var(--cc-glow); }
.cc-ew-seg:focus-visible { outline: none; border-color: #fff; box-shadow: 0 0 0 1px #fff; }
.cc-ew-seg:active { transform: scale(0.93); }
.cc-ew-seg-ico { font-size: 18px; line-height: 1; }
.cc-ew-seg-lbl {
font-size: 9px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%;
}
/* Close button, top-right of the ring */
.cc-ew-close {
position: absolute; top: 4px; right: 4px; z-index: 4;
width: 28px; height: 28px; border-radius: var(--cc-radius-sm); cursor: pointer;
background: var(--cc-bg2); border: 1px solid var(--cc-edge); color: var(--cc-dim);
font-size: 16px; line-height: 1;
transition: border-color var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard), background var(--duration-fast) var(--ease-standard);
}
.cc-ew-close:hover { color: var(--cc-text); border-color: var(--cc-edge-hi); background: var(--cc-bg3); }
.cc-ew-close:focus-visible { outline: none; border-color: #fff; box-shadow: 0 0 0 1px #fff; }
/* Mobile: narrow the clip panel and shrink the ring a bit */
@media (max-width: 640px) {
.cc-ew-ring { width: 300px; height: 300px; }
.cc-ew-seg { width: 54px; }
.cc-ew-clips { max-height: 160px; }
}
/* ── end emote wheel ────────────────────────────────────────────────────────── */
/* ── Tag mini-game (R08) ────────────────────────────────────────────────────── */
/* "🏃 IT" floating label above a remote player who is "it" */
.cc-it-marker {
position: fixed; left: 0; top: 0; z-index: 18;
pointer-events: none;
/* Off-screen until the projection places it, for the same reason as .cc-label
above: anchored at left:0 with a -50% shift, it otherwise spends its first
frames straddling the left edge of the screen. */
transform: translate(-50%, -100%) translate(-9999px, -9999px);
background: rgba(220, 30, 30, 0.88);
color: #fff;
font-size: 11px; font-weight: 700; letter-spacing: 0.03em;
padding: 2px 7px; border-radius: 10px;
box-shadow: 0 0 8px rgba(255, 50, 50, 0.6);
white-space: nowrap;
transition: opacity var(--duration-base) var(--ease-standard);
}
/* Local player variant, slightly larger so they see it on themselves */
.cc-it-marker--local {
font-size: 12px; padding: 3px 10px;
background: rgba(220, 30, 30, 0.95);
}
/* Tag HUD panel, bottom-right, only visible when game is active */
#cc-tag-hud {
position: fixed; bottom: 88px; right: 12px; z-index: 40;
background: var(--cc-panel);
border: 1px solid var(--cc-edge);
border-radius: var(--cc-radius);
padding: 8px 12px;
min-width: 140px;
pointer-events: none;
}
.cc-tag-who {
font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
color: #ff4444; margin-bottom: 6px;
}
.cc-tag-label { color: var(--cc-dim); font-weight: 600; }
.cc-tag-name { color: #fff; }
.cc-tag-leaderboard {
display: flex; flex-direction: column; gap: 2px;
border-top: 1px solid var(--cc-edge); padding-top: 6px;
}
.cc-tag-row {
display: flex; justify-content: space-between; gap: 12px;
font-size: 10px; color: var(--cc-dim);
}
.cc-tag-me { color: var(--cc-text); font-weight: 600; }
.cc-tag-row-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 90px; }
.cc-tag-row-time { color: var(--cc-dim); white-space: nowrap; }
.cc-tag-me .cc-tag-row-time { color: #ff8888; }
/* "YOU'RE IT!" flash overlay, centered, only visible during the animation */
#cc-tag-alert {
position: fixed; top: 30%; left: 50%; transform: translateX(-50%);
z-index: 200; pointer-events: none;
background: rgba(200, 20, 20, 0.9);
color: #fff; font-size: 28px; font-weight: 900; letter-spacing: 0.04em;
padding: 12px 32px; border-radius: 14px;
box-shadow: 0 0 40px rgba(255, 40, 40, 0.5);
opacity: 0; transform: translateX(-50%) scale(0.8);
transition: opacity var(--duration-fast) var(--ease-standard), transform var(--duration-fast) var(--ease-standard);
}
#cc-tag-alert.cc-tag-alert--show {
opacity: 1; transform: translateX(-50%) scale(1);
}
@media (max-width: 640px) {
#cc-tag-hud { bottom: 110px; right: 8px; min-width: 120px; }
#cc-tag-alert { font-size: 22px; padding: 10px 22px; }
}
/* ── end tag mini-game ──────────────────────────────────────────────────────── */
/* ── King of the Totem mini-game (R07) ──────────────────────────────────────── */
#cc-king-hud {
position: fixed; top: 12px; left: 50%; transform: translateX(-50%);
z-index: 40; pointer-events: none;
width: 224px; max-width: calc(100vw - 24px);
background: var(--cc-panel);
border: 1px solid var(--cc-edge);
border-radius: var(--cc-radius);
box-shadow: var(--cc-shadow);
padding: 9px 12px 10px;
text-align: center;
backdrop-filter: blur(8px);
animation: cc-fade 0.25s ease;
}
.cc-king-head {
display: flex; align-items: center; justify-content: center; gap: 6px;
font-size: 10.5px; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase;
color: #ffce5c;
}
.cc-king-head-ico { font-size: 12px; filter: drop-shadow(0 0 5px rgba(255, 206, 92, 0.55)); }
.cc-king-clock { margin: 3px 0 1px; }
.cc-king-timer {
font-size: 30px; font-weight: 800; line-height: 1;
color: var(--cc-text);
font-variant-numeric: tabular-nums; letter-spacing: 0.01em;
}
.cc-king-timer.cc-king-low { color: #ff6b6b; animation: cc-king-low-pulse 1s ease-in-out infinite; }
@keyframes cc-king-low-pulse { 50% { opacity: 0.45; } }
.cc-king-timer-cap {
font-size: 9px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
color: var(--cc-faint); margin-top: 1px;
}
.cc-king-phase {
font-size: 11px; font-weight: 600; color: var(--cc-dim);
margin: 4px 0 7px; min-height: 14px;
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cc-king-board {
display: flex; flex-direction: column; gap: 2px;
border-top: 1px solid var(--cc-edge); padding-top: 7px;
}
.cc-king-row {
display: grid; grid-template-columns: 16px 1fr auto; align-items: center; gap: 8px;
font-size: 11px; color: var(--cc-dim);
padding: 2px 5px; border-radius: var(--cc-radius-sm);
transition: background var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard);
}
.cc-king-rank { color: var(--cc-faint); font-variant-numeric: tabular-nums; text-align: right; }
.cc-king-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.cc-king-score { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--cc-text); }
.cc-king-row--empty { color: var(--cc-faint); font-style: italic; grid-template-columns: 1fr; text-align: center; }
.cc-king-me { background: rgba(255, 255, 255, 0.07); color: var(--cc-text); }
.cc-king-me .cc-king-rank { color: var(--cc-dim); }
.cc-king-holding {
background: rgba(255, 206, 92, 0.12);
box-shadow: inset 0 0 0 1px rgba(255, 206, 92, 0.3);
}
.cc-king-holding .cc-king-name, .cc-king-holding .cc-king-score { color: #ffce5c; }
.cc-king-empty {
font-size: 11px; color: var(--cc-dim); line-height: 1.45;
padding: 4px 2px 2px; border-top: 1px solid var(--cc-edge);
}
/* The 👑 that floats above the current king's head (world-projected). */
.cc-king-crown {
position: fixed; z-index: 41; pointer-events: none;
transform: translate(-50%, -50%);
font-size: 22px; line-height: 1;
filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 8px rgba(255, 206, 92, 0.55));
animation: cc-king-crown-bob 1.6s ease-in-out infinite;
will-change: transform, top, left;
}
@keyframes cc-king-crown-bob { 50% { transform: translate(-50%, -64%); } }
/* Centre-screen winner flash. */
#cc-king-banner {
position: fixed; top: 28%; left: 50%; transform: translateX(-50%) scale(0.8);
z-index: 200; pointer-events: none; text-align: center;
background: linear-gradient(160deg, rgba(40, 32, 8, 0.94), rgba(18, 14, 4, 0.94));
border: 1px solid rgba(255, 206, 92, 0.55);
color: #fff; padding: 18px 38px; border-radius: 16px;
box-shadow: 0 0 50px rgba(255, 206, 92, 0.4);
opacity: 0;
transition: opacity var(--duration-base) var(--ease-standard), transform var(--duration-base) var(--ease-standard);
}
#cc-king-banner.cc-king-banner--show { opacity: 1; transform: translateX(-50%) scale(1); }
.cc-king-banner-crown { font-size: 42px; line-height: 1; filter: drop-shadow(0 0 14px rgba(255, 206, 92, 0.7)); animation: cc-king-crown-bob 1.6s ease-in-out infinite; }
.cc-king-banner-title { font-size: 21px; font-weight: 900; letter-spacing: 0.01em; margin-top: 6px; }
.cc-king-banner-sub { font-size: 14px; font-weight: 700; color: #ffce5c; margin-top: 3px; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
#cc-king-hud { top: 8px; width: 190px; padding: 8px 10px; }
.cc-king-timer { font-size: 26px; }
#cc-king-banner { padding: 14px 26px; }
.cc-king-banner-title { font-size: 18px; }
.cc-king-banner-crown { font-size: 34px; }
}
@media (prefers-reduced-motion: reduce) {
.cc-king-crown, .cc-king-banner-crown { animation: none; }
.cc-king-timer.cc-king-low { animation: none; }
}
/* ── end King of the Totem ──────────────────────────────────────────────────── */
/* ── Zen mode (hide all UI) ──────────────────────────────────────────────────
Z, the HUD button, or a ?ui=hidden link strips every overlay (banner, chat,
world HUD, hotbar, prompts, name tags) so the world renders clean for
screenshots and ambient play. Movement affordances survive (the joystick and
the driving pedal cluster), and panels the player opens on purpose (build
palettes, shops, boards, the emote wheel) still show. Same body.is-zen
contract as /walk and the marketplace gallery. */
body.is-zen #cc-hud > :not(#cc-joystick):not(#cc-photo-btn),
body.is-zen .cc-nav-toggle,
body.is-zen .cc-nav-drawer,
body.is-zen #cc-tag-hud,
body.is-zen #cc-tag-alert,
body.is-zen #cc-king-hud,
body.is-zen #cc-king-banner,
body.is-zen #cc-toast,
body.is-zen .cc-label,
body.is-zen .cc-bubble,
body.is-zen #wh-hud,
body.is-zen .wh-minimap,
body.is-zen .wh-feel-money,
body.is-zen .wh-feel-flourish,
body.is-zen #ps-hud,
body.is-zen .ps-action,
body.is-zen .ps-xp-float,
body.is-zen .ps-levelup,
body.is-zen .veh-prompt,
body.is-zen .combat-prompt,
body.is-zen .combat-attack-btn,
body.is-zen .combat-mob-label,
body.is-zen .combat-zone-label,
body.is-zen .tik-prompt,
body.is-zen .ac-prompt,
body.is-zen #cc-build,
body.is-zen #po-strip,
body.is-zen .cc-it-marker,
body.is-zen .twx-i18n-fab {
display: none !important;
}
/* zen toggle: under the power saver, same visual family */
.cc-zen-btn {
position: fixed; top: 184px; right: 14px; z-index: 22;
display: inline-flex; align-items: center; gap: 8px;
background: var(--cc-panel); border: 1px solid var(--cc-edge); border-radius: var(--cc-radius);
padding: 8px 13px 8px 11px; color: var(--cc-dim); cursor: pointer;
font-weight: 600; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
box-shadow: var(--cc-shadow); backdrop-filter: blur(10px);
transition: border-color var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard), background var(--duration-fast) var(--ease-standard);
}
.cc-zen-btn:hover { border-color: var(--cc-edge-hi); color: var(--cc-text); background: rgba(255, 255, 255, 0.05); }
.cc-zen-btn:focus-visible { outline: none; border-color: var(--cc-edge-hi); box-shadow: 0 0 0 1px var(--cc-edge-hi); }
.cc-zen-ico { line-height: 1; filter: grayscale(1); }
.cc-zen-label { line-height: 1; }
/* zen exit pill: the one control left on screen, faded in a frame after entry */
#cc-zen-exit {
position: fixed; z-index: 30;
top: calc(env(safe-area-inset-top, 0px) + 14px); right: 14px;
display: none; align-items: center; gap: 7px;
appearance: none; border: 1px solid var(--cc-edge);
background: var(--cc-panel); color: var(--cc-dim);
font: inherit; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
padding: 8px 13px; border-radius: 999px; cursor: pointer;
backdrop-filter: blur(10px); box-shadow: var(--cc-shadow);
opacity: 0;
transition: opacity var(--duration-base) var(--ease-standard), color var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard), background var(--duration-fast) var(--ease-standard);
}
body.is-zen #cc-zen-exit { display: inline-flex; }
body.is-zen.zen-revealed #cc-zen-exit { opacity: 0.85; }
#cc-zen-exit:hover { color: var(--cc-text); border-color: var(--cc-edge-hi); background: rgba(255, 255, 255, 0.05); opacity: 1; }
#cc-zen-exit:focus-visible { outline: none; border-color: var(--cc-edge-hi); box-shadow: 0 0 0 1px var(--cc-edge-hi); opacity: 1; }
#cc-zen-exit svg { width: 14px; height: 14px; display: block; }
@media (prefers-reduced-motion: reduce) {
#cc-zen-exit { transition: none; }
}
/* ============================================================================
Accessibility floor
----------------------------------------------------------------------------
/play builds its chrome from ~15 JS modules, each shipping its own
stylesheet. Component-level rules cover most of this surface, but "most" is
how a keyboard user ends up on an invisible focus ring in the one panel
nobody styled. These are the guarantees that hold for the whole page, placed
last so they apply wherever a component did not already do better.
========================================================================= */
/* 1. Nothing focusable is invisible.
Bare-element specificity on purpose: every bespoke `.cc-x:focus-visible`
ring in this file outranks it, so this only fills the gaps. */
a[href]:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible,
[role="button"]:focus-visible,
[role="tab"]:focus-visible {
outline: 2px solid var(--cc-accent);
outline-offset: 2px;
}
/* 2. Text inputs signalled focus with a 1px border-colour change alone, which
is easy to miss against a moving 3D scene. Keep the border tint and add a
real ring. `:focus-visible` so a pointer click doesn't draw one. */
.cc-search input:focus-visible,
.cc-chat-input input:focus-visible,
.cc-avatar-custom input:focus-visible,
.cc-name-input:focus-visible,
.cc-prop-search:focus-visible,
.cc-forge-prompt:focus-visible,
.cc-share-title:focus-visible,
.npc-svc-input:focus-visible,
.npc-chat-input:focus-visible {
outline: 2px solid var(--cc-accent);
outline-offset: 1px;
}
/* 3. The world canvas is a tab stop (see pages/play.html). Keyboard players
have to be able to see when the world, rather than the HUD, has the keys,
inset so a full-viewport outline is not clipped by the window edge. */
#kx-canvas:focus-visible {
outline: 3px solid var(--cc-accent);
outline-offset: -3px;
}
/* 4. Text scaling. At 200% browser zoom the HUD has half the room, so the
fixed-width panels have to become elastic instead of clipping their labels.
Driven off viewport height because that is what browser zoom shrinks. */
@media (max-height: 560px), (max-width: 900px) {
#cc-chat { max-height: min(46vh, 340px); }
.cc-coin-banner { flex-wrap: wrap; row-gap: 6px; max-width: calc(100vw - 24px); }
#cc-hint { display: none; }
}
/* 5. Reduced motion, page-wide. Individual components below/above tune their
own effects; this is the backstop that catches every decorative animation
the /play surface loads from its sibling stylesheets (economy, jobs board,
wheel, combat, photo mode) without each of them having to remember. Motion
that carries meaning is handled in JS instead: camera shake and the wheel's
spin flourish read prefers-reduced-motion directly (src/game/a11y.js). */
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: var(--duration-instant) !important;
scroll-behavior: auto !important;
}
/* Pulses and sweeps are pure decoration: stop them outright rather than
compressing them into a one-frame strobe. */
.cc-dot,
.cc-live-dot,
.kx-boot-bar span,
.cc-skel,
.ec-skel-line,
.cc-avsw-skel {
animation: none !important;
}
}
/* ── Touch targets on a coarse pointer ─────────────────────────────────────────
Measured with scripts/play-journey-audit.mjs at 375px: the whole world HUD and
the lobby's sort chips painted at 26-36px tall, under the 40px a thumb needs,
so every one of them was a near-miss waiting to happen on the device most of
this surface's players arrive on. The desktop density is deliberate and stays
exactly as it is; these bumps apply only where the pointer is coarse.
`min-*` clamps a fixed `width`/`height`, so the square closers grow too. */
@media (pointer: coarse) {
/* Lobby */
.cc-sort { min-height: 40px; }
/* World HUD bar and the fixed right-edge stack */
.cc-shop-btn, .cc-wardrobe-btn, .cc-avatarbtn, .cc-jobs-btn, .cc-friends-btn,
.cc-buy-btn, .cc-leave, .cc-voice, .cc-power-btn, .cc-zen-btn,
.cc-build-toggle, .cc-chat-head, #cc-status, .cc-photo-hud-btn {
min-height: 40px;
}
/* Emote and reaction trays: the reaction pills were the smallest of all. */
.cc-reaction { min-width: 40px; min-height: 40px; }
/* Panel chrome: closers, tabs, filter chips, primary actions. */
.cc-shop-close, .cc-ew-close, .cc-shop-flex, .cc-friends-panel-close {
min-width: 40px; min-height: 40px;
}
.cc-shop-chip, .cc-shop-buy, .cc-friends-panel-crew { min-height: 40px; }
}
/* ── Interactive states (QB-07) ────────────────────────────────────────────
Five controls set cursor: pointer and answered nothing. Three of them are
retry affordances: the offline/failed connection chip and the failed
property status are click-to-reconnect, and with no hover they read as
labels rather than as the way out of the failure. The unavailable state is
deliberately excluded, because it is a passive readout and already declares
cursor: default. */
#cc-status[data-state="offline"],
#cc-status[data-state="failed"],
.cc-prop-gstatus.cc-err,
.cc-shop-thumb-btn,
select.npc-svc-input {
transition:
background var(--duration-fast) var(--ease-standard),
border-color var(--duration-fast) var(--ease-standard),
color var(--duration-fast) var(--ease-standard);
}
#cc-status[data-state="offline"]:hover,
#cc-status[data-state="failed"]:hover {
color: var(--ink);
border-color: var(--cc-edge-soft);
}
.cc-prop-gstatus.cc-err:hover {
color: var(--danger);
text-decoration: underline;
}
.cc-shop-thumb-btn:hover {
background: var(--surface-1);
}
select.npc-svc-input:hover {
border-color: var(--stroke-strong);
}