/**
 * 前台顶部合面权威（轻表面工作台）
 * 桌面：#topBar + #topAppBar + .mdc-module-menu 同色、层间无阴影、无底部分隔线
 * （合面色 = 页底 surface-container-low，再画底线会在灰底上假分隔 → 清除 border 非透明隐藏）
 * 移动：顶栏接缝关掉；搜索行外底线同理清除（同色无假线）
 * 覆盖 skin elevation；不改搜索 DOM / 浮层契约
 * 登记：sanxio/docs/ui-fixed-registry.md → F-20261115-header-edge-clear
 */
/* ======== sanxio 顶部合面 start =========== */

:root {
	--sanxio-header-surface: var(--md3-color-surface-container-low, #f3f5f9);
	--sanxio-header-surface-edge: var(--md3-color-outline-variant, #c3c6cf);
}

/* html 勿留纯白：与页底 surface-container-low 同色，避免页脚/回弹露白边 */
html:not(:has(body.member-md3-page)) {
	background-color: var(--md3-color-surface-container-low, #f3f5f9);
}
body:not(.member-md3-page) {
	background-color: var(--md3-color-surface-container-low, #f3f5f9);
}

/* ----- 桌面：三截合为一面；底边线清除（勿再加 1px 外底线） ----- */
@media (min-width: 768px) {
	body:not(.member-md3-page) #topBar.mdc-top-bar,
	body:not(.member-md3-page) #topBar .mdc-top-bar__row {
		background-color: var(--sanxio-header-surface) !important;
		background-image: none !important;
		box-shadow: none !important;
		border-bottom: 0 !important;
	}

	body:not(.member-md3-page) #topAppBar.mdc-top-app-bar,
	body:not(.member-md3-page) #topAppBar.mdc-top-app-bar--fixed {
		background-color: var(--sanxio-header-surface) !important;
		background-image: none !important;
		box-shadow: none !important;
		border-bottom: 0 !important;
	}

	body:not(.member-md3-page) .mdc-module-menu,
	body:not(.member-md3-page) nav.mdc-module-menu {
		background-color: var(--sanxio-header-surface) !important;
		background-image: none !important;
		box-shadow: none !important;
		border: 0 !important;
		border-bottom: 0 !important;
	}

	body:not(.member-md3-page):not(:has(.mdc-module-menu)) #topAppBar.mdc-top-app-bar {
		border-bottom: 0 !important;
	}
}

/* ----- 移动：顶栏 + 搜索行合面；外底线清除 ----- */
@media (max-width: 767px) {
	body:not(.member-md3-page) #js-mobile-top-nav.md3-mobile-top-nav,
	body:not(.member-md3-page) .md3-mobile-top-nav {
		background-color: var(--sanxio-header-surface) !important;
		background-image: none !important;
		box-shadow: none !important;
		border-bottom: 0 !important;
	}

	body:not(.member-md3-page) #topAppBar.mdc-top-app-bar,
	body:not(.member-md3-page) #topAppBar.mdc-top-app-bar--fixed {
		background-color: var(--sanxio-header-surface) !important;
		background-image: none !important;
		box-shadow: none !important;
		border-bottom: 0 !important;
	}
}

/* ======== sanxio 顶部合面 end =========== */
