/* Loaded only by the standalone staff templates, after their own styles. */
body:is(.bbe-staff-body, :has(> .bbe-staff-bar)) {
	--bbe-staff-green: #003407;
	--bbe-staff-rust: #b2400e;
	--bbe-staff-nav-height: calc(64px + env(safe-area-inset-bottom, 0px));
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100dvh;
	margin: 0;
	padding: 0 0 var(--bbe-staff-nav-height);
	background: #f5f4ef;
	color: #242424;
	font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
}

.bbe-staff-bar, .bbe-staff-bar *, .bbe-staff-nav, .bbe-staff-nav *,
.bbe-staff-dialog, .bbe-staff-dialog * { box-sizing: border-box; }
.bbe-staff-bar [hidden], .bbe-staff-backdrop[hidden], .bbe-staff-dialog [hidden] { display: none; }

.bbe-staff-bar {
	display: flex;
	flex: 0 0 auto;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem 1rem;
	padding: calc(0.6rem + env(safe-area-inset-top, 0px)) max(1rem, env(safe-area-inset-right, 0px)) 0.6rem max(1rem, env(safe-area-inset-left, 0px));
	background: linear-gradient(110deg, #080808, #003407);
	color: #fff;
}
.bbe-staff-brand { display: flex; align-items: center; gap: 0.7rem; color: #fff; text-decoration: none; }
.bbe-staff-brand > span:last-child { font-size: 0.78rem; }
.bbe-staff-wordmark { font-size: 1.4rem; font-weight: 800; letter-spacing: 0.04em; line-height: 1.2; }
.bbe-staff-actions { display: flex; gap: 0.45rem; }
.bbe-staff-button, .bbe-staff-close {
	min-height: 44px;
	border: 1px solid #e6e4e4;
	border-radius: 7px;
	padding: 0.5rem 0.85rem;
	background: #fff;
	color: #003407;
	font: inherit;
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1.3;
	cursor: pointer;
}
.bbe-staff-button:hover { background: #f5f4ef; }
.bbe-staff-install, .bbe-staff-dialog-done { background: #b2400e; border-color: #b2400e; color: #fff; }
.bbe-staff-install:hover, .bbe-staff-dialog-done:hover { background: #8f330b; border-color: #8f330b; }
.bbe-staff-button:disabled { opacity: 0.65; cursor: wait; }
.bbe-staff-status { flex-basis: 100%; margin: 0; font-size: 0.8rem; }

.bbe-staff-nav {
	position: fixed;
	z-index: 1100;
	inset: auto 0 0;
	display: flex;
	justify-content: center;
	height: var(--bbe-staff-nav-height, calc(64px + env(safe-area-inset-bottom, 0px)));
	padding: 0.3rem max(0.5rem, env(safe-area-inset-right, 0px)) calc(0.3rem + env(safe-area-inset-bottom, 0px)) max(0.5rem, env(safe-area-inset-left, 0px));
	border-top: 1px solid #e6e4e4;
	background: #fff;
}
.bbe-staff-nav a {
	display: flex;
	flex: 1 1 0;
	max-width: 20rem;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.1rem;
	min-height: 44px;
	border-radius: 7px;
	color: #5c5c5c;
	text-decoration: none;
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1.2;
}
.bbe-staff-nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.bbe-staff-nav a:hover { background: #f5f4ef; }
.bbe-staff-nav a[aria-current="page"] { background: #edf3ee; color: #003407; box-shadow: inset 0 -3px #b2400e; }
.bbe-staff-bar :focus-visible, .bbe-staff-nav :focus-visible, .bbe-staff-dialog :focus-visible { outline: 3px solid #b2400e; outline-offset: 3px; }
.bbe-staff-bar :focus-visible { outline-color: #fff; }

.bbe-staff-dialog {
	width: min(34rem, calc(100% - 2rem));
	max-height: calc(100vh - 3rem);
	max-height: calc(100dvh - 3rem);
	overflow-y: auto;
	margin: auto;
	padding: 1.5rem;
	border: 1px solid #e6e4e4;
	border-radius: 12px;
	background: #fff;
	color: #242424;
	font: inherit;
	box-shadow: 0 16px 60px #0004;
}
.bbe-staff-dialog:not([open]) { display: none; }
.bbe-staff-dialog::backdrop { background: #0009; }
.bbe-staff-dialog.bbe-staff-dialog-fallback[open] { position: fixed; z-index: 2200; inset: 0; height: fit-content; }
.bbe-staff-backdrop { position: fixed; z-index: 2100; inset: 0; background: #0009; }
.bbe-staff-close { float: right; width: 44px; margin: -0.5rem -0.5rem 0 0.5rem; font-size: 1.5rem; }
.bbe-staff-dialog h2 { margin: 0 0 1rem; color: #003407; font-size: 1.35rem; line-height: 1.3; }
.bbe-staff-dialog h3 { margin: 1.25rem 0 0.35rem; color: #003407; font-size: 1rem; }
.bbe-staff-dialog p { margin: 0.5rem 0; }
.bbe-staff-dialog ol { margin: 0.35rem 0; padding-left: 1.4rem; }
.bbe-staff-dialog li + li { margin-top: 0.35rem; }
.bbe-staff-dialog .bbe-staff-install-note { margin: 1.2rem 0; color: #5c5c5c; font-size: 0.875rem; }
.bbe-staff-noscript { margin: 1rem; font-size: 0.875rem; }

/* Reserve the nav inside the existing full-height map's flex budget. */
body.bbe-map-body:is(.bbe-staff-body, :has(> .bbe-staff-bar)) {
	height: 100vh;
	height: 100dvh;
	min-height: 0;
	overflow: hidden;
}
.bbe-staff-bar ~ .bbe-map-head { flex: 0 0 auto; }
.bbe-staff-bar ~ .bbe-map-wrap { min-width: 0; min-height: 0; }
.bbe-staff-bar ~ .bbe-map-lock { margin: clamp(1rem, 5vh, 4rem) auto; }
body.bbe-map-body:has(> .bbe-map-lock):is(.bbe-staff-body, :has(> .bbe-staff-bar)) { height: auto; min-height: 100dvh; overflow: auto; }

@media (max-width: 860px) {
	body.bbe-map-body:is(.bbe-staff-body, :has(> .bbe-staff-bar)) { height: auto; min-height: 100dvh; overflow: auto; }
	.bbe-staff-bar ~ .bbe-map-wrap .bbe-map-side { max-height: 42vh; max-height: 42svh; }
	.bbe-staff-bar ~ .bbe-map-wrap .bbe-map-canvas { height: 55vh; height: 55svh; min-height: 16rem; }
}
@media (max-width: 360px) {
	.bbe-staff-brand > span:last-child { display: none; }
	.bbe-staff-bar { gap: 0.4rem; }
}
@media (prefers-reduced-motion: reduce) {
	.bbe-staff-dialog { scroll-behavior: auto; }
}
