#sonai-guide-root {
	position: fixed;
	bottom: 20px;
	z-index: 99998;
	font-family: -apple-system, "Segoe UI", Roboto, "Be Vietnam Pro", sans-serif;
}
#sonai-guide-root.sg-left { left: 20px; }
#sonai-guide-root.sg-right { right: 20px; }

/* Nút mở */
.sg-launcher {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 18px;
	border: none;
	border-radius: 999px;
	background: #6a4c93;
	color: #fff;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 10px 26px -10px rgba(0, 0, 0, .45);
	transition: transform .12s ease, box-shadow .12s ease;
}
.sg-launcher:hover { transform: translateY(-1px); }
.sg-launcher-ic { display: inline-grid; place-items: center; }
.sg-launcher-ic svg { width: 20px; height: 20px; }

/* Nhấp nháy thu hút */
.sg-launcher.sg-pulse { animation: sgPulse 1.6s ease-in-out infinite; }
@keyframes sgPulse {
	0%, 100% { box-shadow: 0 10px 26px -10px rgba(0, 0, 0, .45), 0 0 0 0 rgba(106, 76, 147, .45); }
	50%      { box-shadow: 0 10px 26px -10px rgba(0, 0, 0, .45), 0 0 0 12px rgba(106, 76, 147, 0); }
}

/* Khung hướng dẫn */
.sg-panel {
	position: absolute;
	bottom: 64px;
	width: 320px;
	max-width: calc(100vw - 40px);
	background: #fff;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 18px 50px -12px rgba(0, 0, 0, .4);
	opacity: 0;
	transform: translateY(10px) scale(.98);
	pointer-events: none;
	transition: opacity .15s ease, transform .15s ease;
}
#sonai-guide-root.sg-left .sg-panel { left: 0; }
#sonai-guide-root.sg-right .sg-panel { right: 0; }
#sonai-guide-root.sg-open .sg-panel { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

.sg-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 14px;
	background: #6a4c93;
	color: #fff;
}
.sg-title { font-weight: 700; font-size: 15px; }
.sg-close {
	background: none; border: none; color: #fff;
	font-size: 22px; line-height: 1; cursor: pointer; opacity: .9;
}
.sg-close:hover { opacity: 1; }

.sg-progress {
	padding: 10px 16px 0;
	font-size: 12px;
	font-weight: 600;
	color: #6a4c93;
	letter-spacing: .3px;
}
.sg-caption {
	padding: 6px 16px 14px;
	font-size: 15px;
	line-height: 1.5;
	color: #2b2b33;
	min-height: 60px;
}

.sg-controls {
	display: flex;
	gap: 14px;
	padding: 0 16px 16px;
	justify-content: center;
}
.sg-ctrl {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
}
.sg-ctrl > span {
	font-size: 11px;
	font-weight: 600;
	color: #6a4c93;
}
.sg-controls button {
	width: 46px; height: 46px;
	display: grid;
	place-items: center;
	border: 1.5px solid #e7e2ee;
	border-radius: 50%;
	background: #faf8fc;
	cursor: pointer;
	transition: background .12s ease, transform .1s ease;
	padding: 0;
}
.sg-controls button svg { width: 20px; height: 20px; color: #6a4c93; }
.sg-controls button:hover { background: #f0eaf7; }
.sg-controls button:active { transform: scale(.94); }
.sg-toggle { background: #6a4c93 !important; border-color: #6a4c93 !important; }
.sg-toggle svg { color: #fff !important; }

@media (max-width: 480px) {
	#sonai-guide-root { bottom: 14px; }
	#sonai-guide-root.sg-left { left: 12px; }
	#sonai-guide-root.sg-right { right: 12px; }
	.sg-launcher-tx { display: none; } /* mobile: chỉ hiện icon loa cho gọn */
	.sg-launcher { padding: 14px; }
	.sg-panel { width: calc(100vw - 24px); }
}
