/* Comments Mic: restrained labels and engagement controls that inherit the theme. */
:root {
	--comments-mic-accent: currentColor;
	--comments-mic-target: max(44px, 2.75rem);
	--comments-mic-border: color-mix(in srgb, currentColor 30%, transparent);
	--comments-mic-pressed-bg: color-mix(in srgb, currentColor 12%, transparent);
	--comments-mic-radius: 999px;
}

.comments-mic-attributed {
	border-inline-start: 3px solid var(--comments-mic-accent);
	padding-inline-start: 0.75rem;
}

.comments-mic-badge {
	display: inline-block;
	margin-inline-start: 0.4em;
	padding: 0.05em 0.6em;
	border: 1px solid var(--comments-mic-badge-border, var(--comments-mic-accent));
	border-radius: var(--comments-mic-radius);
	background: var(--comments-mic-badge-bg, transparent);
	color: var(--comments-mic-badge-text, inherit);
	font-size: 0.75em;
	font-weight: 600;
	letter-spacing: 0.02em;
	line-height: 1.6;
	vertical-align: middle;
	box-sizing: border-box;
	max-width: 100%;
	/* A long label wraps inside its pill instead of overflowing a narrow comment. */
	overflow-wrap: anywhere;
	hyphens: manual;
}

.comments-mic-engagement {
	margin-block-start: 0.5rem;
}

.comments-mic-engagement__form {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 0.5rem;
	margin: 0;
}

.comments-mic-engagement__group {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

.comments-mic-reaction-picker {
	inline-size: fit-content;
	max-inline-size: 100%;
	min-inline-size: 0;
}

.comments-mic-reaction-picker__toggle {
	display: flex;
	inline-size: fit-content;
	max-inline-size: 100%;
	align-items: center;
	gap: 0.35em;
	flex-wrap: wrap;
	box-sizing: border-box;
	min-height: var(--comments-mic-target);
	padding: 0.2rem 0.75rem;
	border: 1px solid var(--comments-mic-border);
	border-radius: var(--comments-mic-radius);
	font: inherit;
	font-size: 0.875em;
	list-style: none;
	cursor: pointer;
}

.comments-mic-reaction-picker__toggle::-webkit-details-marker {
	display: none;
}

.comments-mic-reaction-picker__toggle:focus-visible {
	outline: 2px solid var(--comments-mic-accent);
	outline-offset: 2px;
}

.comments-mic-reaction-picker__toggle[data-selected="true"] {
	background: var(--comments-mic-pressed-bg);
	border-color: var(--comments-mic-accent);
}

.comments-mic-reaction-picker__faces {
	display: inline-flex;
	align-items: center;
	flex: none;
	isolation: isolate;
	margin-inline-end: 0.2em;
}

.comments-mic-reaction-picker__face {
	/* Disc size, overlap with the previous disc, and the gap cut around it, in the face's
	   own em (the emoji's size). The emoji stays clear of the overlap, so no disc covers
	   the next emoji. */
	--comments-mic-face: 2.2em;
	--comments-mic-face-overlap: 0.4em;
	--comments-mic-face-gap: 2px;
	display: grid;
	place-items: center;
	box-sizing: border-box;
	inline-size: var(--comments-mic-face);
	block-size: var(--comments-mic-face);
	border-radius: 50%;
	background: color-mix(in srgb, currentColor 8%, transparent);
	font-size: 0.8em;
	line-height: 1;
}

/* Each later disc is cut where the disc before it overlaps, instead of being covered by an
   opaque ring in a guessed background colour: the gap shows whatever the comment sits on
   (white, The Modern Nonna's beige team card, a dark theme). */
.comments-mic-reaction-picker__face + .comments-mic-reaction-picker__face {
	--comments-mic-face-cut: radial-gradient(circle at calc(var(--comments-mic-face-overlap) - var(--comments-mic-face) / 2) 50%, transparent calc(var(--comments-mic-face) / 2 + var(--comments-mic-face-gap)), #000 calc(var(--comments-mic-face) / 2 + var(--comments-mic-face-gap) + 0.5px));
	margin-inline-start: calc(-1 * var(--comments-mic-face-overlap));
	-webkit-mask: var(--comments-mic-face-cut);
	mask: var(--comments-mic-face-cut);
}

.comments-mic-reaction-picker__face + .comments-mic-reaction-picker__face:dir(rtl) {
	--comments-mic-face-cut: radial-gradient(circle at calc(100% - var(--comments-mic-face-overlap) + var(--comments-mic-face) / 2) 50%, transparent calc(var(--comments-mic-face) / 2 + var(--comments-mic-face-gap)), #000 calc(var(--comments-mic-face) / 2 + var(--comments-mic-face-gap) + 0.5px));
}

.comments-mic-reaction-picker__face img.emoji {
	inline-size: 1em !important;
	block-size: 1em !important;
	margin: 0 !important;
}

.comments-mic-reaction-picker__total {
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	overflow-wrap: anywhere;
}

.comments-mic-reaction-picker__caret {
	font-size: 0.8em;
}

/* The closed picker names its action ("React") until someone has liked the comment;
   then the total speaks for it and "React" stays for assistive technology. A signed-in
   account's own reaction replaces the stack with that emoji and its name. */
.comments-mic-reaction-picker__label {
	font-weight: 600;
	overflow-wrap: anywhere;
}

.comments-mic-reaction-picker__toggle[data-likes]:not([data-likes="0"]):not([data-selected="true"]) .comments-mic-reaction-picker__label {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.comments-mic-reaction-picker__toggle[data-likes][data-selected="true"] .comments-mic-reaction-picker__faces,
.comments-mic-reaction-picker__mine[hidden],
.comments-mic-reaction-picker__total[hidden] {
	display: none;
}

.comments-mic-reaction-picker__toggle[data-selected="true"] .comments-mic-reaction-picker__total {
	font-weight: 400;
}

/* In-flow, bounded tray also works without JS and in narrow threaded replies. */
.comments-mic-reaction-picker__options {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(4.25rem, 100%), 1fr));
	inline-size: 16rem;
	max-inline-size: 100%;
	box-sizing: border-box;
	gap: 0.25rem;
	margin-block-start: 0.5rem;
	padding: 0.5rem;
	border: 1px solid var(--comments-mic-border);
	border-radius: 0.75rem;
}

.comments-mic-engagement__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.35em;
	box-sizing: border-box;
	min-width: var(--comments-mic-target);
	min-height: var(--comments-mic-target);
	padding: 0.2rem 0.75rem;
	border: 1px solid var(--comments-mic-border);
	border-radius: var(--comments-mic-radius);
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 0.875em;
	cursor: pointer;
}

/*
 * Themes often style every button (Twenty Twenty-One uses
 * button:not(:hover):not(:active):not(.has-background), specificity 0,3,1). These
 * controls inherit the theme's text color and font instead; the repeated class keeps
 * that independent of the theme's selector.
 */
.comments-mic-engagement .comments-mic-engagement__group .comments-mic-engagement__button.comments-mic-engagement__button {
	box-sizing: border-box;
	min-width: var(--comments-mic-target);
	min-height: var(--comments-mic-target);
	margin: 0;
	padding: 0.2rem 0.75rem;
	border: 1px solid var(--comments-mic-border);
	border-radius: var(--comments-mic-radius);
	background: transparent;
	color: inherit;
	font-family: inherit;
	font-size: 0.875em;
	font-weight: 400;
	line-height: 1.4;
	text-decoration: none;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
}

/* Keep the social tray's shape independent of a theme's general button rules. */
.comments-mic-engagement .comments-mic-reaction-picker__options .comments-mic-engagement__button.comments-mic-engagement__button {
	flex-direction: column;
	gap: 0.3rem;
	padding: 0.6rem 0.2rem;
	border-color: transparent;
	border-radius: 0.5rem;
	font-size: 0.75em;
	min-inline-size: var(--comments-mic-target);
	max-inline-size: 100%;
	overflow-wrap: anywhere;
}

.comments-mic-reaction-picker__options .comments-mic-engagement__emoji {
	font-size: 1.8em;
}

.comments-mic-reaction-picker__options .comments-mic-engagement__legacy {
	grid-column: 1 / -1;
	max-inline-size: 100%;
}

.comments-mic-engagement .comments-mic-engagement__group .comments-mic-engagement__button.comments-mic-engagement__button:hover {
	border-color: var(--comments-mic-accent);
}

.comments-mic-engagement .comments-mic-engagement__group .comments-mic-engagement__button.comments-mic-engagement__button:focus-visible {
	outline: 2px solid var(--comments-mic-accent);
	outline-offset: 2px;
}

.comments-mic-engagement .comments-mic-engagement__group .comments-mic-engagement__button.comments-mic-engagement__button[aria-pressed="true"] {
	border-color: var(--comments-mic-accent);
	background: var(--comments-mic-pressed-bg);
	font-weight: 600;
}

.comments-mic-engagement .comments-mic-engagement__group .comments-mic-engagement__button.comments-mic-engagement__button[aria-busy="true"] {
	opacity: 0.6;
	cursor: progress;
}

.comments-mic-engagement__emoji {
	font-size: 1.15em;
	line-height: 1;
}

.comments-mic-engagement__legacy {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.35em;
	box-sizing: border-box;
	min-width: var(--comments-mic-target);
	min-height: var(--comments-mic-target);
	padding: 0.2rem 0.75rem;
	border: 1px dashed var(--comments-mic-border);
	border-radius: var(--comments-mic-radius);
	font-size: 0.875em;
	line-height: 1.4;
}

/* Long names and unbroken words wrap inside the comment. Some themes keep
   overflow-wrap: normal, and an ancestor that hides overflow then cuts the end of a long
   word off at the screen edge (Little Figgy at 393px). Only breaks where a word does not fit. */
li[id^="comment-"] {
	overflow-wrap: anywhere;
}

/* The comment's own Reply link (or "Log in to Reply"), where the theme prints it, takes
   the same shape and text color as the votes and reactions just above it, so the
   comment's actions read as one set. Only shape and color change: the element, its
   place, destination and behavior are the theme's and WordPress's. (It is not moved into
   the controls row: a move after the page is shown shifts the comments below it.) */
li[id^="comment-"] :is(a.comment-reply-link, a.comment-reply-login) {
	padding: 0.2rem 0.75rem;
	border: 1px solid var(--comments-mic-border);
	border-radius: var(--comments-mic-radius);
	background: transparent;
	color: inherit;
	line-height: 1.4;
	text-decoration: none;
}

li[id^="comment-"] :is(a.comment-reply-link, a.comment-reply-login):hover {
	border-color: var(--comments-mic-accent);
	text-decoration: underline;
}

li[id^="comment-"] :is(a.comment-reply-link, a.comment-reply-login):focus-visible {
	outline: 2px solid var(--comments-mic-accent);
	outline-offset: 2px;
}

.comments-mic-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.comments-mic-engagement__count {
	font-variant-numeric: tabular-nums;
}

.comments-mic-engagement__status {
	margin: 0.25rem 0 0;
	font-size: 0.8125em;
}

/* Empty, the live region takes no space but stays in the page, so its first message is
   announced. */
.comments-mic-engagement__status:empty {
	margin: 0;
}

.comments-mic-sort {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem 0.75rem;
	margin-block: 0.75rem 1rem;
	font-size: 0.875em;
}

.comments-mic-sort__label {
	font-weight: 600;
	letter-spacing: 0.02em;
}

.comments-mic-sort__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
	margin: 0;
	padding: 0.25rem;
	list-style: none;
	border: 1px solid var(--comments-mic-border);
	border-radius: 1rem;
}

.comments-mic-sort__list a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-width: var(--comments-mic-target);
	min-height: var(--comments-mic-target);
	padding: 0 0.75rem;
	border: 1px solid transparent;
	border-radius: 0.75rem;
	color: inherit;
	text-decoration: none;
	overflow-wrap: anywhere;
}

.comments-mic-sort__list a:hover {
	text-decoration: underline;
}

.comments-mic-sort__list a[aria-current="true"] {
	background: var(--comments-mic-pressed-bg);
	font-weight: 600;
}

.comments-mic-sort__list a:focus-visible {
	outline: 2px solid var(--comments-mic-accent);
	outline-offset: 2px;
}

/* Pinned comment card: above the sort control, never a copy of the comment itself. */
.comments-mic-pinned {
	box-sizing: border-box;
	max-width: 100%;
	margin-block: 0.75rem 1rem;
	padding: 0.75rem 1rem;
	border: 1px solid var(--comments-mic-border);
	border-inline-start: 4px solid var(--comments-mic-accent);
	border-radius: 0.75rem;
	overflow-wrap: anywhere;
}

.comments-mic-pinned p {
	margin: 0;
}

.comments-mic-pinned__title {
	font-size: 0.8125em;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.comments-mic-pinned__author {
	margin-block-start: 0.375rem !important;
	font-weight: 600;
	letter-spacing: 0.01em;
}

.comments-mic-pinned__excerpt {
	margin-block-start: 0.25rem !important;
}

.comments-mic-pinned__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-block-start: 0.25rem !important;
}

.comments-mic-pinned__link,
.comments-mic-staff__unpin,
.comments-mic-staff__pin {
	display: inline-flex;
	align-items: center;
	box-sizing: border-box;
	min-height: var(--comments-mic-target);
	color: inherit;
	font: inherit;
	font-size: 0.875em;
}

.comments-mic-pinned__link {
	text-decoration: underline;
}

.comments-mic-staff__unpin,
.comments-mic-staff__pin {
	padding: 0 0.75rem;
	border: 1px dashed var(--comments-mic-border);
	border-radius: var(--comments-mic-radius);
	background: transparent;
	cursor: pointer;
}

.comments-mic-staff__pin[aria-pressed="true"] {
	background: var(--comments-mic-pressed-bg);
	border-style: solid;
}

.comments-mic-staff__pin:disabled,
.comments-mic-staff__unpin:disabled {
	cursor: progress;
	opacity: 0.6;
}

.comments-mic-pinned__link:focus-visible,
.comments-mic-staff__unpin:focus-visible,
.comments-mic-staff__pin:focus-visible {
	outline: 2px solid var(--comments-mic-accent);
	outline-offset: 2px;
}

.comments-mic-staff {
	margin-block-start: 0.5rem;
}

.comments-mic-burst {
	position: fixed;
	inset: 0;
	z-index: 99999;
	overflow: hidden;
	pointer-events: none;
}

.comments-mic-burst span {
	position: absolute;
	width: 8px;
	height: 12px;
	border-radius: 2px;
}

/*
 * Avatar ring for labelled comments: a shadow outside the image, so its size, shape and
 * the layout around it never change. Colors come from the inline label styles.
 */
.comments-mic-ring {
	box-shadow: 0 0 0 3px var(--comments-mic-ring, currentColor);
}

/*
 * Block themes (Twenty Twenty-Five) print core's avatar block in a no-wrap flex row beside the
 * comment body. There the engagement controls, badges, handles and a labelled comment's accent
 * left the avatar to give way, and a site rule that fixes the image's width and height (with
 * max-width: 100%) turned it oval. This stylesheet loads only on enhanced posts (instant posting
 * on or off). Inside core's comment template:
 * - the avatar keeps its own size and stays square (cropped, never stretched);
 * - the comment body takes the rest of the row, and moves below the avatar when its narrowest
 *   form (the 44 px controls) does not fit beside it; long unbroken words wrap inside it;
 * - on small screens a reply list (the list core prints directly inside a comment, never a list
 *   in the comment's text) indents by 0.75rem, so a reply at the deepest level still has the
 *   width of its own controls. Nesting, accents and every control stay as they are.
 */
.wp-block-comment-template .wp-block-avatar {
	flex-shrink: 0;
}

.wp-block-comment-template .wp-block-avatar img {
	height: auto;
	aspect-ratio: 1;
	object-fit: cover;
}

.wp-block-comment-template .is-nowrap:has(> .wp-block-avatar) {
	flex-wrap: wrap;
}

.wp-block-comment-template .is-nowrap > .wp-block-avatar + .wp-block-group {
	flex: 1 1 0%;
	max-width: 100%;
	/* A flex item's minimum is its longest unbroken word, and that minimum wins over
	   max-width: a long URL or word in a comment widened the whole page. Breaking only when
	   needed keeps the minimum at the 44 px controls, so the body still moves below the
	   avatar exactly when the controls do not fit beside it. */
	overflow-wrap: anywhere;
}

/*
 * Small screens, block and classic themes: each reply level indents by 0.75rem with a thin
 * rule along its left edge, so who replied to whom stays visible (some themes drop reply
 * indentation entirely on phones, others indent up to 100px a level) while a reply at the
 * deepest level keeps room for its text and controls. The theme's own reply list
 * indentation is replaced only below 601px and only on configured posts.
 */
@media (max-width: 600px) {
	.wp-block-comment-template li[id^="comment-"] > ol,
	.comment-list li[id^="comment-"] > ol.children {
		margin-inline-start: 0;
		padding-inline-start: 0.75rem;
		border-inline-start: 2px solid var(--comments-mic-border);
	}

	.comment-list li[id^="comment-"] > ol.children > li[id^="comment-"] {
		margin-inline-start: 0;
	}

	/* A labelled reply keeps its own padding beside its accent border. */
	.comment-list li[id^="comment-"] > ol.children > li[id^="comment-"]:not(.comments-mic-attributed) {
		padding-inline-start: 0;
	}

	/* Block themes print the avatar as a column beside the whole comment, which on a phone
	   costs every reply level the avatar's width again. Here the avatar sits beside the
	   date and name only, and the text and controls below it use the full width of their
	   level. The avatar keeps its size and shape. */
	.wp-block-comment-template li[id^="comment-"] .is-nowrap:has(> .wp-block-avatar) {
		display: flow-root;
	}

	.wp-block-comment-template li[id^="comment-"] .is-nowrap:has(> .wp-block-avatar) > .wp-block-avatar {
		float: inline-start;
		margin-block-end: 0.5rem;
		margin-inline-end: 0.75rem;
	}

	/* One face is enough to say "reactions" on a phone; the tray still lists them all. */
	.comments-mic-reaction-picker__faces > .comments-mic-reaction-picker__face:nth-child(n + 2) {
		display: none;
	}
}

/* Instagram link beside the commenter's name: a 44px target without changing the line. */
.comments-mic-instagram {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	max-width: 100%;
	/* A handle may break anywhere but never gains hyphens it does not have. */
	overflow-wrap: anywhere;
	hyphens: manual;
	min-width: var(--comments-mic-target);
	min-height: var(--comments-mic-target);
	margin-block: calc((1.5em - var(--comments-mic-target)) / 2);
	margin-inline-start: 0.4em;
	padding-inline: 0.25em;
	font-size: 0.875em;
	letter-spacing: 0.01em;
	vertical-align: middle;
}

.comments-mic-profile-link,
.comments-mic-instant-status {
	margin-block: 0.5rem;
	font-size: 0.875em;
}

/* The theme's own reply links on a configured post (this stylesheet is enqueued on
   configured discussion content only): the signed-in Reply link and the signed-out
   "Log in to Reply" link become a 44px target. The theme's type, colors, border, radius
   and the link's destination stay as they are; nothing is added in markup. */
[id^="comment-"] .comment-reply-link,
[id^="comment-"] .comment-reply-login {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: var(--comments-mic-target);
	min-height: var(--comments-mic-target);
}

/* A jump to the discussion, reply form or a specific comment scrolls
   clear of a sticky site header: the default clears a responsive header up to 112px (a
   pixel floor, so a small root font size cannot shrink it below the header; 7rem above
   that). The admin bar is WordPress's own scroll-padding on html, which adds to this; a
   theme with a taller sticky header sets the custom property. */
#comments,
#respond,
[id^="comment-"] {
	scroll-margin-block-start: var(--comments-mic-anchor-offset, max(112px, 7rem));
}

/* 44px targets that do not grow the line they sit in. */
.comments-mic-profile-link a,
.comments-mic-instant-status a {
	display: inline-flex;
	align-items: center;
	min-height: var(--comments-mic-target);
	margin-block: calc((1.5em - var(--comments-mic-target)) / 2);
	vertical-align: middle;
}

.comments-mic-instant-status:empty {
	margin: 0;
}

.comments-mic-instant-status[hidden] {
	display: none;
}

form[aria-busy="true"] [type="submit"] {
	opacity: 0.6;
	cursor: progress;
}

/* The author's own pending comment, visible only in their browser. */
.comments-mic-pending {
	margin-block: 1rem;
	padding: 0.75rem 1rem;
	border: 1px dashed var(--comments-mic-border);
	border-radius: 8px;
}

.comments-mic-pending p {
	margin-block: 0 0.5rem;
}

.comments-mic-pending__text {
	margin: 0;
	padding-inline-start: 0.75rem;
	border-inline-start: 3px solid var(--comments-mic-border);
}

.comments-mic-pending__text p:last-child {
	margin-block-end: 0;
}

/* Settings > Discussion: the scope fieldsets stay inside narrow admin viewports. */
.comments-mic-scope .regular-text {
	max-width: 100%;
}

.comments-mic-pilot-list {
	margin: 4px 0 0 1em;
	list-style: disc;
	overflow-wrap: anywhere;
}

/* Settings > Discussion label preview. */
.comments-mic-badge-settings__group {
	margin: 0 0 12px;
	padding: 8px 12px 4px;
	border: 1px solid #dcdcde;
}

.comments-mic-badge-settings__group legend {
	padding: 0 4px;
	font-weight: 600;
}

.comments-mic-badge-settings__group input[aria-invalid="true"] {
	border-color: #d63638;
}

.comments-mic-badge-preview__avatar {
	display: inline-block;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #c3c4c7;
	vertical-align: middle;
}

.comments-mic-badge-preview__name {
	margin-inline-start: 8px;
	font-weight: 600;
	vertical-align: middle;
}

.comments-mic-badge-contrast {
	margin: 4px 0 8px;
	font-weight: 600;
}

.comments-mic-badge-contrast:empty {
	margin: 0;
}

/* Keep the hit area and keyboard focus outline when the decorative border is hidden. */
.comments-mic-borderless-reactions .comments-mic-engagement__group .comments-mic-engagement__button.comments-mic-engagement__button[data-family="reaction"],
.comments-mic-borderless-reactions .comments-mic-engagement__legacy[data-family="reaction"] {
	border-color: transparent;
}

.comments-mic-borderless-reactions .comments-mic-reaction-picker__toggle {
	border-color: transparent;
}

/*
 * Opening and choosing a reaction. The tray grows open and fades in (and folds away when it
 * closes, where the browser can animate <details>), the toggle's colours ease between
 * states, the caret turns, and a new choice pops in. These animate a state change rather
 * than decorate, so they do not depend on the Animations setting; reduced motion removes
 * them. Browsers without ::details-content or interpolate-size open and close instantly.
 */
@media (prefers-reduced-motion: no-preference) {
	.comments-mic-reaction-picker {
		interpolate-size: allow-keywords;
	}

	.comments-mic-reaction-picker::details-content {
		block-size: 0;
		overflow-y: clip;
		transition: block-size 220ms cubic-bezier(0.2, 0, 0, 1), content-visibility 220ms allow-discrete;
	}

	.comments-mic-reaction-picker[open]::details-content {
		block-size: auto;
	}

	.comments-mic-reaction-picker__options {
		transform-origin: top left;
		transition: opacity 160ms ease, transform 220ms cubic-bezier(0.2, 0, 0, 1);
	}

	.comments-mic-reaction-picker:not([open]) .comments-mic-reaction-picker__options {
		opacity: 0;
		transform: translateY(-0.25rem) scale(0.98);
	}

	@starting-style {
		.comments-mic-reaction-picker[open] .comments-mic-reaction-picker__options {
			opacity: 0;
			transform: translateY(-0.25rem) scale(0.98);
		}
	}

	.comments-mic-reaction-picker__toggle,
	.comments-mic-reaction-picker__options .comments-mic-engagement__button {
		transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
	}

	.comments-mic-reaction-picker__caret {
		display: inline-block;
		transition: transform 200ms ease;
	}

	.comments-mic-reaction-picker[open] .comments-mic-reaction-picker__caret {
		transform: rotate(180deg);
	}

	.comments-mic-reaction-picker__options .comments-mic-engagement__emoji {
		display: inline-block;
		transition: transform 160ms cubic-bezier(0.3, 1.4, 0.6, 1);
	}

	.comments-mic-reaction-picker__options .comments-mic-engagement__button:active .comments-mic-engagement__emoji {
		transform: scale(0.88);
	}

	@media (hover: hover) {
		.comments-mic-reaction-picker__options .comments-mic-engagement__button:hover:not(:active) .comments-mic-engagement__emoji {
			transform: scale(1.12);
		}
	}

	/* engagement.js adds is-picked after a saved choice, not when a page loads. */
	.comments-mic-reaction-picker__mine.is-picked {
		animation: comments-mic-picked 320ms cubic-bezier(0.3, 1.5, 0.6, 1);
	}

	@keyframes comments-mic-picked {
		from {
			opacity: 0;
			transform: scale(0.4);
		}
	}
}

@media (prefers-reduced-motion: no-preference) {
	.comments-mic-animations :is(.comments-mic-engagement__button, .comments-mic-reaction-picker__toggle, .comments-mic-sort__list a, .comment-reply-link, #cancel-comment-reply-link, #commentform [type="submit"]) {
		transition: transform 140ms ease, opacity 140ms ease, background-color 160ms ease, border-color 160ms ease, color 160ms ease;
	}

	.comments-mic-animations :is(.comments-mic-engagement__button, .comments-mic-reaction-picker__toggle, .comments-mic-sort__list a, .comment-reply-link, #cancel-comment-reply-link, #commentform [type="submit"]):not(:disabled):not([aria-busy="true"]):active {
		transform: scale(0.96);
	}

	@media (hover: hover) {
		.comments-mic-animations :is(.comments-mic-engagement__button, .comments-mic-reaction-picker__toggle, .comments-mic-sort__list a, .comment-reply-link, #cancel-comment-reply-link, #commentform [type="submit"]):not(:disabled):not([aria-busy="true"]):hover:not(:active) {
			transform: translateY(-2px);
		}
	}
}

/* Staff-only notice after a pin error or an unconfirmed change (added by pin.js). */
.comments-mic-staff-notice {
	box-sizing: border-box;
	max-width: 100%;
	margin-block: 0.75rem;
	padding: 0.75rem 1rem;
	border: 2px solid currentColor;
	border-radius: 0.75rem;
	overflow-wrap: anywhere;
}

.comments-mic-staff-notice p {
	margin: 0;
}

.comments-mic-staff-notice__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-block-start: 0.5rem !important;
}

.comments-mic-staff__check,
.comments-mic-staff__reload {
	display: inline-flex;
	align-items: center;
	box-sizing: border-box;
	min-height: var(--comments-mic-target);
	padding: 0 0.75rem;
	border: 1px solid var(--comments-mic-border);
	border-radius: var(--comments-mic-radius);
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 0.875em;
	cursor: pointer;
}

.comments-mic-staff__check:focus-visible,
.comments-mic-staff__reload:focus-visible {
	outline: 2px solid var(--comments-mic-accent);
	outline-offset: 2px;
}

/*
 * Windows High Contrast and other forced color modes replace backgrounds and borders with
 * system colors, which would erase the tint that marks a chosen vote or reaction, the
 * current sort order and a pinned comment. Use the system selection colors instead.
 */
@media (forced-colors: active) {
	.comments-mic-engagement .comments-mic-engagement__group .comments-mic-engagement__button.comments-mic-engagement__button[aria-pressed="true"],
	.comments-mic-reaction-picker__toggle[data-selected="true"],
	.comments-mic-sort__list a[aria-current="true"],
	.comments-mic-staff__pin[aria-pressed="true"] {
		border-color: Highlight;
		background: Highlight;
		color: HighlightText;
		forced-color-adjust: none;
	}

	.comments-mic-borderless-reactions .comments-mic-engagement__group .comments-mic-engagement__button.comments-mic-engagement__button[data-family="reaction"],
	.comments-mic-borderless-reactions .comments-mic-reaction-picker__toggle {
		border-color: ButtonBorder;
	}
}
