.sitespeaker-player {
	--sitespeaker-accent: #315f52;
	--sitespeaker-accent-strong: #23483e;
	position: fixed;
	right: max(18px, env(safe-area-inset-right));
	bottom: max(18px, env(safe-area-inset-bottom));
	z-index: 100000;
	font: 600 15px/1.25 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	color: #fff;
}

.sitespeaker-player[hidden],
.sitespeaker-panel[hidden],
.sitespeaker-launch[hidden] {
	display: none !important;
}

.sitespeaker-launch,
.sitespeaker-panel {
	border: 0;
	background: var(--sitespeaker-accent);
	color: #fff;
	box-shadow: 0 8px 28px rgba(0, 0, 0, .24);
}

.sitespeaker-launch {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	min-width: 58px;
	height: 58px;
	padding: 0 18px;
	border-radius: 999px;
	cursor: pointer;
	transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.sitespeaker-launch:hover,
.sitespeaker-launch:focus-visible,
.sitespeaker-actions button:hover,
.sitespeaker-actions button:focus-visible {
	background: var(--sitespeaker-accent-strong);
}

.sitespeaker-launch:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 32px rgba(0, 0, 0, .28);
}

.sitespeaker-launch:focus-visible,
.sitespeaker-actions button:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 3px;
}

.sitespeaker-icon,
.sitespeaker-icon svg {
	display: block;
	width: 26px;
	height: 26px;
	fill: currentColor;
}

.sitespeaker-panel {
	display: flex;
	align-items: center;
	gap: 16px;
	min-width: min(390px, calc(100vw - 36px));
	max-width: calc(100vw - 36px);
	padding: 12px 14px 12px 18px;
	border-radius: 18px;
}

.sitespeaker-copy {
	display: flex;
	min-width: 0;
	flex: 1;
	flex-direction: column;
	gap: 2px;
}

.sitespeaker-title,
.sitespeaker-status {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sitespeaker-title {
	font-size: 14px;
}

.sitespeaker-status {
	font-size: 12px;
	font-weight: 400;
	opacity: .86;
}

.sitespeaker-actions {
	display: flex;
	gap: 5px;
}

.sitespeaker-actions button {
	display: grid;
	width: 38px;
	height: 38px;
	padding: 0;
	place-items: center;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .16);
	color: #fff;
	cursor: pointer;
	font: inherit;
	transition: background .15s ease;
}

.sitespeaker-actions button:disabled {
	cursor: default;
	opacity: .42;
}

.sitespeaker-reading {
	border-radius: .2em;
	background: rgba(255, 219, 88, .18);
	box-shadow: 0 0 0 4px rgba(255, 219, 88, .18);
	transition: background .2s ease, box-shadow .2s ease;
}

.sitespeaker-speaking-word {
	border-radius: .16em;
	background: #ffdc58;
	color: #18221f;
	box-shadow: 0 0 0 2px #ffdc58;
}

@media (max-width: 600px) {
	.sitespeaker-player {
		right: 12px;
		bottom: max(12px, env(safe-area-inset-bottom));
	}

	.sitespeaker-launch {
		width: 56px;
		min-width: 56px;
		height: 56px;
		padding: 0;
	}

	.sitespeaker-launch-label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
	}

	.sitespeaker-panel {
		width: auto;
		min-width: 0;
		max-width: calc(100vw - 200px);
		gap: 0;
		padding: 10px 12px;
	}

	.sitespeaker-copy {
		display: none;
	}

	.sitespeaker-actions {
		gap: 6px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sitespeaker-launch,
	.sitespeaker-reading {
		transition: none;
	}
}

@media print {
	.sitespeaker-player {
		display: none !important;
	}
}
