.mks-sat-lms-pwa-install {
	display: none !important;
	position: fixed;
	right: 18px;
	bottom: 18px;
	z-index: 9998;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 0 18px;
	border: 1px solid #6d28d9;
	border-radius: 999px;
	background: linear-gradient(135deg, #a66bff 0%, #8746f1 48%, #6223bc 100%);
	color: #ffffff;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.1;
	box-shadow: 0 14px 28px rgba(91, 33, 182, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.24);
	cursor: pointer;
	transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
	max-width: min(calc(100vw - 24px), 240px);
}

.mks-sat-lms-pwa-header-host {
	position: relative;
}

.mks-sat-lms-pwa-header-slot {
	display: inline-flex;
	align-items: center;
	justify-content: flex-end;
	flex: 0 0 auto;
	margin-left: 10px;
}

.mks-sat-lms-pwa-install.is-header {
	position: relative;
	right: auto;
	bottom: auto;
	z-index: auto;
	min-width: 108px;
	min-height: 38px;
	padding: 0 14px;
	border-color: rgba(167, 139, 250, 0.7);
	background: linear-gradient(135deg, #b07bff 0%, #8746f1 52%, #6223bc 100%);
	box-shadow: 0 10px 20px rgba(91, 33, 182, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.2);
	font-size: 14px;
	font-weight: 800;
	line-height: 1;
	max-width: none;
}

.mks-sat-lms-pwa-install:hover {
	transform: translateY(-1px);
	filter: saturate(1.03);
	box-shadow: 0 18px 32px rgba(76, 29, 149, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.mks-sat-lms-pwa-install.is-header:hover {
	background: linear-gradient(135deg, #a855f7 0%, #7c3aed 45%, #5b21b6 100%);
	box-shadow: 0 14px 26px rgba(91, 33, 182, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.mks-sat-lms-pwa-install.is-attention {
	animation: mks-sat-lms-pwa-pulse 1.2s ease-in-out 0s 4;
}

.mks-sat-lms-pwa-install[hidden] {
	display: none !important;
}

.mks-sat-lms-header-calculator {
	position: absolute;
	left: calc(100% + 20px);
	top: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 54px;
	height: 44px;
	margin: 0;
	padding: 0;
	transform: translateY(-50%);
	border: 1px solid rgba(167, 139, 250, 0.62);
	border-radius: 11px;
	background: rgba(124, 58, 237, 0.16);
	color: #ffffff;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 8px 20px rgba(15, 23, 42, 0.24);
	cursor: pointer;
	transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
	appearance: none;
	-webkit-appearance: none;
}

.mks-sat-lms-header-calculator:hover {
	transform: translateY(calc(-50% - 1px));
	border-color: rgba(216, 180, 254, 0.95);
	background: rgba(124, 58, 237, 0.36);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 12px 24px rgba(15, 23, 42, 0.32);
}

.mks-sat-lms-header-calculator:active {
	transform: translateY(-50%);
}

.mks-sat-lms-header-calculator:focus-visible {
	outline: 3px solid rgba(250, 204, 21, 0.92);
	outline-offset: 3px;
}

.mks-sat-lms-header-calculator[hidden] {
	display: none !important;
}

.mks-sat-lms-header-calculator svg {
	display: block;
	width: 24px;
	height: 24px;
	pointer-events: none;
}

.mks-sat-lms-header-calculator-overlay {
	position: fixed;
	inset: 0;
	z-index: 1000002;
	display: grid;
	place-items: center;
	box-sizing: border-box;
	padding: max(18px, env(safe-area-inset-top, 0px)) max(18px, env(safe-area-inset-right, 0px)) max(18px, env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px));
	background: rgba(2, 6, 23, 0.72);
	backdrop-filter: blur(7px);
	-webkit-backdrop-filter: blur(7px);
}

.mks-sat-lms-header-calculator-overlay[hidden] {
	display: none !important;
}

.mks-sat-lms-header-calculator-dialog {
	width: min(920px, 100%);
	height: min(760px, calc(100dvh - 36px));
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid rgba(203, 213, 225, 0.92);
	border-radius: 18px;
	background: #f8fafc;
	box-shadow: 0 28px 76px rgba(2, 6, 23, 0.52);
}

.mks-sat-lms-header-calculator-dialog-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 58px;
	padding: 10px 14px;
	border-bottom: 1px solid #dbe4f0;
	background: #ffffff;
	box-sizing: border-box;
}

.mks-sat-lms-header-calculator-dialog-header > div {
	display: flex;
	align-items: baseline;
	gap: 10px;
	min-width: 0;
}

.mks-sat-lms-header-calculator-dialog-header strong {
	color: #0f7b3d;
	font-size: 20px;
	font-weight: 900;
	letter-spacing: 0.03em;
	line-height: 1;
	text-transform: lowercase;
}

.mks-sat-lms-header-calculator-dialog-header span {
	min-width: 0;
	color: #0f172a;
	font-size: 16px;
	font-weight: 800;
	line-height: 1.2;
}

.mks-sat-lms-header-calculator-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 36px;
	height: 36px;
	margin: 0;
	padding: 0;
	border: 1px solid #cbd5e1;
	border-radius: 999px;
	background: #ffffff;
	color: #0f172a;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}

.mks-sat-lms-header-calculator-close:hover,
.mks-sat-lms-header-calculator-close:focus-visible {
	border-color: #94a3b8;
	background: #f1f5f9;
	outline: none;
}

.mks-sat-lms-header-calculator-status {
	margin: 10px 14px 0;
	padding: 9px 11px;
	border: 1px solid #bfdbfe;
	border-radius: 10px;
	background: #eff6ff;
	color: #1d4ed8;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.4;
}

.mks-sat-lms-header-calculator-status.is-error {
	border-color: #fecaca;
	background: #fef2f2;
	color: #b91c1c;
}

.mks-sat-lms-header-calculator-canvas {
	flex: 1 1 auto;
	min-height: 0;
	margin: 10px 14px 14px;
	overflow: hidden;
	border: 1px solid #cbd5e1;
	border-radius: 12px;
	background: #ffffff;
}

.mks-sat-lms-header-calculator-canvas > .dcg-dom-change-wrapper,
.mks-sat-lms-header-calculator-canvas .dcg-calculator-api-container-v1_11,
.mks-sat-lms-header-calculator-canvas .dcg-container {
	height: 100% !important;
}

body.mks-sat-lms-header-calculator-open {
	overflow: hidden;
}

@media (max-width: 1024px) {
	#mobile-header .mks-sat-lms-header-calculator {
		position: static;
		width: 40px;
		height: 40px;
		margin: 0;
		transform: none;
		border-radius: 10px;
	}

	#mobile-header .mks-sat-lms-header-calculator:hover,
	#mobile-header .mks-sat-lms-header-calculator:active {
		transform: none;
	}

	.mks-sat-lms-header-calculator-dialog {
		height: min(720px, calc(100dvh - 28px));
	}
}

@media (max-width: 520px) {
	.mks-sat-lms-header-calculator-overlay {
		padding: 10px;
	}

	.mks-sat-lms-header-calculator-dialog {
		height: calc(100dvh - 20px);
		border-radius: 14px;
	}

	.mks-sat-lms-header-calculator-dialog-header {
		min-height: 54px;
		padding: 9px 12px;
	}

	.mks-sat-lms-header-calculator-dialog-header span {
		font-size: 14px;
	}

	.mks-sat-lms-header-calculator-canvas {
		margin: 8px 10px 10px;
	}
}

@keyframes mks-sat-lms-pwa-pulse {
	0%,
	100% {
		box-shadow: 0 10px 20px rgba(91, 33, 182, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.2);
	}
	50% {
		box-shadow: 0 0 0 6px rgba(139, 92, 246, 0.22), 0 18px 32px rgba(76, 29, 149, 0.28);
	}
}

.mks-sat-lms-pwa-nav {
	box-sizing: border-box;
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	gap: 4px;
	width: 118px;
	height: 42px;
	margin: 0;
	padding: 4px;
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 13px;
	background: rgba(15, 23, 42, 0.72);
	color: #ffffff;
	box-shadow: 0 16px 36px rgba(15, 23, 42, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.16);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	pointer-events: auto;
}

.mks-sat-lms-pwa-nav[hidden] {
	display: none !important;
}

#main-header .site-header-item:has(> .mks-sat-lms-pwa-nav) {
	display: flex;
	align-items: center;
	gap: 10px;
}

#mobile-header .site-main-header-wrap > .site-header-row-container-inner > .mks-sat-lms-pwa-nav {
	display: flex;
	width: 112px;
	height: 40px;
	margin-inline: auto;
	padding: 3px;
}

#mobile-header .site-main-header-wrap > .site-header-row-container-inner:has(> .mks-sat-lms-pwa-nav:not([hidden])) {
	padding-block-end: 5px;
}

.mks-sat-lms-pwa-nav-btn {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	height: 32px;
	margin: 0;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.34);
	background: rgba(255, 255, 255, 0.14);
	color: #ffffff;
	line-height: 1;
	cursor: pointer;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
	transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
	appearance: none;
	-webkit-appearance: none;
}

.mks-sat-lms-pwa-nav-btn:hover {
	transform: translateY(-1px);
	border-color: rgba(255, 255, 255, 0.48);
	background: rgba(255, 255, 255, 0.22);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 8px 18px rgba(15, 23, 42, 0.2);
}

.mks-sat-lms-pwa-nav-btn:active {
	transform: translateY(0);
}

.mks-sat-lms-pwa-nav-btn:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.mks-sat-lms-pwa-nav-back {
	width: 32px;
	border-radius: 999px;
}

.mks-sat-lms-pwa-nav-home {
	width: 32px;
	border-radius: 9px;
}

.mks-sat-lms-pwa-nav-refresh {
	width: 32px;
	border-radius: 9px;
}

.mks-sat-lms-pwa-nav svg {
	display: block;
	width: 18px;
	height: 18px;
	pointer-events: none;
}

.mks-sat-lms-pwa-toast {
	position: fixed;
	left: 50%;
	bottom: 82px;
	z-index: 9998;
	display: grid;
	gap: 6px;
	transform: translateX(-50%);
	width: min(calc(100vw - 24px), 360px);
	padding: 14px 16px;
	border: 1px solid rgba(109, 40, 217, 0.22);
	border-radius: 18px;
	background: rgba(15, 23, 42, 0.94);
	color: #f8fafc;
	box-shadow: 0 18px 44px rgba(15, 23, 42, 0.34);
}

.mks-sat-lms-pwa-toast[hidden] {
	display: none !important;
}

.mks-sat-lms-pwa-toast strong {
	font-size: 15px;
	line-height: 1.25;
}

.mks-sat-lms-pwa-toast p {
	margin: 0;
	font-size: 13px;
	line-height: 1.5;
	color: #e2e8f0;
}

.mks-sat-lms-pwa-toast-action {
	justify-self: start;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 36px;
	margin-top: 4px;
	padding: 0 14px;
	border: 1px solid rgba(196, 181, 253, 0.72);
	border-radius: 999px;
	background: linear-gradient(135deg, #a855f7 0%, #7c3aed 52%, #5b21b6 100%);
	color: #ffffff;
	font-size: 13px;
	font-weight: 800;
	line-height: 1;
	cursor: pointer;
}

.mks-sat-lms-pwa-toast-action:hover {
	filter: brightness(1.06);
}

.mks-sat-lms-pwa-toast-action[hidden] {
	display: none !important;
}

@media (max-width: 767px) {
	.mks-sat-lms-pwa-install {
		display: none !important;
	}
}

.mks-sat-lms-pwa-toast-close {
	justify-self: end;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 999px;
	background: transparent;
	color: #ffffff;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
}

.mks-sat-lms-pwa-toast-close:hover {
	background: rgba(255, 255, 255, 0.08);
}


/* MKS header layout: logo, navigation, centered menu, AI, calculator, account. */
@media (min-width: 1025px) {
 #masthead #main-header .site-top-header-wrap > .site-header-row-container-inner > .site-container { max-width: none !important; width: 100% !important; padding-left: 16px !important; padding-right: 16px !important; }
 #masthead #main-header .site-top-header-inner-wrap { display: grid !important; grid-template-columns: minmax(260px, 1fr) max-content minmax(260px, 1fr) !important; align-items: center; min-height: 76px; gap: 16px; }
 #masthead #main-header .site-header-top-section-left { justify-content: flex-start !important; }
 #masthead #main-header .site-header-top-section-center { justify-content: center !important; width: max-content !important; min-width: 0; }
 #masthead #main-header .site-header-top-section-right { justify-content: flex-end !important; padding-left: 112px; }
 #masthead #main-header .site-branding img { width: 120px !important; max-width: 120px !important; height: auto !important; }
 #masthead #site-navigation, #masthead #site-navigation .primary-menu-container { width: max-content !important; max-width: none !important; }
 #masthead #site-navigation .primary-menu-container > ul { display: flex !important; flex-wrap: nowrap !important; gap: 8px; width: max-content !important; }
 #masthead #site-navigation .primary-menu-container > ul > li { flex: 0 0 auto; }
 #masthead > .mks-sat-ai-header-slot { left: auto !important; right: 104px !important; top: 50% !important; transform: translateY(-50%) !important; display: flex !important; align-items: center; gap: 10px; }
}
#masthead .mks-sat-ai-header-slot .mks-sat-ai-launch b { display: none !important; }
#masthead .mks-sat-ai-header-slot .mks-sat-ai-launch { width: 44px !important; min-width: 44px !important; height: 44px !important; min-height: 44px !important; padding: 0 !important; display: inline-flex !important; align-items: center; justify-content: center; gap: 0 !important; border-radius: 12px; }
#masthead .mks-sat-ai-header-slot .mks-sat-ai-launch > span { font-size: 24px; line-height: 1; }
@media (min-width: 1025px) {
 #masthead .mks-sat-ai-header-slot .mks-sat-lms-header-calculator { position: static !important; left: auto !important; top: auto !important; transform: none !important; width: 44px !important; height: 44px !important; flex: 0 0 44px; }
}

@media (max-width: 1024px) {
	#mobile-header .site-main-header-wrap > .site-header-row-container-inner,
	#mobile-header .site-main-header-wrap .site-container,
	#mobile-header .site-main-header-wrap .site-main-header-inner-wrap {
		min-height: 54px !important;
	}

	#mobile-header .site-main-header-wrap .site-container {
		padding-inline: 12px;
	}

	#mobile-header .site-main-header-wrap .site-main-header-inner-wrap {
		display: grid !important;
		grid-template-columns: 40px 40px minmax(0, 1fr) 40px minmax(40px, max-content);
		align-items: center !important;
		gap: 6px;
	}

	#mobile-header .site-main-header-inner-wrap > .site-header-section,
	#mobile-header .site-main-header-inner-wrap > .mks-sat-ai-header-slot,
	#mobile-header .site-main-header-inner-wrap > .mks-sat-lms-header-calculator {
		grid-row: 1;
	}

	#mobile-header .site-main-header-inner-wrap > .site-header-main-section-left {
		grid-column: 1;
	}

	#mobile-header .site-main-header-inner-wrap > .mks-sat-ai-header-slot {
		grid-column: 2;
		margin: 0;
	}

	#mobile-header .site-main-header-inner-wrap > .site-header-main-section-center {
		grid-column: 3;
		position: static;
		justify-content: center;
		transform: none;
	}

	#mobile-header .site-main-header-inner-wrap > .mks-sat-lms-header-calculator {
		grid-column: 4;
	}

	#mobile-header .site-main-header-inner-wrap > .site-header-main-section-right {
		grid-column: 5;
		justify-content: flex-end;
	}

	#masthead #mobile-header .site-header-main-section-right .mobile-html {
		height: auto !important;
		min-height: 0 !important;
	}

	#mobile-header #mobile-toggle,
	#mobile-header .ielts-auth-header-toggle,
	#masthead #mobile-header .mks-sat-ai-header-slot .mks-sat-ai-launch {
		box-sizing: border-box;
		width: 40px !important;
		min-width: 40px !important;
		height: 40px !important;
		min-height: 40px !important;
	}

	#mobile-header #mobile-toggle {
		justify-content: center;
		padding: 0;
	}

	#masthead #mobile-header .mks-sat-ai-header-slot .mks-sat-ai-launch > span {
		font-size: 22px;
	}

	#mobile-header .site-main-header-inner-wrap .site-branding a.brand img {
		max-width: 72px;
		max-height: 38px;
	}

	#mobile-header .ielts-auth-header-avatar {
		width: 36px;
		height: 36px;
	}

	#mobile-header .ielts-auth-header-login {
		min-height: 36px;
		padding-inline: 10px;
		font-size: 12px;
	}

	#mobile-header .ielts-auth-header > .mks-sat-lms-pwa-header-slot:not(:has(> :not([hidden]))) {
		display: none;
	}
}
