/* Synergia AI Host — all selectors are intentionally scoped to avoid theme conflicts. */
.syai-root,
.syai-root * {
	box-sizing: border-box;
}

.syai-root {
	--syai-accent: #e50914;
	--syai-ink: #111114;
	--syai-muted: #6d6e76;
	--syai-line: #e9e9ed;
	--syai-paper: #ffffff;
	--syai-mouth-open: 0;
	position: fixed;
	right: 24px;
	bottom: max(24px, env(safe-area-inset-bottom));
	z-index: 2147482000;
	font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 15px;
	line-height: 1.5;
	color: var(--syai-ink);
	text-align: left;
	-webkit-font-smoothing: antialiased;
}

.syai-root.syai-position-left {
	right: auto;
	left: 24px;
}

.syai-root button,
.syai-root textarea {
	font: inherit;
}

.syai-root button {
	-webkit-tap-highlight-color: transparent;
}

.syai-root .screen-reader-text {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

.syai-launcher {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 218px;
	height: 70px;
	padding: 7px 14px 7px 7px;
	overflow: hidden;
	color: #fff;
	background: #151519;
	border: 1px solid rgba(255, 255, 255, 0.13);
	border-radius: 999px;
	box-shadow: 0 18px 48px rgba(10, 10, 13, 0.24), 0 4px 14px rgba(10, 10, 13, 0.16);
	cursor: pointer;
	transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.syai-launcher::before {
	position: absolute;
	inset: 0;
	background: linear-gradient(100deg, transparent 30%, rgba(229, 9, 20, 0.18));
	content: "";
	pointer-events: none;
}

.syai-launcher:hover {
	transform: translateY(-3px);
	box-shadow: 0 22px 55px rgba(10, 10, 13, 0.3), 0 6px 16px rgba(10, 10, 13, 0.17);
}

.syai-launcher:focus-visible,
.syai-panel button:focus-visible,
.syai-panel textarea:focus-visible,
.syai-shortcode-opener:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--syai-accent), white 30%);
	outline-offset: 3px;
}

.syai-launcher__portrait {
	position: relative;
	flex: 0 0 56px;
	width: 56px;
	height: 56px;
}

.syai-launcher__portrait img {
	display: block;
	width: 56px;
	height: 56px;
	object-fit: cover;
	object-position: center 30%;
	border: 2px solid rgba(255, 255, 255, 0.72);
	border-radius: 50%;
	image-rendering: pixelated;
}

.syai-launcher__portrait i {
	position: absolute;
	right: 1px;
	bottom: 3px;
	width: 12px;
	height: 12px;
	background: #35d07f;
	border: 2px solid #151519;
	border-radius: 50%;
	box-shadow: 0 0 0 3px rgba(53, 208, 127, 0.16);
}

.syai-launcher__copy {
	position: relative;
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-width: 100px;
	text-align: left;
}

.syai-launcher__copy small {
	margin-bottom: 1px;
	color: rgba(255, 255, 255, 0.58);
	font-size: 9px;
	font-weight: 750;
	line-height: 1.2;
	letter-spacing: 0.17em;
}

.syai-launcher__copy strong {
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.25;
}

.syai-launcher__arrow {
	position: relative;
	color: var(--syai-accent);
	font-size: 18px;
	font-weight: 700;
}

.syai-root.is-open .syai-launcher {
	opacity: 0;
	transform: translateY(12px) scale(0.96);
	pointer-events: none;
}

.syai-panel {
	position: absolute;
	right: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	width: min(440px, calc(100vw - 32px));
	height: min(740px, calc(100vh - 40px));
	height: min(740px, calc(100dvh - 40px));
	min-height: 560px;
	overflow: hidden;
	background: var(--syai-paper);
	border: 1px solid rgba(20, 20, 24, 0.1);
	border-radius: 28px;
	box-shadow: 0 32px 95px rgba(12, 12, 15, 0.28), 0 8px 26px rgba(12, 12, 15, 0.12);
	transform-origin: right bottom;
	animation: syai-panel-in 260ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.syai-position-left .syai-panel {
	right: auto;
	left: 0;
	transform-origin: left bottom;
}

.syai-panel[hidden] {
	display: none !important;
}

@keyframes syai-panel-in {
	from { opacity: 0; transform: translateY(18px) scale(0.97); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}

.syai-stage {
	position: relative;
	flex: 0 0 292px;
	overflow: hidden;
	color: #fff;
	background: #111114;
	background:
		radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--syai-accent), transparent 48%) 0, rgba(38, 10, 13, 0.46) 24%, transparent 54%),
		linear-gradient(145deg, #24242a 0%, #111114 66%, #09090b 100%);
}

.syai-stage::after {
	position: absolute;
	right: -28%;
	bottom: -118px;
	left: -28%;
	height: 166px;
	background: var(--syai-paper);
	border-radius: 50% 50% 0 0;
	content: "";
}

.syai-stage__grid {
	position: absolute;
	inset: 0;
	opacity: 0.18;
	background-image: linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px);
	background-size: 28px 28px;
	-webkit-mask-image: linear-gradient(to bottom, black, transparent 88%);
	mask-image: linear-gradient(to bottom, black, transparent 88%);
}

.syai-stage__actions {
	position: absolute;
	top: 15px;
	right: 15px;
	z-index: 7;
	display: flex;
	gap: 7px;
}

.syai-icon-button {
	display: grid;
	width: 34px;
	height: 34px;
	padding: 0;
	place-items: center;
	color: rgba(255, 255, 255, 0.78);
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 50%;
	backdrop-filter: blur(8px);
	cursor: pointer;
	transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.syai-icon-button:hover {
	color: #fff;
	background: rgba(255, 255, 255, 0.16);
	transform: translateY(-1px);
}

.syai-icon-button svg {
	width: 17px;
	height: 17px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.7;
}

.syai-orbit,
.syai-orbit i {
	position: absolute;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 50%;
}

.syai-orbit {
	top: -34px;
	left: 4px;
	width: 324px;
	height: 324px;
	border-color: color-mix(in srgb, var(--syai-accent), transparent 46%);
	animation: syai-orbit 24s linear infinite;
}

.syai-orbit i:nth-child(1) {
	inset: 16px;
	border-style: dashed;
}

.syai-orbit i:nth-child(2) {
	inset: 45px;
	border-color: rgba(255, 255, 255, 0.18);
}

.syai-orbit i:nth-child(3) {
	top: 25px;
	right: 25px;
	width: 8px;
	height: 8px;
	background: var(--syai-accent);
	border: 0;
	box-shadow: 0 0 18px var(--syai-accent);
}

@keyframes syai-orbit {
	to { transform: rotate(360deg); }
}

.syai-avatar {
	position: absolute;
	top: 34px;
	left: 24px;
	z-index: 3;
	width: 196px;
	height: 196px;
}

.syai-avatar__halo {
	position: absolute;
	inset: -8px;
	border: 1px solid color-mix(in srgb, var(--syai-accent), white 18%);
	border-radius: 50%;
	box-shadow: 0 0 0 7px rgba(255,255,255,0.04), 0 0 44px color-mix(in srgb, var(--syai-accent), transparent 48%);
}

.syai-avatar > img,
.syai-avatar > .syai-pixel-avatar {
	position: relative;
	display: block;
	width: 196px;
	height: 196px;
	border-radius: 50%;
	filter: drop-shadow(0 16px 20px rgba(0, 0, 0, 0.34));
	transition: transform 200ms ease, filter 200ms ease;
}

.syai-pixel-avatar {
	overflow: hidden;
	background: #060c1b;
}

.syai-pixel-avatar > img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
	image-rendering: pixelated;
}

.syai-pixel-mouth {
	position: absolute;
	inset: 0;
	z-index: 3;
	display: block;
	width: 100%;
	height: 100%;
	overflow: visible;
	pointer-events: none;
}

.syai-pixel-mouth path,
.syai-pixel-mouth rect {
	shape-rendering: crispEdges;
}

.syai-pixel-mouth .syai-pixel-skin {
	fill: #f8c08f;
}

.syai-avatar .syai-viseme {
	opacity: 0 !important;
	transition: opacity 28ms linear;
}

.syai-root[data-syai-viseme="rest"] .syai-avatar .syai-viseme--rest,
.syai-root[data-syai-viseme="mbp"] .syai-avatar .syai-viseme--mbp,
.syai-root[data-syai-viseme="ai"] .syai-avatar .syai-viseme--ai,
.syai-root[data-syai-viseme="e"] .syai-avatar .syai-viseme--e,
.syai-root[data-syai-viseme="o"] .syai-avatar .syai-viseme--o,
.syai-root[data-syai-viseme="u"] .syai-avatar .syai-viseme--u,
.syai-root[data-syai-viseme="fv"] .syai-avatar .syai-viseme--fv,
.syai-root[data-syai-viseme="l"] .syai-avatar .syai-viseme--l,
.syai-root[data-syai-viseme="sch"] .syai-avatar .syai-viseme--sch {
	opacity: 1 !important;
}

.syai-root[data-syai-state="speaking"] .syai-avatar > .syai-pixel-avatar {
	animation: syai-ayla-speaking 1.3s ease-in-out infinite;
}

@keyframes syai-ayla-speaking {
	0%, 100% { transform: translateY(0) rotate(0); }
	35% { transform: translateY(-1.5px) rotate(-0.35deg); }
	70% { transform: translateY(0.7px) rotate(0.25deg); }
}

.syai-demo-mode .syai-status i {
	background: #f4b740;
	box-shadow: 0 0 9px #f4b740;
}

.syai-avatar__live {
	position: absolute;
	right: 8px;
	bottom: 17px;
	width: 16px;
	height: 16px;
	background: #35d07f;
	border: 3px solid #171719;
	border-radius: 50%;
	box-shadow: 0 0 0 4px rgba(53, 208, 127, 0.14);
}

.syai-identity {
	position: absolute;
	top: 103px;
	right: 22px;
	z-index: 4;
	width: 176px;
}

.syai-identity small {
	display: block;
	margin-bottom: 3px;
	color: rgba(255, 255, 255, 0.52);
	font-size: 8px;
	font-weight: 760;
	line-height: 1.3;
	letter-spacing: 0.17em;
}

.syai-identity h2 {
	margin: 0 0 5px;
	color: #fff;
	font-size: 34px;
	font-weight: 680;
	line-height: 1.1;
	letter-spacing: -0.035em;
}

.syai-status {
	display: flex;
	align-items: center;
	gap: 7px;
	margin: 0;
	color: rgba(255, 255, 255, 0.74);
	font-size: 11px;
	line-height: 1.3;
}

.syai-status i {
	flex: 0 0 6px;
	width: 6px;
	height: 6px;
	background: #35d07f;
	border-radius: 50%;
	box-shadow: 0 0 9px #35d07f;
}

.syai-wave {
	position: absolute;
	right: 26px;
	top: 188px;
	z-index: 4;
	display: flex;
	align-items: center;
	gap: 3px;
	height: 24px;
}

.syai-wave i {
	display: block;
	width: 2px;
	height: 5px;
	background: color-mix(in srgb, var(--syai-accent), white 18%);
	border-radius: 9px;
	opacity: 0.65;
}

.syai-root[data-syai-state="speaking"] .syai-wave i,
.syai-root[data-syai-state="listening"] .syai-wave i {
	animation: syai-wave 620ms ease-in-out infinite alternate;
}

.syai-root[data-syai-state="speaking"] .syai-wave i:nth-child(2n),
.syai-root[data-syai-state="listening"] .syai-wave i:nth-child(2n) { animation-delay: -200ms; }
.syai-root[data-syai-state="speaking"] .syai-wave i:nth-child(3n),
.syai-root[data-syai-state="listening"] .syai-wave i:nth-child(3n) { animation-delay: -360ms; }

@keyframes syai-wave {
	to { height: 23px; opacity: 1; }
}

.syai-root[data-syai-state="speaking"] .syai-avatar__halo {
	animation: syai-speaking-halo 1s ease-in-out infinite alternate;
}

@keyframes syai-speaking-halo {
	to { box-shadow: 0 0 0 10px rgba(255,255,255,0.055), 0 0 58px color-mix(in srgb, var(--syai-accent), transparent 36%); }
}

.syai-root[data-syai-state="listening"] .syai-avatar__halo {
	animation: syai-listen 1.15s ease-out infinite;
}

@keyframes syai-listen {
	0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--syai-accent), transparent 45%); }
	100% { box-shadow: 0 0 0 18px transparent; }
}

.syai-conversation {
	position: relative;
	z-index: 4;
	display: flex;
	flex: 1 1 auto;
	min-height: 0;
	flex-direction: column;
	padding: 0 18px 12px;
	background: var(--syai-paper);
}

.syai-messages {
	flex: 1 1 auto;
	min-height: 0;
	padding: 2px 4px 15px;
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-color: #d4d4d9 transparent;
	scrollbar-width: thin;
}

.syai-messages::-webkit-scrollbar { width: 5px; }
.syai-messages::-webkit-scrollbar-track { background: transparent; }
.syai-messages::-webkit-scrollbar-thumb { background: #d4d4d9; border-radius: 99px; }

.syai-message {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	margin: 0 0 14px;
	animation: syai-message-in 220ms ease both;
}

@keyframes syai-message-in {
	from { opacity: 0; transform: translateY(7px); }
	to { opacity: 1; transform: translateY(0); }
}

.syai-message > img {
	flex: 0 0 28px;
	width: 28px;
	height: 28px;
	object-fit: cover;
	object-position: center 28%;
	border: 1px solid #dddde2;
	border-radius: 50%;
	image-rendering: pixelated;
}

.syai-message > div {
	position: relative;
	max-width: 82%;
	padding: 11px 13px;
	color: #27272c;
	background: #f3f3f5;
	border: 1px solid #ededf0;
	border-radius: 16px 16px 16px 4px;
	font-size: 13.5px;
	line-height: 1.5;
	white-space: pre-wrap;
	word-break: break-word;
}

.syai-message--user {
	justify-content: flex-end;
}

.syai-message--user > div {
	color: #fff;
	background: var(--syai-accent);
	border-color: var(--syai-accent);
	border-radius: 16px 16px 4px 16px;
}

.syai-replay {
	display: inline-grid;
	width: 27px;
	height: 27px;
	margin: 8px 0 -4px;
	padding: 0;
	place-items: center;
	color: var(--syai-accent);
	background: #fff;
	border: 1px solid #e0e0e5;
	border-radius: 50%;
	cursor: pointer;
}

.syai-replay svg {
	width: 14px;
	height: 14px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.8;
}

.syai-typing {
	display: flex;
	align-items: center;
	gap: 4px;
	width: 52px;
	height: 31px;
	margin: 0 0 10px 36px;
	padding: 0 12px;
	background: #f3f3f5;
	border-radius: 15px 15px 15px 4px;
}

.syai-typing[hidden] { display: none !important; }

.syai-typing i {
	width: 5px;
	height: 5px;
	background: #8b8c93;
	border-radius: 50%;
	animation: syai-dot 900ms ease-in-out infinite;
}

.syai-typing i:nth-child(2) { animation-delay: 120ms; }
.syai-typing i:nth-child(3) { animation-delay: 240ms; }

@keyframes syai-dot {
	0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
	30% { transform: translateY(-4px); opacity: 1; }
}

.syai-composer {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	padding: 6px 6px 6px 14px;
	background: #fff;
	border: 1px solid #dcdce2;
	border-radius: 18px;
	box-shadow: 0 7px 22px rgba(20, 20, 24, 0.06);
	transition: border-color 160ms ease, box-shadow 160ms ease;
}

.syai-composer:focus-within {
	border-color: color-mix(in srgb, var(--syai-accent), white 35%);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--syai-accent), transparent 90%), 0 7px 22px rgba(20, 20, 24, 0.06);
}

.syai-composer textarea {
	display: block;
	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
	height: 38px;
	max-height: 96px;
	padding: 9px 0 7px;
	resize: none;
	overflow-y: auto;
	color: #1c1c20;
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	font-size: 13.5px;
	line-height: 1.45;
	outline: 0;
}

.syai-composer textarea::placeholder {
	color: #999aa2;
	opacity: 1;
}

.syai-composer__actions {
	display: flex;
	flex: 0 0 auto;
	gap: 5px;
}

.syai-mic,
.syai-send {
	display: grid;
	width: 38px;
	height: 38px;
	padding: 0;
	place-items: center;
	border-radius: 12px;
	cursor: pointer;
	transition: transform 150ms ease, color 150ms ease, background 150ms ease, opacity 150ms ease;
}

.syai-mic {
	color: #686970;
	background: #f3f3f5;
	border: 1px solid transparent;
}

.syai-mic:hover {
	color: var(--syai-accent);
	background: color-mix(in srgb, var(--syai-accent), white 94%);
}

.syai-mic[aria-pressed="true"] {
	color: #fff;
	background: var(--syai-accent);
	animation: syai-mic-pulse 1s ease-out infinite;
}

@keyframes syai-mic-pulse {
	50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--syai-accent), transparent 84%); }
}

.syai-send {
	color: #fff;
	background: var(--syai-accent);
	border: 1px solid var(--syai-accent);
	box-shadow: 0 5px 13px color-mix(in srgb, var(--syai-accent), transparent 72%);
}

.syai-mic:hover,
.syai-send:hover { transform: translateY(-1px); }

.syai-mic:disabled,
.syai-send:disabled,
.syai-composer textarea:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.syai-mic svg,
.syai-send svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.8;
}

.syai-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 8px 3px 0;
}

.syai-meta p {
	margin: 0;
	color: #a0a0a7;
	font-size: 9.5px;
	line-height: 1.2;
}

.syai-voice-toggle {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 0;
	color: #797a81;
	background: transparent;
	border: 0;
	font-size: 10.5px;
	cursor: default;
}

.syai-voice-toggle svg {
	width: 16px;
	height: 16px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.6;
}

.syai-voice-toggle[aria-pressed="false"] .syai-sound-waves {
	display: none;
}

.syai-voice-toggle[aria-pressed="false"] {
	color: #a0a0a7;
}

.syai-toast {
	position: absolute;
	right: 16px;
	bottom: 88px;
	left: 16px;
	z-index: 20;
	padding: 10px 12px;
	color: #fff;
	background: rgba(24, 24, 28, 0.96);
	border: 1px solid rgba(255,255,255,0.1);
	border-radius: 12px;
	box-shadow: 0 8px 24px rgba(0,0,0,0.18);
	font-size: 12px;
	line-height: 1.4;
	animation: syai-toast-in 180ms ease both;
}

.syai-toast[hidden] { display: none !important; }

@keyframes syai-toast-in {
	from { opacity: 0; transform: translateY(5px); }
}

.syai-shortcode-opener {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 13px 18px;
	color: #fff;
	background: #151519;
	border: 1px solid #151519;
	border-radius: 999px;
	font: 650 14px/1.2 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	cursor: pointer;
	box-shadow: 0 8px 22px rgba(21,21,25,0.14);
	transition: transform 160ms ease, background 160ms ease;
}

.syai-shortcode-opener span { color: #e50914; }
.syai-shortcode-opener:hover { color: #fff; background: #24242a; transform: translateY(-2px); }

@media (max-width: 480px) {
	.syai-root,
	.syai-root.syai-position-left {
		right: 10px;
		bottom: max(10px, env(safe-area-inset-bottom));
		left: auto;
	}

	.syai-panel,
	.syai-position-left .syai-panel {
		right: 0;
		left: auto;
		width: calc(100vw - 20px);
		height: calc(100vh - 20px);
		height: calc(100dvh - 20px);
		min-height: 0;
		border-radius: 24px;
	}

	.syai-launcher {
		min-width: 196px;
		height: 64px;
	}

	.syai-launcher__portrait,
	.syai-launcher__portrait img {
		width: 50px;
		height: 50px;
	}

	.syai-stage { flex-basis: 260px; }
	.syai-avatar { top: 35px; left: 16px; width: 168px; height: 168px; }
	.syai-avatar > img,
	.syai-avatar > .syai-pixel-avatar { width: 168px; height: 168px; }
	.syai-identity { top: 94px; right: 16px; width: 163px; }
	.syai-identity h2 { font-size: 31px; }
	.syai-wave { top: 176px; right: 20px; }
	.syai-orbit { top: -42px; left: -18px; }
	.syai-conversation { padding-right: 13px; padding-left: 13px; }
}

@media (max-width: 370px) {
	.syai-stage { flex-basis: 244px; }
	.syai-avatar { top: 38px; left: 10px; width: 150px; height: 150px; }
	.syai-avatar > img,
	.syai-avatar > .syai-pixel-avatar { width: 150px; height: 150px; }
	.syai-identity { top: 86px; right: 12px; width: 158px; }
	.syai-identity h2 { font-size: 26px; }
	.syai-wave { top: 164px; right: 16px; }
}

@media (max-height: 670px) and (min-width: 481px) {
	.syai-panel { min-height: 0; }
	.syai-stage { flex-basis: 236px; }
	.syai-stage::after { bottom: -126px; }
	.syai-avatar { top: 28px; width: 164px; height: 164px; }
	.syai-avatar > img,
	.syai-avatar > .syai-pixel-avatar { width: 164px; height: 164px; }
	.syai-identity { top: 80px; }
	.syai-wave { top: 158px; }
	.syai-orbit { top: -67px; }
}

@media (prefers-reduced-motion: reduce) {
	.syai-root *,
	.syai-root *::before,
	.syai-root *::after {
		scroll-behavior: auto !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}
