:root {
	--bc-nav-row-height: 64px;
	--bc-nav-safe-area: env(safe-area-inset-bottom, 0px);
	--bc-nav-clearance: calc(132px + var(--bc-nav-safe-area));
	--bc-page-bottom-gap: 50px;
	--bc-content-clearance: calc(var(--bc-nav-clearance) + var(--bc-page-bottom-gap));
	--bc-sticky-action-height: 74px;
	--bc-sticky-action-gap: 10px;
	--bc-sticky-action-bottom: calc(var(--bc-nav-clearance) + var(--bc-sticky-action-gap));
	--bc-sticky-action-clearance: calc(var(--bc-content-clearance) + var(--bc-sticky-action-height) + var(--bc-sticky-action-gap));
	--bc-owner-menu-bottom: calc(var(--bc-nav-row-height) + var(--bc-nav-safe-area) + var(--bc-sticky-action-gap));
}

@media (display-mode: standalone), (display-mode: fullscreen) {
	:root { --bc-nav-safe-area: max(env(safe-area-inset-bottom, 0px), 34px); }
}

html.ios-standalone {
	--bc-nav-safe-area: max(env(safe-area-inset-bottom, 0px), 34px);
}

html {
	scroll-padding-bottom: var(--bc-content-clearance);
}

body.bc-has-bottom-nav {
	padding-bottom: var(--bc-content-clearance) !important;
}

.bc-bottom-nav-spacer {
	display: block;
	flex: 0 0 auto;
	width: 100%;
	height: var(--bc-content-clearance);
	min-height: var(--bc-content-clearance);
	pointer-events: none;
}

body.bc-has-bottom-nav :where(
	.social-page,
	.map-page,
	.fav-page,
	.mp-cat-view,
	.mp-list-view,
	.bc-section,
	.bc-offline-state,
	.bc-docs,
	.bc-doc-manage
) > :last-child {
	margin-bottom: var(--bc-content-clearance) !important;
}

.bc-toast-stack {
	position: fixed;
	top: calc(14px + env(safe-area-inset-top, 0px));
	left: 50%;
	z-index: 2000;
	width: min(calc(100vw - 28px), 420px);
	pointer-events: none;
	transform: translateX(-50%);
}

.bc-toast {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 48px;
	padding: 12px 14px;
	border: 1px solid rgba(245, 158, 11, 0.38);
	border-radius: 14px;
	background: linear-gradient(135deg, rgba(245, 158, 11, 0.96), rgba(255, 176, 46, 0.90));
	color: #160D03;
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.34);
	-webkit-backdrop-filter: blur(18px);
	backdrop-filter: blur(18px);
	animation: bcToastIn 180ms ease-out both, bcToastOut 260ms ease-in 4.2s forwards;
}

.bc-toast-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 26px;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: rgba(22, 13, 3, 0.12);
	color: #160D03;
}

.bc-toast-message {
	display: block;
	min-width: 0;
	color: #160D03;
	font-size: 13px;
	font-weight: 850;
	line-height: 1.35;
}

@keyframes bcToastIn {
	from { opacity: 0; transform: translateY(-12px) scale(0.98); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes bcToastOut {
	to { opacity: 0; visibility: hidden; transform: translateY(-10px) scale(0.98); }
}

@media (prefers-reduced-motion: reduce) {
	.bc-toast { animation: none; }
}

.bc-offline-state {
	max-width: 680px;
	margin: 0 auto;
	padding: 64px 16px var(--bc-content-clearance);
}

.bc-offline-card {
	padding: 22px;
	border-radius: 18px;
	border: 1px solid rgba(245, 158, 11, 0.18);
	background: linear-gradient(180deg, rgba(245, 158, 11, 0.08), rgba(255, 255, 255, 0.03));
}

.bc-offline-kicker {
	color: #F59E0B;
	font-size: 11px;
	font-weight: 950;
	letter-spacing: 1.4px;
	text-transform: uppercase;
	margin-bottom: 8px;
}

.bc-offline-title {
	color: #fff;
	font-size: 28px;
	line-height: 1.08;
	font-weight: 950;
	margin: 0 0 10px;
}

.bc-offline-copy {
	color: rgba(255, 255, 255, 0.58);
	font-size: 14px;
	line-height: 1.5;
	margin: 0 0 16px;
}

.bc-offline-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 10px 14px;
	border-radius: 12px;
	border: 1px solid #F59E0B;
	color: #F59E0B;
	text-decoration: none;
	font-size: 13px;
	font-weight: 900;
}

.bc-offline-link:hover,
.bc-offline-link:focus-visible {
	color: #FFB02E;
	border-color: #FFB02E;
}

/* Bottom nav source of truth: rendered Favorites tab style. */
.stand-nav {
	position: fixed; bottom: 0; left: 0; right: 0; z-index: 1050;
	display: flex; align-items: flex-start; justify-content: space-around;
	height: calc(var(--bc-nav-row-height) + var(--bc-nav-safe-area));
	min-height: calc(var(--bc-nav-row-height) + var(--bc-nav-safe-area));
	padding: 0 0 var(--bc-nav-safe-area);
	overflow: visible;
	background: transparent !important;
	-webkit-backdrop-filter: saturate(180%) blur(20px);
	backdrop-filter: saturate(180%) blur(20px);
	border-top: 1px solid rgba(255, 255, 255, 0.06);
	box-shadow: 0 -1px 12px rgba(0, 0, 0, 0.04);
}

.stand-nav-item {
	flex: 1 0 0; height: var(--bc-nav-row-height); min-height: var(--bc-nav-row-height);
	display: flex; flex-direction: column;
	align-items: center; justify-content: center; gap: 3px;
	padding: 6px 0; cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: color 0.2s ease, transform 0.15s ease;
	color: rgba(255,255,255,0.35);
	text-decoration: none !important; position: relative;
}

.stand-nav-button {
	border: 0;
	background: transparent;
	font-family: inherit;
}

.stand-nav-coming-soon {
	cursor: default;
}

.stand-nav-item:active { transform: scale(0.92); }
.stand-nav-coming-soon:active { transform: none; }
.stand-nav-item.active { color: #F59E0B; }
.stand-nav-item.active::before {
	content: ''; position: absolute;
	top: 0; left: 25%; right: 25%;
	height: 2px; background: #F59E0B;
	border-radius: 0 0 2px 2px;
}
.stand-nav-item.active .stand-nav-icon {
	filter: drop-shadow(0 0 6px rgba(245,158,11,0.4));
}
.stand-nav-icon { font-size: 20px; line-height: 1; }
.stand-nav-icon-inline {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
}
.stand-nav-icon-inline svg {
	width: 22px;
	height: 22px;
	display: block;
}
.stand-nav-icon-share {
	display: block;
	width: 22px;
	height: 22px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='18' cy='5' r='3'/%3E%3Ccircle cx='6' cy='12' r='3'/%3E%3Ccircle cx='18' cy='19' r='3'/%3E%3Cpath d='m8.6 13.5 6.8 4'/%3E%3Cpath d='m15.4 6.5-6.8 4'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='18' cy='5' r='3'/%3E%3Ccircle cx='6' cy='12' r='3'/%3E%3Ccircle cx='18' cy='19' r='3'/%3E%3Cpath d='m8.6 13.5 6.8 4'/%3E%3Cpath d='m15.4 6.5-6.8 4'/%3E%3C/svg%3E") center / contain no-repeat;
}
.stand-nav-label { font-size: 10px; font-weight: 600; letter-spacing: 0.3px; }

.owner-menu-backdrop {
	position: fixed;
	inset: 0;
	z-index: 1070;
	background: rgba(0, 0, 0, 0.54);
	-webkit-backdrop-filter: blur(2px);
	backdrop-filter: blur(2px);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.18s ease;
}

.owner-menu-backdrop.owner-menu-open {
	opacity: 1;
	pointer-events: auto;
}

.owner-menu-sheet {
	position: fixed;
	left: 10px;
	right: 10px;
	bottom: var(--bc-owner-menu-bottom);
	z-index: 1080;
	max-width: 560px;
	height: auto;
	max-height: calc(100svh - var(--bc-owner-menu-bottom) - env(safe-area-inset-top, 0px) - 18px);
	overflow-y: auto;
	overscroll-behavior: contain;
	margin: 0 auto;
	padding: 10px 12px 12px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 22px;
	background: rgba(16, 17, 23, 0.96);
	box-shadow: 0 28px 80px rgba(0, 0, 0, 0.52);
	-webkit-backdrop-filter: saturate(160%) blur(24px);
	backdrop-filter: saturate(160%) blur(24px);
	transform: translateY(calc(100% + 120px));
	opacity: 0;
	pointer-events: none;
	transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.18s ease;
}

.owner-menu-sheet.owner-menu-open {
	transform: translateY(0);
	opacity: 1;
	pointer-events: auto;
}

.owner-menu-sheet-server-master.owner-menu-open {
	height: calc(100svh - var(--bc-owner-menu-bottom) - env(safe-area-inset-top, 0px) - 18px);
}

.owner-menu-handle {
	width: 42px;
	height: 4px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.22);
	margin: 2px auto 12px;
}

.owner-menu-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 14px;
	padding: 0 2px 10px;
}

.owner-menu-kicker {
	color: #F59E0B;
	font-size: 10px;
	font-weight: 950;
	letter-spacing: 1.2px;
	text-transform: uppercase;
}

.owner-menu-title {
	margin: 2px 0 0;
	color: #fff;
	font-size: 20px;
	font-weight: 950;
	line-height: 1.05;
}

.owner-menu-account {
	margin-top: 6px;
	max-width: 300px;
	color: rgba(255, 255, 255, 0.54);
	font-size: 12px;
	font-weight: 700;
	line-height: 1.25;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.owner-menu-close {
	width: 34px;
	height: 34px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
	color: rgba(255, 255, 255, 0.72);
	font-size: 24px;
	line-height: 1;
}

.owner-menu-list {
	display: grid;
	gap: 8px;
}

.owner-menu-section {
	display: grid;
	gap: 8px;
}

.owner-menu-section + .owner-menu-section {
	margin-top: 6px;
	padding-top: 10px;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.owner-menu-section-title {
	padding: 0 2px;
	color: rgba(255, 255, 255, 0.42);
	font-size: 10px;
	font-weight: 950;
	letter-spacing: 1.1px;
	text-transform: uppercase;
}

.owner-menu-section-primary {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.owner-menu-section-primary .owner-menu-section-title {
	grid-column: 1 / -1;
}

.owner-menu-section-primary .owner-menu-action {
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 74px;
	padding: 10px 8px;
	text-align: center;
}

.owner-menu-section-primary .owner-menu-action-icon {
	flex-basis: 34px;
	width: 34px;
	height: 34px;
	border-radius: 12px;
}

.owner-menu-section-primary .owner-menu-action small {
	display: none;
}

.owner-menu-sheet-server-master .owner-menu-section-account .owner-menu-section-title {
	grid-column: 1 / -1;
}

.owner-menu-action {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 62px;
	padding: 11px 12px;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.055);
	color: #fff;
	text-decoration: none !important;
	-webkit-tap-highlight-color: transparent;
}

.owner-menu-action:active {
	transform: scale(0.985);
}

.owner-menu-action-icon {
	flex: 0 0 40px;
	width: 40px;
	height: 40px;
	display: grid;
	place-items: center;
	border-radius: 14px;
	background: rgba(245, 158, 11, 0.12);
	color: #F59E0B;
}

.owner-menu-action strong,
.owner-menu-action small {
	display: block;
}

.owner-menu-action strong {
	color: #fff;
	font-size: 14px;
	font-weight: 900;
}

.owner-menu-action small {
	margin-top: 2px;
	color: rgba(255, 255, 255, 0.5);
	font-size: 12px;
	font-weight: 650;
}

.owner-menu-action-muted .owner-menu-action-icon {
	background: rgba(255, 255, 255, 0.08);
	color: rgba(255, 255, 255, 0.62);
}

@media (max-width: 480px) {
	.owner-menu-sheet {
		left: 8px;
		right: 8px;
		bottom: var(--bc-owner-menu-bottom);
		padding: 7px 9px 9px;
		border-radius: 16px;
	}

	.owner-menu-handle {
		width: 36px;
		height: 3px;
		margin: 1px auto 7px;
	}

	.owner-menu-header {
		gap: 10px;
		padding: 0 1px 7px;
		align-items: center;
	}

	.owner-menu-kicker,
	.owner-menu-account {
		display: none;
	}

	.owner-menu-title {
		font-size: 17px;
	}

	.owner-menu-close {
		width: 30px;
		height: 30px;
		font-size: 22px;
	}

	.owner-menu-list,
	.owner-menu-section {
		gap: 5px;
	}

	.owner-menu-section + .owner-menu-section {
		margin-top: 3px;
		padding-top: 6px;
	}

	.owner-menu-section-title {
		font-size: 9px;
		letter-spacing: 1px;
	}

	.owner-menu-section-primary .owner-menu-action {
		gap: 5px;
		min-height: 58px;
		padding: 7px 6px;
		border-radius: 12px;
	}

	.owner-menu-section-primary .owner-menu-action-icon {
		flex-basis: 28px;
		width: 28px;
		height: 28px;
		border-radius: 10px;
	}

	.owner-menu-section-primary .owner-menu-action strong {
		font-size: 12px;
		line-height: 1.05;
	}
}
