/* Extracted from front-page.php <style id="hcm-mobile-app-module">. */
/* =========================================================
   HCM 首页移动端 App 架构 (max-width: 992px)
   真凶：front-page.php <main> 内 margin-left:calc(...) + style.css display:grid
   ========================================================= */
@media (max-width: 992px) {
	*, *::before, *::after {
		box-sizing: border-box !important;
	}

	/* 1. 破解主题 Fixed/Sticky 降维陷阱：解除 overflow 封印 */
	html,
	body,
	#page,
	.site {
		transform: none !important;
		will-change: auto !important;
		contain: none !important;
		overflow: visible !important;
		overflow-x: visible !important;
		max-width: 100vw !important;
	}

	.site.grid-container,
	#content,
	.site-content,
	#primary,
	main.site-main,
	.site-main,
	.inside-article,
	.hcm-home-container {
		transform: none !important;
		translate: none !important;
		perspective: none !important;
		filter: none !important;
		contain: none !important;
		will-change: auto !important;
	}

	#content,
	.site-content,
	#primary,
	main.site-main {
		width: 100% !important;
		max-width: 100% !important;
		margin-left: auto !important;
		margin-right: auto !important;
		padding-left: 0 !important;
		padding-right: 0 !important;
	}

	/* Bug1：抹除 PC 动态 margin-left / Grid 轨道（特异性高于首页 <main> 内联） */
	main.site-main .hcm-home-container,
	.site-main .hcm-home-container {
		width: 100% !important;
		max-width: 100% !important;
		margin-top: 0 !important;
		margin-bottom: 0 !important;
		margin-left: auto !important;
		margin-right: auto !important;
		padding: 0 !important;
		left: auto !important;
		right: auto !important;
		transform: none !important;
		display: block !important;
		grid-template-columns: none !important;
		grid-template-rows: none !important;
		gap: 0 !important;
	}

	/* Header 吸顶 + App 化布局已移至 style.css @media (max-width: 992px) 全站生效 */

	/* 赛程控制台：自然文档流，跟在 Header 后滚动，禁止吸顶防重叠 */
	main.site-main .hcm-mc-top-console,
	.hcm-mc-top-console {
		position: relative !important;
		top: auto !important;
		z-index: 1 !important;
		margin-bottom: 12px !important;
		box-shadow: none !important;
	}

	/* 强制隐藏 Flatpickr 的原生 fallback input，保卫 Hôm nay 按钮的纯净度 */
	.flatpickr-mobile,
	input.flatpickr-input[type="date"],
	input.flatpickr-input[type="hidden"],
	.hcm-mc-top-console input.flatpickr-input {
		display: none !important;
		visibility: hidden !important;
		opacity: 0 !important;
		width: 0 !important;
		height: 0 !important;
		position: absolute !important;
		pointer-events: none !important;
	}

	/* 赛程控制台做减法：隐藏占用空间的 Bộ lọc 搜索框 */
	.hcm-mc-top-console .hcm-mc-filter-bar .hcm-search-box {
		display: none !important;
	}

	/* 赛程控制台：胶囊按钮等分拉伸铺满 */
	.hcm-mc-top-console .hcm-mc-filter-bar {
		display: flex !important;
		width: 100% !important;
		justify-content: space-between !important;
		align-items: center !important;
		gap: 8px !important;
		flex-wrap: nowrap !important;
	}

	.hcm-mc-top-console .hcm-mc-filter-bar > .filter-btn-bottom {
		flex: 1 1 0% !important;
		min-width: 0 !important;
		display: flex !important;
		justify-content: center !important;
		align-items: center !important;
		text-align: center !important;
		padding-left: 0 !important;
		padding-right: 0 !important;
		white-space: nowrap !important;
	}

	.hcm-mc-top-console .hcm-mc-filter-bar--not-today #btn-ongoing {
		display: none !important;
	}

	.hcm-mc-top-console .hcm-mc-filter-bar--not-today > .filter-btn-bottom#btn-time {
		flex: 1 1 0% !important;
		display: flex !important;
	}

	.hcm-mc-top-console .hcm-mc-filter-bar > .global-toggle-btn {
		flex: 0 0 auto !important;
		width: auto !important;
		min-width: 36px !important;
	}

	/* =========================================
	   首页移动端：三栏微观排版紧凑化重置
	   ========================================= */

	/* 【中栏：赛程控制台收紧】 */
	.hcm-mc-date-bar {
		padding: 8px 10px !important;
	}
	.hcm-mc-date-bar .date-text {
		font-size: 13px !important;
	}
	.hcm-mc-filter-bar {
		padding: 8px 10px !important;
		min-height: 48px !important;
	}
	.filter-btn-bottom {
		font-size: 12px !important;
		padding: 6px 12px !important;
	}

	/* 【中栏：联赛头部 & 赛程列表 — 仅加大行框架触控区，内容尺寸沿用 style.css 默认】 */
	.hcm-league-link-area {
		padding: 16px 16px !important;
		min-height: 56px !important;
	}
	.hcm-league-toggle-area {
		min-height: 56px !important;
		padding: 0 14px !important;
	}
	.match-row {
		padding: 16px 16px !important;
		min-height: 56px !important;
		align-items: center !important;
	}
	/* 队名过长：在空格处换行完整展示，不在单词内截断 */
	.match-row .match-center-layout {
		max-width: none !important;
		padding-left: 52px !important;
		box-sizing: border-box !important;
		align-items: center !important;
	}
	.match-row .match-center-layout .team {
		align-items: center !important;
	}
	.match-row .match-center-layout .team-name {
		white-space: normal !important;
		overflow: visible !important;
		text-overflow: unset !important;
		overflow-wrap: normal !important;
		word-break: normal !important;
		hyphens: none !important;
		line-height: 1.25 !important;
	}
	.match-row .match-center-layout .team-home .team-logo,
	.match-row .match-center-layout .team-away .team-logo {
		flex-shrink: 0 !important;
	}
	.match-row .match-center-data {
		padding: 0 8px !important;
		min-width: 44px !important;
	}

	/* 【左栏：Giải đấu — 加大行框架触控区，内容尺寸沿用默认】 */
	.hcm-left-sidebar .hcm-home-side-card__title {
		padding: 14px 16px 12px !important;
	}
	.hcm-left-sidebar .hcm-home-side-card__link {
		padding: 14px 16px !important;
		min-height: 52px !important;
	}
	.hcm-left-sidebar .hcm-all-leagues-widget__head {
		padding: 14px 16px !important;
		min-height: 52px !important;
	}
	.hcm-left-sidebar .hcm-all-leagues-filter-wrap {
		padding: 12px 16px 4px !important;
	}
	.hcm-left-sidebar .hcm-all-leagues-list {
		gap: 2px !important;
		padding-bottom: 12px !important;
	}
	.hcm-left-sidebar .hcm-country-item {
		padding: 12px 16px !important;
		min-height: 52px !important;
	}
	.hcm-left-sidebar .hcm-country-item .hcm-league-toggle-area {
		min-width: 44px !important;
		min-height: 44px !important;
		padding: 0 !important;
	}
	.hcm-left-sidebar .hcm-country-toggle-spacer {
		width: 44px !important;
	}
	.hcm-left-sidebar .hcm-league-submenu-item {
		padding: 12px 16px 12px 28px !important;
		min-height: 48px !important;
	}

	/* 【右栏：BXH — 加大行框架触控区，内容尺寸沿用默认】 */
	.hcm-right-sidebar .hcm-mini-stand-header {
		padding: 14px 16px 10px !important;
	}
	.hcm-right-sidebar .hcm-mini-stand-controls {
		padding: 0 8px 12px !important;
		min-height: 48px !important;
	}
	.hcm-right-sidebar .hcm-mini-stand-prev,
	.hcm-right-sidebar .hcm-mini-stand-next {
		width: 44px !important;
		height: 44px !important;
	}
	.hcm-right-sidebar .hcm-mini-stand-dot {
		width: 8px !important;
		height: 8px !important;
		padding: 12px !important;
		box-sizing: content-box !important;
		background-clip: content-box !important;
	}
	:is(html.dark-mode, body.dark-mode) .hcm-right-sidebar .hcm-mini-stand-dot {
		background-clip: content-box !important;
	}
	.hcm-right-sidebar .hcm-mini-stand-heading {
		padding: 14px 16px !important;
		min-height: 56px !important;
	}
	.hcm-right-sidebar .hcm-mini-stand-table-wrap {
		padding: 0 12px 8px !important;
	}
	.hcm-right-sidebar .hcm-mini-stand-table th,
	.hcm-right-sidebar .hcm-mini-stand-table td {
		padding: 10px 6px !important;
	}
	.hcm-right-sidebar .hcm-mini-stand-table tbody tr {
		min-height: 44px !important;
	}

	/* Bug4 + 白屏防护：CSS 状态机默认显示中栏 */
	main.site-main .hcm-home-container .hcm-left-sidebar,
	main.site-main .hcm-home-container .hcm-right-sidebar {
		display: none !important;
		width: 100% !important;
		max-width: 100% !important;
		padding: 10px !important;
		margin: 0 !important;
	}

	main.site-main .hcm-home-container .hcm-main-column {
		display: block !important;
		width: 100% !important;
		max-width: 100% !important;
		padding: 12px 10px 10px !important;
		margin: 0 auto !important;
	}

	body.show-mobile-left main.site-main .hcm-home-container .hcm-main-column {
		display: none !important;
		min-height: 0 !important;
	}

	#primary,
	.site-main {
		flex: none !important;
		min-height: 0 !important;
	}

	.hcm-fat-footer {
		margin-top: 0 !important;
	}

	main.site-main .hcm-home-container .hcm-main-column,
	main.site-main .hcm-home-container .hcm-left-sidebar,
	main.site-main .hcm-home-container .hcm-right-sidebar {
		padding-bottom: 24px !important;
	}

	body.show-mobile-right main.site-main .hcm-home-container .hcm-right-sidebar {
		grid-row: auto !important;
	}

	.hcm-main-column .hcm-league-group:last-child {
		margin-bottom: 0 !important;
	}

	.hcm-left-sidebar .hcm-all-leagues-widget,
	.hcm-right-sidebar .hcm-mini-standings-widget {
		margin-bottom: 0 !important;
	}

	.hcm-mini-stand-panels {
		min-height: 0 !important;
	}

	/* Bug3：底栏脱离文档流，贴屏幕底 */
	.hcm-mobile-bottom-nav {
		display: flex !important;
		position: fixed !important;
		bottom: 0 !important;
		left: 0 !important;
		right: 0 !important;
		width: 100% !important;
		max-width: 100vw !important;
		height: calc(60px + env(safe-area-inset-bottom, 0px)) !important;
		padding-bottom: env(safe-area-inset-bottom, 0px) !important;
		margin: 0 !important;
		background: #ffffff !important;
		border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
		z-index: 2147483646 !important;
		box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.04) !important;
	}

	.hcm-mobile-bottom-nav .nav-item {
		flex: 1;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		background: transparent;
		border: none;
		color: #475569;
		padding: 0;
		cursor: pointer;
	}

	.hcm-mobile-bottom-nav .nav-item svg {
		width: 22px;
		height: 22px;
		margin-bottom: 4px;
	}

	.hcm-mobile-bottom-nav .nav-item span {
		font-size: 11px;
		font-weight: 600;
	}

	.hcm-mobile-bottom-nav .nav-item.is-active {
		color: #111827;
	}

	:is(html.dark-mode, body.dark-mode) .hcm-mobile-bottom-nav {
		background: #1c1c1c !important;
		border-top-color: #333 !important;
	}

	:is(html.dark-mode, body.dark-mode) .hcm-mobile-bottom-nav .nav-item {
		color: #94a3b8;
	}

	:is(html.dark-mode, body.dark-mode) .hcm-mobile-bottom-nav .nav-item.is-active {
		color: #f8fafc;
	}

	/* =========================================
	   移动端 Footer 无缝衔接：灰色延伸至屏幕底
	   ========================================= */
	html,
	body,
	#page,
	.site-content,
	.site-footer {
		margin-bottom: 0 !important;
	}

	.site-footer,
	footer.site-footer {
		background-color: #f2f3f5 !important;
		border-top: none !important;
		padding-bottom: calc(75px + env(safe-area-inset-bottom, 0px)) !important;
	}

	.site-info,
	.inside-site-info,
	.footer-widgets {
		background: transparent !important;
		margin-bottom: 0 !important;
		padding-bottom: 0 !important;
	}

	:is(html.dark-mode, body.dark-mode) .site-footer,
	:is(html.dark-mode, body.dark-mode) footer.site-footer {
		background-color: #111 !important;
	}
}

@media (min-width: 993px) {
	.hcm-mobile-bottom-nav {
		display: none !important;
	}
}
