/**
 * Add to Home Screen (iOS standalone) — nav + header fit.
 *
 * Scoped to html.studio-standalone (ios-standalone.js). Does not affect in-browser Safari.
 * Homepage tablet: compact horizontal bar. Narrow widths: tighter overlay menu + safe areas.
 */

@supports (-webkit-touch-callout: none) {
	/* Status bar — all standalone pages (horizontal nav uses ≥768px with no safe-top today) */
	html.studio-standalone .site-header,
	html.studio-standalone .site-header.has-global-padding {
		padding-top: max(0.75rem, var(--studio-safe-top)) !important;
	}

	/* Tablet standalone — compact bar (all pages; keep full wordmark text) */
	@media (min-width: 768px) and (max-width: 1024px) {
		html.studio-standalone .site-header__inner {
			gap: 0.75rem;
		}

		html.studio-standalone .site-header .site-header__wordmark a {
			font-size: 0.8125rem !important;
			line-height: 1.15 !important;
		}

		html.studio-standalone .site-header .wp-block-navigation ul,
		html.studio-standalone .site-header .wp-block-navigation .wp-block-navigation__container {
			gap: 0.25rem !important;
		}

		html.studio-standalone .site-header .wp-block-navigation a,
		html.studio-standalone .site-header .wp-block-navigation-item__content {
			font-size: 0.8125rem !important;
			padding: 0.125rem 0.35rem !important;
		}
	}

	/* Overlay menu (≤767 — iPad Mini portrait, split view) */
	@media (max-width: 767px) {
		html.studio-standalone .site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close {
			top: max(0.5rem, var(--studio-safe-top)) !important;
		}

		html.studio-standalone
			.site-header
			.wp-block-navigation__responsive-container.is-menu-open
			.wp-block-navigation__responsive-container-content {
			padding-top: calc(2.75rem + var(--studio-safe-top)) !important;
			padding-bottom: max(1.75rem, var(--studio-safe-bottom)) !important;
			min-height: 100dvh;
			min-height: 100svh;
		}

		html.studio-standalone
			.site-header
			.wp-block-navigation__responsive-container.is-menu-open
			.wp-block-navigation__responsive-container-content::before {
			margin-bottom: 1.25rem;
		}

		html.studio-standalone
			.site-header
			.wp-block-navigation__responsive-container.is-menu-open
			.wp-block-navigation-item__content {
			font-size: clamp(1.75rem, 8vw, 2.35rem) !important;
			padding: 0.9rem 0 0.95rem !important;
		}
	}
}
