/* ==========================================================================
   app-next — UX preview demo
   Surface goals:
   1. The avatar is the page. Stage, not chrome.
   2. One CTA hierarchy. No competing sign-in / save / upload mid-screen.
   3. Animation strip is an invitation, not a control panel.
   ========================================================================== */

:root {
	--nxt-bg-0: #000000;
	--nxt-bg-1: #0a0a0a;
	--nxt-ink: #e8e8e8;
	--nxt-ink-dim: #888888;
	--nxt-ink-fade: #555555;
	--nxt-accent: #ffffff;
	--nxt-accent-soft: rgba(255, 255, 255, 0.10);
	--nxt-glass: rgba(0, 0, 0, 0.55);
	--nxt-glass-strong: rgba(0, 0, 0, 0.82);
	--nxt-stroke: rgba(255, 255, 255, 0.07);
	--nxt-stroke-strong: rgba(255, 255, 255, 0.13);
	--nxt-radius: 14px;
	--nxt-radius-sm: 10px;
	--nxt-radius-pill: 999px;
	--nxt-header-h: 56px;
}

/* ── Body / shell ──────────────────────────────────────────────────────── */

html,
body {
	height: 100%;
}

body.app-next-body {
	margin: 0;
	background:
		/* Soft luminous lift behind the avatar */
		radial-gradient(ellipse 50% 35% at 50% 38%, rgba(255, 255, 255, 0.04) 0%, transparent 70%),
		/* Base depth gradient */
		radial-gradient(ellipse 90% 70% at 50% 60%, #0e0e0e 0%, #080808 55%, #020202 100%);
	color: var(--nxt-ink);
	font-family: 'Inter', system-ui, -apple-system, sans-serif;
	overflow: hidden;
}

/* Hide every chrome element produced by the production app.js that the
   demo overrides. None of these are required for the viewer to work. */
body.app-next-body #agent-presence-sidebar,
body.app-next-body #auth-gate,
body.app-next-body #agent-onboarding,
body.app-next-body .dropzone,
body.app-next-body footer,
body.app-next-body .h-footer,
body.app-next-body .phi-grid,
body.app-next-body .phi-grid-label,
body.app-next-body .anim-panel,
body.app-next-body .agent-presence-sidebar,
body.app-next-body .save-toast,
body.app-next-body .controls-toggle,
body.app-next-body .gui-toggle,
body.app-next-body .gui-wrap,
body.app-next-body .ar-btn,
body.app-next-body .nich-toggle {
	display: none !important;
}

/* When NichAgent's panel is open (manually opened by overlay) restyle it to
   match the dock — same glass, same accent. Override its absolute positioning
   so it docks above the chat input rather than floating mid-screen. */
body.app-next-body .nich-panel {
	border-radius: 18px;
	border-color: rgba(255, 255, 255, 0.08);
	background: rgba(14, 15, 22, 0.92);
	backdrop-filter: blur(22px) saturate(140%);
	-webkit-backdrop-filter: blur(22px) saturate(140%);
	box-shadow: 0 28px 80px rgba(0, 0, 0, 0.6);
}

body.app-next-body.nxt-chat-open .nxt-chat-dock {
	z-index: 23;
}

/* Override style.css `body { display: flex }` since we manage layout ourselves */
body.app-next-body {
	display: block;
}

/* ── Header ────────────────────────────────────────────────────────────── */

.nxt-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: var(--nxt-header-h);
	padding: 0 18px 0 14px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: linear-gradient(180deg, rgba(5, 6, 8, 0.85) 0%, rgba(5, 6, 8, 0.55) 60%, rgba(5, 6, 8, 0) 100%);
	backdrop-filter: blur(14px) saturate(140%);
	-webkit-backdrop-filter: blur(14px) saturate(140%);
	z-index: 30;
	pointer-events: none; /* let clicks through to the canvas in dead space */
}

.nxt-header > * {
	pointer-events: auto;
}

.nxt-brand {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	text-decoration: none;
	color: var(--nxt-ink);
	font-weight: 600;
	letter-spacing: -0.01em;
	font-size: 15px;
	padding: 6px 10px 6px 6px;
	border-radius: var(--nxt-radius-pill);
	transition: background 0.15s;
}

.nxt-brand:hover {
	background: rgba(255, 255, 255, 0.05);
}

.nxt-brand-mark {
	width: 24px;
	height: 24px;
	display: block;
}

.nxt-brand-tag {
	font-size: 10.5px;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--nxt-ink-dim);
	background: rgba(255, 255, 255, 0.06);
	padding: 3px 8px;
	border-radius: var(--nxt-radius-pill);
	margin-left: 4px;
}

.nxt-header-right {
	display: flex;
	align-items: center;
	gap: 8px;
}

.nxt-more {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: transparent;
	border: 0;
	color: var(--nxt-ink-dim);
	font: inherit;
	font-size: 13.5px;
	padding: 7px 12px;
	border-radius: var(--nxt-radius-pill);
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
}

.nxt-more:hover {
	color: var(--nxt-ink);
	background: rgba(255, 255, 255, 0.05);
}

.nxt-more svg {
	transition: transform 0.18s;
}

.nxt-more[aria-expanded='true'] svg {
	transform: rotate(180deg);
}

.nxt-more-menu {
	position: fixed;
	top: var(--nxt-header-h);
	right: 12px;
	min-width: 200px;
	max-width: calc(100vw - 24px);
	padding: 6px;
	background: var(--nxt-glass-strong);
	border: 1px solid var(--nxt-stroke);
	border-radius: var(--nxt-radius);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	box-shadow: 0 22px 60px rgba(0, 0, 0, 0.5);
	display: flex;
	flex-direction: column;
	gap: 2px;
	z-index: 40;
}

.nxt-more-menu[hidden] { display: none; }

.nxt-more-menu a,
.nxt-more-menu button {
	display: block;
	background: transparent;
	border: 0;
	color: var(--nxt-ink-dim);
	font: inherit;
	font-size: 13.5px;
	text-decoration: none;
	text-align: left;
	padding: 9px 12px;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.12s, color 0.12s;
}

.nxt-more-menu a:hover,
.nxt-more-menu button:hover {
	color: var(--nxt-ink);
	background: rgba(255, 255, 255, 0.05);
}

.nxt-more-sep {
	height: 1px;
	background: var(--nxt-stroke);
	margin: 4px 4px;
}

/* Auth surface */
.nxt-auth {
	position: relative;
}

.nxt-signin {
	display: inline-flex;
	align-items: center;
	background: rgba(255, 255, 255, 0.06);
	color: var(--nxt-ink);
	font-size: 13.5px;
	font-weight: 500;
	padding: 7px 14px;
	border-radius: var(--nxt-radius-pill);
	text-decoration: none;
	border: 1px solid var(--nxt-stroke);
	transition: background 0.15s, border-color 0.15s;
}

.nxt-signin:hover {
	background: rgba(255, 255, 255, 0.1);
	border-color: var(--nxt-stroke-strong);
}

.nxt-user-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: rgba(255, 255, 255, 0.06);
	color: var(--nxt-ink);
	border: 1px solid var(--nxt-stroke);
	font: inherit;
	font-size: 13.5px;
	font-weight: 500;
	padding: 6px 12px 6px 10px;
	border-radius: var(--nxt-radius-pill);
	cursor: pointer;
}

.nxt-user-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--nxt-ink);
	box-shadow: 0 0 6px rgba(255, 255, 255, 0.3);
}

.nxt-user-menu {
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	min-width: 200px;
	padding: 6px;
	background: var(--nxt-glass-strong);
	border: 1px solid var(--nxt-stroke);
	border-radius: var(--nxt-radius);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	box-shadow: 0 22px 60px rgba(0, 0, 0, 0.5);
	z-index: 40;
}

.nxt-user-menu[hidden] { display: none; }

.nxt-user-menu a,
.nxt-user-menu button {
	display: block;
	background: transparent;
	border: 0;
	color: var(--nxt-ink-dim);
	font: inherit;
	font-size: 13.5px;
	text-align: left;
	padding: 9px 12px;
	border-radius: 8px;
	cursor: pointer;
	text-decoration: none;
	width: 100%;
}

.nxt-user-menu a:hover,
.nxt-user-menu button:hover {
	color: var(--nxt-ink);
	background: rgba(255, 255, 255, 0.05);
}

.nxt-user-sep {
	height: 1px;
	background: var(--nxt-stroke);
	margin: 4px 4px;
}

/* ── Stage / Main ──────────────────────────────────────────────────────── */

.nxt-main {
	position: fixed;
	inset: 0;
	width: 100vw;
	height: 100vh;
	min-height: 100vh;
	display: block;
}

.nxt-viewer {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	min-height: 0;
	/* Sit above the CSS stage layers so the avatar reads first, but allow the
	   floor glow to shine through the transparent canvas via blend-mode. */
	z-index: 4;
	background: transparent;
	pointer-events: auto;
}

.nxt-viewer canvas {
	display: block;
	width: 100% !important;
	height: 100% !important;
}

/* Floor glow: a layered pool of light under the avatar's feet, painted
   BEHIND the transparent canvas. The overlay JS flips viewer.state.transparentBg
   so non-avatar pixels reveal these layers. */
.nxt-stage-floor {
	position: absolute;
	left: 50%;
	bottom: 8%;
	width: 88vmin;
	height: 32vmin;
	transform: translate(-50%, 18%);
	background:
		/* Inner soft light pool */
		radial-gradient(
			ellipse 40% 35% at center,
			rgba(255, 255, 255, 0.22) 0%,
			rgba(255, 255, 255, 0.06) 35%,
			rgba(0, 0, 0, 0) 70%
		),
		/* Outer ambient halo */
		radial-gradient(
			ellipse 90% 70% at center,
			rgba(255, 255, 255, 0.04) 0%,
			rgba(0, 0, 0, 0) 65%
		);
	pointer-events: none;
	z-index: 2;
	filter: blur(3px);
}

/* Thin ring directly under the avatar — a subtle "agent base" hint */
.nxt-stage-floor::after {
	content: '';
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -45%);
	width: 32vmin;
	height: 32vmin;
	border-radius: 50%;
	background: radial-gradient(
		circle at center,
		rgba(255, 255, 255, 0.0) 30%,
		rgba(255, 255, 255, 0.12) 55%,
		rgba(255, 255, 255, 0.0) 70%
	);
	filter: blur(0.5px);
	opacity: 0.7;
}

/* Vignette — pulls the eye inward, fades to deep black at the edges */
.nxt-stage-vignette {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 3;
	background:
		radial-gradient(
			ellipse 70% 80% at center,
			transparent 30%,
			rgba(0, 0, 0, 0.55) 78%,
			rgba(0, 0, 0, 0.85) 100%
		);
}

/* ── Action bar ────────────────────────────────────────────────────────── */

.nxt-action-bar {
	position: fixed;
	left: 50%;
	bottom: 24px;
	transform: translateX(-50%);
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px;
	background: var(--nxt-glass-strong);
	border: 1px solid var(--nxt-stroke);
	border-radius: var(--nxt-radius-pill);
	backdrop-filter: blur(16px) saturate(140%);
	-webkit-backdrop-filter: blur(16px) saturate(140%);
	box-shadow: 0 28px 64px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
	z-index: 21;
	animation: nxt-rise-bar 0.5s 0.2s both;
}

@keyframes nxt-rise-bar {
	from { opacity: 0; transform: translate(-50%, 14px); }
	to { opacity: 1; transform: translate(-50%, 0); }
}

.nxt-action {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: transparent;
	color: var(--nxt-ink-dim);
	border: 0;
	font: inherit;
	font-size: 13.5px;
	font-weight: 500;
	padding: 9px 14px;
	border-radius: var(--nxt-radius-pill);
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.15s, color 0.15s, transform 0.15s;
}

.nxt-action svg { flex: none; }

.nxt-action kbd {
	font: 10.5px 'SF Mono', ui-monospace, monospace;
	color: var(--nxt-ink-fade);
	background: rgba(255, 255, 255, 0.06);
	padding: 2px 6px;
	border-radius: 5px;
	border: 1px solid var(--nxt-stroke);
	letter-spacing: 0.04em;
	margin-left: 2px;
}

.nxt-action--ghost:hover {
	color: var(--nxt-ink);
	background: rgba(255, 255, 255, 0.06);
}

.nxt-action--primary {
	background: var(--nxt-ink);
	color: #0a0a0a;
	box-shadow: 0 6px 18px rgba(255, 255, 255, 0.12);
}

.nxt-action--primary:hover {
	transform: translateY(-1px);
	box-shadow: 0 10px 22px rgba(255, 255, 255, 0.18);
}

.nxt-action--primary kbd {
	background: rgba(255, 255, 255, 0.18);
	color: rgba(255, 255, 255, 0.85);
	border-color: rgba(255, 255, 255, 0.25);
}

/* ── Deploy on-chain action ────────────────────────────────────────────── */
.nxt-action--deploy {
	text-decoration: none;
	color: var(--nxt-ink);
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.14);
	box-shadow: 0 0 0 0 transparent;
	position: relative;
}

.nxt-action--deploy:hover {
	background: rgba(255, 255, 255, 0.10);
	border-color: rgba(255, 255, 255, 0.22);
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.nxt-action--deploy::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 14px;
	width: 6px;
	height: 6px;
	border-radius: 999px;
	background: var(--nxt-ink-dim);
	box-shadow: 0 0 6px rgba(255, 255, 255, 0.3);
	transform: translateY(-50%);
	opacity: 0;
	pointer-events: none;
}

.nxt-action--deploy.is-deployed {
	color: var(--nxt-ink);
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.20);
}

.nxt-action--deploy.is-deployed:hover {
	background: rgba(255, 255, 255, 0.12);
	border-color: rgba(255, 255, 255, 0.28);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.nxt-action--deploy.is-deployed::before {
	background: var(--nxt-ink);
	box-shadow: 0 0 6px rgba(255, 255, 255, 0.4);
}

.nxt-hidden-hosts { display: none !important; }

/* ── Animation picker sheet ────────────────────────────────────────────── */

.nxt-anim-sheet {
	position: fixed;
	left: 50%;
	bottom: 92px;
	transform: translateX(-50%);
	width: min(720px, calc(100vw - 32px));
	max-height: 60vh;
	display: flex;
	flex-direction: column;
	background: var(--nxt-glass-strong);
	border: 1px solid var(--nxt-stroke);
	border-radius: 18px;
	backdrop-filter: blur(22px) saturate(140%);
	-webkit-backdrop-filter: blur(22px) saturate(140%);
	box-shadow: 0 28px 80px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
	z-index: 25;
	overflow: hidden;
	animation: nxt-sheet-up 0.22s ease-out both;
}

.nxt-anim-sheet[hidden] { display: none; }

@keyframes nxt-sheet-up {
	from { opacity: 0; transform: translate(-50%, 10px); }
	to { opacity: 1; transform: translate(-50%, 0); }
}

.nxt-anim-sheet__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 18px 8px;
}

.nxt-anim-sheet__head h2 {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	color: var(--nxt-ink);
	letter-spacing: 0.02em;
}

.nxt-anim-sheet__close {
	background: transparent;
	border: 0;
	color: var(--nxt-ink-fade);
	font-size: 22px;
	line-height: 1;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
}

.nxt-anim-sheet__close:hover {
	color: var(--nxt-ink);
	background: rgba(255, 255, 255, 0.06);
}

.nxt-anim-sheet__filter {
	padding: 0 18px 12px;
}

.nxt-anim-search {
	width: 100%;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid var(--nxt-stroke);
	border-radius: 10px;
	color: var(--nxt-ink);
	font: inherit;
	font-size: 13.5px;
	padding: 9px 12px;
	outline: none;
	transition: border-color 0.15s, background 0.15s;
}

.nxt-anim-search:focus {
	border-color: rgba(255, 255, 255, 0.22);
	background: rgba(255, 255, 255, 0.08);
}

.nxt-anim-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
	gap: 6px;
	padding: 0 12px 14px;
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.nxt-anim-grid::-webkit-scrollbar {
	width: 8px;
}
.nxt-anim-grid::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.12);
	border-radius: 4px;
}

.nxt-anim-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 12px 8px 10px;
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.05);
	border-radius: 10px;
	color: var(--nxt-ink);
	cursor: pointer;
	font: inherit;
	font-size: 11.5px;
	text-align: center;
	line-height: 1.3;
	transition: background 0.12s, border-color 0.12s, transform 0.12s;
}

.nxt-anim-card:hover {
	background: rgba(255, 255, 255, 0.07);
	border-color: rgba(255, 255, 255, 0.12);
	transform: translateY(-1px);
}

.nxt-anim-card[aria-pressed='true'] {
	background: rgba(255, 255, 255, 0.10);
	border-color: rgba(255, 255, 255, 0.22);
	color: var(--nxt-ink);
}

.nxt-anim-card__icon {
	font-size: 22px;
	line-height: 1;
}

.nxt-anim-empty {
	grid-column: 1 / -1;
	text-align: center;
	color: var(--nxt-ink-fade);
	padding: 28px 12px;
	font-size: 13px;
}

/* ── Drag-over overlay ─────────────────────────────────────────────────── */

body.app-next-body.is-dragover::before {
	content: 'Drop to load model';
	position: fixed;
	inset: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--nxt-ink);
	background: rgba(255, 255, 255, 0.03);
	border: 2px dashed rgba(255, 255, 255, 0.25);
	border-radius: 16px;
	z-index: 50;
	pointer-events: none;
}

/* ── First-visit hint ──────────────────────────────────────────────────── */

.nxt-first-hint {
	position: fixed;
	top: calc(var(--nxt-header-h) + 14px);
	left: 50%;
	transform: translateX(-50%);
	display: inline-flex;
	align-items: center;
	gap: 12px;
	padding: 8px 8px 8px 14px;
	background: var(--nxt-glass-strong);
	border: 1px solid var(--nxt-stroke);
	border-radius: var(--nxt-radius-pill);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	font-size: 12.5px;
	color: var(--nxt-ink-dim);
	z-index: 22;
	animation: nxt-rise 0.5s 0.8s both;
}

.nxt-first-hint[hidden] { display: none; }

.nxt-first-hint button {
	background: transparent;
	border: 0;
	color: var(--nxt-ink-fade);
	width: 22px;
	height: 22px;
	border-radius: 50%;
	cursor: pointer;
	font-size: 18px;
	line-height: 1;
}

.nxt-first-hint button:hover {
	color: var(--nxt-ink);
	background: rgba(255, 255, 255, 0.06);
}

/* ── Spinner ───────────────────────────────────────────────────────────── */

.spinner {
	position: fixed;
	top: 50%;
	left: 50%;
	width: 36px;
	height: 36px;
	margin: -18px 0 0 -18px;
	border-radius: 50%;
	border: 2.5px solid rgba(255, 255, 255, 0.08);
	border-top-color: var(--nxt-ink);
	animation: nxt-spin 0.8s linear infinite;
	z-index: 5;
	pointer-events: none;
}

@keyframes nxt-spin {
	to { transform: rotate(360deg); }
}

/* ── Camera presets ────────────────────────────────────────────────────── */

.nxt-preset-cluster {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	padding: 3px;
	background: rgba(14, 15, 22, 0.5);
	border: 1px solid var(--nxt-stroke);
	border-radius: var(--nxt-radius-pill);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
}

.nxt-preset {
	background: transparent;
	border: 0;
	color: var(--nxt-ink-fade);
	font: inherit;
	font-size: 12px;
	font-weight: 500;
	padding: 5px 11px;
	border-radius: var(--nxt-radius-pill);
	cursor: pointer;
	transition: color 0.15s, background 0.15s;
}

.nxt-preset:hover {
	color: var(--nxt-ink);
}

.nxt-preset.is-active {
	color: var(--nxt-ink);
	background: rgba(255, 255, 255, 0.08);
}

/* ── Icon buttons (fullscreen, share) ──────────────────────────────────── */

.nxt-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	background: rgba(14, 15, 22, 0.5);
	border: 1px solid var(--nxt-stroke);
	border-radius: 50%;
	color: var(--nxt-ink-dim);
	cursor: pointer;
	transition: color 0.15s, background 0.15s, border-color 0.15s;
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
}

.nxt-icon-btn:hover {
	color: var(--nxt-ink);
	background: rgba(255, 255, 255, 0.06);
	border-color: var(--nxt-stroke-strong);
}

/* ── Chat dock ─────────────────────────────────────────────────────────── */

.nxt-chat-dock {
	position: fixed;
	left: 50%;
	bottom: 76px;
	transform: translateX(-50%);
	width: min(640px, calc(100vw - 32px));
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 8px;
	z-index: 21;
	animation: nxt-rise-bar 0.5s 0.2s both;
}

.nxt-chat-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	justify-content: center;
}

.nxt-chat-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: rgba(14, 15, 22, 0.7);
	border: 1px solid var(--nxt-stroke);
	color: var(--nxt-ink-dim);
	font: inherit;
	font-size: 12.5px;
	padding: 6px 12px;
	border-radius: var(--nxt-radius-pill);
	cursor: pointer;
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	transition: color 0.15s, background 0.15s, border-color 0.15s, transform 0.15s;
}

.nxt-chat-chip:hover {
	color: var(--nxt-ink);
	border-color: rgba(255, 255, 255, 0.16);
	background: rgba(255, 255, 255, 0.06);
	transform: translateY(-1px);
}

.nxt-chat-chip__icon {
	font-size: 14px;
	line-height: 1;
}

.nxt-chat-input-wrap {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 6px 6px 6px 14px;
	background: var(--nxt-glass-strong);
	border: 1px solid var(--nxt-stroke);
	border-radius: 14px;
	backdrop-filter: blur(20px) saturate(140%);
	-webkit-backdrop-filter: blur(20px) saturate(140%);
	box-shadow: 0 28px 64px rgba(0, 0, 0, 0.55);
	transition: border-color 0.15s, box-shadow 0.15s;
}

.nxt-chat-input-wrap:focus-within {
	border-color: rgba(255, 255, 255, 0.20);
	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06), 0 28px 64px rgba(0, 0, 0, 0.55);
}

.nxt-chat-input-icon {
	flex: none;
	color: var(--nxt-ink-fade);
}

.nxt-chat-input {
	flex: 1;
	min-width: 0;
	background: transparent;
	border: 0;
	color: var(--nxt-ink);
	font: inherit;
	font-size: 14px;
	padding: 8px 4px;
	outline: none;
}

.nxt-chat-input::placeholder {
	color: var(--nxt-ink-fade);
}

.nxt-chat-mic,
.nxt-chat-send {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	transition: background 0.15s, color 0.15s, transform 0.15s;
}

.nxt-chat-mic {
	background: rgba(255, 255, 255, 0.05);
	color: var(--nxt-ink-dim);
}

.nxt-chat-mic:hover,
.nxt-chat-mic.is-active {
	color: var(--nxt-ink);
	background: rgba(255, 255, 255, 0.1);
}

.nxt-chat-mic.is-recording {
	background: var(--nxt-ink);
	color: #0a0a0a;
	animation: nxt-mic-pulse 1.2s ease-in-out infinite;
}

@keyframes nxt-mic-pulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.3); }
	50% { box-shadow: 0 0 0 8px rgba(255, 255, 255, 0); }
}

.nxt-chat-send {
	background: var(--nxt-ink);
	color: #0a0a0a;
	box-shadow: 0 4px 12px rgba(255, 255, 255, 0.10);
}

.nxt-chat-send:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(255, 255, 255, 0.16);
}

.nxt-chat-send:disabled,
.nxt-chat-mic:disabled {
	opacity: 0.4;
	cursor: not-allowed;
	transform: none;
}

/* ── Secondary action bar — smaller, below the chat dock ───────────────── */

.nxt-action-bar--secondary {
	bottom: 18px;
	padding: 4px;
	box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
}

.nxt-action-bar--secondary .nxt-action {
	padding: 7px 12px;
	font-size: 12.5px;
}

/* ── Agent reply bubble (above the avatar) ─────────────────────────────── */

.nxt-agent-bubble {
	position: fixed;
	left: 50%;
	top: 18%;
	transform: translateX(-50%);
	max-width: min(540px, calc(100vw - 40px));
	z-index: 19;
	animation: nxt-bubble-in 0.32s ease-out both;
}

.nxt-agent-bubble[hidden] { display: none; }

@keyframes nxt-bubble-in {
	from { opacity: 0; transform: translate(-50%, -8px); }
	to { opacity: 1; transform: translate(-50%, 0); }
}

.nxt-agent-bubble__inner {
	display: inline-flex;
	align-items: flex-start;
	gap: 10px;
	padding: 12px 18px;
	background: var(--nxt-glass-strong);
	border: 1px solid rgba(255, 255, 255, 0.10);
	border-radius: 18px;
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.nxt-agent-bubble__dot {
	flex: none;
	width: 8px;
	height: 8px;
	margin-top: 6px;
	border-radius: 50%;
	background: var(--nxt-ink);
	box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.nxt-agent-bubble__text {
	font-size: 14px;
	line-height: 1.45;
	color: var(--nxt-ink);
}

/* ── Share popover ────────────────────────────────────────────────────── */

.nxt-share-popover {
	position: fixed;
	top: calc(var(--nxt-header-h) + 12px);
	right: 18px;
	width: min(380px, calc(100vw - 32px));
	background: var(--nxt-glass-strong);
	border: 1px solid var(--nxt-stroke);
	border-radius: 16px;
	backdrop-filter: blur(20px) saturate(140%);
	-webkit-backdrop-filter: blur(20px) saturate(140%);
	box-shadow: 0 28px 60px rgba(0, 0, 0, 0.6);
	z-index: 35;
	overflow: hidden;
	animation: nxt-share-in 0.18s ease-out both;
}

.nxt-share-popover[hidden] { display: none; }

@keyframes nxt-share-in {
	from { opacity: 0; transform: translateY(-6px); }
	to { opacity: 1; transform: translateY(0); }
}

.nxt-share-popover__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 16px 6px;
}

.nxt-share-popover__head h2 {
	margin: 0;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--nxt-ink);
}

.nxt-share-close {
	background: transparent;
	border: 0;
	color: var(--nxt-ink-fade);
	font-size: 20px;
	line-height: 1;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	cursor: pointer;
}

.nxt-share-close:hover {
	color: var(--nxt-ink);
	background: rgba(255, 255, 255, 0.06);
}

.nxt-share-popover__body {
	padding: 6px 16px 14px;
}

.nxt-share-row {
	display: block;
	margin-bottom: 12px;
}

.nxt-share-label {
	display: block;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--nxt-ink-fade);
	margin-bottom: 6px;
}

.nxt-share-copy {
	display: flex;
	gap: 6px;
}

.nxt-share-copy--block {
	flex-direction: column;
}

.nxt-share-copy input,
.nxt-share-copy textarea {
	flex: 1;
	min-width: 0;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid var(--nxt-stroke);
	border-radius: 8px;
	color: var(--nxt-ink);
	font: 12px 'SF Mono', ui-monospace, monospace;
	padding: 8px 10px;
	outline: none;
	resize: vertical;
}

.nxt-share-copy input:focus,
.nxt-share-copy textarea:focus {
	border-color: rgba(255, 255, 255, 0.22);
}

.nxt-share-copy button {
	flex: none;
	background: var(--nxt-ink);
	color: #0a0a0a;
	border: 0;
	border-radius: 8px;
	padding: 8px 14px;
	font: inherit;
	font-size: 12.5px;
	font-weight: 500;
	cursor: pointer;
	transition: transform 0.12s, box-shadow 0.12s;
}

.nxt-share-copy--block button {
	align-self: flex-end;
	padding: 6px 14px;
	margin-top: 6px;
}

.nxt-share-copy button:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 10px rgba(255, 255, 255, 0.12);
}

.nxt-share-copy button.is-copied {
	background: rgba(255, 255, 255, 0.18);
	color: var(--nxt-ink);
}

.nxt-share-hint {
	margin: 4px 0 0;
	font-size: 11.5px;
	color: var(--nxt-ink-fade);
	line-height: 1.5;
}

/* ── Share popover: Deploy on-chain row ────────────────────────────────── */
.nxt-share-divider {
	height: 1px;
	background: var(--nxt-stroke);
	margin: 14px -16px 12px;
}

.nxt-share-deploy {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	margin: 0 -4px;
	border-radius: 12px;
	text-decoration: none;
	color: var(--nxt-ink);
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.10);
	transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.nxt-share-deploy:hover {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.18);
}

.nxt-share-deploy__icon {
	flex: none;
	width: 32px;
	height: 32px;
	display: grid;
	place-items: center;
	border-radius: 9px;
	background: rgba(255, 255, 255, 0.08);
	color: var(--nxt-ink-dim);
}

.nxt-share-deploy.is-deployed .nxt-share-deploy__icon {
	background: rgba(255, 255, 255, 0.12);
	color: var(--nxt-ink);
}

.nxt-share-deploy.is-deployed {
	background: rgba(255, 255, 255, 0.06);
	border-color: rgba(255, 255, 255, 0.14);
}

.nxt-share-deploy.is-deployed:hover {
	background: rgba(255, 255, 255, 0.10);
	border-color: rgba(255, 255, 255, 0.22);
}

.nxt-share-deploy__copy {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex: 1;
	min-width: 0;
}

.nxt-share-deploy__title {
	font-size: 13px;
	font-weight: 600;
	color: var(--nxt-ink);
	letter-spacing: 0.005em;
}

.nxt-share-deploy__sub {
	font-size: 11.5px;
	color: var(--nxt-ink-fade);
	line-height: 1.4;
}

.nxt-share-deploy__chev {
	flex: none;
	color: var(--nxt-ink-fade);
}

/* ── Keyboard help ─────────────────────────────────────────────────────── */

.nxt-help {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: min(420px, calc(100vw - 32px));
	background: var(--nxt-glass-strong);
	border: 1px solid var(--nxt-stroke);
	border-radius: 16px;
	backdrop-filter: blur(22px) saturate(140%);
	-webkit-backdrop-filter: blur(22px) saturate(140%);
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
	z-index: 60;
	padding: 18px 18px 14px;
	animation: nxt-help-in 0.18s ease-out both;
}

.nxt-help[hidden] { display: none; }

@keyframes nxt-help-in {
	from { opacity: 0; transform: translate(-50%, -46%); }
	to { opacity: 1; transform: translate(-50%, -50%); }
}

.nxt-help__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
}

.nxt-help__head h2 {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
}

.nxt-help__close {
	background: transparent;
	border: 0;
	color: var(--nxt-ink-fade);
	font-size: 20px;
	line-height: 1;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	cursor: pointer;
}

.nxt-help__close:hover {
	color: var(--nxt-ink);
	background: rgba(255, 255, 255, 0.06);
}

.nxt-help__grid {
	display: grid;
	grid-template-columns: 100px 1fr;
	gap: 8px 12px;
	margin: 0;
}

.nxt-help__grid dt {
	margin: 0;
	display: flex;
	align-items: center;
	gap: 4px;
	color: var(--nxt-ink-dim);
}

.nxt-help__grid dt kbd {
	font: 11px 'SF Mono', ui-monospace, monospace;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid var(--nxt-stroke);
	border-radius: 5px;
	padding: 2px 6px;
	color: var(--nxt-ink);
}

.nxt-help__grid dd {
	margin: 0;
	font-size: 12.5px;
	color: var(--nxt-ink);
	align-self: center;
}

/* ── Toast ─────────────────────────────────────────────────────────────── */

.nxt-toast {
	position: fixed;
	top: calc(var(--nxt-header-h) + 12px);
	left: 50%;
	transform: translateX(-50%);
	max-width: calc(100vw - 32px);
	padding: 9px 14px;
	background: var(--nxt-glass-strong);
	border: 1px solid var(--nxt-stroke);
	border-radius: var(--nxt-radius-pill);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	color: var(--nxt-ink);
	font-size: 13px;
	z-index: 70;
	animation: nxt-toast-in 0.22s ease-out both;
}

.nxt-toast[hidden] { display: none; }

.nxt-toast a {
	color: var(--nxt-accent);
	margin-left: 6px;
	text-decoration: none;
	font-weight: 500;
}

.nxt-toast a:hover { text-decoration: underline; }

@keyframes nxt-toast-in {
	from { opacity: 0; transform: translate(-50%, -6px); }
	to { opacity: 1; transform: translate(-50%, 0); }
}

/* ── Auto-hide chrome ──────────────────────────────────────────────────── */

body.app-next-body.nxt-chrome-hidden .nxt-header,
body.app-next-body.nxt-chrome-hidden .nxt-action-bar,
body.app-next-body.nxt-chrome-hidden .nxt-chat-dock,
body.app-next-body.nxt-chrome-hidden .nxt-first-hint {
	opacity: 0;
	pointer-events: none;
	transform: translateY(8px);
}

.nxt-header,
.nxt-action-bar,
.nxt-chat-dock,
.nxt-first-hint {
	transition: opacity 0.35s ease, transform 0.35s ease;
}

/* When the chat input is focused or NichAgent panel is open, force chrome to stay visible. */
body.app-next-body.nxt-chat-active .nxt-header,
body.app-next-body.nxt-chat-active .nxt-action-bar,
body.app-next-body.nxt-chat-active .nxt-chat-dock {
	opacity: 1;
	pointer-events: auto;
	transform: none;
}

/* The chat dock's chip row is translated with the dock; keep their transforms in sync */
.nxt-chat-dock .nxt-chat-chips {
	transition: opacity 0.25s ease;
}

body.app-next-body.nxt-chrome-hidden .nxt-chat-dock .nxt-chat-chips {
	opacity: 0;
}

/* ── NichAgent panel positioning override ─────────────────────────────── */

/* Dock the chat panel to the right so the avatar stays visible. The panel
   sits directly above the chat dock, which also slides right when active. */
body.app-next-body .nich-panel {
	position: fixed;
	right: 16px;
	bottom: 168px;
	left: auto;
	top: auto;
	transform: none;
	width: min(380px, calc(100vw - 32px));
	max-height: min(50vh, 480px);
	z-index: 24;
}

/* The chat dock is the single composer on /app-next — it writes through to the
   panel's hidden .nich-input and clicks .nich-mic programmatically. Hide the
   panel's own input + mic row so we don't render two stacked composers; the
   panel stays a pure conversation thread (header + messages). */
body.app-next-body .nich-panel .nich-controls,
body.app-next-body .nich-panel .nich-mic-row {
	display: none !important;
}

/* When chat is active, slide the input dock to the right to align with the
   conversation panel — keeps input + thread as one unified column.
   Uses translate instead of left/right so the transition animates cleanly. */
body.app-next-body.nxt-chat-active .nxt-chat-dock {
	left: auto;
	right: 16px;
	/* The entrance animation uses fill-mode `both`, which otherwise pins the
	   dock's transform to translateX(-50%) and defeats this right-alignment.
	   The rise has long since played by the time chat is active, so drop it. */
	animation: none;
	transform: none;
	width: min(380px, calc(100vw - 32px));
}

/* ── Unified chat card ─────────────────────────────────────────────────────
   While the thread is open, the panel (above) and dock (below) are fused into
   one glass card so they read as a single chat — not two stacked widgets. JS
   pins the panel's bottom edge flush onto the dock's top edge; the rules below
   square the seam, continue the glass down through the composer, and quiet the
   input pill into an inset row of the same card. */
body.app-next-body.nxt-chat-merged .nich-panel {
	border-bottom-left-radius: 0;
	border-bottom-right-radius: 0;
	/* Faint divider between thread and composer; drop the downward shadow so the
	   card looks continuous instead of like a box hovering over another box. */
	border-bottom-color: rgba(255, 255, 255, 0.06);
	box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.5);
}

body.app-next-body.nxt-chat-merged .nxt-chat-dock {
	gap: 0;
	padding: 10px 12px 12px;
	background: rgba(14, 15, 22, 0.92);
	backdrop-filter: blur(22px) saturate(140%);
	-webkit-backdrop-filter: blur(22px) saturate(140%);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-top: none; /* the panel's border-bottom is the only seam line */
	border-bottom-left-radius: 18px;
	border-bottom-right-radius: 18px;
	box-shadow: 0 28px 80px rgba(0, 0, 0, 0.6);
}

body.app-next-body.nxt-chat-merged .nxt-chat-chips {
	justify-content: flex-start;
	padding: 2px 2px 10px;
}

/* Inside the card the composer is just a row — strip its standalone pill chrome. */
body.app-next-body.nxt-chat-merged .nxt-chat-input-wrap {
	background: rgba(255, 255, 255, 0.04);
	border-color: rgba(255, 255, 255, 0.1);
	box-shadow: none;
}

/* ── Mobile ────────────────────────────────────────────────────────────── */

@media (max-width: 720px) {
	.nxt-preset-cluster {
		display: none; /* presets hidden on mobile to free up header space */
	}
}

@media (max-width: 640px) {
	.nxt-brand-tag { display: none; }
	.nxt-more { padding: 7px 8px; }
	.nxt-more-menu a,
	.nxt-more-menu button { padding: 12px 14px; font-size: 15px; min-height: 44px; }
	.nxt-action kbd { display: none; }
	.nxt-action { padding: 7px 10px; font-size: 12px; }
	.nxt-action span { display: none; }
	.nxt-action--primary span { display: inline; }
	.nxt-chat-dock { bottom: 64px; }
	.nxt-action-bar--secondary { bottom: 12px; }
	.nxt-chat-chips { max-width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
	.nxt-chat-chip { white-space: nowrap; flex: none; }
	.nxt-anim-sheet { bottom: 130px; max-height: 50vh; }
	.nxt-first-hint { font-size: 11.5px; padding: 6px 6px 6px 12px; max-width: calc(100vw - 24px); }
	.nxt-icon-btn { width: 28px; height: 28px; }
	.nxt-help__grid { grid-template-columns: 80px 1fr; font-size: 12px; }
	body.app-next-body .nich-panel {
		left: 50%;
		right: auto;
		transform: translateX(-50%);
		width: min(640px, calc(100vw - 32px));
		bottom: 142px;
		max-height: 45vh;
	}
	body.app-next-body.nxt-chat-active .nxt-chat-dock {
		left: 50%;
		right: auto;
		transform: translateX(-50%);
		width: min(640px, calc(100vw - 32px));
	}
}

/* Hide the production dat.gui by default — controls live inside the viewer
   panel that's intentionally not surfaced in this UX preview. Power users
   can re-enable via the explore menu (link routes to /app). */
body.app-next-body .dg.ac { display: none !important; }

/* ══════════════════════════════════════════════════════════════════════
   Visitor Agent Card — floating read-only identity card for visitors
   ══════════════════════════════════════════════════════════════════ */

.nxt-visitor-card {
	position: fixed;
	top: 72px;
	left: 20px;
	z-index: 45;
	width: 280px;
	animation: nxt-visitor-card-in 0.4s ease-out;
	pointer-events: none;
}

.nxt-visitor-card__inner {
	pointer-events: auto;
	background: linear-gradient(
		168deg,
		rgba(16, 16, 24, 0.92) 0%,
		rgba(10, 10, 16, 0.95) 100%
	);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 16px;
	backdrop-filter: blur(22px) saturate(140%);
	-webkit-backdrop-filter: blur(22px) saturate(140%);
	box-shadow:
		0 20px 60px rgba(0, 0, 0, 0.55),
		inset 0 1px 0 rgba(255, 255, 255, 0.04);
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.nxt-visitor-card__head {
	display: flex;
	align-items: center;
	gap: 12px;
}

.nxt-visitor-card__avatar {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	flex-shrink: 0;
	overflow: hidden;
	border: 2px solid rgba(139, 92, 246, 0.4);
	box-shadow: 0 0 12px rgba(139, 92, 246, 0.2);
	position: relative;
	background: rgba(255, 255, 255, 0.04);
}

.nxt-visitor-card__avatar-shimmer {
	position: absolute;
	inset: 0;
	background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.06) 50%, transparent 70%);
	background-size: 200% 100%;
	animation: nxt-shimmer 1.8s ease-in-out infinite;
}

.nxt-visitor-card__avatar-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.nxt-visitor-card__info {
	flex: 1;
	min-width: 0;
}

.nxt-visitor-card__name {
	font-family: 'Space Grotesk', 'Inter', sans-serif;
	font-size: 16px;
	font-weight: 600;
	color: #f5f5f7;
	letter-spacing: -0.01em;
	margin: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.nxt-visitor-card__status {
	display: flex;
	align-items: center;
	gap: 5px;
	font-size: 11px;
	color: rgba(255, 255, 255, 0.45);
	margin-top: 2px;
}

.nxt-visitor-card__dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--nxt-ink);
	box-shadow: 0 0 6px rgba(255, 255, 255, 0.35);
	animation: nxt-dot-pulse 2.5s ease infinite;
	flex-shrink: 0;
}

.nxt-visitor-card__desc {
	font-size: 12.5px;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.55);
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.nxt-visitor-card__skills {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

.nxt-visitor-card__skill {
	font-size: 10px;
	padding: 3px 8px;
	border-radius: 999px;
	background: rgba(139, 92, 246, 0.12);
	color: rgba(167, 139, 250, 0.85);
	border: 1px solid rgba(139, 92, 246, 0.18);
	white-space: nowrap;
}

.nxt-visitor-card__actions {
	display: flex;
	gap: 8px;
	padding-top: 4px;
}

.nxt-visitor-card__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	padding: 8px 14px;
	border-radius: 10px;
	font-size: 12.5px;
	font-weight: 500;
	font-family: inherit;
	text-decoration: none;
	border: 1px solid rgba(255, 255, 255, 0.1);
	background: rgba(255, 255, 255, 0.04);
	color: rgba(255, 255, 255, 0.8);
	cursor: pointer;
	transition: all 0.18s ease;
}

.nxt-visitor-card__btn:hover {
	border-color: rgba(255, 255, 255, 0.22);
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
}

.nxt-visitor-card__btn--primary {
	flex: 1;
	background: linear-gradient(180deg, rgba(139, 92, 246, 0.9), rgba(124, 58, 237, 0.9));
	border-color: rgba(167, 139, 250, 0.6);
	color: #fff;
	box-shadow: 0 4px 16px rgba(139, 92, 246, 0.28);
}

.nxt-visitor-card__btn--primary:hover {
	background: linear-gradient(180deg, rgba(151, 109, 255, 1), rgba(139, 92, 246, 1));
	border-color: rgba(167, 139, 250, 0.85);
	box-shadow: 0 6px 20px rgba(139, 92, 246, 0.38);
}

.nxt-visitor-card__btn--share {
	padding: 8px 12px;
}

@keyframes nxt-visitor-card-in {
	from {
		opacity: 0;
		transform: translateY(10px) translateX(-6px);
	}
	to {
		opacity: 1;
		transform: translateY(0) translateX(0);
	}
}

@keyframes nxt-dot-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.45; }
}

@keyframes nxt-shimmer {
	0% { background-position: -200% 0; }
	100% { background-position: 200% 0; }
}

/* Fade the visitor card when chrome auto-hides */
.nxt-chrome-hidden .nxt-visitor-card {
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.35s ease;
}
.nxt-visitor-card {
	transition: opacity 0.35s ease;
}

/* ══════════════════════════════════════════════════════════════════════
   Mobile Agent Strip — compact floating bar for agent context
   ══════════════════════════════════════════════════════════════════ */

.nxt-mobile-agent-strip {
	display: none;
}

@media (max-width: 720px) {
	.nxt-mobile-agent-strip {
		display: flex;
		position: fixed;
		top: 52px;
		left: 12px;
		right: 12px;
		z-index: 44;
		align-items: center;
		gap: 10px;
		padding: 8px 10px 8px 8px;
		background: linear-gradient(
			180deg,
			rgba(14, 14, 22, 0.92) 0%,
			rgba(10, 10, 16, 0.95) 100%
		);
		border: 1px solid rgba(255, 255, 255, 0.08);
		border-radius: 14px;
		backdrop-filter: blur(20px) saturate(140%);
		-webkit-backdrop-filter: blur(20px) saturate(140%);
		box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
		animation: nxt-strip-in 0.35s ease-out;
	}

	.nxt-mobile-agent-strip[hidden] {
		display: none;
	}

	/* On mobile, hide the desktop visitor card */
	.nxt-visitor-card {
		display: none !important;
	}
}

.nxt-mobile-agent-strip__avatar {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	flex-shrink: 0;
	background: rgba(255, 255, 255, 0.06);
	border: 1.5px solid rgba(139, 92, 246, 0.4);
	position: relative;
	overflow: hidden;
}

.nxt-mobile-agent-strip__dot {
	position: absolute;
	bottom: -1px;
	right: -1px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--nxt-ink);
	border: 2px solid rgba(10, 10, 10, 0.95);
	box-shadow: 0 0 4px rgba(255, 255, 255, 0.3);
}

.nxt-mobile-agent-strip__info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 1px;
}

.nxt-mobile-agent-strip__name {
	font-size: 13px;
	font-weight: 600;
	color: #f5f5f7;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	letter-spacing: -0.01em;
}

.nxt-mobile-agent-strip__desc {
	font-size: 10.5px;
	color: rgba(255, 255, 255, 0.4);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.nxt-mobile-agent-strip__share {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	flex-shrink: 0;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.1);
	background: rgba(255, 255, 255, 0.04);
	color: rgba(255, 255, 255, 0.55);
	cursor: pointer;
	transition: all 0.15s ease;
}

.nxt-mobile-agent-strip__share:hover,
.nxt-mobile-agent-strip__share:active {
	color: #fff;
	border-color: rgba(255, 255, 255, 0.25);
	background: rgba(255, 255, 255, 0.08);
}

@keyframes nxt-strip-in {
	from {
		opacity: 0;
		transform: translateY(-8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Fade with chrome auto-hide */
.nxt-chrome-hidden .nxt-mobile-agent-strip {
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.35s ease;
}
.nxt-mobile-agent-strip {
	transition: opacity 0.35s ease;
}

/* ══════════════════════════════════════════════════════════════════════
   Social Share Buttons
   ══════════════════════════════════════════════════════════════════ */

.nxt-share-social {
	padding-top: 4px;
}

.nxt-share-social__row {
	display: flex;
	gap: 8px;
	margin-top: 8px;
}

.nxt-share-social__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 10px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	background: rgba(255, 255, 255, 0.04);
	color: rgba(255, 255, 255, 0.55);
	cursor: pointer;
	transition: all 0.18s ease;
}

.nxt-share-social__btn:hover {
	color: #fff;
	border-color: rgba(255, 255, 255, 0.22);
	background: rgba(255, 255, 255, 0.08);
	transform: translateY(-1px);
}

.nxt-share-social__btn:active {
	transform: translateY(0);
}

/* ══════════════════════════════════════════════════════════════════════
   Poster Skeleton — branded shimmer placeholder during GLB load
   ══════════════════════════════════════════════════════════════════ */

.nxt-poster-skeleton {
	position: absolute;
	inset: 0;
	z-index: 4;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	overflow: hidden;
	transition: opacity 0.65s ease;
}

.nxt-poster-skeleton[hidden] {
	display: none;
}

.nxt-poster-skeleton--fading {
	opacity: 0;
}

.nxt-poster-skeleton__silhouette {
	width: 140px;
	height: 260px;
	border-radius: 70px 70px 40px 40px;
	background: linear-gradient(
		180deg,
		rgba(139, 92, 246, 0.06) 0%,
		rgba(139, 92, 246, 0.03) 40%,
		rgba(255, 255, 255, 0.02) 100%
	);
	border: 1px solid rgba(255, 255, 255, 0.03);
	position: relative;
}

.nxt-poster-skeleton__shimmer {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		110deg,
		transparent 25%,
		rgba(139, 92, 246, 0.05) 37%,
		rgba(167, 139, 250, 0.08) 50%,
		rgba(139, 92, 246, 0.05) 63%,
		transparent 75%
	);
	background-size: 250% 100%;
	animation: nxt-shimmer 2.2s ease-in-out infinite;
}

/* Floor glow intensifies during skeleton state to suggest something is loading */
.nxt-poster-skeleton:not([hidden]) ~ .nxt-stage-floor {
	opacity: 0.7;
}

@media (max-width: 640px) {
	.nxt-poster-skeleton__silhouette {
		width: 100px;
		height: 200px;
	}
}
