/* Keep responsive content within the mobile layout without changing scroll
 * ownership. In particular, avoid overflow clipping on page sections because
 * iOS Safari can treat those paint boundaries as touch-scroll traps. */
html,
body {
	width: 100%;
	max-width: 100%;
	overscroll-behavior-x: none;
}

@media (max-width: 900px) {
	/* iOS can rubber-band the visual viewport sideways even when the document
	 * has no horizontal overflow. Keep the document gesture vertical without
	 * introducing an overflow container that can trap vertical scrolling. */
	body {
		touch-action: pan-y pinch-zoom;
	}

	body > * {
		min-width: 0;
		max-width: 100%;
	}

	.swiper-container,
	.swiper-outer,
	.home_banner,
	.home_news,
	.home_show,
	.home_first,
	.home_interview,
	.life_interview,
	.footer,
	footer {
		min-width: 0;
		max-width: 100%;
	}

	ins.adsbygoogle,
	.adsbygoogle,
	ins.adsbygoogle iframe,
	.adsbygoogle iframe,
	iframe[id^="aswift_"],
	iframe[id^="google_ads_iframe_"] {
		width: 100% !important;
		max-width: 100vw !important;
	}
}

/* Shared staging navigation refinement. The mobile drawer uses separate theme
 * markup and is intentionally left untouched. */
@media (min-width: 901px) {
	.nav {
		position: relative !important;
		height: 62px !important;
		margin-bottom: 24px !important;
		border: 1px solid #e1e7d2;
		border-radius: 16px;
		background: #fff;
		box-shadow: 0 12px 30px rgba(52, 66, 15, .12) !important;
	}

	.nav .menu-mainmenu-container,
	.nav .menu-mainmenu-container > ul {
		width: 100% !important;
		height: 100% !important;
	}

	.nav .menu-mainmenu-container > ul {
		display: flex !important;
		position: absolute !important;
		inset: 0 !important;
		align-items: stretch;
		margin: 0 !important;
		padding: 0 !important;
	}

	.nav .menu-mainmenu-container > ul > li {
		position: relative;
		float: none !important;
		flex: 1 1 0;
		width: auto !important;
		height: 62px !important;
		margin: 0 !important;
		padding: 0 !important;
		list-style: none;
	}

	.nav .menu-mainmenu-container > ul > li > a {
		display: flex !important;
		align-items: center;
		justify-content: center;
		width: 100% !important;
		height: 62px !important;
		padding: 0 12px !important;
		border-right: 1px solid #e2e6e9;
		background: transparent !important;
		color: #172232 !important;
		font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Microsoft JhengHei", sans-serif;
		font-size: 17px !important;
		font-weight: 800 !important;
		line-height: 1.2 !important;
		text-align: center;
		text-decoration: none !important;
		white-space: nowrap;
	}

	.nav .menu-mainmenu-container > ul > li:last-child > a {
		border-right: 0;
	}

	.nav .menu-mainmenu-container > ul > li.current-menu-item > a,
	.nav .menu-mainmenu-container > ul > li.current-menu-parent > a,
	.nav .menu-mainmenu-container > ul > li.current-post-ancestor > a,
	.nav .menu-mainmenu-container > ul > li > a:hover {
		background: linear-gradient(135deg, #91a33b, #abbf4a) !important;
		color: #fff !important;
	}

	.nav .menu-mainmenu-container > ul > li:first-child > a {
		border-radius: 15px 0 0 15px;
	}

	.nav .menu-mainmenu-container > ul > li:last-child > a {
		border-radius: 0 15px 15px 0;
	}

	.nav .menu-mainmenu-container > ul > li > .sub-menu {
		top: 62px !important;
		left: 0 !important;
		z-index: 50;
		min-width: 220px;
		padding: 8px !important;
		border: 1px solid #dce4eb;
		border-radius: 0 0 16px 16px;
		background: #fff !important;
		box-shadow: 0 18px 36px rgba(23, 34, 50, .16);
	}

	.nav .menu-mainmenu-container > ul > li > .sub-menu li,
	.nav .menu-mainmenu-container > ul > li > .sub-menu a {
		float: none !important;
		width: 100% !important;
	}

	.nav .menu-mainmenu-container > ul > li > .sub-menu a {
		display: block;
		padding: 11px 13px !important;
		border-radius: 9px;
		color: #172232 !important;
		font-size: 15px !important;
		font-weight: 700;
		line-height: 1.35 !important;
		white-space: normal;
	}

	.nav .menu-mainmenu-container > ul > li > .sub-menu a:hover {
		background: #f4f7e7 !important;
		color: #56700b !important;
	}
}
