.fbpwa-shell {
	position: fixed;
	right: max(18px, env(safe-area-inset-right));
	bottom: max(18px, env(safe-area-inset-bottom));
	z-index: 999999;
	font-family: inherit;
}

.fbpwa-launcher,
.fbpwa-action,
.fbpwa-text-action,
.fbpwa-close {
	font: inherit;
}

.fbpwa-launcher {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	min-height: 44px;
	padding: 10px 15px 10px 12px;
	border: 1px solid rgba(126, 223, 255, .48);
	border-radius: 999px;
	background: linear-gradient(135deg, rgba(5, 16, 36, .96), rgba(23, 18, 64, .96));
	box-shadow: 0 12px 32px rgba(0, 0, 0, .34), inset 0 1px rgba(255, 255, 255, .12);
	color: #f3fbff;
	cursor: pointer;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .01em;
}

.fbpwa-launcher:hover,
.fbpwa-launcher:focus-visible {
	border-color: #7ee7ff;
	box-shadow: 0 14px 36px rgba(0, 0, 0, .4), 0 0 0 3px rgba(66, 220, 245, .16);
	outline: none;
}

.fbpwa-launcher-orbit {
	width: 20px;
	height: 20px;
	border: 2px solid #42dcf5;
	border-radius: 50%;
	box-shadow: 0 0 10px rgba(66, 220, 245, .72);
	position: relative;
}

.fbpwa-launcher-orbit::after {
	position: absolute;
	top: 5px;
	left: 5px;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #ff5ca8;
	box-shadow: 0 0 8px #ff5ca8;
	content: '';
}

.fbpwa-panel {
	position: absolute;
	right: 0;
	bottom: 56px;
	width: min(390px, calc(100vw - 36px));
	padding: 20px;
	border: 1px solid rgba(126, 223, 255, .36);
	border-radius: 20px;
	background:
		radial-gradient(circle at 92% 8%, rgba(158, 108, 255, .23), transparent 37%),
		linear-gradient(145deg, rgba(6, 17, 39, .98), rgba(15, 10, 47, .98));
	box-shadow: 0 28px 58px rgba(0, 0, 0, .48), inset 0 1px rgba(255, 255, 255, .09);
	color: #f4f9ff;
}

.fbpwa-panel[hidden] {
	display: none;
}

.fbpwa-panel-heading {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 14px;
	margin-bottom: 16px;
}

.fbpwa-kicker {
	margin: 0 0 4px;
	color: #8beeff;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.fbpwa-panel h2 {
	margin: 0;
	color: #fff;
	font-size: 24px;
	line-height: 1.1;
}

.fbpwa-close {
	width: 32px;
	height: 32px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .09);
	color: #d8edff;
	cursor: pointer;
	font-size: 26px;
	line-height: 27px;
}

.fbpwa-close:hover,
.fbpwa-close:focus-visible {
	background: rgba(255, 255, 255, .17);
	outline: 2px solid #7ee7ff;
	outline-offset: 2px;
}

.fbpwa-option {
	display: grid;
	grid-template-columns: 34px minmax(0, 1fr) auto;
	align-items: center;
	gap: 12px;
	padding: 14px 0;
	border-top: 1px solid rgba(187, 223, 255, .14);
}

.fbpwa-option-icon {
	display: grid;
	width: 34px;
	height: 34px;
	place-items: center;
	border-radius: 11px;
	background: linear-gradient(135deg, rgba(66, 220, 245, .22), rgba(158, 108, 255, .24));
	color: #a5f4ff;
	font-size: 22px;
}

.fbpwa-option strong {
	display: block;
	color: #fff;
	font-size: 14px;
}

.fbpwa-option p,
.fbpwa-note,
.fbpwa-status {
	margin: 4px 0 0;
	color: #b8c9df;
	font-size: 12px;
	line-height: 1.45;
}

.fbpwa-install-count {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 7px !important;
	color: #8eeefc !important;
	font-size: 11px !important;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	letter-spacing: .01em;
}

.fbpwa-install-count::before {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #42dcf5;
	box-shadow: 0 0 9px rgba(66, 220, 245, .85);
	content: '';
}

.fbpwa-action,
.fbpwa-text-action {
	border: 0;
	cursor: pointer;
	font-size: 13px;
	font-weight: 800;
}

.fbpwa-action {
	min-height: 36px;
	padding: 8px 12px;
	border-radius: 10px;
	background: linear-gradient(135deg, #42dcf5, #9e6cff);
	color: #061226;
	box-shadow: 0 5px 16px rgba(66, 220, 245, .22);
}

.fbpwa-action:hover,
.fbpwa-action:focus-visible {
	filter: brightness(1.08);
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.fbpwa-action:disabled {
	background: rgba(159, 180, 208, .2);
	box-shadow: none;
	color: #a7b6c8;
	cursor: not-allowed;
}

.fbpwa-push-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	min-width: 72px;
}

.fbpwa-text-action {
	padding: 5px;
	background: transparent;
	color: #9cdff0;
	text-decoration: underline;
}

.fbpwa-text-action:hover,
.fbpwa-text-action:focus-visible {
	color: #fff;
	outline: 2px solid #7ee7ff;
	outline-offset: 2px;
}

.fbpwa-device-note {
	margin: -2px 0 0 40px;
	color: #a7b6c8;
	font-size: 12px;
}

.fbpwa-device-note .fbpwa-text-action {
	font-size: inherit;
}

.fbpwa-note {
	margin: 0;
	padding: 12px 0 0;
	border-top: 1px solid rgba(187, 223, 255, .14);
}

.fbpwa-status {
	min-height: 18px;
	margin-top: 10px;
	color: #8eeefc;
}

.fbpwa-status.is-error {
	color: #ffb3ce;
}

/* Keep the app launcher immediately to the left of Ask Aether on desktop.
 * The CSS variables are measured in the companion script so theme changes to
 * Aether's width or position cannot create an overlap. */
@media (min-width: 768px) {
	.fbpwa-shell.fbpwa-next-to-aether {
		right: var(--fbpwa-aether-right);
		bottom: var(--fbpwa-aether-bottom);
	}

	.fbpwa-shell.fbpwa-next-to-aether .fbpwa-panel {
		top: 56px;
		right: 0;
		bottom: auto;
	}
}

@media (max-width: 520px) {
	.fbpwa-shell {
		right: max(12px, env(safe-area-inset-right));
		bottom: max(12px, env(safe-area-inset-bottom));
	}

	.fbpwa-panel {
		bottom: 54px;
		padding: 17px;
	}

	.fbpwa-option {
		grid-template-columns: 32px minmax(0, 1fr);
	}

	.fbpwa-option > .fbpwa-action,
	.fbpwa-push-actions {
		grid-column: 2;
		justify-self: start;
	}

	.fbpwa-device-note {
		margin-left: 32px;
	}
}
