/**
 * Najibul AI - application shell.
 *
 * Performance rules:
 *  - Only transform / opacity are animated (compositor friendly -> 60 FPS).
 *  - Every animated element has a fixed size -> zero CLS.
 *  - The chat area uses a single scroll container.
 */

/* ══════════════════════════════════════════════════════════════════════
   TOKENS
   ══════════════════════════════════════════════════════════════════════ */
html,
body.nj-ai-body {
	--nj-ai-bg: #05070f;
	--nj-ai-bg-soft: #0b1020;
	--nj-ai-panel: rgba(16, 23, 43, .74);
	--nj-ai-panel-solid: #101729;
	--nj-ai-line: rgba(148, 163, 184, .14);
	--nj-ai-line-strong: rgba(148, 163, 184, .26);
	--nj-ai-text: #eef2ff;
	--nj-ai-muted: #93a0bd;
	--nj-ai-dim: #6b7896;
	--nj-ai-primary: #6366f1;
	--nj-ai-primary-2: #22d3ee;
	--nj-ai-accent: #a855f7;
	--nj-ai-wa: #25d366;
	--nj-ai-gold: #fbbf24;
	--nj-ai-ok: #34d399;
	--nj-ai-radius: 18px;
	--nj-ai-radius-lg: 24px;
	--nj-ai-sidebar-w: 252px;
	--nj-ai-panel-w: 330px;

	margin: 0;
	padding: 0;
	height: 100%;
	overflow: hidden;
	background: var(--nj-ai-bg);
	color: var(--nj-ai-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Bengali", "Noto Sans Devanagari", "Noto Sans", "Helvetica Neue", Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
	overscroll-behavior: none;
}

.nj-ai-body {
	-webkit-tap-highlight-color: transparent;
}

/* ══════════════════════════════════════════════════════════════════════
   APP GRID
   ══════════════════════════════════════════════════════════════════════ */
.nj-ai-app {
	position: relative;
	display: grid;
	grid-template-columns: var(--nj-ai-sidebar-w) minmax(0, 1fr) var(--nj-ai-panel-w);
	height: 100dvh;
	max-height: 100dvh;
	isolation: isolate;
	background:
		radial-gradient(120% 80% at 50% -10%, rgba(99, 102, 241, .13), transparent 60%),
		linear-gradient(180deg, #070b18 0%, #05070f 100%);
}

.nj-ai-app--inline {
	height: 640px;
	max-height: 82vh;
	min-height: 460px;
	margin: 18px 0;
	border-radius: var(--nj-ai-radius-lg);
	overflow: hidden;
	border: 1px solid rgba(99, 102, 241, .26);
	box-shadow: 0 24px 70px rgba(2, 6, 23, .45);
}

.nj-ai-app--inline .nj-ai-ambient {
	position: absolute;
	inset: 0;
}

/* ══════════════════════════════════════════════════════════════════════
   AMBIENT
   ══════════════════════════════════════════════════════════════════════ */
.nj-ai-ambient {
	position: fixed;
	inset: 0;
	z-index: 0;
	overflow: hidden;
	pointer-events: none;
}

.nj-ai-orb {
	position: absolute;
	width: 44vmax;
	height: 44vmax;
	border-radius: 50%;
	filter: blur(90px);
	opacity: .26;
	will-change: transform;
}

.nj-ai-orb--1 {
	background: radial-gradient(circle at 30% 30%, #6366f1, transparent 70%);
	top: -16vmax;
	left: -12vmax;
	animation: nj-ai-float-a 26s ease-in-out infinite;
}

.nj-ai-orb--2 {
	background: radial-gradient(circle at 60% 40%, #22d3ee, transparent 70%);
	bottom: -20vmax;
	right: -14vmax;
	animation: nj-ai-float-b 32s ease-in-out infinite;
}

.nj-ai-orb--3 {
	background: radial-gradient(circle at 50% 50%, #a855f7, transparent 70%);
	top: 32%;
	left: 38%;
	width: 32vmax;
	height: 32vmax;
	opacity: .16;
	animation: nj-ai-float-c 40s ease-in-out infinite;
}

@keyframes nj-ai-float-a {
	0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
	50% { transform: translate3d(6vmax, 4vmax, 0) scale(1.12); }
}

@keyframes nj-ai-float-b {
	0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
	50% { transform: translate3d(-5vmax, -6vmax, 0) scale(1.08); }
}

@keyframes nj-ai-float-c {
	0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
	50% { transform: translate3d(-7vmax, 3vmax, 0) scale(1.18); }
}

.nj-ai-wave {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: .22;
}

/* ══════════════════════════════════════════════════════════════════════
   SIDEBAR
   ══════════════════════════════════════════════════════════════════════ */
.nj-ai-sidebar {
	position: relative;
	z-index: 4;
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 18px 14px 16px;
	background: linear-gradient(180deg, rgba(10, 15, 32, .92), rgba(7, 11, 24, .96));
	backdrop-filter: blur(22px);
	-webkit-backdrop-filter: blur(22px);
	border-right: 1px solid var(--nj-ai-line);
	overflow-y: auto;
	overscroll-behavior: contain;
}

.nj-ai-sidebar__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.nj-ai-brandmark {
	display: flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	color: inherit;
	min-width: 0;
}

/* The logo floats free - no square box, only a neon aura. */
.nj-ai-brandmark__orb {
	position: relative;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	flex: 0 0 auto;
	background: transparent;
	border: 0;
	isolation: isolate;
}

.nj-ai-brandmark__orb::before {
	content: "";
	position: absolute;
	inset: -14px;
	border-radius: 50%;
	background: radial-gradient(circle at 42% 40%, rgba(34, 211, 238, .55), transparent 60%),
		radial-gradient(circle at 62% 62%, rgba(244, 114, 182, .42), transparent 58%);
	filter: blur(11px);
	opacity: .85;
	animation: nj-ai-logo-aura 5s ease-in-out infinite;
	z-index: -1;
}

@keyframes nj-ai-logo-aura {
	0%, 100% { opacity: .6; transform: scale(.92); }
	50% { opacity: 1; transform: scale(1.1); }
}

.nj-ai-brandmark__orb img {
	width: 34px;
	height: 34px;
	object-fit: cover;
	display: block;
	border-radius: 50%;
	mix-blend-mode: screen;
	-webkit-mask-image: radial-gradient(circle at 50% 50%, #000 55%, transparent 76%);
	mask-image: radial-gradient(circle at 50% 50%, #000 55%, transparent 76%);
	filter: drop-shadow(0 0 8px rgba(34, 211, 238, .55)) drop-shadow(0 0 18px rgba(129, 140, 248, .45));
}

.nj-ai-brandmark__text {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.nj-ai-brandmark__text strong {
	font-size: 13.5px;
	font-weight: 800;
	letter-spacing: -.01em;
	color: #f1f5ff;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.nj-ai-brandmark__text small {
	font-size: 11px;
	color: #67e8f9;
	font-weight: 700;
	letter-spacing: .04em;
}

.nj-ai-sidebar__close {
	display: none;
	width: 32px;
	height: 32px;
	border-radius: 9px;
	border: 1px solid var(--nj-ai-line);
	background: rgba(255, 255, 255, .05);
	color: var(--nj-ai-text);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

.nj-ai-nav {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.nj-ai-nav__item {
	display: flex;
	align-items: center;
	gap: 11px;
	width: 100%;
	padding: 11px 13px;
	border: 1px solid transparent;
	border-radius: 13px;
	background: transparent;
	color: var(--nj-ai-muted);
	font: inherit;
	font-size: 13.5px;
	font-weight: 600;
	text-align: start;
	text-decoration: none;
	cursor: pointer;
	transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}

.nj-ai-nav__item:hover {
	background: rgba(255, 255, 255, .05);
	color: var(--nj-ai-text);
}

.nj-ai-nav__item:active {
	transform: scale(.985);
}

.nj-ai-nav__item.is-active {
	background: linear-gradient(120deg, rgba(99, 102, 241, .26), rgba(34, 211, 238, .12));
	border-color: rgba(129, 140, 248, .38);
	color: #fff;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}

.nj-ai-nav__icon {
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	border-radius: 9px;
	background: rgba(255, 255, 255, .06);
	flex: 0 0 auto;
}

.nj-ai-nav__item.is-active .nj-ai-nav__icon {
	background: rgba(99, 102, 241, .3);
	color: #c7d2fe;
}

.nj-ai-nav__label {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.nj-ai-langbar {
	display: flex;
	gap: 6px;
	padding: 5px;
	border-radius: 13px;
	background: rgba(255, 255, 255, .045);
	border: 1px solid var(--nj-ai-line);
}

.nj-ai-langbar__btn {
	flex: 1 1 0;
	padding: 8px 4px;
	border: 0;
	border-radius: 9px;
	background: transparent;
	color: var(--nj-ai-muted);
	font: inherit;
	font-size: 11.5px;
	font-weight: 800;
	letter-spacing: .04em;
	cursor: pointer;
	transition: background .18s ease, color .18s ease;
}

.nj-ai-langbar__btn:hover {
	color: var(--nj-ai-text);
}

.nj-ai-langbar__btn.is-active {
	background: linear-gradient(135deg, #6366f1, #22d3ee);
	color: #fff;
	box-shadow: 0 4px 14px rgba(79, 70, 229, .4);
}

.nj-ai-sidebar__foot {
	margin-top: auto;
	padding-top: 12px;
}

.nj-ai-usercard {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 11px;
	border-radius: 15px;
	background: linear-gradient(135deg, rgba(99, 102, 241, .16), rgba(34, 211, 238, .08));
	border: 1px solid rgba(129, 140, 248, .26);
	position: relative;
}

.nj-ai-usercard__avatar {
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	overflow: hidden;
	background: linear-gradient(135deg, #6366f1, #a855f7);
	color: #fff;
	font-weight: 800;
	font-size: 15px;
	flex: 0 0 auto;
}

.nj-ai-usercard__avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.nj-ai-usercard__body {
	display: flex;
	flex-direction: column;
	min-width: 0;
	flex: 1 1 auto;
}

.nj-ai-usercard__body strong {
	font-size: 12.5px;
	font-weight: 700;
	color: #f1f5ff;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.nj-ai-usercard__body small {
	font-size: 10.5px;
	color: var(--nj-ai-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.nj-ai-usercard__tier {
	position: absolute;
	top: -7px;
	inset-inline-end: 9px;
	padding: 2px 8px;
	border-radius: 999px;
	background: linear-gradient(135deg, #fbbf24, #f59e0b);
	color: #3b2400;
	font-size: 9px;
	font-weight: 900;
	letter-spacing: .05em;
	text-transform: uppercase;
	box-shadow: 0 3px 10px rgba(251, 191, 36, .35);
}

/* ══════════════════════════════════════════════════════════════════════
   MAIN COLUMN
   ══════════════════════════════════════════════════════════════════════ */
.nj-ai-main {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	min-width: 0;
	min-height: 0;
}

.nj-ai-topbar {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	padding-top: max(12px, env(safe-area-inset-top));
	background: rgba(7, 11, 24, .72);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border-bottom: 1px solid var(--nj-ai-line);
	flex: 0 0 auto;
}

.nj-ai-drawer-toggle {
	display: none;
	width: 36px;
	height: 36px;
	border-radius: 10px;
	border: 1px solid var(--nj-ai-line);
	background: rgba(255, 255, 255, .05);
	color: var(--nj-ai-text);
	cursor: pointer;
}

.nj-ai-identity {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
	flex: 1 1 auto;
}

.nj-ai-identity__orb {
	position: relative;
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	flex: 0 0 auto;
	background: transparent;
	border: 0;
	isolation: isolate;
}

.nj-ai-identity__orb::before {
	content: "";
	position: absolute;
	inset: -12px;
	border-radius: 50%;
	background: radial-gradient(circle at 45% 40%, rgba(34, 211, 238, .48), transparent 62%),
		radial-gradient(circle at 60% 65%, rgba(168, 85, 247, .38), transparent 58%);
	filter: blur(10px);
	opacity: .8;
	animation: nj-ai-logo-aura 5.5s ease-in-out infinite;
	z-index: -1;
}

.nj-ai-identity__orb img {
	width: 29px;
	height: 29px;
	object-fit: cover;
	display: block;
	border-radius: 50%;
	mix-blend-mode: screen;
	-webkit-mask-image: radial-gradient(circle at 50% 50%, #000 55%, transparent 76%);
	mask-image: radial-gradient(circle at 50% 50%, #000 55%, transparent 76%);
	filter: drop-shadow(0 0 7px rgba(34, 211, 238, .5)) drop-shadow(0 0 14px rgba(129, 140, 248, .4));
}

.nj-ai-identity__text {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.nj-ai-identity__text strong {
	font-size: 13.5px;
	font-weight: 700;
	color: #f1f5ff;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.nj-ai-identity__text small {
	display: flex;
	align-items: center;
	gap: 5px;
	font-size: 11px;
	color: var(--nj-ai-muted);
}

.nj-ai-identity__lang {
	color: #67e8f9;
	font-weight: 700;
}

.nj-ai-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--nj-ai-dim);
	flex: 0 0 auto;
}

.nj-ai-dot.is-on {
	background: var(--nj-ai-ok);
	box-shadow: 0 0 0 3px rgba(52, 211, 153, .16);
}

.nj-ai-topbar__actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 0 0 auto;
}

.nj-ai-icon-btn {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 11px;
	border: 1px solid var(--nj-ai-line);
	background: rgba(255, 255, 255, .05);
	color: var(--nj-ai-text);
	cursor: pointer;
	transition: background .18s ease, transform .18s ease;
}

.nj-ai-icon-btn:hover {
	background: rgba(255, 255, 255, .1);
}

.nj-ai-icon-btn:active {
	transform: scale(.94);
}

.nj-ai-livetalk {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 16px;
	border-radius: 13px;
	border: 1px solid rgba(251, 191, 36, .42);
	background: linear-gradient(135deg, rgba(251, 191, 36, .16), rgba(245, 158, 11, .08));
	color: #fde68a;
	font: inherit;
	font-size: 12.5px;
	font-weight: 800;
	cursor: pointer;
	transition: transform .18s ease, box-shadow .18s ease;
}

.nj-ai-livetalk:hover {
	transform: translateY(-1px);
	box-shadow: 0 8px 22px rgba(251, 191, 36, .22);
}

.nj-ai-livetalk:active {
	transform: scale(.97);
}

.nj-ai-livetalk.is-off,
.nj-ai-livetalk:disabled {
	opacity: .4;
	cursor: not-allowed;
}

.nj-ai-livetalk__ring {
	position: absolute;
	inset: -3px;
	border-radius: 15px;
	border: 2px solid rgba(251, 191, 36, .45);
	opacity: 0;
	pointer-events: none;
}

.nj-ai-livetalk.is-live .nj-ai-livetalk__ring {
	animation: nj-ai-pulse 1.7s ease-out infinite;
}

/* ══════════════════════════════════════════════════════════════════════
   MEMORY RIBBON
   ══════════════════════════════════════════════════════════════════════ */
.nj-ai-memory {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 18px;
	font-size: 11.5px;
	color: var(--nj-ai-muted);
	background: rgba(99, 102, 241, .09);
	border-bottom: 1px solid var(--nj-ai-line);
	flex: 0 0 auto;
	overflow: hidden;
}

.nj-ai-memory__badge {
	flex: 0 0 auto;
	background: rgba(251, 191, 36, .16);
	color: var(--nj-ai-gold);
	border-radius: 999px;
	padding: 2px 10px;
	font-weight: 800;
	font-size: 9.5px;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.nj-ai-memory__text {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ══════════════════════════════════════════════════════════════════════
   CHAT
   ══════════════════════════════════════════════════════════════════════ */
.nj-ai-chat {
	flex: 1 1 auto;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	padding: 22px 18px 8px;
	scroll-behavior: smooth;
}

.nj-ai-empty {
	max-width: 460px;
	margin: 6vh auto 0;
	text-align: center;
}

.nj-ai-empty__orb {
	width: 92px;
	height: 92px;
	margin: 0 auto 22px;
	border-radius: 50%;
	background: conic-gradient(from 0deg, #6366f1, #22d3ee, #a855f7, #6366f1);
	filter: blur(1px);
	opacity: .88;
	animation: nj-ai-spin 15s linear infinite;
}

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

.nj-ai-empty h2 {
	margin: 0 0 10px;
	font-size: clamp(21px, 3.4vw, 34px);
	font-weight: 900;
	letter-spacing: -.025em;
	line-height: 1.24;
	background: linear-gradient(100deg, #f8fafc 0%, #a5f3fc 42%, #4ade80 72%, #f8fafc 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}

.nj-ai-empty p {
	margin: 0;
	color: var(--nj-ai-muted);
	font-size: clamp(13px, 1.6vw, 15px);
	max-width: 460px;
	margin-inline: auto;
}

.nj-ai-msg {
	max-width: 760px;
	margin: 0 auto 18px;
	display: flex;
	gap: 12px;
	align-items: flex-start;
	animation: nj-ai-rise .28s cubic-bezier(.22, 1, .36, 1);
}

@keyframes nj-ai-rise {
	from { opacity: 0; transform: translate3d(0, 10px, 0); }
	to { opacity: 1; transform: translate3d(0, 0, 0); }
}

.nj-ai-msg--user {
	flex-direction: row-reverse;
}

.nj-ai-msg__avatar {
	flex: 0 0 auto;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	font-size: 13px;
	font-weight: 800;
	background: rgba(255, 255, 255, .07);
	border: 1px solid var(--nj-ai-line);
	color: var(--nj-ai-text);
	overflow: hidden;
}

.nj-ai-msg--ai .nj-ai-msg__avatar {
	background: linear-gradient(135deg, #6366f1, #22d3ee);
	border: 0;
	color: #fff;
	box-shadow: 0 5px 16px rgba(79, 70, 229, .34);
}

.nj-ai-msg__body {
	flex: 1 1 auto;
	min-width: 0;
}

.nj-ai-bubble {
	background: var(--nj-ai-panel);
	border: 1px solid var(--nj-ai-line);
	border-radius: var(--nj-ai-radius);
	padding: 14px 16px;
	font-size: 14.5px;
	line-height: 1.72;
	white-space: pre-wrap;
	word-wrap: break-word;
	overflow-wrap: anywhere;
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
}

.nj-ai-msg--user .nj-ai-bubble {
	background: linear-gradient(135deg, rgba(99, 102, 241, .26), rgba(34, 211, 238, .14));
	border-color: rgba(129, 140, 248, .34);
}

.nj-ai-bubble p {
	margin: 0 0 10px;
}

.nj-ai-bubble p:last-child {
	margin-bottom: 0;
}

.nj-ai-bubble ul,
.nj-ai-bubble ol {
	margin: 0 0 10px;
	padding-inline-start: 20px;
}

.nj-ai-bubble code {
	background: rgba(255, 255, 255, .08);
	padding: 1px 6px;
	border-radius: 5px;
	font-size: 13px;
}

.nj-ai-bubble strong {
	color: #fff;
}

/* Verified strip */
.nj-ai-verified {
	display: flex;
	align-items: center;
	gap: 7px;
	margin-top: 10px;
	padding: 8px 12px;
	border-radius: 11px;
	background: linear-gradient(135deg, rgba(251, 191, 36, .12), rgba(245, 158, 11, .06));
	border: 1px solid rgba(251, 191, 36, .26);
	font-size: 11.5px;
	color: #fde68a;
	font-weight: 700;
}

.nj-ai-verified__sep {
	color: var(--nj-ai-dim);
	font-weight: 500;
}

/* Citation cards */
.nj-ai-citations {
	margin-top: 10px;
	display: grid;
	gap: 7px;
}

.nj-ai-citation {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	padding: 10px 12px;
	border-radius: 12px;
	background: rgba(251, 191, 36, .06);
	border: 1px solid rgba(251, 191, 36, .2);
	font-size: 12.5px;
	text-decoration: none;
	color: var(--nj-ai-text);
	transition: transform .16s ease, background .16s ease;
}

.nj-ai-citation:hover {
	transform: translateY(-2px);
	background: rgba(251, 191, 36, .11);
}

.nj-ai-citation__badge {
	flex: 0 0 auto;
	font-size: 9.5px;
	font-weight: 900;
	letter-spacing: .05em;
	color: var(--nj-ai-gold);
	text-transform: uppercase;
	padding-top: 3px;
}

.nj-ai-citation__title {
	font-weight: 700;
	display: block;
}

.nj-ai-citation__meta {
	color: var(--nj-ai-muted);
	font-size: 11px;
	display: block;
	margin-top: 2px;
}

/* Action row inside a message */
.nj-ai-actions {
	display: flex;
	gap: 6px;
	margin-top: 9px;
	flex-wrap: wrap;
}

.nj-ai-action {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 6px 11px;
	border-radius: 10px;
	border: 1px solid rgba(129, 140, 248, .3);
	background: linear-gradient(135deg, rgba(99, 102, 241, .18), rgba(34, 211, 238, .1));
	color: #c7d2fe;
	font-size: 11.5px;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
	transition: transform .16s ease, background .16s ease;
}

.nj-ai-action:hover {
	transform: translateY(-1px);
	background: linear-gradient(135deg, rgba(99, 102, 241, .28), rgba(34, 211, 238, .16));
}

.nj-ai-action--wa {
	background: rgba(37, 211, 102, .14);
	border-color: rgba(37, 211, 102, .32);
	color: #86efac;
}

.nj-ai-action--quiz {
	background: rgba(251, 191, 36, .13);
	border-color: rgba(251, 191, 36, .3);
	color: #fde68a;
}

.nj-ai-tools {
	display: flex;
	gap: 6px;
	margin-top: 8px;
	flex-wrap: wrap;
}

.nj-ai-tool {
	background: transparent;
	border: 1px solid var(--nj-ai-line);
	color: var(--nj-ai-muted);
	border-radius: 9px;
	padding: 4px 9px;
	font-size: 11px;
	cursor: pointer;
	transition: color .16s ease, border-color .16s ease;
}

.nj-ai-tool:hover {
	color: var(--nj-ai-text);
	border-color: var(--nj-ai-line-strong);
}

.nj-ai-tool--up.is-active {
	color: var(--nj-ai-ok);
	border-color: rgba(52, 211, 153, .5);
}

.nj-ai-tool--down.is-active {
	color: #f87171;
	border-color: rgba(248, 113, 113, .5);
}

/* Typing */
.nj-ai-typing {
	display: inline-flex;
	gap: 4px;
	align-items: center;
}

.nj-ai-typing span {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--nj-ai-muted);
	animation: nj-ai-blink 1.1s infinite ease-in-out;
}

.nj-ai-typing span:nth-child(2) { animation-delay: .18s; }
.nj-ai-typing span:nth-child(3) { animation-delay: .36s; }

@keyframes nj-ai-blink {
	0%, 60%, 100% { opacity: .25; transform: translateY(0); }
	30% { opacity: 1; transform: translateY(-3px); }
}

/* ══════════════════════════════════════════════════════════════════════
   SUGGESTIONS
   ══════════════════════════════════════════════════════════════════════ */
.nj-ai-suggestions {
	display: flex;
	gap: 8px;
	padding: 4px 18px 0;
	overflow-x: auto;
	scrollbar-width: none;
	flex: 0 0 auto;
}

.nj-ai-suggestions::-webkit-scrollbar {
	display: none;
}

.nj-ai-suggestions[hidden] {
	display: none;
}

.nj-ai-suggestion {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 9px 14px;
	border-radius: 999px;
	border: 1px solid var(--nj-ai-line);
	background: rgba(255, 255, 255, .04);
	color: var(--nj-ai-muted);
	font: inherit;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
	transition: transform .16s ease, background .16s ease, color .16s ease;
}

.nj-ai-suggestion:hover {
	transform: translateY(-2px);
	background: rgba(255, 255, 255, .08);
	color: var(--nj-ai-text);
}

/* ══════════════════════════════════════════════════════════════════════
   ECOSYSTEM CARDS
   ══════════════════════════════════════════════════════════════════════ */
.nj-ai-cards {
	flex: 0 0 auto;
	max-height: 32vh;
	overflow-y: auto;
	padding: 10px 18px 0;
}

.nj-ai-cards[hidden] {
	display: none;
}

.nj-ai-cards__title {
	font-size: 10.5px;
	font-weight: 900;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--nj-ai-dim);
	margin: 8px 0 8px;
}

.nj-ai-card {
	display: flex;
	gap: 12px;
	align-items: center;
	max-width: 760px;
	margin: 0 auto 8px;
	padding: 12px;
	border-radius: 14px;
	background: var(--nj-ai-panel);
	border: 1px solid var(--nj-ai-line);
}

.nj-ai-card__logo {
	width: 42px;
	height: 42px;
	border-radius: 11px;
	object-fit: cover;
	flex: 0 0 auto;
	background: rgba(255, 255, 255, .06);
}

.nj-ai-card__body {
	flex: 1 1 auto;
	min-width: 0;
}

.nj-ai-card__title {
	font-size: 13.5px;
	font-weight: 700;
	display: block;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.nj-ai-card__meta {
	font-size: 11.5px;
	color: var(--nj-ai-muted);
}

.nj-ai-card__actions {
	display: flex;
	gap: 6px;
	flex: 0 0 auto;
	flex-wrap: wrap;
}

.nj-ai-btn {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	border-radius: 9px;
	padding: 6px 11px;
	font-size: 11.5px;
	font-weight: 700;
	text-decoration: none;
	border: 1px solid var(--nj-ai-line);
	color: var(--nj-ai-text);
	background: rgba(255, 255, 255, .05);
	cursor: pointer;
	transition: transform .16s ease;
}

.nj-ai-btn:active {
	transform: scale(.95);
}

.nj-ai-btn--wa {
	background: rgba(37, 211, 102, .16);
	border-color: rgba(37, 211, 102, .35);
	color: #86efac;
}

.nj-ai-btn--call {
	background: rgba(99, 102, 241, .16);
	border-color: rgba(99, 102, 241, .35);
	color: #b5b8ff;
}

.nj-ai-quiz {
	max-width: 760px;
	margin: 0 auto 8px;
	border-radius: 14px;
	background: var(--nj-ai-panel);
	border: 1px solid var(--nj-ai-line);
	padding: 14px;
}

.nj-ai-quiz__q {
	font-size: 13.5px;
	font-weight: 600;
	margin-bottom: 10px;
}

.nj-ai-quiz__options {
	display: grid;
	gap: 6px;
}

.nj-ai-quiz__option {
	text-align: start;
	border: 1px solid var(--nj-ai-line);
	background: rgba(255, 255, 255, .04);
	color: var(--nj-ai-text);
	border-radius: 9px;
	padding: 8px 11px;
	font: inherit;
	font-size: 12.5px;
	cursor: pointer;
	transition: background .16s ease, border-color .16s ease;
}

.nj-ai-quiz__option.is-correct {
	border-color: rgba(52, 211, 153, .6);
	background: rgba(52, 211, 153, .16);
}

.nj-ai-quiz__option.is-wrong {
	border-color: rgba(248, 113, 113, .6);
	background: rgba(248, 113, 113, .14);
}

/* ══════════════════════════════════════════════════════════════════════
   COMPOSER
   ══════════════════════════════════════════════════════════════════════ */
.nj-ai-composer-wrap {
	flex: 0 0 auto;
	padding: 10px 18px calc(12px + env(safe-area-inset-bottom));
	background: linear-gradient(to top, rgba(5, 7, 15, .96) 55%, rgba(5, 7, 15, 0));
}

.nj-ai-composer {
	display: flex;
	align-items: center;
	gap: 6px;
	max-width: 760px;
	margin: 0 auto;
	padding: 7px 8px;
	border-radius: 22px;
	background: var(--nj-ai-panel);
	border: 1px solid var(--nj-ai-line);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
}

.nj-ai-input {
	flex: 1 1 auto;
	min-width: 0;
	resize: none;
	border: 0;
	outline: 0;
	background: transparent;
	color: var(--nj-ai-text);
	font: inherit;
	font-size: 15px;
	line-height: 1.5;
	max-height: 160px;
	padding: 10px 4px;
	overflow-y: auto;
}

.nj-ai-input::placeholder {
	color: rgba(147, 160, 189, .7);
}

.nj-ai-composer__icon {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 0;
	background: transparent;
	color: var(--nj-ai-muted);
	cursor: pointer;
	transition: color .16s ease, background .16s ease;
}

.nj-ai-composer__icon:hover {
	color: var(--nj-ai-text);
	background: rgba(255, 255, 255, .06);
}

.nj-ai-send,
.nj-ai-mic {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 0;
	cursor: pointer;
	transition: transform .16s ease, opacity .16s ease;
}

.nj-ai-send {
	background: linear-gradient(135deg, #6366f1, #22d3ee);
	color: #fff;
	box-shadow: 0 6px 18px rgba(79, 70, 229, .38);
}

.nj-ai-mic {
	position: relative;
	background: rgba(34, 211, 238, .12);
	color: #67e8f9;
}

.nj-ai-mic:disabled {
	opacity: .32;
	cursor: not-allowed;
}

.nj-ai-mic.is-live {
	background: rgba(37, 211, 102, .22);
	color: #86efac;
}

.nj-ai-mic__ring {
	position: absolute;
	inset: -3px;
	border-radius: 50%;
	border: 2px solid rgba(37, 211, 102, .5);
	opacity: 0;
	pointer-events: none;
}

.nj-ai-mic.is-live .nj-ai-mic__ring {
	animation: nj-ai-pulse 1.6s ease-out infinite;
}

@keyframes nj-ai-pulse {
	0% { opacity: .8; transform: scale(.9); }
	100% { opacity: 0; transform: scale(1.35); }
}

.nj-ai-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	max-width: 760px;
	margin: 8px auto 0;
	font-size: 11px;
	color: var(--nj-ai-dim);
	flex-wrap: wrap;
}

.nj-ai-meta__pill {
	background: rgba(251, 191, 36, .12);
	color: var(--nj-ai-gold);
	border-radius: 999px;
	padding: 3px 10px;
	font-weight: 800;
}

.nj-ai-meta__note {
	margin-inline-start: auto;
}

/* ══════════════════════════════════════════════════════════════════════
   RIGHT PANEL
   ══════════════════════════════════════════════════════════════════════ */
.nj-ai-panel {
	position: relative;
	z-index: 4;
	display: flex;
	flex-direction: column;
	background: linear-gradient(180deg, rgba(10, 15, 32, .92), rgba(7, 11, 24, .96));
	backdrop-filter: blur(22px);
	-webkit-backdrop-filter: blur(22px);
	border-left: 1px solid var(--nj-ai-line);
	overflow: hidden;
}

.nj-ai-panel__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 15px 16px 12px;
	border-bottom: 1px solid var(--nj-ai-line);
	flex: 0 0 auto;
}

.nj-ai-panel__head h3 {
	margin: 0;
	font-size: 12px;
	font-weight: 900;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: #c7d2fe;
}

.nj-ai-panel__close {
	display: none;
	width: 30px;
	height: 30px;
	border-radius: 8px;
	border: 1px solid var(--nj-ai-line);
	background: rgba(255, 255, 255, .05);
	color: var(--nj-ai-text);
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}

.nj-ai-panel__body {
	flex: 1 1 auto;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 14px 14px 20px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.nj-ai-panel__block h4 {
	margin: 0 0 9px;
	font-size: 11px;
	font-weight: 900;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--nj-ai-dim);
}

.nj-ai-panel__list {
	display: grid;
	gap: 8px;
}

.nj-ai-panel__empty {
	font-size: 12px;
	color: var(--nj-ai-dim);
	padding: 10px 12px;
	border-radius: 11px;
	background: rgba(255, 255, 255, .03);
	border: 1px dashed var(--nj-ai-line);
}

.nj-ai-pitem {
	display: flex;
	gap: 9px;
	align-items: flex-start;
	padding: 10px;
	border-radius: 12px;
	background: rgba(255, 255, 255, .04);
	border: 1px solid var(--nj-ai-line);
	font-size: 12px;
	text-decoration: none;
	color: var(--nj-ai-text);
	transition: transform .16s ease, background .16s ease;
}

.nj-ai-pitem:hover {
	transform: translateY(-1px);
	background: rgba(255, 255, 255, .07);
}

.nj-ai-pitem__icon {
	flex: 0 0 auto;
	width: 28px;
	height: 28px;
	border-radius: 9px;
	display: grid;
	place-items: center;
	background: rgba(99, 102, 241, .2);
	font-size: 14px;
}

.nj-ai-pitem__body {
	min-width: 0;
	flex: 1 1 auto;
}

.nj-ai-pitem__title {
	display: block;
	font-weight: 700;
	font-size: 12px;
	line-height: 1.35;
}

.nj-ai-pitem__meta {
	display: block;
	font-size: 10.5px;
	color: var(--nj-ai-muted);
	margin-top: 2px;
}

.nj-ai-vaultstats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
}

.nj-ai-vaultstat {
	padding: 11px 8px;
	border-radius: 12px;
	background: rgba(99, 102, 241, .1);
	border: 1px solid rgba(129, 140, 248, .2);
	text-align: center;
}

.nj-ai-vaultstat b {
	display: block;
	font-size: 17px;
	font-weight: 900;
	color: #c7d2fe;
}

.nj-ai-vaultstat span {
	display: block;
	font-size: 9.5px;
	color: var(--nj-ai-dim);
	text-transform: uppercase;
	letter-spacing: .06em;
	margin-top: 2px;
}

/* Scrim for mobile drawers */
.nj-ai-scrim {
	position: fixed;
	inset: 0;
	z-index: 3;
	background: rgba(3, 6, 14, .68);
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
}

.nj-ai-scrim[hidden] {
	display: none;
}

/* ══════════════════════════════════════════════════════════════════════
   VOICE OVERLAY
   ══════════════════════════════════════════════════════════════════════ */
.nj-ai-voice {
	position: fixed;
	inset: 0;
	z-index: 60;
	display: grid;
	place-items: center;
	background: radial-gradient(circle at 50% 40%, rgba(99, 102, 241, .22), rgba(3, 6, 14, .96) 62%);
	backdrop-filter: blur(24px);
	-webkit-backdrop-filter: blur(24px);
}

.nj-ai-voice[hidden] {
	display: none;
}

.nj-ai-voice__inner {
	text-align: center;
	padding: 24px;
	max-width: 520px;
	width: 100%;
}

.nj-ai-voice__orb {
	position: relative;
	width: 176px;
	height: 176px;
	margin: 0 auto 24px;
}

.nj-ai-voice__orb span {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	border: 2px solid rgba(99, 102, 241, .55);
	animation: nj-ai-voice-ring 2.4s ease-out infinite;
}

.nj-ai-voice__orb span:nth-child(2) { animation-delay: .8s; }
.nj-ai-voice__orb span:nth-child(3) { animation-delay: 1.6s; }

@keyframes nj-ai-voice-ring {
	0% { transform: scale(.55); opacity: .9; }
	100% { transform: scale(1.18); opacity: 0; }
}

.nj-ai-voice__status {
	margin: 0 0 8px;
	font-size: 18px;
	font-weight: 800;
}

.nj-ai-voice__transcript {
	margin: 0 auto 8px;
	max-width: 480px;
	font-size: 14.5px;
	color: var(--nj-ai-text);
	min-height: 24px;
}

.nj-ai-voice__hint {
	margin: 0 auto 24px;
	max-width: 420px;
	font-size: 12.5px;
	color: var(--nj-ai-muted);
}

.nj-ai-voice__actions {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 18px;
}

.nj-ai-voice__round {
	display: grid;
	place-items: center;
	width: 62px;
	height: 62px;
	border-radius: 50%;
	border: 1px solid var(--nj-ai-line);
	background: rgba(255, 255, 255, .06);
	color: var(--nj-ai-text);
	cursor: pointer;
	transition: transform .16s ease, background .16s ease;
}

.nj-ai-voice__round:hover {
	background: rgba(255, 255, 255, .11);
}

.nj-ai-voice__round:active {
	transform: scale(.93);
}

.nj-ai-voice__round--end {
	background: linear-gradient(135deg, #ef4444, #dc2626);
	border-color: transparent;
	color: #fff;
	box-shadow: 0 10px 28px rgba(239, 68, 68, .38);
}

/* ══════════════════════════════════════════════════════════════════════
   PREMIUM BRAIN ORB (pure SVG + CSS, zero image requests)
   ══════════════════════════════════════════════════════════════════════ */
.nj-ai-brain {
	position: relative;
	width: 188px;
	height: 188px;
	margin: 0 auto 26px;
	display: grid;
	place-items: center;
}

.nj-ai-brain__halo {
	position: absolute;
	inset: -16%;
	border-radius: 50%;
	background:
		radial-gradient(circle at 36% 38%, rgba(34, 211, 238, .50), transparent 56%),
		radial-gradient(circle at 66% 58%, rgba(244, 114, 182, .44), transparent 54%),
		radial-gradient(circle at 50% 45%, rgba(129, 140, 248, .46), transparent 70%);
	filter: blur(38px);
	animation: nj-ai-halo 4.6s ease-in-out infinite;
	will-change: opacity, transform;
}

@keyframes nj-ai-halo {
	0%, 100% { opacity: .72; transform: scale(1); }
	50% { opacity: 1; transform: scale(1.08); }
}

.nj-ai-brain__ring {
	position: absolute;
	border-radius: 50%;
	border: 1px solid rgba(129, 140, 248, .34);
}

.nj-ai-brain__ring--1 {
	inset: 4%;
	border-top-color: rgba(34, 211, 238, .85);
	border-right-color: transparent;
	animation: nj-ai-spin 9s linear infinite;
}

.nj-ai-brain__ring--2 {
	inset: -6%;
	border-bottom-color: rgba(192, 132, 252, .7);
	border-left-color: transparent;
	animation: nj-ai-spin 13s linear infinite reverse;
}

.nj-ai-brain__ring--3 {
	inset: 16%;
	border-top-color: rgba(52, 211, 153, .55);
	border-bottom-color: transparent;
	animation: nj-ai-spin 7s linear infinite;
}

/*
 * The logo PNG carries a dark square background. "screen" blending makes
 * that background vanish on the dark canvas, and the radial mask crops it
 * into a perfect circle - so the brain melts into the page with nothing
 * but its own light.
 */
.nj-ai-brain__core {
	position: relative;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
	mix-blend-mode: screen;
	-webkit-mask-image: radial-gradient(circle at 50% 50%, #000 52%, rgba(0, 0, 0, .75) 64%, transparent 74%);
	mask-image: radial-gradient(circle at 50% 50%, #000 52%, rgba(0, 0, 0, .75) 64%, transparent 74%);
	filter: drop-shadow(0 0 22px rgba(34, 211, 238, .45)) drop-shadow(0 0 44px rgba(129, 140, 248, .3));
	animation: nj-ai-float 6s ease-in-out infinite;
}

@keyframes nj-ai-float {
	0%, 100% { transform: translateY(0) scale(1); }
	50% { transform: translateY(-7px) scale(1.025); }
}

.nj-ai-brain__spark {
	position: absolute;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: #e0e7ff;
	box-shadow: 0 0 10px rgba(129, 140, 248, .9);
	animation: nj-ai-spark 3.6s ease-in-out infinite;
}

.nj-ai-brain__spark--1 { top: 12%; left: 26%; animation-delay: 0s; }
.nj-ai-brain__spark--2 { top: 30%; right: 8%; animation-delay: .7s; }
.nj-ai-brain__spark--3 { bottom: 18%; left: 14%; animation-delay: 1.4s; }
.nj-ai-brain__spark--4 { bottom: 26%; right: 20%; animation-delay: 2.1s; }

@keyframes nj-ai-spark {
	0%, 100% { opacity: .25; transform: scale(.6); }
	50% { opacity: 1; transform: scale(1.35); }
}

/* ══════════════════════════════════════════════════════════════════════
   WELCOME CHIPS
   ══════════════════════════════════════════════════════════════════════ */
.nj-ai-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 9px;
	justify-content: center;
	margin-top: 22px;
}

.nj-ai-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 11px 17px;
	border-radius: 999px;
	border: 1px solid var(--nj-ai-line-strong);
	background: rgba(255, 255, 255, .045);
	color: var(--nj-ai-text);
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: transform .18s cubic-bezier(.22, 1, .36, 1), background .18s ease, box-shadow .18s ease;
}

.nj-ai-chip:hover {
	transform: translateY(-2px);
	background: rgba(99, 102, 241, .16);
	box-shadow: 0 10px 26px rgba(79, 70, 229, .24);
}

.nj-ai-chip:active {
	transform: translateY(0) scale(.97);
}

.nj-ai-chip span {
	font-size: 15px;
	line-height: 1;
}

/* Home button */
.nj-ai-home-btn {
	text-decoration: none;
}


/* --- Reactive brain states ----------------------------------------- */
.nj-ai-brain.is-thinking .nj-ai-brain__core {
	animation: nj-ai-think 1.15s ease-in-out infinite;
}

@keyframes nj-ai-think {
	0%, 100% { transform: scale(1) rotate(0deg); filter: drop-shadow(0 10px 30px rgba(99, 102, 241, .45)); }
	50% { transform: scale(1.07) rotate(-3deg); filter: drop-shadow(0 14px 42px rgba(34, 211, 238, .7)); }
}

.nj-ai-brain.is-thinking .nj-ai-brain__halo {
	animation-duration: 1.6s;
}

.nj-ai-brain.is-thinking .nj-ai-brain__ring--1 {
	animation-duration: 2.2s;
}

.nj-ai-brain.is-thinking .nj-ai-brain__ring--2 {
	animation-duration: 3s;
}

.nj-ai-brain.is-listening .nj-ai-brain__core {
	animation: nj-ai-pulse-core 1s ease-in-out infinite;
}

@keyframes nj-ai-pulse-core {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.09); }
}

.nj-ai-brain.is-listening .nj-ai-brain__halo {
	background: radial-gradient(circle at 50% 45%, rgba(34, 211, 238, .5), rgba(37, 211, 102, .2) 46%, transparent 72%);
	animation-duration: 1.2s;
}

.nj-ai-brain.is-speaking .nj-ai-brain__core {
	animation: nj-ai-speak .55s ease-in-out infinite alternate;
}

@keyframes nj-ai-speak {
	0% { transform: scale(1) translateY(0); }
	100% { transform: scale(1.06) translateY(-5px); }
}

.nj-ai-brain.is-speaking .nj-ai-brain__halo {
	background: radial-gradient(circle at 50% 45%, rgba(251, 191, 36, .42), rgba(168, 85, 247, .2) 46%, transparent 72%);
}

.nj-ai-brain.is-speaking .nj-ai-brain__spark {
	animation-duration: 1.2s;
}

/* --- Glow border on the conversational console --------------------- */
.nj-ai-composer {
	position: relative;
	border-color: transparent;
	background:
		linear-gradient(var(--nj-ai-panel-solid), var(--nj-ai-panel-solid)) padding-box,
		linear-gradient(120deg, rgba(99, 102, 241, .85), rgba(34, 211, 238, .6), rgba(168, 85, 247, .75), rgba(37, 211, 102, .55)) border-box;
	box-shadow: 0 0 0 1px rgba(99, 102, 241, .18), 0 14px 44px rgba(79, 70, 229, .22);
}

.nj-ai-composer:focus-within {
	box-shadow: 0 0 0 1px rgba(129, 140, 248, .5), 0 0 34px rgba(99, 102, 241, .34), 0 14px 44px rgba(79, 70, 229, .26);
}

.nj-ai-composer::after {
	content: "";
	position: absolute;
	inset: -2px;
	border-radius: 24px;
	background: conic-gradient(from 0deg, rgba(99, 102, 241, .55), rgba(34, 211, 238, .45), rgba(168, 85, 247, .5), rgba(99, 102, 241, .55));
	filter: blur(16px);
	opacity: .5;
	z-index: -1;
	animation: nj-ai-conic 7s linear infinite;
	pointer-events: none;
}

@keyframes nj-ai-conic {
	to { transform: rotate(360deg); }
}

/* --- Inline app placeholder before the JIT assets arrive ------------ */
.nj-ai-app--inline:not(.nj-ai-app--ready) {
	opacity: .35;
	pointer-events: none;
}


/* ══════════════════════════════════════════════════════════════════════
   PREMIUM SEARCHABLE LANGUAGE SWITCHER
   ══════════════════════════════════════════════════════════════════════ */
.nj-ai-langbar {
	position: relative;
}

.nj-ai-langbar__current {
	display: flex;
	align-items: center;
	gap: 9px;
	width: 100%;
	padding: 10px 13px;
	border: 1px solid rgba(129, 140, 248, .3);
	border-radius: 13px;
	background: linear-gradient(135deg, rgba(99, 102, 241, .18), rgba(34, 211, 238, .08));
	color: var(--nj-ai-text);
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.nj-ai-langbar__current:hover {
	border-color: rgba(129, 140, 248, .55);
	background: linear-gradient(135deg, rgba(99, 102, 241, .28), rgba(34, 211, 238, .12));
}

.nj-ai-langbar__current:active {
	transform: scale(.98);
}

.nj-ai-langbar__globe {
	display: grid;
	place-items: center;
	width: 26px;
	height: 26px;
	border-radius: 8px;
	background: rgba(99, 102, 241, .28);
	color: #c7d2fe;
	flex: 0 0 auto;
}

.nj-ai-langbar__name {
	flex: 1 1 auto;
	min-width: 0;
	text-align: start;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.nj-ai-langbar__chev {
	flex: 0 0 auto;
	color: var(--nj-ai-muted);
	transition: transform .2s ease;
}

.nj-ai-langbar__current[aria-expanded="true"] .nj-ai-langbar__chev {
	transform: rotate(180deg);
}

.nj-ai-langbar__panel {
	position: absolute;
	inset-inline: 0;
	bottom: calc(100% + 8px);
	z-index: 20;

	display: flex;
	flex-direction: column;
	max-height: 320px;

	border-radius: 16px;
	border: 1px solid rgba(129, 140, 248, .34);
	background: rgba(13, 19, 38, .97);
	backdrop-filter: blur(22px);
	-webkit-backdrop-filter: blur(22px);
	box-shadow: 0 22px 60px rgba(2, 6, 23, .6);
	overflow: hidden;
	animation: nj-ai-pop .18s cubic-bezier(.22, 1, .36, 1);
}

.nj-ai-langbar__panel[hidden] {
	display: none;
}

@keyframes nj-ai-pop {
	from { opacity: 0; transform: translateY(8px) scale(.97); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}

.nj-ai-langbar__search {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 12px;
	border-bottom: 1px solid rgba(148, 163, 184, .16);
	color: var(--nj-ai-muted);
	flex: 0 0 auto;
}

.nj-ai-langbar__search input {
	flex: 1 1 auto;
	min-width: 0;
	border: 0;
	outline: 0;
	background: transparent;
	color: var(--nj-ai-text);
	font: inherit;
	font-size: 13px;
}

.nj-ai-langbar__search input::placeholder {
	color: var(--nj-ai-dim);
}

.nj-ai-langbar__list {
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 6px;
	flex: 1 1 auto;
}

.nj-ai-langbar__item {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 8px 10px;
	border-radius: 10px;
	color: var(--nj-ai-text);
	font-size: 13px;
	text-decoration: none;
	transition: background .14s ease;
}

.nj-ai-langbar__item:hover {
	background: rgba(255, 255, 255, .07);
}

.nj-ai-langbar__item.is-active {
	background: rgba(99, 102, 241, .22);
}

.nj-ai-langbar__code {
	flex: 0 0 auto;
	min-width: 30px;
	padding: 2px 6px;
	border-radius: 6px;
	background: rgba(255, 255, 255, .08);
	color: #c7d2fe;
	font-size: 10px;
	font-weight: 800;
	text-align: center;
	letter-spacing: .04em;
}

.nj-ai-langbar__label {
	flex: 1 1 auto;
	min-width: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.nj-ai-langbar__check {
	flex: 0 0 auto;
	color: var(--nj-ai-ok);
}

.nj-ai-langbar__empty {
	padding: 14px;
	text-align: center;
	font-size: 12px;
	color: var(--nj-ai-dim);
}

.nj-ai-langbar__empty[hidden] {
	display: none;
}


/* ══════════════════════════════════════════════════════════════════════
   STREAMING + MARKDOWN CODE BLOCKS
   ══════════════════════════════════════════════════════════════════════ */
.nj-ai-bubble--streaming {
	min-height: 46px;
}

.nj-ai-bubble h3,
.nj-ai-bubble h4,
.nj-ai-bubble h5,
.nj-ai-bubble h6 {
	margin: 0 0 10px;
	font-weight: 800;
	letter-spacing: -.015em;
	color: #fff;
}

.nj-ai-bubble h3 { font-size: 17px; }
.nj-ai-bubble h4 { font-size: 15.5px; }
.nj-ai-bubble h5 { font-size: 14.5px; }
.nj-ai-bubble h6 { font-size: 13.5px; }

.nj-ai-bubble em {
	font-style: italic;
	color: #dbe4ff;
}

.nj-ai-code {
	margin: 12px 0;
	border-radius: 14px;
	overflow: hidden;
	border: 1px solid rgba(129, 140, 248, .28);
	background: rgba(6, 10, 24, .82);
}

.nj-ai-code__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 7px 12px;
	background: rgba(99, 102, 241, .16);
	border-bottom: 1px solid rgba(129, 140, 248, .2);
}

.nj-ai-code__head span {
	font-size: 10.5px;
	font-weight: 800;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #a5b4fc;
}

.nj-ai-code__copy {
	border: 1px solid rgba(148, 163, 184, .28);
	background: rgba(255, 255, 255, .05);
	color: #cbd5f5;
	border-radius: 8px;
	padding: 3px 10px;
	font-size: 11px;
	font-weight: 700;
	cursor: pointer;
	transition: background .16s ease, color .16s ease;
}

.nj-ai-code__copy:hover {
	background: rgba(99, 102, 241, .3);
	color: #fff;
}

.nj-ai-code pre {
	margin: 0;
	padding: 13px 14px;
	overflow-x: auto;
}

.nj-ai-code code {
	background: transparent;
	padding: 0;
	font-size: 12.5px;
	line-height: 1.62;
	color: #d7e0ff;
	white-space: pre;
	font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

/* ══════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════════ */
@media (max-width: 1180px) {
	.nj-ai-app {
		grid-template-columns: var(--nj-ai-sidebar-w) minmax(0, 1fr);
	}

	.nj-ai-panel {
		position: fixed;
		inset-block: 0;
		inset-inline-end: 0;
		width: min(360px, 88vw);
		transform: translateX(100%);
		transition: transform .28s cubic-bezier(.22, 1, .36, 1);
		z-index: 5;
		box-shadow: -20px 0 50px rgba(0, 0, 0, .4);
	}

	.nj-ai-panel.is-open {
		transform: translateX(0);
	}

	.nj-ai-panel__close {
		display: grid;
		place-items: center;
	}
}

@media (max-width: 820px) {
	.nj-ai-app {
		grid-template-columns: minmax(0, 1fr);
	}

	.nj-ai-sidebar {
		position: fixed;
		inset-block: 0;
		inset-inline-start: 0;
		width: min(286px, 86vw);
		transform: translateX(-100%);
		transition: transform .28s cubic-bezier(.22, 1, .36, 1);
		z-index: 5;
		box-shadow: 20px 0 50px rgba(0, 0, 0, .45);
	}

	.nj-ai-sidebar.is-open {
		transform: translateX(0);
	}

	.nj-ai-sidebar__close {
		display: grid;
		place-items: center;
	}

	.nj-ai-drawer-toggle {
		display: grid;
		place-items: center;
	}

	.nj-ai-topbar {
		padding-inline: 12px;
	}

	.nj-ai-chat,
	.nj-ai-cards,
	.nj-ai-suggestions {
		padding-inline: 12px;
	}

	.nj-ai-composer-wrap {
		padding-inline: 12px;
	}

	.nj-ai-livetalk__label {
		display: none;
	}

	.nj-ai-livetalk {
		padding: 9px 11px;
	}

	.nj-ai-empty {
		margin-top: 3vh;
	}

	.nj-ai-empty__orb {
		width: 74px;
		height: 74px;
	}

	.nj-ai-empty h2 {
		font-size: 18px;
	}

	.nj-ai-msg {
		gap: 9px;
	}

	.nj-ai-msg__avatar {
		width: 30px;
		height: 30px;
	}

	.nj-ai-bubble {
		font-size: 14px;
		padding: 12px 14px;
	}

	.nj-ai-voice__orb {
		width: 140px;
		height: 140px;
	}
}

@media (max-width: 480px) {
	.nj-ai-app--inline {
		height: 74vh;
		min-height: 400px;
	}

	.nj-ai-identity__lang {
		display: none;
	}

	.nj-ai-voice__actions {
		gap: 12px;
	}

	.nj-ai-voice__round {
		width: 54px;
		height: 54px;
	}
}

/* ══════════════════════════════════════════════════════════════════════
   RTL
   ══════════════════════════════════════════════════════════════════════ */
.nj-ai-rtl .nj-ai-msg,
.nj-ai-rtl .nj-ai-msg--user {
	flex-direction: row-reverse;
}

/* ══════════════════════════════════════════════════════════════════════
   REDUCED MOTION
   ══════════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
	.nj-ai-orb,
	.nj-ai-empty__orb,
	.nj-ai-voice__orb span,
	.nj-ai-mic__ring,
	.nj-ai-livetalk__ring,
	.nj-ai-typing span,
	.nj-ai-sidebar,
	.nj-ai-panel {
		animation: none !important;
		transition: none !important;
	}
}

/* ==================================================================
   LAYOUT V2 - premium 3 column glass app (approved visual guide)
   ================================================================== */
.nj-ai-app,
.nj-ai-app *,
.nj-ai-app *::before,
.nj-ai-app *::after {
	box-sizing: border-box;
}

.nj-ai-app {
	grid-template-columns: 268px minmax(0, 1fr) 344px;
	gap: 14px;
	padding: 14px;
	height: 100dvh;
	max-height: 100dvh;
	background:
		radial-gradient(80% 60% at 10% -5%, rgba(99, 102, 241, .22), transparent 62%),
		radial-gradient(66% 52% at 92% 4%, rgba(34, 211, 238, .13), transparent 60%),
		radial-gradient(60% 50% at 50% 108%, rgba(168, 85, 247, .14), transparent 62%),
		linear-gradient(180deg, #060a15 0%, #04060d 100%);
}

.nj-ai-app--inline {
	gap: 10px;
	padding: 10px;
}

/* --- Sidebar card -------------------------------------------------- */
.nj-ai-sidebar {
	gap: 14px;
	padding: 18px 16px;
	border-radius: 26px;
	border: 1px solid rgba(148, 163, 184, .16);
	background: linear-gradient(180deg, rgba(17, 25, 48, .86), rgba(8, 12, 24, .94));
	box-shadow: 0 26px 60px rgba(2, 6, 23, .48), inset 0 1px 0 rgba(255, 255, 255, .06);
	backdrop-filter: blur(26px) saturate(140%);
	-webkit-backdrop-filter: blur(26px) saturate(140%);
}

/* --- Primary actions: New Chat + Live Talk ------------------------- */
.nj-ai-primary {
	display: grid;
	gap: 9px;
	margin-top: 2px;
}

.nj-ai-primary__btn {
	position: relative;
	display: flex;
	align-items: center;
	gap: 11px;
	width: 100%;
	padding: 11px 13px;
	border-radius: 15px;
	border: 1px solid rgba(148, 163, 184, .18);
	background: rgba(255, 255, 255, .045);
	color: var(--nj-ai-text);
	font: inherit;
	font-size: 14px;
	font-weight: 800;
	text-align: start;
	cursor: pointer;
	transition: transform .16s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.nj-ai-primary__btn:hover {
	transform: translateY(-1px);
	background: rgba(255, 255, 255, .08);
}

.nj-ai-primary__btn:active {
	transform: scale(.98);
}

.nj-ai-primary__btn--chat {
	border-color: rgba(129, 140, 248, .5);
	background: linear-gradient(135deg, rgba(99, 102, 241, .32), rgba(34, 211, 238, .14));
	box-shadow: 0 12px 30px rgba(79, 70, 229, .3), inset 0 1px 0 rgba(255, 255, 255, .14);
}

.nj-ai-primary__btn--voice {
	border-color: rgba(52, 211, 153, .32);
	background: linear-gradient(135deg, rgba(16, 185, 129, .18), rgba(34, 211, 238, .08));
}

.nj-ai-primary__btn.is-off,
.nj-ai-primary__btn:disabled {
	opacity: .42;
	cursor: not-allowed;
}

.nj-ai-primary__icon {
	display: grid;
	place-items: center;
	flex: 0 0 auto;
	width: 34px;
	height: 34px;
	border-radius: 11px;
	background: rgba(255, 255, 255, .09);
	color: #e0e7ff;
}

.nj-ai-primary__btn--chat .nj-ai-primary__icon {
	background: linear-gradient(135deg, #6366f1, #22d3ee);
	color: #fff;
	animation: nj-ai-plus-glow 2.8s ease-in-out infinite;
}

.nj-ai-primary__btn--voice .nj-ai-primary__icon {
	background: linear-gradient(135deg, rgba(16, 185, 129, .9), rgba(34, 211, 238, .7));
	color: #04241c;
}

@keyframes nj-ai-plus-glow {
	0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, .0), 0 0 14px rgba(99, 102, 241, .45); }
	50% { box-shadow: 0 0 0 5px rgba(99, 102, 241, .14), 0 0 26px rgba(34, 211, 238, .7); }
}

.nj-ai-primary__label {
	flex: 1 1 auto;
	min-width: 0;
	line-height: 1.25;
}

.nj-ai-brandmark__slash {
	margin-inline-start: 1px;
	color: #67e8f9;
}

.nj-ai-chip__text {
	min-width: 0;
}

.nj-ai-primary__sub {
	font-weight: 600;
	font-size: 11.5px;
	color: var(--nj-ai-muted);
}

/* --- Nav ----------------------------------------------------------- */
.nj-ai-nav {
	display: flex;
	flex-direction: column;
	gap: 3px;
	margin-top: 2px;
}

.nj-ai-nav__item {
	display: flex;
	align-items: center;
	gap: 11px;
	width: 100%;
	padding: 10px 12px;
	border: 0;
	border-radius: 13px;
	background: transparent;
	color: var(--nj-ai-muted);
	font: inherit;
	font-size: 13.5px;
	font-weight: 700;
	text-align: start;
	text-decoration: none;
	cursor: pointer;
	transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}

.nj-ai-nav__item:hover {
	background: rgba(255, 255, 255, .055);
	color: var(--nj-ai-text);
}

.nj-ai-nav__item.is-active {
	background: linear-gradient(135deg, rgba(99, 102, 241, .22), rgba(34, 211, 238, .07));
	color: #e0e7ff;
	box-shadow: inset 0 0 0 1px rgba(129, 140, 248, .26);
}

.nj-ai-nav__icon {
	display: grid;
	place-items: center;
	flex: 0 0 auto;
	width: 30px;
	height: 30px;
	border-radius: 9px;
	background: rgba(255, 255, 255, .05);
	color: currentColor;
}

.nj-ai-nav__item.is-active .nj-ai-nav__icon {
	background: rgba(99, 102, 241, .28);
	color: #c7d2fe;
}

.nj-ai-nav__label {
	min-width: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* --- Sidebar foot: user + live wallet ------------------------------ */
.nj-ai-sidebar__foot {
	display: grid;
	gap: 8px;
	margin-top: auto;
}

.nj-ai-usercard {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 10px;
	border-radius: 16px;
	border: 1px solid rgba(148, 163, 184, .13);
	background: rgba(255, 255, 255, .035);
}

.nj-ai-usercard__avatar {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	border-radius: 12px;
	overflow: hidden;
	background: linear-gradient(135deg, #6366f1, #22d3ee);
}

.nj-ai-usercard__avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.nj-ai-usercard__initial {
	font-size: 15px;
	font-weight: 900;
	color: #fff;
}

.nj-ai-usercard__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-width: 0;
	line-height: 1.3;
}

.nj-ai-usercard__body strong {
	font-size: 13px;
	font-weight: 800;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.nj-ai-usercard__body small {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--nj-ai-dim);
}

.nj-ai-usercard__badge {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	border-radius: 9px;
	background: rgba(251, 191, 36, .14);
	color: var(--nj-ai-gold);
}

.nj-ai-wallet {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border-radius: 16px;
	border: 1px solid rgba(52, 211, 153, .28);
	background: linear-gradient(135deg, rgba(16, 185, 129, .15), rgba(34, 211, 238, .06));
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07);
}

.nj-ai-wallet__icon {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	border-radius: 10px;
	background: rgba(16, 185, 129, .22);
	color: #6ee7b7;
}

.nj-ai-wallet__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-width: 0;
	line-height: 1.25;
}

.nj-ai-wallet__label {
	font-size: 9px;
	font-weight: 800;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--nj-ai-muted);
}

.nj-ai-wallet strong {
	font-size: 14.5px;
	font-weight: 800;
	color: #d1fae5;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.nj-ai-wallet__online {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 9px;
	font-weight: 800;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #6ee7b7;
}

.nj-ai-wallet__online i {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #34d399;
	box-shadow: 0 0 8px #34d399;
	animation: nj-ai-blink 2s ease-in-out infinite;
}

@keyframes nj-ai-blink {
	0%, 100% { opacity: 1; }
	50% { opacity: .35; }
}

/* --- Main + panel cards -------------------------------------------- */
.nj-ai-main {
	border-radius: 26px;
	border: 1px solid rgba(148, 163, 184, .14);
	background: linear-gradient(180deg, rgba(14, 20, 40, .8), rgba(6, 10, 20, .9));
	box-shadow: 0 26px 70px rgba(2, 6, 23, .5), inset 0 1px 0 rgba(255, 255, 255, .05);
	backdrop-filter: blur(22px);
	-webkit-backdrop-filter: blur(22px);
	overflow: hidden;
}

.nj-ai-panel {
	border-radius: 26px;
	border: 1px solid rgba(148, 163, 184, .14);
	background: linear-gradient(180deg, rgba(15, 21, 42, .82), rgba(6, 10, 20, .92));
	box-shadow: 0 26px 70px rgba(2, 6, 23, .5), inset 0 1px 0 rgba(255, 255, 255, .05);
	backdrop-filter: blur(22px);
	-webkit-backdrop-filter: blur(22px);
}

.nj-ai-topbar {
	padding: 11px 16px;
	padding-top: max(11px, env(safe-area-inset-top));
	background: transparent;
	border-bottom: 1px solid rgba(148, 163, 184, .1);
}

.nj-ai-topbar__panel {
	display: none;
}

/* --- Top right searchable language switcher ------------------------ */
.nj-ai-topbar .nj-ai-langbar__current {
	width: auto;
	gap: 8px;
	padding: 8px 12px;
	border-radius: 12px;
	border: 1px solid rgba(148, 163, 184, .2);
	background: rgba(255, 255, 255, .05);
	font-size: 12.5px;
	font-weight: 800;
}

.nj-ai-topbar .nj-ai-langbar__current:hover {
	background: rgba(255, 255, 255, .09);
	border-color: rgba(129, 140, 248, .45);
}

.nj-ai-topbar .nj-ai-langbar__globe {
	width: 23px;
	height: 23px;
	border-radius: 7px;
}

.nj-ai-langbar__kicker {
	font-size: 9px;
	font-weight: 800;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--nj-ai-dim);
	white-space: nowrap;
}

.nj-ai-langbar__sep {
	color: rgba(148, 163, 184, .38);
	font-weight: 600;
}

.nj-ai-langbar__name {
	flex: 0 1 auto;
	font-weight: 800;
	white-space: nowrap;
	max-width: 120px;
	overflow: hidden;
	text-overflow: ellipsis;
}

.nj-ai-topbar .nj-ai-langbar__panel {
	inset-inline-start: auto;
	inset-inline-end: 0;
	top: calc(100% + 10px);
	bottom: auto;
	width: min(292px, 84vw);
	max-height: min(372px, 64vh);
	border-radius: 17px;
	box-shadow: 0 26px 70px rgba(2, 6, 23, .72);
}

/* --- Compact animated brain --------------------------------------- */
.nj-ai-brain {
	width: 156px;
	height: 156px;
	margin: 0 auto 22px;
}

.nj-ai-brain__core {
	width: 132px;
	height: 132px;
	object-fit: contain;
	border-radius: 0;
	mix-blend-mode: normal;
	-webkit-mask-image: none;
	mask-image: none;
	filter: drop-shadow(0 0 20px rgba(34, 211, 238, .5)) drop-shadow(0 0 40px rgba(129, 140, 248, .38));
}

/* Reactive aura: typing / listening makes the neon breathe faster. */
.nj-ai-brain.is-reactive .nj-ai-brain__halo {
	animation-duration: 1.15s;
	opacity: 1;
}

.nj-ai-brain.is-reactive .nj-ai-brain__core {
	animation-duration: 1.4s;
	filter: drop-shadow(0 0 26px rgba(34, 211, 238, .72)) drop-shadow(0 0 54px rgba(129, 140, 248, .55));
}

/* --- Composer ------------------------------------------------------ */
.nj-ai-composer-wrap {
	padding: 10px 18px calc(12px + env(safe-area-inset-bottom));
	background: linear-gradient(to top, rgba(6, 10, 20, .95) 55%, rgba(6, 10, 20, 0));
}

.nj-ai-composer {
	border-radius: 20px;
}

.nj-ai-mic {
	background: rgba(99, 102, 241, .16);
	color: #c7d2fe;
}

.nj-ai-mic.is-live {
	background: rgba(37, 211, 102, .26);
	color: #86efac;
}

.nj-ai-send {
	box-shadow: 0 8px 22px rgba(79, 70, 229, .42);
}

.nj-ai-send:disabled {
	opacity: .5;
	cursor: not-allowed;
	box-shadow: none;
}

/* --- Chat breathing room ------------------------------------------ */
.nj-ai-empty h2 {
	font-size: 26px;
	letter-spacing: -.01em;
}

.nj-ai-empty p {
	max-width: 460px;
	margin-inline: auto;
}

/* --- Right panel polish ------------------------------------------- */
.nj-ai-panel__head {
	padding: 15px 16px 12px;
	border-bottom: 1px solid rgba(148, 163, 184, .1);
}

.nj-ai-panel__head h3 {
	font-size: 14px;
	font-weight: 800;
	letter-spacing: .01em;
}

.nj-ai-panel__body {
	padding: 14px;
	gap: 14px;
}

.nj-ai-panel__block {
	border-radius: 16px;
	border: 1px solid rgba(148, 163, 184, .12);
	background: rgba(255, 255, 255, .03);
	padding: 12px;
}

.nj-ai-panel__block h4 {
	font-size: 10px;
	font-weight: 800;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--nj-ai-muted);
	margin-bottom: 8px;
}

/* --- Tablet: 2 columns, sidebar becomes an icon drawer ------------- */
@media (min-width: 821px) and (max-width: 1180px) {
	.nj-ai-app {
		grid-template-columns: 88px minmax(0, 1fr);
	}

	.nj-ai-sidebar {
		align-items: center;
		padding: 16px 10px;
		gap: 12px;
	}

	.nj-ai-brandmark__text,
	.nj-ai-primary__label,
	.nj-ai-nav__label,
	.nj-ai-usercard__body,
	.nj-ai-usercard__badge,
	.nj-ai-wallet__label,
	.nj-ai-wallet__online,
	.nj-ai-sidebar__close {
		display: none;
	}

	.nj-ai-brandmark {
		justify-content: center;
	}

	.nj-ai-primary__btn,
	.nj-ai-nav__item {
		justify-content: center;
		padding: 9px;
	}

	.nj-ai-nav__icon {
		width: 34px;
		height: 34px;
	}

	.nj-ai-usercard {
		justify-content: center;
		padding: 5px;
		border: 0;
		background: transparent;
	}

	.nj-ai-wallet {
		flex-direction: column;
		gap: 3px;
		padding: 7px 3px;
		width: 100%;
	}

	.nj-ai-wallet__body {
		align-items: center;
		width: 100%;
	}

	.nj-ai-wallet strong {
		font-size: 9.5px;
		max-width: 100%;
		text-align: center;
	}

	.nj-ai-sidebar__foot {
		width: 100%;
	}

	.nj-ai-topbar__panel {
		display: grid;
	}
}

/* --- Mobile: 1 column, hamburger, thumb friendly ------------------- */
@media (max-width: 820px) {
	.nj-ai-app {
		grid-template-columns: minmax(0, 1fr);
		gap: 0;
		padding: 0;
	}

	.nj-ai-main {
		border: 0;
		border-radius: 0;
		background: transparent;
		box-shadow: none;
		backdrop-filter: none;
		-webkit-backdrop-filter: none;
	}

	.nj-ai-sidebar {
		padding: 18px 16px;
		padding-top: max(18px, env(safe-area-inset-top));
		border-radius: 0 24px 24px 0;
	}

	.nj-ai-panel {
		border-radius: 24px 0 0 24px;
		width: min(344px, 92vw);
	}

	.nj-ai-topbar {
		gap: 8px;
		padding: 10px 12px;
		padding-top: max(10px, env(safe-area-inset-top));
		background: rgba(7, 11, 24, .82);
	}

	.nj-ai-identity__orb img {
		width: 28px;
		height: 28px;
	}

	.nj-ai-identity__text strong {
		font-size: 12px;
	}

	.nj-ai-identity__text small {
		font-size: 10px;
	}

	.nj-ai-langbar__kicker,
	.nj-ai-langbar__sep {
		display: none;
	}

	.nj-ai-topbar .nj-ai-langbar__current {
		padding: 7px 10px;
		gap: 6px;
	}

	.nj-ai-langbar__name {
		max-width: 74px;
	}

	.nj-ai-brain {
		width: 128px;
		height: 128px;
		margin-bottom: 16px;
	}

	.nj-ai-brain__core {
		width: 112px;
		height: 112px;
	}

	.nj-ai-empty {
		margin-top: 2vh;
	}

	.nj-ai-empty h2 {
		font-size: 20px;
	}

	.nj-ai-chat,
	.nj-ai-cards,
	.nj-ai-suggestions {
		padding-inline: 12px;
	}

	.nj-ai-composer-wrap {
		padding: 8px 10px calc(10px + env(safe-area-inset-bottom));
	}

	.nj-ai-composer {
		border-radius: 20px;
		padding: 6px;
		gap: 4px;
	}

	.nj-ai-input {
		font-size: 16px;
		line-height: 1.45;
		padding: 9px 2px;
	}

	.nj-ai-send,
	.nj-ai-mic {
		width: 44px;
		height: 44px;
	}

	.nj-ai-composer__icon {
		width: 40px;
		height: 40px;
	}

	.nj-ai-meta {
		font-size: 10px;
		gap: 6px;
	}

	.nj-ai-meta__note {
		display: none;
	}
}

@media (max-width: 480px) {
	.nj-ai-identity__text strong {
		display: none;
	}

	.nj-ai-topbar__panel {
		display: none;
	}

	.nj-ai-langbar__name {
		max-width: 62px;
	}
}

/* ---- Guest wallet strip (temp guest session balance) ---- */
.nj-ai-wallet--guest {
	border-color: rgba(129, 140, 248, .32);
	background: rgba(99, 102, 241, .1);
}

.nj-ai-wallet--guest .nj-ai-wallet__label {
	color: #b9c2e4;
}

.nj-ai-wallet--guest .nj-ai-wallet__body strong {
	color: #e0e7ff;
}

/* ==================================================================
   FINAL POLISH - 40px avatars, dual voice buttons, dark glass input,
   audio player, neon word highlight, transactions, voice orb, quiz timer
   ================================================================== */

/* ---- 40px message avatars (AI brand logo / user photo / guest) ---- */
.nj-ai-msg__avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	font-size: 13px;
	font-weight: 800;
	background: rgba(255, 255, 255, .07);
	border: 1px solid var(--nj-ai-line);
	color: var(--nj-ai-text);
	overflow: hidden;
	box-shadow: 0 0 0 1px rgba(129, 140, 248, .28), 0 6px 18px rgba(79, 70, 229, .22);
}

.nj-ai-msg--ai .nj-ai-msg__avatar {
	background: linear-gradient(135deg, #6366f1, #22d3ee);
	border: 0;
	color: #fff;
	box-shadow: 0 0 0 1px rgba(34, 211, 238, .6), 0 0 24px rgba(99, 102, 241, .6), 0 8px 22px rgba(79, 70, 229, .42);
}

.nj-ai-msg--ai .nj-ai-msg__avatar img,
.nj-ai-msg--ai .nj-ai-msg__avatar .nj-ai-avatar-img {
	width: 40px;
	height: 40px;
	object-fit: cover;
	border-radius: 50%;
	display: block;
}

.nj-ai-msg--user .nj-ai-msg__avatar {
	background: rgba(255, 255, 255, .05);
	border: 1px solid rgba(148, 163, 184, .24);
	box-shadow: 0 0 0 1px rgba(34, 211, 238, .4), 0 0 18px rgba(34, 211, 238, .24);
}

.nj-ai-msg--user .nj-ai-msg__avatar img,
.nj-ai-msg--user .nj-ai-msg__avatar .nj-ai-avatar-img {
	width: 40px;
	height: 40px;
	object-fit: cover;
	border-radius: 50%;
	display: block;
}

.nj-ai-msg__avatar--guest {
	background: rgba(99, 102, 241, .2);
	border: 1px dashed rgba(129, 140, 248, .45);
	color: #c7d2fe;
}

@media (max-width: 820px) {
	.nj-ai-msg__avatar,
	.nj-ai-msg--ai .nj-ai-msg__avatar,
	.nj-ai-msg--user .nj-ai-msg__avatar {
		width: 40px;
		height: 40px;
	}
}

/* ---- Composer: mic (Voice-to-Text) + Live waveform side by side, left of Send ---- */
.nj-ai-composer {
	gap: 8px;
	padding: 8px;
}

.nj-ai-mic,
.nj-ai-live {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	border: 0;
	cursor: pointer;
	color: #c7d2fe;
	background: rgba(99, 102, 241, .16);
	transition: transform .16s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}

.nj-ai-mic:disabled {
	opacity: .32;
	cursor: not-allowed;
}

.nj-ai-mic.is-live {
	background: rgba(37, 211, 102, .26);
	color: #86efac;
}

.nj-ai-live {
	background: rgba(34, 211, 238, .14);
	border: 1px solid rgba(34, 211, 238, .3);
	color: #a5f3fc;
}

.nj-ai-live.is-live {
	background: rgba(37, 211, 102, .26);
	border-color: rgba(37, 211, 102, .45);
	color: #86efac;
}

.nj-ai-live__bars {
	display: inline-flex;
	align-items: flex-end;
	justify-content: center;
	gap: 2px;
	height: 14px;
}

.nj-ai-live__bars i {
	width: 3px;
	height: 4px;
	border-radius: 2px;
	background: currentColor;
	animation: nj-ai-bars 1.15s ease-in-out infinite;
}

.nj-ai-live__bars i:nth-child(2) { animation-delay: .16s; }
.nj-ai-live__bars i:nth-child(3) { animation-delay: .32s; }
.nj-ai-live__bars i:nth-child(4) { animation-delay: .48s; }
.nj-ai-live__bars i:nth-child(5) { animation-delay: .64s; }
.nj-ai-live__bars i:nth-child(6) { animation-delay: .8s; }

@keyframes nj-ai-bars {
	0%, 100% { height: 4px; }
	50% { height: 13px; }
}

.nj-ai-mic__ring {
	position: absolute;
	inset: -3px;
	border-radius: 50%;
	border: 2px solid rgba(37, 211, 102, .5);
	opacity: 0;
	pointer-events: none;
}

.nj-ai-mic.is-live .nj-ai-mic__ring {
	animation: nj-ai-pulse 1.6s ease-out infinite;
}

/* Dark glass composer stays dark on focus */
.nj-ai-composer {
	background: rgba(13, 19, 38, .72);
	border: 1px solid rgba(129, 140, 248, .24);
	backdrop-filter: blur(18px);
	-webkit-backdrop-filter: blur(18px);
}

.nj-ai-composer:focus-within {
	border-color: rgba(129, 140, 248, .55);
	box-shadow: 0 0 34px rgba(99, 102, 241, .3), 0 14px 44px rgba(79, 70, 229, .22);
}

.nj-ai-input {
	background: transparent;
	color: #f1f5f9;
}

.nj-ai-input::placeholder {
	color: rgba(148, 163, 184, .75);
}

/* ---- Corner language switcher (absolute top-right) ---- */
.nj-ai-corner {
	position: fixed;
	top: max(14px, env(safe-area-inset-top));
	right: max(14px, env(safe-area-inset-right));
	z-index: 45;
}

/* ---- Audio player (Listen / Play / Pause / Stop / speed) ---- */
.nj-ai-audio {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 10px;
	padding: 8px 10px;
	border-radius: 13px;
	background: rgba(255, 255, 255, .045);
	border: 1px solid rgba(129, 140, 248, .22);
}

.nj-ai-audio__play {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	border: 1px solid rgba(129, 140, 248, .4);
	background: linear-gradient(135deg, rgba(99, 102, 241, .32), rgba(34, 211, 238, .12));
	color: #e0e7ff;
	border-radius: 999px;
	padding: 7px 13px;
	font: inherit;
	font-size: 11.5px;
	font-weight: 800;
	cursor: pointer;
	transition: background .16s ease, transform .16s ease;
}

.nj-ai-audio__play:hover {
	background: linear-gradient(135deg, rgba(99, 102, 241, .45), rgba(34, 211, 238, .2));
	transform: translateY(-1px);
}

.nj-ai-audio__ctrl {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.nj-ai-audio__btn {
	width: 27px;
	height: 27px;
	border-radius: 50%;
	border: 1px solid var(--nj-ai-line);
	background: rgba(255, 255, 255, .06);
	color: var(--nj-ai-text);
	display: grid;
	place-items: center;
	cursor: pointer;
}

.nj-ai-audio__speed {
	background: rgba(255, 255, 255, .06);
	color: var(--nj-ai-text);
	border: 1px solid var(--nj-ai-line);
	border-radius: 8px;
	padding: 3px 5px;
	font: inherit;
	font-size: 11px;
	font-weight: 700;
}

/* ---- Neon live word highlight while reading ---- */
.nj-ai-bubble .nj-ai-word {
	border-radius: 4px;
	padding: 0 1px;
	transition: background .12s ease, color .12s ease, text-shadow .12s ease;
}

.nj-ai-bubble .nj-ai-word.is-speaking {
	background: linear-gradient(120deg, rgba(34, 211, 238, .55), rgba(168, 85, 247, .55));
	color: #fff;
	text-shadow: 0 0 12px rgba(34, 211, 238, .95), 0 0 30px rgba(168, 85, 247, .8);
}

/* ---- Wallet transactions rows ---- */
.nj-ai-tx {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 9px 11px;
	border-radius: 12px;
	background: rgba(255, 255, 255, .04);
	border: 1px solid var(--nj-ai-line);
	font-size: 12px;
}

.nj-ai-tx.is-credit {
	border-color: rgba(52, 211, 153, .38);
	background: rgba(16, 185, 129, .09);
}

.nj-ai-tx.is-debit {
	border-color: rgba(148, 163, 184, .2);
}

.nj-ai-tx__icon {
	flex: 0 0 auto;
	width: 24px;
	height: 24px;
	border-radius: 8px;
	display: grid;
	place-items: center;
	background: rgba(16, 185, 129, .2);
	color: #6ee7b7;
	font-weight: 900;
}

.nj-ai-tx.is-debit .nj-ai-tx__icon {
	background: rgba(148, 163, 184, .14);
	color: var(--nj-ai-muted);
}

.nj-ai-tx__body {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.nj-ai-tx__body strong {
	font-size: 12px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.nj-ai-tx__body small {
	font-size: 10px;
	color: var(--nj-ai-dim);
}

.nj-ai-tx__amount {
	font-size: 12px;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
}

/* ---- Gemini-style fullscreen voice orb (new markup) ---- */
.nj-ai-voice__brain {
	position: relative;
	width: 176px;
	height: 176px;
	margin: 0 auto 24px;
}

.nj-ai-voice__brain img {
	width: 132px;
	height: 132px;
	object-fit: cover;
	border-radius: 50%;
	mix-blend-mode: screen;
	filter: drop-shadow(0 0 22px rgba(34, 211, 238, .5)) drop-shadow(0 0 44px rgba(129, 140, 248, .32));
	animation: nj-ai-float 6s ease-in-out infinite;
}

.nj-ai-voice__halo {
	position: absolute;
	inset: -14%;
	border-radius: 50%;
	background: radial-gradient(circle at 50% 45%, rgba(99, 102, 241, .42), rgba(34, 211, 238, .2) 46%, transparent 72%);
	filter: blur(30px);
	animation: nj-ai-halo 4.6s ease-in-out infinite;
}

.nj-ai-voice__ring {
	position: absolute;
	border-radius: 50%;
	border: 2px solid rgba(99, 102, 241, .55);
}

.nj-ai-voice__ring--1 {
	inset: 2%;
	border-top-color: rgba(34, 211, 238, .9);
	animation: nj-ai-spin 2.6s linear infinite;
}

.nj-ai-voice__ring--2 {
	inset: -6%;
	border-bottom-color: rgba(192, 132, 252, .7);
	border-left-color: transparent;
	animation: nj-ai-spin 13s linear infinite reverse;
}

.nj-ai-voice__ring--3 {
	inset: 16%;
	border-top-color: rgba(52, 211, 153, .55);
	border-bottom-color: transparent;
	animation: nj-ai-spin 7s linear infinite;
}

.nj-ai-voice.is-live .nj-ai-voice__brain {
	animation: nj-ai-float 3.4s ease-in-out infinite;
}

.nj-ai-voice.is-live .nj-ai-voice__halo {
	animation-duration: 1.3s;
	background: radial-gradient(circle at 50% 45%, rgba(34, 211, 238, .55), rgba(37, 211, 102, .28) 46%, transparent 72%);
}

.nj-ai-voice.is-speaking .nj-ai-voice__brain {
	animation: nj-ai-speak .55s ease-in-out infinite alternate;
}

.nj-ai-voice.is-speaking .nj-ai-voice__halo {
	animation-duration: 1.6s;
	background: radial-gradient(circle at 50% 45%, rgba(251, 191, 36, .4), rgba(168, 85, 247, .22) 46%, transparent 72%);
}

.nj-ai-voice__status {
	margin: 0 0 10px;
	font-size: 20px;
	font-weight: 900;
}

.nj-ai-voice.is-speaking .nj-ai-voice__status {
	color: #fde68a;
}

.nj-ai-voice__transcript {
	margin: 0 auto 10px;
	max-width: 480px;
	font-size: 15px;
	line-height: 1.6;
	color: var(--nj-ai-text);
	min-height: 26px;
}

.nj-ai-voice__wave {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	height: 44px;
	margin: 0 auto 14px;
	max-width: 320px;
}

.nj-ai-voice__wave i {
	width: 4px;
	height: 6px;
	border-radius: 3px;
	background: linear-gradient(180deg, #22d3ee, #6366f1);
	animation: nj-ai-wave 1.2s ease-in-out infinite;
}

.nj-ai-voice__wave i:nth-child(2) { animation-delay: .14s; }
.nj-ai-voice__wave i:nth-child(3) { animation-delay: .28s; }
.nj-ai-voice__wave i:nth-child(4) { animation-delay: .42s; }
.nj-ai-voice__wave i:nth-child(5) { animation-delay: .56s; }
.nj-ai-voice__wave i:nth-child(6) { animation-delay: .7s; }
.nj-ai-voice__wave i:nth-child(7) { animation-delay: .84s; }
.nj-ai-voice__wave i:nth-child(8) { animation-delay: .98s; }
.nj-ai-voice__wave i:nth-child(9) { animation-delay: 1.12s; }
.nj-ai-voice__wave i:nth-child(10) { animation-delay: 1.26s; }

@keyframes nj-ai-wave {
	0%, 100% { height: 6px; }
	50% { height: 34px; }
}

.nj-ai-voice.is-live .nj-ai-voice__wave i {
	background: linear-gradient(180deg, #34d399, #22d3ee);
	animation-duration: 0.85s;
}

.nj-ai-voice.is-speaking .nj-ai-voice__wave i {
	background: linear-gradient(180deg, #f59e0b, #ef4444);
	animation-duration: 0.65s;
}

.nj-ai-voice__hint {
	margin: 0 auto 22px;
	max-width: 420px;
	font-size: 12.5px;
	color: var(--nj-ai-muted);
}

.nj-ai-voice__actions {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 18px;
}

.nj-ai-voice__round {
	display: grid;
	place-items: center;
	width: 62px;
	height: 62px;
	border-radius: 50%;
	border: 1px solid var(--nj-ai-line);
	background: rgba(255, 255, 255, .06);
	color: var(--nj-ai-text);
	cursor: pointer;
	transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}

.nj-ai-voice__round:hover {
	background: rgba(255, 255, 255, .11);
}

.nj-ai-voice__round:active {
	transform: scale(.93);
}

.nj-ai-voice__round.is-live {
	background: rgba(37, 211, 102, .26);
	border-color: rgba(37, 211, 102, .5);
	color: #86efac;
	box-shadow: 0 0 22px rgba(37, 211, 102, .35);
}

.nj-ai-voice__round--end {
	background: linear-gradient(135deg, #ef4444, #dc2626);
	border-color: transparent;
	color: #fff;
	box-shadow: 0 10px 28px rgba(239, 68, 68, .38);
}

/* ---- Voice quiz timer (30s, red neon pulse in last 5s) ---- */
.nj-ai-quiz__timer {
	position: relative;
	width: 64px;
	height: 64px;
	margin: 0 auto 10px;
}

.nj-ai-quiz__timer svg {
	display: block;
	width: 64px;
	height: 64px;
	transform: rotate(-90deg);
}

.nj-ai-quiz__timer circle {
	fill: none;
	stroke-width: 5;
	stroke-linecap: round;
}

.nj-ai-quiz__timer .nj-ai-quiz__track {
	stroke: rgba(255, 255, 255, .08);
}

.nj-ai-quiz__timer .nj-ai-quiz__bar {
	stroke: #22d3ee;
	stroke-dasharray: 157;
	stroke-dashoffset: 0;
	transition: stroke-dashoffset .2s linear;
}

.nj-ai-quiz__timer__label {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	font-size: 15px;
	font-weight: 900;
	color: var(--nj-ai-text);
}

.nj-ai-quiz__timer.is-danger .nj-ai-quiz__bar {
	stroke: #ef4444;
}

.nj-ai-quiz__timer.is-danger .nj-ai-quiz__timer__label {
	color: #fca5a5;
}

.nj-ai-quiz__timer.is-danger .nj-ai-quiz__timer__label::after {
	content: "";
	position: absolute;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #ef4444;
	box-shadow: 0 0 12px #ef4444;
	animation: nj-ai-pulse 1s ease-out infinite;
}

/* ---- Guest user card actions (Login / Register) ---- */
.nj-ai-usercard--guest {
	border: 1px dashed rgba(129, 140, 248, .42);
	background: rgba(99, 102, 241, .08);
}

.nj-ai-usercard--guest .nj-ai-usercard__avatar {
	background: rgba(99, 102, 241, .26);
}

.nj-ai-usercard--guest .nj-ai-usercard__initial {
	color: #e0e7ff;
}

.nj-ai-usercard__actions {
	display: flex;
	gap: 8px;
	margin-top: 9px;
}

.nj-ai-usercard__actions a,
.nj-ai-usercard__actions button {
	flex: 1;
	text-align: center;
	padding: 8px 10px;
	border-radius: 11px;
	font: inherit;
	font-size: 12px;
	font-weight: 800;
	text-decoration: none;
	border: 1px solid rgba(129, 140, 248, .42);
	background: rgba(99, 102, 241, .18);
	color: #e0e7ff;
	cursor: pointer;
	transition: background .16s ease, transform .16s ease;
}

.nj-ai-usercard__actions a:hover,
.nj-ai-usercard__actions button:hover {
	background: rgba(99, 102, 241, .32);
	transform: translateY(-1px);
}

.nj-ai-usercard__actions a.nj-ai-usercard__btn--register,
.nj-ai-usercard__actions button.nj-ai-usercard__btn--register {
	border-color: rgba(52, 211, 153, .5);
	background: rgba(16, 185, 129, .16);
	color: #a7f3d0;
}

/* ---- Guest wallet strip inside sidebar foot ---- */
.nj-ai-usercard--guest .nj-ai-wallet {
	border-color: rgba(129, 140, 248, .3);
	background: rgba(99, 102, 241, .08);
}

.nj-ai-voice__round--end:disabled,
.nj-ai-voice__round:disabled {
	opacity: .55;
	cursor: not-allowed;
}
