.c3ns {
	/* Colours come from the theme's own buttons (copied by next-steps.js).
	   These are fallbacks if no theme button is found. */
	--c3ns-accent: var(--c3ns-theme-bg, #1f2a44);
	--c3ns-on-accent: var(--c3ns-theme-fg, #ffffff);
	position: fixed;
	right: max(16px, env(safe-area-inset-right));
	bottom: max(16px, env(safe-area-inset-bottom));
	z-index: 9999;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 12px;
	font-family: var(--c3ns-theme-font, inherit);
	/* Hidden until the theme colours are applied, so it doesn't flash the
	   fallback colour. Shows anyway after 1.5s if the script never runs. */
	opacity: 0;
	animation: c3ns-show 0s 1.5s forwards;
}
.c3ns.is-ready { opacity: 1; animation: none; }
@keyframes c3ns-show { to { opacity: 1; } }
.c3ns__toggle {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	min-height: 96px;
	padding: 0 40px;
	border: 0;
	border-radius: 999px;
	background: var(--c3ns-accent);
	color: var(--c3ns-on-accent);
	font: inherit;
	font-family: var(--c3ns-theme-font, inherit);
	font-size: 32px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
	/* A wide button set in Settings never runs off a phone screen. */
	max-width: calc(100vw - 32px);
	overflow: hidden;
}
/* Keyboard focus ring in the theme's button colour (no yellow box for mouse/touch). */
.c3ns__toggle:focus { outline: none; }
.c3ns__toggle:focus-visible {
	outline: 3px solid var(--c3ns-accent);
	outline-offset: 3px;
}
.c3ns .c3ns__link:focus { outline: none; }
.c3ns .c3ns__link:focus-visible {
	outline: 3px solid var(--c3ns-accent);
	outline-offset: -3px;
}
.c3ns__icon { width: .875em; height: .875em; flex: none; transition: transform .2s ease; }
.c3ns__toggle[aria-expanded="true"] .c3ns__icon { transform: rotate(180deg); }
.c3ns__menu {
	margin: 0;
	padding: 6px;
	list-style: none;
	min-width: min(280px, calc(100vw - 32px));
	max-width: calc(100vw - 32px);
	background: #ffffff;
	border-radius: 12px;
	box-shadow: 0 8px 28px rgba(0, 0, 0, .2);
}
.c3ns__menu[hidden] { display: none; }
/* Extra .c3ns so theme link colours (hover/focus) don't override ours. */
.c3ns .c3ns__link,
.c3ns .c3ns__link:visited,
.c3ns .c3ns__link:hover,
.c3ns .c3ns__link:focus,
.c3ns .c3ns__link:active {
	color: #1a1a1a !important; /* some themes force link colours with !important */
	text-decoration: none;
	box-shadow: none;
}
.c3ns__link {
	display: block;
	padding: 16px 20px;
	border-radius: 8px;
	color: #1a1a1a;
	font-size: 22px;
	text-decoration: none;
}
.c3ns .c3ns__link:hover,
.c3ns .c3ns__link:focus-visible { background: #f1f2f5; }
@media (prefers-reduced-motion: reduce) {
	.c3ns__icon { transition: none; }
}
@media print {
	.c3ns { display: none; }
}
